generated-configure.sh revision 1447:db1867b7c4bb
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_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
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687COMPILER_SUPPORTS_TARGET_BITS_FLAG
688ZERO_ARCHFLAG
689LDFLAGS_TESTEXE_SUFFIX
690LDFLAGS_TESTLIB_SUFFIX
691LDFLAGS_TESTEXE
692LDFLAGS_TESTLIB
693LDFLAGS_CXX_JDK
694LDFLAGS_JDKEXE_SUFFIX
695LDFLAGS_JDKLIB_SUFFIX
696LDFLAGS_JDKEXE
697LDFLAGS_JDKLIB
698CXXFLAGS_TESTEXE
699CXXFLAGS_TESTLIB
700CFLAGS_TESTEXE
701CFLAGS_TESTLIB
702CXXFLAGS_JDKEXE
703CXXFLAGS_JDKLIB
704CFLAGS_JDKEXE
705CFLAGS_JDKLIB
706MACOSX_VERSION_MIN
707LEGACY_EXTRA_LDFLAGS
708LEGACY_EXTRA_CXXFLAGS
709LEGACY_EXTRA_CFLAGS
710CXX_O_FLAG_NONE
711CXX_O_FLAG_DEBUG
712CXX_O_FLAG_NORM
713CXX_O_FLAG_HI
714CXX_O_FLAG_HIGHEST
715C_O_FLAG_NONE
716C_O_FLAG_DEBUG
717C_O_FLAG_NORM
718C_O_FLAG_HI
719C_O_FLAG_HIGHEST
720CXXFLAGS_DEBUG_OPTIONS
721CFLAGS_DEBUG_OPTIONS
722CXXFLAGS_DEBUG_SYMBOLS
723CFLAGS_DEBUG_SYMBOLS
724CXX_FLAG_DEPS
725C_FLAG_DEPS
726SET_SHARED_LIBRARY_MAPFILE
727SET_SHARED_LIBRARY_NAME
728SET_SHARED_LIBRARY_ORIGIN
729SET_EXECUTABLE_ORIGIN
730SHARED_LIBRARY_FLAGS
731CXX_FLAG_REORDER
732C_FLAG_REORDER
733SYSROOT_LDFLAGS
734SYSROOT_CFLAGS
735RC_FLAGS
736AR_OUT_OPTION
737LD_OUT_OPTION
738EXE_OUT_OPTION
739CC_OUT_OPTION
740POST_MCS_CMD
741POST_STRIP_CMD
742ARFLAGS
743COMPILER_TARGET_BITS_FLAG
744JT_HOME
745JTREGEXE
746USING_BROKEN_SUSE_LD
747PACKAGE_PATH
748LDEXECXX
749LDEXE
750USE_CLANG
751HOTSPOT_LD
752HOTSPOT_CXX
753HOTSPOT_RC
754HOTSPOT_MT
755BUILD_LD
756BUILD_CXX
757BUILD_CC
758ac_ct_OBJDUMP
759OBJDUMP
760ac_ct_OBJCOPY
761OBJCOPY
762ac_ct_NM
763ac_ct_STRIP
764MCS
765GNM
766NM
767STRIP
768MSBUILD
769DUMPBIN
770RC
771MT
772LIPO
773ac_ct_AR
774AR
775AS
776LDCXX
777LD
778CXXCPP
779CPP
780ac_ct_CXX
781CXXFLAGS
782CXX
783ac_ct_PROPER_COMPILER_CXX
784PROPER_COMPILER_CXX
785TOOLCHAIN_PATH_CXX
786POTENTIAL_CXX
787OBJEXT
788EXEEXT
789ac_ct_CC
790CPPFLAGS
791LDFLAGS
792CFLAGS
793CC
794ac_ct_PROPER_COMPILER_CC
795PROPER_COMPILER_CC
796TOOLCHAIN_PATH_CC
797POTENTIAL_CC
798VS_LIB
799VS_INCLUDE
800VS_PATH
801CYGWIN_LINK
802EXE_SUFFIX
803OBJ_SUFFIX
804STATIC_LIBRARY
805SHARED_LIBRARY
806STATIC_LIBRARY_SUFFIX
807SHARED_LIBRARY_SUFFIX
808LIBRARY_PREFIX
809TOOLCHAIN_TYPE
810BUILD_HOTSPOT
811HOTSPOT_DIST
812BUILD_OUTPUT
813OVERRIDE_SRC_ROOT
814ADD_SRC_ROOT
815JDK_TOPDIR
816NASHORN_TOPDIR
817HOTSPOT_TOPDIR
818JAXWS_TOPDIR
819JAXP_TOPDIR
820CORBA_TOPDIR
821LANGTOOLS_TOPDIR
822JAVAC_FLAGS
823BOOT_JDK_SOURCETARGET
824JARSIGNER
825NATIVE2ASCII
826JAR
827JAVAH
828JAVAC
829JAVA
830BOOT_JDK
831JAVA_CHECK
832JAVAC_CHECK
833COOKED_BUILD_NUMBER
834JDK_VERSION
835COPYRIGHT_YEAR
836MACOSX_BUNDLE_ID_BASE
837MACOSX_BUNDLE_NAME_BASE
838COMPANY_NAME
839JDK_RC_PLATFORM_NAME
840PRODUCT_SUFFIX
841PRODUCT_NAME
842LAUNCHER_NAME
843MILESTONE
844JDK_BUILD_NUMBER
845JDK_UPDATE_VERSION
846JDK_MICRO_VERSION
847JDK_MINOR_VERSION
848JDK_MAJOR_VERSION
849USER_RELEASE_SUFFIX
850COMPRESS_JARS
851RMICONNECTOR_IIOP
852UNLIMITED_CRYPTO
853CACERTS_FILE
854TEST_IN_BUILD
855BUILD_HEADLESS
856SUPPORT_HEADFUL
857SUPPORT_HEADLESS
858BDEPS_FTP
859BDEPS_UNZIP
860OS_VERSION_MICRO
861OS_VERSION_MINOR
862OS_VERSION_MAJOR
863PKG_CONFIG
864BASH_ARGS
865CODESIGN
866XATTR
867DSYMUTIL
868IS_GNU_TIME
869TIME
870STAT
871HG
872READELF
873OTOOL
874LDD
875ZIP
876UNZIP
877FIND_DELETE
878OUTPUT_SYNC
879OUTPUT_SYNC_SUPPORTED
880MAKE
881CHECK_TOOLSDIR_MAKE
882CHECK_TOOLSDIR_GMAKE
883CHECK_MAKE
884CHECK_GMAKE
885PKGHANDLER
886CONFIGURESUPPORT_OUTPUTDIR
887OUTPUT_ROOT
888CONF_NAME
889SPEC
890SDKROOT
891XCODEBUILD
892BUILD_VARIANT_RELEASE
893DEBUG_CLASSFILES
894FASTDEBUG
895VARIANT
896DEBUG_LEVEL
897MACOSX_UNIVERSAL
898INCLUDE_SA
899JVM_VARIANT_CORE
900JVM_VARIANT_ZEROSHARK
901JVM_VARIANT_ZERO
902JVM_VARIANT_KERNEL
903JVM_VARIANT_MINIMAL1
904JVM_VARIANT_CLIENT
905JVM_VARIANT_SERVER
906JVM_VARIANTS
907JVM_INTERPRETER
908JDK_VARIANT
909SET_OPENJDK
910CANONICAL_TOPDIR
911ORIGINAL_TOPDIR
912TOPDIR
913PATH_SEP
914ZERO_ARCHDEF
915DEFINE_CROSS_COMPILE_ARCH
916LP64
917OPENJDK_TARGET_OS_EXPORT_DIR
918OPENJDK_TARGET_CPU_JLI_CFLAGS
919OPENJDK_TARGET_CPU_OSARCH
920OPENJDK_TARGET_CPU_ISADIR
921OPENJDK_TARGET_CPU_LIBDIR
922OPENJDK_TARGET_CPU_LEGACY_LIB
923OPENJDK_TARGET_CPU_LEGACY
924REQUIRED_OS_VERSION
925REQUIRED_OS_NAME
926COMPILE_TYPE
927OPENJDK_TARGET_CPU_ENDIAN
928OPENJDK_TARGET_CPU_BITS
929OPENJDK_TARGET_CPU_ARCH
930OPENJDK_TARGET_CPU
931OPENJDK_TARGET_OS_ENV
932OPENJDK_TARGET_OS_TYPE
933OPENJDK_TARGET_OS
934OPENJDK_BUILD_CPU_ENDIAN
935OPENJDK_BUILD_CPU_BITS
936OPENJDK_BUILD_CPU_ARCH
937OPENJDK_BUILD_CPU
938OPENJDK_BUILD_OS_ENV
939OPENJDK_BUILD_OS_TYPE
940OPENJDK_BUILD_OS
941OPENJDK_BUILD_AUTOCONF_NAME
942OPENJDK_TARGET_AUTOCONF_NAME
943target_os
944target_vendor
945target_cpu
946target
947host_os
948host_vendor
949host_cpu
950host
951build_os
952build_vendor
953build_cpu
954build
955CPIO
956SETFILE
957DF
958READLINK
959CYGPATH
960SED
961FGREP
962EGREP
963GREP
964AWK
965XARGS
966WHICH
967WC
968UNIQ
969UNAME
970TR
971TOUCH
972TEE
973TAR
974TAIL
975SORT
976SH
977RM
978PRINTF
979NAWK
980MV
981MKTEMP
982MKDIR
983LS
984LN
985HEAD
986FIND
987FILE
988EXPR
989ECHO
990DIRNAME
991DIFF
992DATE
993CUT
994CP
995COMM
996CMP
997CHMOD
998CAT
999BASH
1000BASENAME
1001DATE_WHEN_CONFIGURED
1002ORIGINAL_PATH
1003CONFIGURE_COMMAND_LINE
1004target_alias
1005host_alias
1006build_alias
1007LIBS
1008ECHO_T
1009ECHO_N
1010ECHO_C
1011DEFS
1012mandir
1013localedir
1014libdir
1015psdir
1016pdfdir
1017dvidir
1018htmldir
1019infodir
1020docdir
1021oldincludedir
1022includedir
1023localstatedir
1024sharedstatedir
1025sysconfdir
1026datadir
1027datarootdir
1028libexecdir
1029sbindir
1030bindir
1031program_transform_name
1032prefix
1033exec_prefix
1034PACKAGE_URL
1035PACKAGE_BUGREPORT
1036PACKAGE_STRING
1037PACKAGE_VERSION
1038PACKAGE_TARNAME
1039PACKAGE_NAME
1040PATH_SEPARATOR
1041SHELL'
1042ac_subst_files=''
1043ac_user_opts='
1044enable_option_checking
1045with_target_bits
1046enable_openjdk_only
1047with_custom_make_dir
1048with_jdk_variant
1049with_jvm_interpreter
1050with_jvm_variants
1051enable_debug
1052with_debug_level
1053with_devkit
1054with_sys_root
1055with_sysroot
1056with_tools_dir
1057with_toolchain_path
1058with_extra_path
1059with_sdk_name
1060with_conf_name
1061with_output_sync
1062with_builddeps_conf
1063with_builddeps_server
1064with_builddeps_dir
1065with_builddeps_group
1066enable_headful
1067enable_hotspot_test_in_build
1068with_cacerts_file
1069enable_unlimited_crypto
1070enable_rmiconnector_iiop
1071with_milestone
1072with_update_version
1073with_user_release_suffix
1074with_build_number
1075with_copyright_year
1076with_boot_jdk
1077with_add_source_root
1078with_override_source_root
1079with_adds_and_overrides
1080with_override_langtools
1081with_override_corba
1082with_override_jaxp
1083with_override_jaxws
1084with_override_hotspot
1085with_override_nashorn
1086with_override_jdk
1087with_import_hotspot
1088with_toolchain_type
1089with_toolchain_version
1090with_jtreg
1091with_extra_cflags
1092with_extra_cxxflags
1093with_extra_ldflags
1094enable_debug_symbols
1095enable_zip_debug_info
1096enable_native_coverage
1097with_x
1098with_cups
1099with_cups_include
1100with_freetype
1101with_freetype_include
1102with_freetype_lib
1103with_freetype_src
1104enable_freetype_bundling
1105with_alsa
1106with_alsa_include
1107with_alsa_lib
1108with_libjpeg
1109with_giflib
1110with_lcms
1111with_libpng
1112with_zlib
1113with_stdc__lib
1114with_msvcr_dll
1115with_msvcp_dll
1116with_dxsdk
1117with_dxsdk_lib
1118with_dxsdk_include
1119with_num_cores
1120with_memory_size
1121with_jobs
1122with_boot_jdk_jvmargs
1123with_sjavac_server_java
1124enable_sjavac
1125enable_precompiled_headers
1126enable_ccache
1127with_ccache_dir
1128'
1129      ac_precious_vars='build_alias
1130host_alias
1131target_alias
1132BASENAME
1133BASH
1134CAT
1135CHMOD
1136CMP
1137COMM
1138CP
1139CUT
1140DATE
1141DIFF
1142DIRNAME
1143ECHO
1144EXPR
1145FILE
1146FIND
1147HEAD
1148LN
1149LS
1150MKDIR
1151MKTEMP
1152MV
1153NAWK
1154PRINTF
1155RM
1156SH
1157SORT
1158TAIL
1159TAR
1160TEE
1161TOUCH
1162TR
1163UNAME
1164UNIQ
1165WC
1166WHICH
1167XARGS
1168AWK
1169GREP
1170EGREP
1171FGREP
1172SED
1173CYGPATH
1174READLINK
1175DF
1176SETFILE
1177CPIO
1178UNZIP
1179ZIP
1180LDD
1181OTOOL
1182READELF
1183HG
1184STAT
1185TIME
1186DSYMUTIL
1187XATTR
1188CODESIGN
1189PKG_CONFIG
1190JAVA
1191JAVAC
1192JAVAH
1193JAR
1194NATIVE2ASCII
1195JARSIGNER
1196CC
1197CFLAGS
1198LDFLAGS
1199LIBS
1200CPPFLAGS
1201CXX
1202CXXFLAGS
1203CCC
1204CPP
1205CXXCPP
1206AS
1207AR
1208LIPO
1209STRIP
1210NM
1211GNM
1212MCS
1213OBJCOPY
1214OBJDUMP
1215BUILD_CC
1216BUILD_CXX
1217BUILD_LD
1218JTREGEXE
1219XMKMF
1220FREETYPE_CFLAGS
1221FREETYPE_LIBS
1222ALSA_CFLAGS
1223ALSA_LIBS
1224LCMS_CFLAGS
1225LCMS_LIBS
1226PNG_CFLAGS
1227PNG_LIBS
1228LIBFFI_CFLAGS
1229LIBFFI_LIBS
1230CCACHE'
1231
1232
1233# Initialize some variables set by options.
1234ac_init_help=
1235ac_init_version=false
1236ac_unrecognized_opts=
1237ac_unrecognized_sep=
1238# The variables have the same names as the options, with
1239# dashes changed to underlines.
1240cache_file=/dev/null
1241exec_prefix=NONE
1242no_create=
1243no_recursion=
1244prefix=NONE
1245program_prefix=NONE
1246program_suffix=NONE
1247program_transform_name=s,x,x,
1248silent=
1249site=
1250srcdir=
1251verbose=
1252x_includes=NONE
1253x_libraries=NONE
1254
1255# Installation directory options.
1256# These are left unexpanded so users can "make install exec_prefix=/foo"
1257# and all the variables that are supposed to be based on exec_prefix
1258# by default will actually change.
1259# Use braces instead of parens because sh, perl, etc. also accept them.
1260# (The list follows the same order as the GNU Coding Standards.)
1261bindir='${exec_prefix}/bin'
1262sbindir='${exec_prefix}/sbin'
1263libexecdir='${exec_prefix}/libexec'
1264datarootdir='${prefix}/share'
1265datadir='${datarootdir}'
1266sysconfdir='${prefix}/etc'
1267sharedstatedir='${prefix}/com'
1268localstatedir='${prefix}/var'
1269includedir='${prefix}/include'
1270oldincludedir='/usr/include'
1271docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1272infodir='${datarootdir}/info'
1273htmldir='${docdir}'
1274dvidir='${docdir}'
1275pdfdir='${docdir}'
1276psdir='${docdir}'
1277libdir='${exec_prefix}/lib'
1278localedir='${datarootdir}/locale'
1279mandir='${datarootdir}/man'
1280
1281ac_prev=
1282ac_dashdash=
1283for ac_option
1284do
1285  # If the previous option needs an argument, assign it.
1286  if test -n "$ac_prev"; then
1287    eval $ac_prev=\$ac_option
1288    ac_prev=
1289    continue
1290  fi
1291
1292  case $ac_option in
1293  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1294  *=)   ac_optarg= ;;
1295  *)    ac_optarg=yes ;;
1296  esac
1297
1298  # Accept the important Cygnus configure options, so we can diagnose typos.
1299
1300  case $ac_dashdash$ac_option in
1301  --)
1302    ac_dashdash=yes ;;
1303
1304  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1305    ac_prev=bindir ;;
1306  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1307    bindir=$ac_optarg ;;
1308
1309  -build | --build | --buil | --bui | --bu)
1310    ac_prev=build_alias ;;
1311  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1312    build_alias=$ac_optarg ;;
1313
1314  -cache-file | --cache-file | --cache-fil | --cache-fi \
1315  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1316    ac_prev=cache_file ;;
1317  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1318  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1319    cache_file=$ac_optarg ;;
1320
1321  --config-cache | -C)
1322    cache_file=config.cache ;;
1323
1324  -datadir | --datadir | --datadi | --datad)
1325    ac_prev=datadir ;;
1326  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1327    datadir=$ac_optarg ;;
1328
1329  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1330  | --dataroo | --dataro | --datar)
1331    ac_prev=datarootdir ;;
1332  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1333  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1334    datarootdir=$ac_optarg ;;
1335
1336  -disable-* | --disable-*)
1337    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1338    # Reject names that are not valid shell variable names.
1339    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1340      as_fn_error $? "invalid feature name: $ac_useropt"
1341    ac_useropt_orig=$ac_useropt
1342    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1343    case $ac_user_opts in
1344      *"
1345"enable_$ac_useropt"
1346"*) ;;
1347      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1348	 ac_unrecognized_sep=', ';;
1349    esac
1350    eval enable_$ac_useropt=no ;;
1351
1352  -docdir | --docdir | --docdi | --doc | --do)
1353    ac_prev=docdir ;;
1354  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1355    docdir=$ac_optarg ;;
1356
1357  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1358    ac_prev=dvidir ;;
1359  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1360    dvidir=$ac_optarg ;;
1361
1362  -enable-* | --enable-*)
1363    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1364    # Reject names that are not valid shell variable names.
1365    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1366      as_fn_error $? "invalid feature name: $ac_useropt"
1367    ac_useropt_orig=$ac_useropt
1368    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1369    case $ac_user_opts in
1370      *"
1371"enable_$ac_useropt"
1372"*) ;;
1373      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1374	 ac_unrecognized_sep=', ';;
1375    esac
1376    eval enable_$ac_useropt=\$ac_optarg ;;
1377
1378  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1379  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1380  | --exec | --exe | --ex)
1381    ac_prev=exec_prefix ;;
1382  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1383  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1384  | --exec=* | --exe=* | --ex=*)
1385    exec_prefix=$ac_optarg ;;
1386
1387  -gas | --gas | --ga | --g)
1388    # Obsolete; use --with-gas.
1389    with_gas=yes ;;
1390
1391  -help | --help | --hel | --he | -h)
1392    ac_init_help=long ;;
1393  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1394    ac_init_help=recursive ;;
1395  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1396    ac_init_help=short ;;
1397
1398  -host | --host | --hos | --ho)
1399    ac_prev=host_alias ;;
1400  -host=* | --host=* | --hos=* | --ho=*)
1401    host_alias=$ac_optarg ;;
1402
1403  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1404    ac_prev=htmldir ;;
1405  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1406  | --ht=*)
1407    htmldir=$ac_optarg ;;
1408
1409  -includedir | --includedir | --includedi | --included | --include \
1410  | --includ | --inclu | --incl | --inc)
1411    ac_prev=includedir ;;
1412  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1413  | --includ=* | --inclu=* | --incl=* | --inc=*)
1414    includedir=$ac_optarg ;;
1415
1416  -infodir | --infodir | --infodi | --infod | --info | --inf)
1417    ac_prev=infodir ;;
1418  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1419    infodir=$ac_optarg ;;
1420
1421  -libdir | --libdir | --libdi | --libd)
1422    ac_prev=libdir ;;
1423  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1424    libdir=$ac_optarg ;;
1425
1426  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1427  | --libexe | --libex | --libe)
1428    ac_prev=libexecdir ;;
1429  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1430  | --libexe=* | --libex=* | --libe=*)
1431    libexecdir=$ac_optarg ;;
1432
1433  -localedir | --localedir | --localedi | --localed | --locale)
1434    ac_prev=localedir ;;
1435  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1436    localedir=$ac_optarg ;;
1437
1438  -localstatedir | --localstatedir | --localstatedi | --localstated \
1439  | --localstate | --localstat | --localsta | --localst | --locals)
1440    ac_prev=localstatedir ;;
1441  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1442  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1443    localstatedir=$ac_optarg ;;
1444
1445  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1446    ac_prev=mandir ;;
1447  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1448    mandir=$ac_optarg ;;
1449
1450  -nfp | --nfp | --nf)
1451    # Obsolete; use --without-fp.
1452    with_fp=no ;;
1453
1454  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1455  | --no-cr | --no-c | -n)
1456    no_create=yes ;;
1457
1458  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1459  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1460    no_recursion=yes ;;
1461
1462  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1463  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1464  | --oldin | --oldi | --old | --ol | --o)
1465    ac_prev=oldincludedir ;;
1466  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1467  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1468  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1469    oldincludedir=$ac_optarg ;;
1470
1471  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1472    ac_prev=prefix ;;
1473  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1474    prefix=$ac_optarg ;;
1475
1476  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1477  | --program-pre | --program-pr | --program-p)
1478    ac_prev=program_prefix ;;
1479  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1480  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1481    program_prefix=$ac_optarg ;;
1482
1483  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1484  | --program-suf | --program-su | --program-s)
1485    ac_prev=program_suffix ;;
1486  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1487  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1488    program_suffix=$ac_optarg ;;
1489
1490  -program-transform-name | --program-transform-name \
1491  | --program-transform-nam | --program-transform-na \
1492  | --program-transform-n | --program-transform- \
1493  | --program-transform | --program-transfor \
1494  | --program-transfo | --program-transf \
1495  | --program-trans | --program-tran \
1496  | --progr-tra | --program-tr | --program-t)
1497    ac_prev=program_transform_name ;;
1498  -program-transform-name=* | --program-transform-name=* \
1499  | --program-transform-nam=* | --program-transform-na=* \
1500  | --program-transform-n=* | --program-transform-=* \
1501  | --program-transform=* | --program-transfor=* \
1502  | --program-transfo=* | --program-transf=* \
1503  | --program-trans=* | --program-tran=* \
1504  | --progr-tra=* | --program-tr=* | --program-t=*)
1505    program_transform_name=$ac_optarg ;;
1506
1507  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1508    ac_prev=pdfdir ;;
1509  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1510    pdfdir=$ac_optarg ;;
1511
1512  -psdir | --psdir | --psdi | --psd | --ps)
1513    ac_prev=psdir ;;
1514  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1515    psdir=$ac_optarg ;;
1516
1517  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1518  | -silent | --silent | --silen | --sile | --sil)
1519    silent=yes ;;
1520
1521  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1522    ac_prev=sbindir ;;
1523  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1524  | --sbi=* | --sb=*)
1525    sbindir=$ac_optarg ;;
1526
1527  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1528  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1529  | --sharedst | --shareds | --shared | --share | --shar \
1530  | --sha | --sh)
1531    ac_prev=sharedstatedir ;;
1532  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1533  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1534  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1535  | --sha=* | --sh=*)
1536    sharedstatedir=$ac_optarg ;;
1537
1538  -site | --site | --sit)
1539    ac_prev=site ;;
1540  -site=* | --site=* | --sit=*)
1541    site=$ac_optarg ;;
1542
1543  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1544    ac_prev=srcdir ;;
1545  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1546    srcdir=$ac_optarg ;;
1547
1548  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1549  | --syscon | --sysco | --sysc | --sys | --sy)
1550    ac_prev=sysconfdir ;;
1551  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1552  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1553    sysconfdir=$ac_optarg ;;
1554
1555  -target | --target | --targe | --targ | --tar | --ta | --t)
1556    ac_prev=target_alias ;;
1557  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1558    target_alias=$ac_optarg ;;
1559
1560  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1561    verbose=yes ;;
1562
1563  -version | --version | --versio | --versi | --vers | -V)
1564    ac_init_version=: ;;
1565
1566  -with-* | --with-*)
1567    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1568    # Reject names that are not valid shell variable names.
1569    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1570      as_fn_error $? "invalid package name: $ac_useropt"
1571    ac_useropt_orig=$ac_useropt
1572    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1573    case $ac_user_opts in
1574      *"
1575"with_$ac_useropt"
1576"*) ;;
1577      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1578	 ac_unrecognized_sep=', ';;
1579    esac
1580    eval with_$ac_useropt=\$ac_optarg ;;
1581
1582  -without-* | --without-*)
1583    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1584    # Reject names that are not valid shell variable names.
1585    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1586      as_fn_error $? "invalid package name: $ac_useropt"
1587    ac_useropt_orig=$ac_useropt
1588    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1589    case $ac_user_opts in
1590      *"
1591"with_$ac_useropt"
1592"*) ;;
1593      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1594	 ac_unrecognized_sep=', ';;
1595    esac
1596    eval with_$ac_useropt=no ;;
1597
1598  --x)
1599    # Obsolete; use --with-x.
1600    with_x=yes ;;
1601
1602  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1603  | --x-incl | --x-inc | --x-in | --x-i)
1604    ac_prev=x_includes ;;
1605  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1606  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1607    x_includes=$ac_optarg ;;
1608
1609  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1610  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1611    ac_prev=x_libraries ;;
1612  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1613  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1614    x_libraries=$ac_optarg ;;
1615
1616  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1617Try \`$0 --help' for more information"
1618    ;;
1619
1620  *=*)
1621    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1622    # Reject names that are not valid shell variable names.
1623    case $ac_envvar in #(
1624      '' | [0-9]* | *[!_$as_cr_alnum]* )
1625      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1626    esac
1627    eval $ac_envvar=\$ac_optarg
1628    export $ac_envvar ;;
1629
1630  *)
1631    # FIXME: should be removed in autoconf 3.0.
1632    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1633    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1634      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1635    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1636    ;;
1637
1638  esac
1639done
1640
1641if test -n "$ac_prev"; then
1642  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1643  as_fn_error $? "missing argument to $ac_option"
1644fi
1645
1646if test -n "$ac_unrecognized_opts"; then
1647  case $enable_option_checking in
1648    no) ;;
1649    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1650    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1651  esac
1652fi
1653
1654# Check all directory arguments for consistency.
1655for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1656		datadir sysconfdir sharedstatedir localstatedir includedir \
1657		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1658		libdir localedir mandir
1659do
1660  eval ac_val=\$$ac_var
1661  # Remove trailing slashes.
1662  case $ac_val in
1663    */ )
1664      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1665      eval $ac_var=\$ac_val;;
1666  esac
1667  # Be sure to have absolute directory names.
1668  case $ac_val in
1669    [\\/$]* | ?:[\\/]* )  continue;;
1670    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1671  esac
1672  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1673done
1674
1675# There might be people who depend on the old broken behavior: `$host'
1676# used to hold the argument of --host etc.
1677# FIXME: To remove some day.
1678build=$build_alias
1679host=$host_alias
1680target=$target_alias
1681
1682# FIXME: To remove some day.
1683if test "x$host_alias" != x; then
1684  if test "x$build_alias" = x; then
1685    cross_compiling=maybe
1686  elif test "x$build_alias" != "x$host_alias"; then
1687    cross_compiling=yes
1688  fi
1689fi
1690
1691ac_tool_prefix=
1692test -n "$host_alias" && ac_tool_prefix=$host_alias-
1693
1694test "$silent" = yes && exec 6>/dev/null
1695
1696
1697ac_pwd=`pwd` && test -n "$ac_pwd" &&
1698ac_ls_di=`ls -di .` &&
1699ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1700  as_fn_error $? "working directory cannot be determined"
1701test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1702  as_fn_error $? "pwd does not report name of working directory"
1703
1704
1705# Find the source files, if location was not specified.
1706if test -z "$srcdir"; then
1707  ac_srcdir_defaulted=yes
1708  # Try the directory containing this script, then the parent directory.
1709  ac_confdir=`$as_dirname -- "$as_myself" ||
1710$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1711	 X"$as_myself" : 'X\(//\)[^/]' \| \
1712	 X"$as_myself" : 'X\(//\)$' \| \
1713	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1714$as_echo X"$as_myself" |
1715    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\/\)[^/].*/{
1720	    s//\1/
1721	    q
1722	  }
1723	  /^X\(\/\/\)$/{
1724	    s//\1/
1725	    q
1726	  }
1727	  /^X\(\/\).*/{
1728	    s//\1/
1729	    q
1730	  }
1731	  s/.*/./; q'`
1732  srcdir=$ac_confdir
1733  if test ! -r "$srcdir/$ac_unique_file"; then
1734    srcdir=..
1735  fi
1736else
1737  ac_srcdir_defaulted=no
1738fi
1739if test ! -r "$srcdir/$ac_unique_file"; then
1740  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1741  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1742fi
1743ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1744ac_abs_confdir=`(
1745	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1746	pwd)`
1747# When building in place, set srcdir=.
1748if test "$ac_abs_confdir" = "$ac_pwd"; then
1749  srcdir=.
1750fi
1751# Remove unnecessary trailing slashes from srcdir.
1752# Double slashes in file names in object file debugging info
1753# mess up M-x gdb in Emacs.
1754case $srcdir in
1755*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1756esac
1757for ac_var in $ac_precious_vars; do
1758  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1759  eval ac_env_${ac_var}_value=\$${ac_var}
1760  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1761  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1762done
1763
1764#
1765# Report the --help message.
1766#
1767if test "$ac_init_help" = "long"; then
1768  # Omit some internal or obsolete options to make the list less imposing.
1769  # This message is too long to be a string in the A/UX 3.1 sh.
1770  cat <<_ACEOF
1771\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1772
1773Usage: $0 [OPTION]... [VAR=VALUE]...
1774
1775To assign environment variables (e.g., CC, CFLAGS...), specify them as
1776VAR=VALUE.  See below for descriptions of some of the useful variables.
1777
1778Defaults for the options are specified in brackets.
1779
1780Configuration:
1781  -h, --help              display this help and exit
1782      --help=short        display options specific to this package
1783      --help=recursive    display the short help of all the included packages
1784  -V, --version           display version information and exit
1785  -q, --quiet, --silent   do not print \`checking ...' messages
1786      --cache-file=FILE   cache test results in FILE [disabled]
1787  -C, --config-cache      alias for \`--cache-file=config.cache'
1788  -n, --no-create         do not create output files
1789      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1790
1791Installation directories:
1792  --prefix=PREFIX         install architecture-independent files in PREFIX
1793                          [$ac_default_prefix]
1794  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1795                          [PREFIX]
1796
1797By default, \`make install' will install all the files in
1798\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1799an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1800for instance \`--prefix=\$HOME'.
1801
1802For better control, use the options below.
1803
1804Fine tuning of the installation directories:
1805  --bindir=DIR            user executables [EPREFIX/bin]
1806  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1807  --libexecdir=DIR        program executables [EPREFIX/libexec]
1808  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1809  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1810  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1811  --libdir=DIR            object code libraries [EPREFIX/lib]
1812  --includedir=DIR        C header files [PREFIX/include]
1813  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1814  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1815  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1816  --infodir=DIR           info documentation [DATAROOTDIR/info]
1817  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1818  --mandir=DIR            man documentation [DATAROOTDIR/man]
1819  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1820  --htmldir=DIR           html documentation [DOCDIR]
1821  --dvidir=DIR            dvi documentation [DOCDIR]
1822  --pdfdir=DIR            pdf documentation [DOCDIR]
1823  --psdir=DIR             ps documentation [DOCDIR]
1824_ACEOF
1825
1826  cat <<\_ACEOF
1827
1828X features:
1829  --x-includes=DIR    X include files are in DIR
1830  --x-libraries=DIR   X library files are in DIR
1831
1832System types:
1833  --build=BUILD     configure for building on BUILD [guessed]
1834  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1835  --target=TARGET   configure for building compilers for TARGET [HOST]
1836_ACEOF
1837fi
1838
1839if test -n "$ac_init_help"; then
1840  case $ac_init_help in
1841     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1842   esac
1843  cat <<\_ACEOF
1844
1845Optional Features:
1846  --disable-option-checking  ignore unrecognized --enable/--with options
1847  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1848  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1849  --enable-openjdk-only   suppress building custom source even if present
1850                          [disabled]
1851  --enable-debug          set the debug level to fastdebug (shorthand for
1852                          --with-debug-level=fastdebug) [disabled]
1853  --disable-headful       disable building headful support (graphical UI
1854                          support) [enabled]
1855  --enable-hotspot-test-in-build
1856                          run the Queens test after Hotspot build [disabled]
1857  --enable-unlimited-crypto
1858                          Enable unlimited crypto policy [disabled]
1859  --enable-rmiconnector-iiop
1860                          enable the JMX RMIConnector iiop transport
1861                          [disabled]
1862  --disable-debug-symbols disable generation of debug symbols [enabled]
1863  --disable-zip-debug-info
1864                          disable zipping of debug-info files [enabled]
1865  --enable-native-coverage
1866                          enable native compilation with code coverage
1867                          data[disabled]
1868  --disable-freetype-bundling
1869                          disable bundling of the freetype library with the
1870                          build result [enabled on Windows or when using
1871                          --with-freetype, disabled otherwise]
1872  --enable-sjavac         use sjavac to do fast incremental compiles
1873                          [disabled]
1874  --disable-precompiled-headers
1875                          disable using precompiled headers when compiling C++
1876                          [enabled]
1877  --enable-ccache         enable using ccache to speed up recompilations
1878                          [disabled]
1879
1880Optional Packages:
1881  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1882  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1883  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1884                          support it), e.g. --with-target-bits=32 [guessed]
1885  --with-custom-make-dir  Deprecated. Option is kept for backwards
1886                          compatibility and is ignored
1887  --with-jdk-variant      JDK variant to build (normal) [normal]
1888  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1889  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1890                          client, minimal1, kernel, zero, zeroshark, core)
1891                          [server]
1892  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1893                          optimized (HotSpot build only)) [release]
1894  --with-devkit           use this devkit for compilers, tools and resources
1895  --with-sys-root         alias for --with-sysroot for backwards compatability
1896  --with-sysroot          use this directory as sysroot
1897  --with-tools-dir        alias for --with-toolchain-path for backwards
1898                          compatibility
1899  --with-toolchain-path   prepend these directories when searching for
1900                          toolchain binaries (compilers etc)
1901  --with-extra-path       prepend these directories to the default path
1902  --with-sdk-name         use the platform SDK of the given name. [macosx]
1903  --with-conf-name        use this as the name of the configuration [generated
1904                          from important configuration options]
1905  --with-output-sync      set make output sync type if supported by make.
1906                          [recurse]
1907  --with-builddeps-conf   use this configuration file for the builddeps
1908  --with-builddeps-server download and use build dependencies from this server
1909                          url
1910  --with-builddeps-dir    store downloaded build dependencies here
1911                          [/localhome/builddeps]
1912  --with-builddeps-group  chgrp the downloaded build dependencies to this
1913                          group
1914  --with-cacerts-file     specify alternative cacerts file
1915  --with-milestone        Set milestone value for build [internal]
1916  --with-update-version   Set update version value for build [b00]
1917  --with-user-release-suffix
1918                          Add a custom string to the version string if build
1919                          number is not set.[username_builddateb00]
1920  --with-build-number     Set build number value for build [b00]
1921  --with-copyright-year   Set copyright year value for build [current year]
1922  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1923  --with-add-source-root  for each and every source directory, look in this
1924                          additional source root for the same directory; if it
1925                          exists and have files in it, include it in the build
1926  --with-override-source-root
1927                          for each and every source directory, look in this
1928                          override source root for the same directory; if it
1929                          exists, use that directory instead and ignore the
1930                          directory in the original source root
1931  --with-adds-and-overrides
1932                          use the subdirs 'adds' and 'overrides' in the
1933                          specified directory as add-source-root and
1934                          override-source-root
1935  --with-override-langtools
1936                          use this langtools dir for the build
1937  --with-override-corba   use this corba dir for the build
1938  --with-override-jaxp    use this jaxp dir for the build
1939  --with-override-jaxws   use this jaxws dir for the build
1940  --with-override-hotspot use this hotspot dir for the build
1941  --with-override-nashorn use this nashorn dir for the build
1942  --with-override-jdk     use this jdk dir for the build
1943  --with-import-hotspot   import hotspot binaries from this jdk image or
1944                          hotspot build dist dir instead of building from
1945                          source
1946  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1947                          to show possible values [platform dependent]
1948  --with-toolchain-version
1949                          the version of the toolchain to look for, use
1950                          '--help' to show possible values [platform
1951                          dependent]
1952  --with-jtreg            Regression Test Harness [probed]
1953  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1954  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1955  --with-extra-ldflags    extra flags to be used when linking jdk
1956  --with-x                use the X Window System
1957  --with-cups             specify prefix directory for the cups package
1958                          (expecting the headers under PATH/include)
1959  --with-cups-include     specify directory for the cups include files
1960  --with-freetype         specify prefix directory for the freetype package
1961                          (expecting the libraries under PATH/lib and the
1962                          headers under PATH/include)
1963  --with-freetype-include specify directory for the freetype include files
1964  --with-freetype-lib     specify directory for the freetype library
1965  --with-freetype-src     specify directory with freetype sources to
1966                          automatically build the library (experimental,
1967                          Windows-only)
1968  --with-alsa             specify prefix directory for the alsa package
1969                          (expecting the libraries under PATH/lib and the
1970                          headers under PATH/include)
1971  --with-alsa-include     specify directory for the alsa include files
1972  --with-alsa-lib         specify directory for the alsa library
1973  --with-libjpeg          use libjpeg from build system or OpenJDK source
1974                          (system, bundled) [bundled]
1975  --with-giflib           use giflib from build system or OpenJDK source
1976                          (system, bundled) [bundled]
1977  --with-lcms             use lcms2 from build system or OpenJDK source
1978                          (system, bundled) [bundled]
1979  --with-libpng           use libpng from build system or OpenJDK source
1980                          (system, bundled) [bundled]
1981  --with-zlib             use zlib from build system or OpenJDK source
1982                          (system, bundled) [bundled]
1983  --with-stdc++lib=<static>,<dynamic>,<default>
1984                          force linking of the C++ runtime on Linux to either
1985                          static or dynamic, default is static with dynamic as
1986                          fallback
1987  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1988                          (Windows only) [probed]
1989  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1990                          (Windows only) [probed]
1991  --with-dxsdk            Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --with-dxsdk-include    Deprecated. Option is kept for backwards
1996                          compatibility and is ignored
1997  --with-num-cores        number of cores in the build system, e.g.
1998                          --with-num-cores=8 [probed]
1999  --with-memory-size      memory (in MB) available in the build system, e.g.
2000                          --with-memory-size=1024 [probed]
2001  --with-jobs             number of parallel jobs to let make run [calculated
2002                          based on cores and memory]
2003  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2004                          invocations of boot JDK, overriding the default
2005                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2006                          -enableassertions"
2007  --with-sjavac-server-java
2008                          use this java binary for running the sjavac
2009                          background server [Boot JDK java]
2010  --with-ccache-dir       where to store ccache files [~/.ccache]
2011
2012Some influential environment variables:
2013  BASENAME    Override default value for BASENAME
2014  BASH        Override default value for BASH
2015  CAT         Override default value for CAT
2016  CHMOD       Override default value for CHMOD
2017  CMP         Override default value for CMP
2018  COMM        Override default value for COMM
2019  CP          Override default value for CP
2020  CUT         Override default value for CUT
2021  DATE        Override default value for DATE
2022  DIFF        Override default value for DIFF
2023  DIRNAME     Override default value for DIRNAME
2024  ECHO        Override default value for ECHO
2025  EXPR        Override default value for EXPR
2026  FILE        Override default value for FILE
2027  FIND        Override default value for FIND
2028  HEAD        Override default value for HEAD
2029  LN          Override default value for LN
2030  LS          Override default value for LS
2031  MKDIR       Override default value for MKDIR
2032  MKTEMP      Override default value for MKTEMP
2033  MV          Override default value for MV
2034  NAWK        Override default value for NAWK
2035  PRINTF      Override default value for PRINTF
2036  RM          Override default value for RM
2037  SH          Override default value for SH
2038  SORT        Override default value for SORT
2039  TAIL        Override default value for TAIL
2040  TAR         Override default value for TAR
2041  TEE         Override default value for TEE
2042  TOUCH       Override default value for TOUCH
2043  TR          Override default value for TR
2044  UNAME       Override default value for UNAME
2045  UNIQ        Override default value for UNIQ
2046  WC          Override default value for WC
2047  WHICH       Override default value for WHICH
2048  XARGS       Override default value for XARGS
2049  AWK         Override default value for AWK
2050  GREP        Override default value for GREP
2051  EGREP       Override default value for EGREP
2052  FGREP       Override default value for FGREP
2053  SED         Override default value for SED
2054  CYGPATH     Override default value for CYGPATH
2055  READLINK    Override default value for READLINK
2056  DF          Override default value for DF
2057  SETFILE     Override default value for SETFILE
2058  CPIO        Override default value for CPIO
2059  UNZIP       Override default value for UNZIP
2060  ZIP         Override default value for ZIP
2061  LDD         Override default value for LDD
2062  OTOOL       Override default value for OTOOL
2063  READELF     Override default value for READELF
2064  HG          Override default value for HG
2065  STAT        Override default value for STAT
2066  TIME        Override default value for TIME
2067  DSYMUTIL    Override default value for DSYMUTIL
2068  XATTR       Override default value for XATTR
2069  CODESIGN    Override default value for CODESIGN
2070  PKG_CONFIG  path to pkg-config utility
2071  JAVA        Override default value for JAVA
2072  JAVAC       Override default value for JAVAC
2073  JAVAH       Override default value for JAVAH
2074  JAR         Override default value for JAR
2075  NATIVE2ASCII
2076              Override default value for NATIVE2ASCII
2077  JARSIGNER   Override default value for JARSIGNER
2078  CC          C compiler command
2079  CFLAGS      C compiler flags
2080  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2081              nonstandard directory <lib dir>
2082  LIBS        libraries to pass to the linker, e.g. -l<library>
2083  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2084              you have headers in a nonstandard directory <include dir>
2085  CXX         C++ compiler command
2086  CXXFLAGS    C++ compiler flags
2087  CPP         C preprocessor
2088  CXXCPP      C++ preprocessor
2089  AS          Override default value for AS
2090  AR          Override default value for AR
2091  LIPO        Override default value for LIPO
2092  STRIP       Override default value for STRIP
2093  NM          Override default value for NM
2094  GNM         Override default value for GNM
2095  MCS         Override default value for MCS
2096  OBJCOPY     Override default value for OBJCOPY
2097  OBJDUMP     Override default value for OBJDUMP
2098  BUILD_CC    Override default value for BUILD_CC
2099  BUILD_CXX   Override default value for BUILD_CXX
2100  BUILD_LD    Override default value for BUILD_LD
2101  JTREGEXE    Override default value for JTREGEXE
2102  XMKMF       Path to xmkmf, Makefile generator for X Window System
2103  FREETYPE_CFLAGS
2104              C compiler flags for FREETYPE, overriding pkg-config
2105  FREETYPE_LIBS
2106              linker flags for FREETYPE, overriding pkg-config
2107  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2108  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2109  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2110  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2111  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2112  PNG_LIBS    linker flags for PNG, overriding pkg-config
2113  LIBFFI_CFLAGS
2114              C compiler flags for LIBFFI, overriding pkg-config
2115  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2116  CCACHE      Override default value for CCACHE
2117
2118Use these variables to override the choices made by `configure' or to help
2119it to find libraries and programs with nonstandard names/locations.
2120
2121Report bugs to <build-dev@openjdk.java.net>.
2122OpenJDK home page: <http://openjdk.java.net>.
2123_ACEOF
2124ac_status=$?
2125fi
2126
2127if test "$ac_init_help" = "recursive"; then
2128  # If there are subdirs, report their specific --help.
2129  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2130    test -d "$ac_dir" ||
2131      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2132      continue
2133    ac_builddir=.
2134
2135case "$ac_dir" in
2136.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2137*)
2138  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2139  # A ".." for each directory in $ac_dir_suffix.
2140  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2141  case $ac_top_builddir_sub in
2142  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2143  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2144  esac ;;
2145esac
2146ac_abs_top_builddir=$ac_pwd
2147ac_abs_builddir=$ac_pwd$ac_dir_suffix
2148# for backward compatibility:
2149ac_top_builddir=$ac_top_build_prefix
2150
2151case $srcdir in
2152  .)  # We are building in place.
2153    ac_srcdir=.
2154    ac_top_srcdir=$ac_top_builddir_sub
2155    ac_abs_top_srcdir=$ac_pwd ;;
2156  [\\/]* | ?:[\\/]* )  # Absolute name.
2157    ac_srcdir=$srcdir$ac_dir_suffix;
2158    ac_top_srcdir=$srcdir
2159    ac_abs_top_srcdir=$srcdir ;;
2160  *) # Relative name.
2161    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2162    ac_top_srcdir=$ac_top_build_prefix$srcdir
2163    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2164esac
2165ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2166
2167    cd "$ac_dir" || { ac_status=$?; continue; }
2168    # Check for guested configure.
2169    if test -f "$ac_srcdir/configure.gnu"; then
2170      echo &&
2171      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2172    elif test -f "$ac_srcdir/configure"; then
2173      echo &&
2174      $SHELL "$ac_srcdir/configure" --help=recursive
2175    else
2176      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2177    fi || ac_status=$?
2178    cd "$ac_pwd" || { ac_status=$?; break; }
2179  done
2180fi
2181
2182test -n "$ac_init_help" && exit $ac_status
2183if $ac_init_version; then
2184  cat <<\_ACEOF
2185OpenJDK configure jdk9
2186generated by GNU Autoconf 2.69
2187
2188Copyright (C) 2012 Free Software Foundation, Inc.
2189This configure script is free software; the Free Software Foundation
2190gives unlimited permission to copy, distribute and modify it.
2191_ACEOF
2192  exit
2193fi
2194
2195## ------------------------ ##
2196## Autoconf initialization. ##
2197## ------------------------ ##
2198
2199# ac_fn_c_try_compile LINENO
2200# --------------------------
2201# Try to compile conftest.$ac_ext, and return whether this succeeded.
2202ac_fn_c_try_compile ()
2203{
2204  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205  rm -f conftest.$ac_objext
2206  if { { ac_try="$ac_compile"
2207case "(($ac_try" in
2208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2209  *) ac_try_echo=$ac_try;;
2210esac
2211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2212$as_echo "$ac_try_echo"; } >&5
2213  (eval "$ac_compile") 2>conftest.err
2214  ac_status=$?
2215  if test -s conftest.err; then
2216    grep -v '^ *+' conftest.err >conftest.er1
2217    cat conftest.er1 >&5
2218    mv -f conftest.er1 conftest.err
2219  fi
2220  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2221  test $ac_status = 0; } && {
2222	 test -z "$ac_c_werror_flag" ||
2223	 test ! -s conftest.err
2224       } && test -s conftest.$ac_objext; then :
2225  ac_retval=0
2226else
2227  $as_echo "$as_me: failed program was:" >&5
2228sed 's/^/| /' conftest.$ac_ext >&5
2229
2230	ac_retval=1
2231fi
2232  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233  as_fn_set_status $ac_retval
2234
2235} # ac_fn_c_try_compile
2236
2237# ac_fn_cxx_try_compile LINENO
2238# ----------------------------
2239# Try to compile conftest.$ac_ext, and return whether this succeeded.
2240ac_fn_cxx_try_compile ()
2241{
2242  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243  rm -f conftest.$ac_objext
2244  if { { ac_try="$ac_compile"
2245case "(($ac_try" in
2246  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2247  *) ac_try_echo=$ac_try;;
2248esac
2249eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2250$as_echo "$ac_try_echo"; } >&5
2251  (eval "$ac_compile") 2>conftest.err
2252  ac_status=$?
2253  if test -s conftest.err; then
2254    grep -v '^ *+' conftest.err >conftest.er1
2255    cat conftest.er1 >&5
2256    mv -f conftest.er1 conftest.err
2257  fi
2258  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2259  test $ac_status = 0; } && {
2260	 test -z "$ac_cxx_werror_flag" ||
2261	 test ! -s conftest.err
2262       } && test -s conftest.$ac_objext; then :
2263  ac_retval=0
2264else
2265  $as_echo "$as_me: failed program was:" >&5
2266sed 's/^/| /' conftest.$ac_ext >&5
2267
2268	ac_retval=1
2269fi
2270  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2271  as_fn_set_status $ac_retval
2272
2273} # ac_fn_cxx_try_compile
2274
2275# ac_fn_c_try_cpp LINENO
2276# ----------------------
2277# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2278ac_fn_c_try_cpp ()
2279{
2280  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281  if { { ac_try="$ac_cpp conftest.$ac_ext"
2282case "(($ac_try" in
2283  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2284  *) ac_try_echo=$ac_try;;
2285esac
2286eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2287$as_echo "$ac_try_echo"; } >&5
2288  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2289  ac_status=$?
2290  if test -s conftest.err; then
2291    grep -v '^ *+' conftest.err >conftest.er1
2292    cat conftest.er1 >&5
2293    mv -f conftest.er1 conftest.err
2294  fi
2295  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2296  test $ac_status = 0; } > conftest.i && {
2297	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2298	 test ! -s conftest.err
2299       }; then :
2300  ac_retval=0
2301else
2302  $as_echo "$as_me: failed program was:" >&5
2303sed 's/^/| /' conftest.$ac_ext >&5
2304
2305    ac_retval=1
2306fi
2307  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2308  as_fn_set_status $ac_retval
2309
2310} # ac_fn_c_try_cpp
2311
2312# ac_fn_cxx_try_cpp LINENO
2313# ------------------------
2314# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2315ac_fn_cxx_try_cpp ()
2316{
2317  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2318  if { { ac_try="$ac_cpp conftest.$ac_ext"
2319case "(($ac_try" in
2320  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2321  *) ac_try_echo=$ac_try;;
2322esac
2323eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2324$as_echo "$ac_try_echo"; } >&5
2325  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2326  ac_status=$?
2327  if test -s conftest.err; then
2328    grep -v '^ *+' conftest.err >conftest.er1
2329    cat conftest.er1 >&5
2330    mv -f conftest.er1 conftest.err
2331  fi
2332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2333  test $ac_status = 0; } > conftest.i && {
2334	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2335	 test ! -s conftest.err
2336       }; then :
2337  ac_retval=0
2338else
2339  $as_echo "$as_me: failed program was:" >&5
2340sed 's/^/| /' conftest.$ac_ext >&5
2341
2342    ac_retval=1
2343fi
2344  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2345  as_fn_set_status $ac_retval
2346
2347} # ac_fn_cxx_try_cpp
2348
2349# ac_fn_c_try_link LINENO
2350# -----------------------
2351# Try to link conftest.$ac_ext, and return whether this succeeded.
2352ac_fn_c_try_link ()
2353{
2354  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355  rm -f conftest.$ac_objext conftest$ac_exeext
2356  if { { ac_try="$ac_link"
2357case "(($ac_try" in
2358  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2359  *) ac_try_echo=$ac_try;;
2360esac
2361eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2362$as_echo "$ac_try_echo"; } >&5
2363  (eval "$ac_link") 2>conftest.err
2364  ac_status=$?
2365  if test -s conftest.err; then
2366    grep -v '^ *+' conftest.err >conftest.er1
2367    cat conftest.er1 >&5
2368    mv -f conftest.er1 conftest.err
2369  fi
2370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2371  test $ac_status = 0; } && {
2372	 test -z "$ac_c_werror_flag" ||
2373	 test ! -s conftest.err
2374       } && test -s conftest$ac_exeext && {
2375	 test "$cross_compiling" = yes ||
2376	 test -x conftest$ac_exeext
2377       }; then :
2378  ac_retval=0
2379else
2380  $as_echo "$as_me: failed program was:" >&5
2381sed 's/^/| /' conftest.$ac_ext >&5
2382
2383	ac_retval=1
2384fi
2385  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2386  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2387  # interfere with the next link command; also delete a directory that is
2388  # left behind by Apple's compiler.  We do this before executing the actions.
2389  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2390  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2391  as_fn_set_status $ac_retval
2392
2393} # ac_fn_c_try_link
2394
2395# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2396# ---------------------------------------------------------
2397# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2398# the include files in INCLUDES and setting the cache variable VAR
2399# accordingly.
2400ac_fn_cxx_check_header_mongrel ()
2401{
2402  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403  if eval \${$3+:} false; then :
2404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2405$as_echo_n "checking for $2... " >&6; }
2406if eval \${$3+:} false; then :
2407  $as_echo_n "(cached) " >&6
2408fi
2409eval ac_res=\$$3
2410	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411$as_echo "$ac_res" >&6; }
2412else
2413  # Is the header compilable?
2414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2415$as_echo_n "checking $2 usability... " >&6; }
2416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417/* end confdefs.h.  */
2418$4
2419#include <$2>
2420_ACEOF
2421if ac_fn_cxx_try_compile "$LINENO"; then :
2422  ac_header_compiler=yes
2423else
2424  ac_header_compiler=no
2425fi
2426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2428$as_echo "$ac_header_compiler" >&6; }
2429
2430# Is the header present?
2431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2432$as_echo_n "checking $2 presence... " >&6; }
2433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h.  */
2435#include <$2>
2436_ACEOF
2437if ac_fn_cxx_try_cpp "$LINENO"; then :
2438  ac_header_preproc=yes
2439else
2440  ac_header_preproc=no
2441fi
2442rm -f conftest.err conftest.i conftest.$ac_ext
2443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2444$as_echo "$ac_header_preproc" >&6; }
2445
2446# So?  What about this header?
2447case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2448  yes:no: )
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2450$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2452$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2453    ;;
2454  no:yes:* )
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2456$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2458$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2460$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2461    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2462$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2464$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2465( $as_echo "## ----------------------------------------- ##
2466## Report this to build-dev@openjdk.java.net ##
2467## ----------------------------------------- ##"
2468     ) | sed "s/^/$as_me: WARNING:     /" >&2
2469    ;;
2470esac
2471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2472$as_echo_n "checking for $2... " >&6; }
2473if eval \${$3+:} false; then :
2474  $as_echo_n "(cached) " >&6
2475else
2476  eval "$3=\$ac_header_compiler"
2477fi
2478eval ac_res=\$$3
2479	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2480$as_echo "$ac_res" >&6; }
2481fi
2482  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483
2484} # ac_fn_cxx_check_header_mongrel
2485
2486# ac_fn_cxx_try_run LINENO
2487# ------------------------
2488# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2489# that executables *can* be run.
2490ac_fn_cxx_try_run ()
2491{
2492  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2493  if { { ac_try="$ac_link"
2494case "(($ac_try" in
2495  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2496  *) ac_try_echo=$ac_try;;
2497esac
2498eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2499$as_echo "$ac_try_echo"; } >&5
2500  (eval "$ac_link") 2>&5
2501  ac_status=$?
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2504  { { case "(($ac_try" in
2505  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2506  *) ac_try_echo=$ac_try;;
2507esac
2508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2509$as_echo "$ac_try_echo"; } >&5
2510  (eval "$ac_try") 2>&5
2511  ac_status=$?
2512  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2513  test $ac_status = 0; }; }; then :
2514  ac_retval=0
2515else
2516  $as_echo "$as_me: program exited with status $ac_status" >&5
2517       $as_echo "$as_me: failed program was:" >&5
2518sed 's/^/| /' conftest.$ac_ext >&5
2519
2520       ac_retval=$ac_status
2521fi
2522  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2523  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524  as_fn_set_status $ac_retval
2525
2526} # ac_fn_cxx_try_run
2527
2528# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2529# ---------------------------------------------------------
2530# Tests whether HEADER exists and can be compiled using the include files in
2531# INCLUDES, setting the cache variable VAR accordingly.
2532ac_fn_cxx_check_header_compile ()
2533{
2534  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2536$as_echo_n "checking for $2... " >&6; }
2537if eval \${$3+:} false; then :
2538  $as_echo_n "(cached) " >&6
2539else
2540  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2541/* end confdefs.h.  */
2542$4
2543#include <$2>
2544_ACEOF
2545if ac_fn_cxx_try_compile "$LINENO"; then :
2546  eval "$3=yes"
2547else
2548  eval "$3=no"
2549fi
2550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2551fi
2552eval ac_res=\$$3
2553	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2554$as_echo "$ac_res" >&6; }
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556
2557} # ac_fn_cxx_check_header_compile
2558
2559# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2560# ----------------------------------------------
2561# Tries to find the compile-time value of EXPR in a program that includes
2562# INCLUDES, setting VAR accordingly. Returns whether the value could be
2563# computed
2564ac_fn_cxx_compute_int ()
2565{
2566  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567  if test "$cross_compiling" = yes; then
2568    # Depending upon the size, compute the lo and hi bounds.
2569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570/* end confdefs.h.  */
2571$4
2572int
2573main ()
2574{
2575static int test_array [1 - 2 * !(($2) >= 0)];
2576test_array [0] = 0;
2577return test_array [0];
2578
2579  ;
2580  return 0;
2581}
2582_ACEOF
2583if ac_fn_cxx_try_compile "$LINENO"; then :
2584  ac_lo=0 ac_mid=0
2585  while :; do
2586    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2587/* end confdefs.h.  */
2588$4
2589int
2590main ()
2591{
2592static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2593test_array [0] = 0;
2594return test_array [0];
2595
2596  ;
2597  return 0;
2598}
2599_ACEOF
2600if ac_fn_cxx_try_compile "$LINENO"; then :
2601  ac_hi=$ac_mid; break
2602else
2603  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2604			if test $ac_lo -le $ac_mid; then
2605			  ac_lo= ac_hi=
2606			  break
2607			fi
2608			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611  done
2612else
2613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616int
2617main ()
2618{
2619static int test_array [1 - 2 * !(($2) < 0)];
2620test_array [0] = 0;
2621return test_array [0];
2622
2623  ;
2624  return 0;
2625}
2626_ACEOF
2627if ac_fn_cxx_try_compile "$LINENO"; then :
2628  ac_hi=-1 ac_mid=-1
2629  while :; do
2630    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631/* end confdefs.h.  */
2632$4
2633int
2634main ()
2635{
2636static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2637test_array [0] = 0;
2638return test_array [0];
2639
2640  ;
2641  return 0;
2642}
2643_ACEOF
2644if ac_fn_cxx_try_compile "$LINENO"; then :
2645  ac_lo=$ac_mid; break
2646else
2647  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2648			if test $ac_mid -le $ac_hi; then
2649			  ac_lo= ac_hi=
2650			  break
2651			fi
2652			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2653fi
2654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2655  done
2656else
2657  ac_lo= ac_hi=
2658fi
2659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2660fi
2661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2662# Binary search between lo and hi bounds.
2663while test "x$ac_lo" != "x$ac_hi"; do
2664  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2666/* end confdefs.h.  */
2667$4
2668int
2669main ()
2670{
2671static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2672test_array [0] = 0;
2673return test_array [0];
2674
2675  ;
2676  return 0;
2677}
2678_ACEOF
2679if ac_fn_cxx_try_compile "$LINENO"; then :
2680  ac_hi=$ac_mid
2681else
2682  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2683fi
2684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2685done
2686case $ac_lo in #((
2687?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2688'') ac_retval=1 ;;
2689esac
2690  else
2691    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692/* end confdefs.h.  */
2693$4
2694static long int longval () { return $2; }
2695static unsigned long int ulongval () { return $2; }
2696#include <stdio.h>
2697#include <stdlib.h>
2698int
2699main ()
2700{
2701
2702  FILE *f = fopen ("conftest.val", "w");
2703  if (! f)
2704    return 1;
2705  if (($2) < 0)
2706    {
2707      long int i = longval ();
2708      if (i != ($2))
2709	return 1;
2710      fprintf (f, "%ld", i);
2711    }
2712  else
2713    {
2714      unsigned long int i = ulongval ();
2715      if (i != ($2))
2716	return 1;
2717      fprintf (f, "%lu", i);
2718    }
2719  /* Do not output a trailing newline, as this causes \r\n confusion
2720     on some platforms.  */
2721  return ferror (f) || fclose (f) != 0;
2722
2723  ;
2724  return 0;
2725}
2726_ACEOF
2727if ac_fn_cxx_try_run "$LINENO"; then :
2728  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2729else
2730  ac_retval=1
2731fi
2732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2733  conftest.$ac_objext conftest.beam conftest.$ac_ext
2734rm -f conftest.val
2735
2736  fi
2737  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2738  as_fn_set_status $ac_retval
2739
2740} # ac_fn_cxx_compute_int
2741
2742# ac_fn_cxx_try_link LINENO
2743# -------------------------
2744# Try to link conftest.$ac_ext, and return whether this succeeded.
2745ac_fn_cxx_try_link ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  rm -f conftest.$ac_objext conftest$ac_exeext
2749  if { { ac_try="$ac_link"
2750case "(($ac_try" in
2751  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2752  *) ac_try_echo=$ac_try;;
2753esac
2754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2755$as_echo "$ac_try_echo"; } >&5
2756  (eval "$ac_link") 2>conftest.err
2757  ac_status=$?
2758  if test -s conftest.err; then
2759    grep -v '^ *+' conftest.err >conftest.er1
2760    cat conftest.er1 >&5
2761    mv -f conftest.er1 conftest.err
2762  fi
2763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2764  test $ac_status = 0; } && {
2765	 test -z "$ac_cxx_werror_flag" ||
2766	 test ! -s conftest.err
2767       } && test -s conftest$ac_exeext && {
2768	 test "$cross_compiling" = yes ||
2769	 test -x conftest$ac_exeext
2770       }; then :
2771  ac_retval=0
2772else
2773  $as_echo "$as_me: failed program was:" >&5
2774sed 's/^/| /' conftest.$ac_ext >&5
2775
2776	ac_retval=1
2777fi
2778  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2779  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2780  # interfere with the next link command; also delete a directory that is
2781  # left behind by Apple's compiler.  We do this before executing the actions.
2782  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2783  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2784  as_fn_set_status $ac_retval
2785
2786} # ac_fn_cxx_try_link
2787
2788# ac_fn_cxx_check_func LINENO FUNC VAR
2789# ------------------------------------
2790# Tests whether FUNC exists, setting the cache variable VAR accordingly
2791ac_fn_cxx_check_func ()
2792{
2793  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2795$as_echo_n "checking for $2... " >&6; }
2796if eval \${$3+:} false; then :
2797  $as_echo_n "(cached) " >&6
2798else
2799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h.  */
2801/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2802   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2803#define $2 innocuous_$2
2804
2805/* System header to define __stub macros and hopefully few prototypes,
2806    which can conflict with char $2 (); below.
2807    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2808    <limits.h> exists even on freestanding compilers.  */
2809
2810#ifdef __STDC__
2811# include <limits.h>
2812#else
2813# include <assert.h>
2814#endif
2815
2816#undef $2
2817
2818/* Override any GCC internal prototype to avoid an error.
2819   Use char because int might match the return type of a GCC
2820   builtin and then its argument prototype would still apply.  */
2821#ifdef __cplusplus
2822extern "C"
2823#endif
2824char $2 ();
2825/* The GNU C library defines this for functions which it implements
2826    to always fail with ENOSYS.  Some functions are actually named
2827    something starting with __ and the normal name is an alias.  */
2828#if defined __stub_$2 || defined __stub___$2
2829choke me
2830#endif
2831
2832int
2833main ()
2834{
2835return $2 ();
2836  ;
2837  return 0;
2838}
2839_ACEOF
2840if ac_fn_cxx_try_link "$LINENO"; then :
2841  eval "$3=yes"
2842else
2843  eval "$3=no"
2844fi
2845rm -f core conftest.err conftest.$ac_objext \
2846    conftest$ac_exeext conftest.$ac_ext
2847fi
2848eval ac_res=\$$3
2849	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2850$as_echo "$ac_res" >&6; }
2851  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2852
2853} # ac_fn_cxx_check_func
2854
2855# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2856# -------------------------------------------------------
2857# Tests whether HEADER exists and can be compiled using the include files in
2858# INCLUDES, setting the cache variable VAR accordingly.
2859ac_fn_c_check_header_compile ()
2860{
2861  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2863$as_echo_n "checking for $2... " >&6; }
2864if eval \${$3+:} false; then :
2865  $as_echo_n "(cached) " >&6
2866else
2867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2868/* end confdefs.h.  */
2869$4
2870#include <$2>
2871_ACEOF
2872if ac_fn_c_try_compile "$LINENO"; then :
2873  eval "$3=yes"
2874else
2875  eval "$3=no"
2876fi
2877rm -f core conftest.err conftest.$ac_objext 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_c_check_header_compile
2885cat >config.log <<_ACEOF
2886This file contains any messages produced by compilers while
2887running configure, to aid debugging if configure makes a mistake.
2888
2889It was created by OpenJDK $as_me jdk9, which was
2890generated by GNU Autoconf 2.69.  Invocation command line was
2891
2892  $ $0 $@
2893
2894_ACEOF
2895exec 5>>config.log
2896{
2897cat <<_ASUNAME
2898## --------- ##
2899## Platform. ##
2900## --------- ##
2901
2902hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2903uname -m = `(uname -m) 2>/dev/null || echo unknown`
2904uname -r = `(uname -r) 2>/dev/null || echo unknown`
2905uname -s = `(uname -s) 2>/dev/null || echo unknown`
2906uname -v = `(uname -v) 2>/dev/null || echo unknown`
2907
2908/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2909/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2910
2911/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2912/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2913/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2914/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2915/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2916/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2917/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2918
2919_ASUNAME
2920
2921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2922for as_dir in $PATH
2923do
2924  IFS=$as_save_IFS
2925  test -z "$as_dir" && as_dir=.
2926    $as_echo "PATH: $as_dir"
2927  done
2928IFS=$as_save_IFS
2929
2930} >&5
2931
2932cat >&5 <<_ACEOF
2933
2934
2935## ----------- ##
2936## Core tests. ##
2937## ----------- ##
2938
2939_ACEOF
2940
2941
2942# Keep a trace of the command line.
2943# Strip out --no-create and --no-recursion so they do not pile up.
2944# Strip out --silent because we don't want to record it for future runs.
2945# Also quote any args containing shell meta-characters.
2946# Make two passes to allow for proper duplicate-argument suppression.
2947ac_configure_args=
2948ac_configure_args0=
2949ac_configure_args1=
2950ac_must_keep_next=false
2951for ac_pass in 1 2
2952do
2953  for ac_arg
2954  do
2955    case $ac_arg in
2956    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2957    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2958    | -silent | --silent | --silen | --sile | --sil)
2959      continue ;;
2960    *\'*)
2961      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2962    esac
2963    case $ac_pass in
2964    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2965    2)
2966      as_fn_append ac_configure_args1 " '$ac_arg'"
2967      if test $ac_must_keep_next = true; then
2968	ac_must_keep_next=false # Got value, back to normal.
2969      else
2970	case $ac_arg in
2971	  *=* | --config-cache | -C | -disable-* | --disable-* \
2972	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2973	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2974	  | -with-* | --with-* | -without-* | --without-* | --x)
2975	    case "$ac_configure_args0 " in
2976	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2977	    esac
2978	    ;;
2979	  -* ) ac_must_keep_next=true ;;
2980	esac
2981      fi
2982      as_fn_append ac_configure_args " '$ac_arg'"
2983      ;;
2984    esac
2985  done
2986done
2987{ ac_configure_args0=; unset ac_configure_args0;}
2988{ ac_configure_args1=; unset ac_configure_args1;}
2989
2990# When interrupted or exit'd, cleanup temporary files, and complete
2991# config.log.  We remove comments because anyway the quotes in there
2992# would cause problems or look ugly.
2993# WARNING: Use '\'' to represent an apostrophe within the trap.
2994# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2995trap 'exit_status=$?
2996  # Save into config.log some information that might help in debugging.
2997  {
2998    echo
2999
3000    $as_echo "## ---------------- ##
3001## Cache variables. ##
3002## ---------------- ##"
3003    echo
3004    # The following way of writing the cache mishandles newlines in values,
3005(
3006  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3007    eval ac_val=\$$ac_var
3008    case $ac_val in #(
3009    *${as_nl}*)
3010      case $ac_var in #(
3011      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3012$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3013      esac
3014      case $ac_var in #(
3015      _ | IFS | as_nl) ;; #(
3016      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3017      *) { eval $ac_var=; unset $ac_var;} ;;
3018      esac ;;
3019    esac
3020  done
3021  (set) 2>&1 |
3022    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3023    *${as_nl}ac_space=\ *)
3024      sed -n \
3025	"s/'\''/'\''\\\\'\'''\''/g;
3026	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3027      ;; #(
3028    *)
3029      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3030      ;;
3031    esac |
3032    sort
3033)
3034    echo
3035
3036    $as_echo "## ----------------- ##
3037## Output variables. ##
3038## ----------------- ##"
3039    echo
3040    for ac_var in $ac_subst_vars
3041    do
3042      eval ac_val=\$$ac_var
3043      case $ac_val in
3044      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3045      esac
3046      $as_echo "$ac_var='\''$ac_val'\''"
3047    done | sort
3048    echo
3049
3050    if test -n "$ac_subst_files"; then
3051      $as_echo "## ------------------- ##
3052## File substitutions. ##
3053## ------------------- ##"
3054      echo
3055      for ac_var in $ac_subst_files
3056      do
3057	eval ac_val=\$$ac_var
3058	case $ac_val in
3059	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3060	esac
3061	$as_echo "$ac_var='\''$ac_val'\''"
3062      done | sort
3063      echo
3064    fi
3065
3066    if test -s confdefs.h; then
3067      $as_echo "## ----------- ##
3068## confdefs.h. ##
3069## ----------- ##"
3070      echo
3071      cat confdefs.h
3072      echo
3073    fi
3074    test "$ac_signal" != 0 &&
3075      $as_echo "$as_me: caught signal $ac_signal"
3076    $as_echo "$as_me: exit $exit_status"
3077  } >&5
3078  rm -f core *.core core.conftest.* &&
3079    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3080    exit $exit_status
3081' 0
3082for ac_signal in 1 2 13 15; do
3083  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3084done
3085ac_signal=0
3086
3087# confdefs.h avoids OS command line length limits that DEFS can exceed.
3088rm -f -r conftest* confdefs.h
3089
3090$as_echo "/* confdefs.h */" > confdefs.h
3091
3092# Predefined preprocessor variables.
3093
3094cat >>confdefs.h <<_ACEOF
3095#define PACKAGE_NAME "$PACKAGE_NAME"
3096_ACEOF
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_VERSION "$PACKAGE_VERSION"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_STRING "$PACKAGE_STRING"
3108_ACEOF
3109
3110cat >>confdefs.h <<_ACEOF
3111#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3112_ACEOF
3113
3114cat >>confdefs.h <<_ACEOF
3115#define PACKAGE_URL "$PACKAGE_URL"
3116_ACEOF
3117
3118
3119# Let the site file select an alternate cache file if it wants to.
3120# Prefer an explicitly selected file to automatically selected ones.
3121ac_site_file1=NONE
3122ac_site_file2=NONE
3123if test -n "$CONFIG_SITE"; then
3124  # We do not want a PATH search for config.site.
3125  case $CONFIG_SITE in #((
3126    -*)  ac_site_file1=./$CONFIG_SITE;;
3127    */*) ac_site_file1=$CONFIG_SITE;;
3128    *)   ac_site_file1=./$CONFIG_SITE;;
3129  esac
3130elif test "x$prefix" != xNONE; then
3131  ac_site_file1=$prefix/share/config.site
3132  ac_site_file2=$prefix/etc/config.site
3133else
3134  ac_site_file1=$ac_default_prefix/share/config.site
3135  ac_site_file2=$ac_default_prefix/etc/config.site
3136fi
3137for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3138do
3139  test "x$ac_site_file" = xNONE && continue
3140  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3141    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3142$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3143    sed 's/^/| /' "$ac_site_file" >&5
3144    . "$ac_site_file" \
3145      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3147as_fn_error $? "failed to load site script $ac_site_file
3148See \`config.log' for more details" "$LINENO" 5; }
3149  fi
3150done
3151
3152if test -r "$cache_file"; then
3153  # Some versions of bash will fail to source /dev/null (special files
3154  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3155  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3156    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3157$as_echo "$as_me: loading cache $cache_file" >&6;}
3158    case $cache_file in
3159      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3160      *)                      . "./$cache_file";;
3161    esac
3162  fi
3163else
3164  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3165$as_echo "$as_me: creating cache $cache_file" >&6;}
3166  >$cache_file
3167fi
3168
3169# Check that the precious variables saved in the cache have kept the same
3170# value.
3171ac_cache_corrupted=false
3172for ac_var in $ac_precious_vars; do
3173  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3174  eval ac_new_set=\$ac_env_${ac_var}_set
3175  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3176  eval ac_new_val=\$ac_env_${ac_var}_value
3177  case $ac_old_set,$ac_new_set in
3178    set,)
3179      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3180$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3181      ac_cache_corrupted=: ;;
3182    ,set)
3183      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3184$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3185      ac_cache_corrupted=: ;;
3186    ,);;
3187    *)
3188      if test "x$ac_old_val" != "x$ac_new_val"; then
3189	# differences in whitespace do not lead to failure.
3190	ac_old_val_w=`echo x $ac_old_val`
3191	ac_new_val_w=`echo x $ac_new_val`
3192	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3193	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3194$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3195	  ac_cache_corrupted=:
3196	else
3197	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3198$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3199	  eval $ac_var=\$ac_old_val
3200	fi
3201	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3202$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3203	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3204$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3205      fi;;
3206  esac
3207  # Pass precious variables to config.status.
3208  if test "$ac_new_set" = set; then
3209    case $ac_new_val in
3210    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3211    *) ac_arg=$ac_var=$ac_new_val ;;
3212    esac
3213    case " $ac_configure_args " in
3214      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3215      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3216    esac
3217  fi
3218done
3219if $ac_cache_corrupted; then
3220  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3222  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3223$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3224  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3225fi
3226## -------------------- ##
3227## Main body of script. ##
3228## -------------------- ##
3229
3230ac_ext=c
3231ac_cpp='$CPP $CPPFLAGS'
3232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3234ac_compiler_gnu=$ac_cv_c_compiler_gnu
3235
3236
3237
3238ac_aux_dir=
3239for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3240  if test -f "$ac_dir/install-sh"; then
3241    ac_aux_dir=$ac_dir
3242    ac_install_sh="$ac_aux_dir/install-sh -c"
3243    break
3244  elif test -f "$ac_dir/install.sh"; then
3245    ac_aux_dir=$ac_dir
3246    ac_install_sh="$ac_aux_dir/install.sh -c"
3247    break
3248  elif test -f "$ac_dir/shtool"; then
3249    ac_aux_dir=$ac_dir
3250    ac_install_sh="$ac_aux_dir/shtool install -c"
3251    break
3252  fi
3253done
3254if test -z "$ac_aux_dir"; then
3255  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
3256fi
3257
3258# These three variables are undocumented and unsupported,
3259# and are intended to be withdrawn in a future Autoconf release.
3260# They can cause serious problems if a builder's source tree is in a directory
3261# whose full name contains unusual characters.
3262ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3263ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3264ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3265
3266
3267# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3268
3269#
3270# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3271# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3272#
3273# This code is free software; you can redistribute it and/or modify it
3274# under the terms of the GNU General Public License version 2 only, as
3275# published by the Free Software Foundation.  Oracle designates this
3276# particular file as subject to the "Classpath" exception as provided
3277# by Oracle in the LICENSE file that accompanied this code.
3278#
3279# This code is distributed in the hope that it will be useful, but WITHOUT
3280# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3281# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3282# version 2 for more details (a copy is included in the LICENSE file that
3283# accompanied this code).
3284#
3285# You should have received a copy of the GNU General Public License version
3286# 2 along with this work; if not, write to the Free Software Foundation,
3287# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3288#
3289# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3290# or visit www.oracle.com if you need additional information or have any
3291# questions.
3292#
3293
3294#
3295# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3296#
3297# This program is free software; you can redistribute it and/or modify
3298# it under the terms of the GNU General Public License as published by
3299# the Free Software Foundation; either version 2 of the License, or
3300# (at your option) any later version.
3301#
3302# This program is distributed in the hope that it will be useful, but
3303# WITHOUT ANY WARRANTY; without even the implied warranty of
3304# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3305# General Public License for more details.
3306#
3307# You should have received a copy of the GNU General Public License
3308# along with this program; if not, write to the Free Software
3309# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3310#
3311# As a special exception to the GNU General Public License, if you
3312# distribute this file as part of a program that contains a
3313# configuration script generated by Autoconf, you may include it under
3314# the same distribution terms that you use for the rest of that program.
3315
3316# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3317# ----------------------------------
3318# PKG_PROG_PKG_CONFIG
3319
3320# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3321#
3322# Check to see whether a particular set of modules exists.  Similar
3323# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3324#
3325#
3326# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3327# this or PKG_CHECK_MODULES is called, or make sure to call
3328# PKG_CHECK_EXISTS manually
3329# --------------------------------------------------------------
3330
3331
3332
3333# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3334# ---------------------------------------------
3335# _PKG_CONFIG
3336
3337# _PKG_SHORT_ERRORS_SUPPORTED
3338# -----------------------------
3339# _PKG_SHORT_ERRORS_SUPPORTED
3340
3341
3342# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3343# [ACTION-IF-NOT-FOUND])
3344#
3345#
3346# Note that if there is a possibility the first call to
3347# PKG_CHECK_MODULES might not happen, you should be sure to include an
3348# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3349#
3350#
3351# --------------------------------------------------------------
3352# PKG_CHECK_MODULES
3353
3354
3355# Include these first...
3356#
3357# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3358# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3359#
3360# This code is free software; you can redistribute it and/or modify it
3361# under the terms of the GNU General Public License version 2 only, as
3362# published by the Free Software Foundation.  Oracle designates this
3363# particular file as subject to the "Classpath" exception as provided
3364# by Oracle in the LICENSE file that accompanied this code.
3365#
3366# This code is distributed in the hope that it will be useful, but WITHOUT
3367# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3368# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3369# version 2 for more details (a copy is included in the LICENSE file that
3370# accompanied this code).
3371#
3372# You should have received a copy of the GNU General Public License version
3373# 2 along with this work; if not, write to the Free Software Foundation,
3374# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3375#
3376# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3377# or visit www.oracle.com if you need additional information or have any
3378# questions.
3379#
3380
3381# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3382# If so, then append $1 to $2 \
3383# Also set JVM_ARG_OK to true/false depending on outcome.
3384
3385
3386# Appends a string to a path variable, only adding the : when needed.
3387
3388
3389# Prepends a string to a path variable, only adding the : when needed.
3390
3391
3392# This will make sure the given variable points to a full and proper
3393# path. This means:
3394# 1) There will be no spaces in the path. On unix platforms,
3395#    spaces in the path will result in an error. On Windows,
3396#    the path will be rewritten using short-style to be space-free.
3397# 2) The path will be absolute, and it will be in unix-style (on
3398#     cygwin).
3399# $1: The name of the variable to fix
3400
3401
3402# This will make sure the given variable points to a executable
3403# with a full and proper path. This means:
3404# 1) There will be no spaces in the path. On unix platforms,
3405#    spaces in the path will result in an error. On Windows,
3406#    the path will be rewritten using short-style to be space-free.
3407# 2) The path will be absolute, and it will be in unix-style (on
3408#     cygwin).
3409# Any arguments given to the executable is preserved.
3410# If the input variable does not have a directory specification, then
3411# it need to be in the PATH.
3412# $1: The name of the variable to fix
3413
3414
3415
3416
3417# Register a --with argument but mark it as deprecated
3418# $1: The name of the with argument to deprecate, not including --with-
3419
3420
3421# Register a --enable argument but mark it as deprecated
3422# $1: The name of the with argument to deprecate, not including --enable-
3423# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3424
3425
3426
3427
3428# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3429# $1: variable to check
3430
3431
3432# Check that there are no unprocessed overridden variables left.
3433# If so, they are an incorrect argument and we will exit with an error.
3434
3435
3436# Setup a tool for the given variable. If correctly specified by the user,
3437# use that value, otherwise search for the tool using the supplied code snippet.
3438# $1: variable to set
3439# $2: code snippet to call to look for the tool
3440
3441
3442# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3443# $1: variable to set
3444# $2: executable name (or list of names) to look for
3445
3446
3447# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3448# $1: variable to set
3449# $2: executable name (or list of names) to look for
3450
3451
3452# Like BASIC_PATH_PROGS but fails if no tool was found.
3453# $1: variable to set
3454# $2: executable name (or list of names) to look for
3455
3456
3457# Like BASIC_SETUP_TOOL but fails if no tool was found.
3458# $1: variable to set
3459# $2: autoconf macro to call to look for the special tool
3460
3461
3462# Setup the most fundamental tools that relies on not much else to set up,
3463# but is used by much of the early bootstrap code.
3464
3465
3466# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3467
3468
3469
3470
3471
3472
3473#%%% Simple tools %%%
3474
3475# Check if we have found a usable version of make
3476# $1: the path to a potential make binary (or empty)
3477# $2: the description on how we found this
3478
3479
3480
3481
3482# Goes looking for a usable version of GNU make.
3483
3484
3485
3486
3487
3488
3489# Check if build directory is on local disk. If not possible to determine,
3490# we prefer to claim it's local.
3491# Argument 1: directory to test
3492# Argument 2: what to do if it is on local disk
3493# Argument 3: what to do otherwise (remote disk or failure)
3494
3495
3496# Check that source files have basic read permissions set. This might
3497# not be the case in cygwin in certain conditions.
3498
3499
3500
3501
3502# Check for support for specific options in bash
3503
3504
3505#
3506# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3507# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3508#
3509# This code is free software; you can redistribute it and/or modify it
3510# under the terms of the GNU General Public License version 2 only, as
3511# published by the Free Software Foundation.  Oracle designates this
3512# particular file as subject to the "Classpath" exception as provided
3513# by Oracle in the LICENSE file that accompanied this code.
3514#
3515# This code is distributed in the hope that it will be useful, but WITHOUT
3516# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3517# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3518# version 2 for more details (a copy is included in the LICENSE file that
3519# accompanied this code).
3520#
3521# You should have received a copy of the GNU General Public License version
3522# 2 along with this work; if not, write to the Free Software Foundation,
3523# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3524#
3525# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3526# or visit www.oracle.com if you need additional information or have any
3527# questions.
3528#
3529
3530
3531
3532
3533
3534# Helper function which possibly converts a path using DOS-style short mode.
3535# If so, the updated path is stored in $new_path.
3536# $1: The path to check
3537
3538
3539# Helper function which possibly converts a path using DOS-style short mode.
3540# If so, the updated path is stored in $new_path.
3541# $1: The path to check
3542
3543
3544# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3545# and could probably be heavily simplified. However, all changes in this
3546# area tend to need lot of testing in different scenarios, and in lack of
3547# proper unit testing, cleaning this up has not been deemed worth the effort
3548# at the moment.
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3559
3560
3561
3562
3563#
3564# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3566#
3567# This code is free software; you can redistribute it and/or modify it
3568# under the terms of the GNU General Public License version 2 only, as
3569# published by the Free Software Foundation.  Oracle designates this
3570# particular file as subject to the "Classpath" exception as provided
3571# by Oracle in the LICENSE file that accompanied this code.
3572#
3573# This code is distributed in the hope that it will be useful, but WITHOUT
3574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3576# version 2 for more details (a copy is included in the LICENSE file that
3577# accompanied this code).
3578#
3579# You should have received a copy of the GNU General Public License version
3580# 2 along with this work; if not, write to the Free Software Foundation,
3581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3582#
3583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3584# or visit www.oracle.com if you need additional information or have any
3585# questions.
3586#
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598# ... then the rest
3599#
3600# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3601# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3602#
3603# This code is free software; you can redistribute it and/or modify it
3604# under the terms of the GNU General Public License version 2 only, as
3605# published by the Free Software Foundation.  Oracle designates this
3606# particular file as subject to the "Classpath" exception as provided
3607# by Oracle in the LICENSE file that accompanied this code.
3608#
3609# This code is distributed in the hope that it will be useful, but WITHOUT
3610# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3611# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3612# version 2 for more details (a copy is included in the LICENSE file that
3613# accompanied this code).
3614#
3615# You should have received a copy of the GNU General Public License version
3616# 2 along with this work; if not, write to the Free Software Foundation,
3617# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3618#
3619# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3620# or visit www.oracle.com if you need additional information or have any
3621# questions.
3622#
3623
3624########################################################################
3625# This file handles detection of the Boot JDK. The Boot JDK detection
3626# process has been developed as a response to solve a complex real-world
3627# problem. Initially, it was simple, but it has grown as platform after
3628# platform, idiosyncracy after idiosyncracy has been supported.
3629#
3630# The basic idea is this:
3631# 1) You need an acceptable *) JDK to use as a Boot JDK
3632# 2) There are several ways to locate a JDK, that are mostly platform
3633#    dependent **)
3634# 3) You can have multiple JDKs installed
3635# 4) If possible, configure should try to dig out an acceptable JDK
3636#    automatically, without having to resort to command-line options
3637#
3638# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3639#     javac) and not a JRE, etc.
3640#
3641# **) On Windows we typically use a well-known path.
3642#     On MacOSX we typically use the tool java_home.
3643#     On Linux we typically find javac in the $PATH, and then follow a
3644#     chain of symlinks that often ends up in a real JDK.
3645#
3646# This leads to the code where we check in different ways to locate a
3647# JDK, and if one is found, check if it is acceptable. If not, we print
3648# our reasons for rejecting it (useful when debugging non-working
3649# configure situations) and continue checking the next one.
3650########################################################################
3651
3652# Execute the check given as argument, and verify the result
3653# If the Boot JDK was previously found, do nothing
3654# $1 A command line (typically autoconf macro) to execute
3655
3656
3657# Test: Is bootjdk explicitely set by command line arguments?
3658
3659
3660# Test: Is bootjdk available from builddeps?
3661
3662
3663# Test: Is $JAVA_HOME set?
3664
3665
3666# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3667
3668
3669# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3670# $1: Argument to the java_home binary (optional)
3671
3672
3673# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3674
3675
3676# Look for a jdk in the given path. If there are multiple, try to select the newest.
3677# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3678# $1 = Path to directory containing jdk installations.
3679# $2 = String to append to the found JDK directory to get the proper JDK home
3680
3681
3682# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3683# environmental variable as base for where to look.
3684# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3685
3686
3687# Test: Is there a JDK installed in default, well-known locations?
3688
3689
3690# Check that a command-line tool in the Boot JDK is correct
3691# $1 = name of variable to assign
3692# $2 = name of binary
3693
3694
3695###############################################################################
3696#
3697# We need a Boot JDK to bootstrap the build.
3698#
3699
3700
3701
3702
3703
3704#
3705# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3706# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3707#
3708# This code is free software; you can redistribute it and/or modify it
3709# under the terms of the GNU General Public License version 2 only, as
3710# published by the Free Software Foundation.  Oracle designates this
3711# particular file as subject to the "Classpath" exception as provided
3712# by Oracle in the LICENSE file that accompanied this code.
3713#
3714# This code is distributed in the hope that it will be useful, but WITHOUT
3715# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3716# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3717# version 2 for more details (a copy is included in the LICENSE file that
3718# accompanied this code).
3719#
3720# You should have received a copy of the GNU General Public License version
3721# 2 along with this work; if not, write to the Free Software Foundation,
3722# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3723#
3724# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3725# or visit www.oracle.com if you need additional information or have any
3726# questions.
3727#
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748#
3749# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3750# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3751#
3752# This code is free software; you can redistribute it and/or modify it
3753# under the terms of the GNU General Public License version 2 only, as
3754# published by the Free Software Foundation.  Oracle designates this
3755# particular file as subject to the "Classpath" exception as provided
3756# by Oracle in the LICENSE file that accompanied this code.
3757#
3758# This code is distributed in the hope that it will be useful, but WITHOUT
3759# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3760# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3761# version 2 for more details (a copy is included in the LICENSE file that
3762# accompanied this code).
3763#
3764# You should have received a copy of the GNU General Public License version
3765# 2 along with this work; if not, write to the Free Software Foundation,
3766# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3767#
3768# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3769# or visit www.oracle.com if you need additional information or have any
3770# questions.
3771#
3772
3773
3774
3775
3776
3777# Documentation on common flags used for solstudio in HIGHEST.
3778#
3779# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3780#          done with care, there are some assumptions below that need to
3781#          be understood about the use of pointers, and IEEE behavior.
3782#
3783# -fns: Use non-standard floating point mode (not IEEE 754)
3784# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3785# -fsingle: Use single precision floating point with 'float'
3786# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3787#   (Source with excessing pointer casting and data access with mixed
3788#    pointer types are not recommended)
3789# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3790#   (If you expect perfect errno behavior, do not use this)
3791# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3792# -xrestrict: Pointer parameters to functions do not overlap
3793#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3794#    If you pass in multiple pointers to the same data, do not use this)
3795# -xlibmil: Inline some library routines
3796#   (If you expect perfect errno behavior, do not use this)
3797# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3798#   (If you expect perfect errno behavior, do not use this)
3799#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3800
3801    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3802    # Bug?
3803    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3804    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3805    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3806    #fi
3807
3808
3809
3810
3811
3812# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3813#                                   [RUN-IF-FALSE])
3814# ------------------------------------------------------------
3815# Check that the c and c++ compilers support an argument
3816
3817
3818# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3819#                                    [RUN-IF-FALSE])
3820# ------------------------------------------------------------
3821# Check that the linker support an argument
3822
3823
3824
3825
3826#
3827# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3828# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3829#
3830# This code is free software; you can redistribute it and/or modify it
3831# under the terms of the GNU General Public License version 2 only, as
3832# published by the Free Software Foundation.  Oracle designates this
3833# particular file as subject to the "Classpath" exception as provided
3834# by Oracle in the LICENSE file that accompanied this code.
3835#
3836# This code is distributed in the hope that it will be useful, but WITHOUT
3837# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3838# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3839# version 2 for more details (a copy is included in the LICENSE file that
3840# accompanied this code).
3841#
3842# You should have received a copy of the GNU General Public License version
3843# 2 along with this work; if not, write to the Free Software Foundation,
3844# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3845#
3846# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3847# or visit www.oracle.com if you need additional information or have any
3848# questions.
3849#
3850
3851
3852
3853
3854
3855cygwin_help() {
3856  case $1 in
3857    unzip)
3858      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3859      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3860      ;;
3861    zip)
3862      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3863      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3864      ;;
3865    make)
3866      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3867      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3868      ;;
3869    freetype)
3870      HELP_MSG="
3871The freetype library can now be build during the configure process.
3872Download the freetype sources and unpack them into an arbitrary directory:
3873
3874wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3875tar -xzf freetype-2.5.3.tar.gz
3876
3877Then run configure with '--with-freetype-src=<freetype_src>'. This will
3878automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3879builds or into '<freetype_src>/lib32' for 32-bit builds.
3880Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3881and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3882      ;;
3883  esac
3884}
3885
3886msys_help() {
3887  PKGHANDLER_COMMAND=""
3888}
3889
3890apt_help() {
3891  case $1 in
3892    devkit)
3893      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3894    openjdk)
3895      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3896    alsa)
3897      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3898    cups)
3899      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3900    freetype)
3901      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3902    pulse)
3903      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3904    x11)
3905      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3906    ccache)
3907      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3908  esac
3909}
3910
3911yum_help() {
3912  case $1 in
3913    devkit)
3914      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3915    openjdk)
3916      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3917    alsa)
3918      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3919    cups)
3920      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3921    freetype)
3922      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3923    pulse)
3924      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3925    x11)
3926      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3927    ccache)
3928      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3929  esac
3930}
3931
3932port_help() {
3933  PKGHANDLER_COMMAND=""
3934}
3935
3936pkgutil_help() {
3937  PKGHANDLER_COMMAND=""
3938}
3939
3940pkgadd_help() {
3941  PKGHANDLER_COMMAND=""
3942}
3943
3944# This function will check if we're called from the "configure" wrapper while
3945# printing --help. If so, we will print out additional information that can
3946# only be extracted within the autoconf script, and then exit. This must be
3947# called at the very beginning in configure.ac.
3948
3949
3950
3951
3952
3953
3954#
3955# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3956# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3957#
3958# This code is free software; you can redistribute it and/or modify it
3959# under the terms of the GNU General Public License version 2 only, as
3960# published by the Free Software Foundation.  Oracle designates this
3961# particular file as subject to the "Classpath" exception as provided
3962# by Oracle in the LICENSE file that accompanied this code.
3963#
3964# This code is distributed in the hope that it will be useful, but WITHOUT
3965# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3966# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3967# version 2 for more details (a copy is included in the LICENSE file that
3968# accompanied this code).
3969#
3970# You should have received a copy of the GNU General Public License version
3971# 2 along with this work; if not, write to the Free Software Foundation,
3972# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3973#
3974# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3975# or visit www.oracle.com if you need additional information or have any
3976# questions.
3977#
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988###############################################################################
3989#
3990# Should we build only OpenJDK even if closed sources are present?
3991#
3992
3993
3994
3995
3996###############################################################################
3997#
3998# Setup version numbers
3999#
4000
4001
4002
4003
4004
4005
4006################################################################################
4007#
4008# Gcov coverage data for hotspot
4009#
4010
4011
4012#
4013# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4014# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4015#
4016# This code is free software; you can redistribute it and/or modify it
4017# under the terms of the GNU General Public License version 2 only, as
4018# published by the Free Software Foundation.  Oracle designates this
4019# particular file as subject to the "Classpath" exception as provided
4020# by Oracle in the LICENSE file that accompanied this code.
4021#
4022# This code is distributed in the hope that it will be useful, but WITHOUT
4023# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4024# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4025# version 2 for more details (a copy is included in the LICENSE file that
4026# accompanied this code).
4027#
4028# You should have received a copy of the GNU General Public License version
4029# 2 along with this work; if not, write to the Free Software Foundation,
4030# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4031#
4032# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4033# or visit www.oracle.com if you need additional information or have any
4034# questions.
4035#
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057#
4058# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4059# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4060#
4061# This code is free software; you can redistribute it and/or modify it
4062# under the terms of the GNU General Public License version 2 only, as
4063# published by the Free Software Foundation.  Oracle designates this
4064# particular file as subject to the "Classpath" exception as provided
4065# by Oracle in the LICENSE file that accompanied this code.
4066#
4067# This code is distributed in the hope that it will be useful, but WITHOUT
4068# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4069# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4070# version 2 for more details (a copy is included in the LICENSE file that
4071# accompanied this code).
4072#
4073# You should have received a copy of the GNU General Public License version
4074# 2 along with this work; if not, write to the Free Software Foundation,
4075# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4076#
4077# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4078# or visit www.oracle.com if you need additional information or have any
4079# questions.
4080#
4081
4082# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4083# Converts autoconf style CPU name to OpenJDK style, into
4084# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4085
4086
4087# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4088# Converts autoconf style OS name to OpenJDK style, into
4089# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4090
4091
4092# Expects $host_os $host_cpu $build_os and $build_cpu
4093# and $with_target_bits to have been setup!
4094#
4095# Translate the standard triplet(quadruplet) definition
4096# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4097# OPENJDK_BUILD_OS, etc.
4098
4099
4100# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4101# accordingly. Must be done after setting up build and target system, but before
4102# doing anything else with these values.
4103
4104
4105# Setup the legacy variables, for controlling the old makefiles.
4106#
4107
4108
4109
4110
4111#%%% Build and target systems %%%
4112
4113
4114
4115
4116# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4117# Add -mX to various FLAGS variables.
4118
4119
4120
4121
4122
4123
4124#
4125# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4126# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4127#
4128# This code is free software; you can redistribute it and/or modify it
4129# under the terms of the GNU General Public License version 2 only, as
4130# published by the Free Software Foundation.  Oracle designates this
4131# particular file as subject to the "Classpath" exception as provided
4132# by Oracle in the LICENSE file that accompanied this code.
4133#
4134# This code is distributed in the hope that it will be useful, but WITHOUT
4135# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4136# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4137# version 2 for more details (a copy is included in the LICENSE file that
4138# accompanied this code).
4139#
4140# You should have received a copy of the GNU General Public License version
4141# 2 along with this work; if not, write to the Free Software Foundation,
4142# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4143#
4144# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4145# or visit www.oracle.com if you need additional information or have any
4146# questions.
4147#
4148
4149
4150
4151
4152
4153
4154
4155
4156#
4157# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4158# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4159#
4160# This code is free software; you can redistribute it and/or modify it
4161# under the terms of the GNU General Public License version 2 only, as
4162# published by the Free Software Foundation.  Oracle designates this
4163# particular file as subject to the "Classpath" exception as provided
4164# by Oracle in the LICENSE file that accompanied this code.
4165#
4166# This code is distributed in the hope that it will be useful, but WITHOUT
4167# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4168# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4169# version 2 for more details (a copy is included in the LICENSE file that
4170# accompanied this code).
4171#
4172# You should have received a copy of the GNU General Public License version
4173# 2 along with this work; if not, write to the Free Software Foundation,
4174# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4175#
4176# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4177# or visit www.oracle.com if you need additional information or have any
4178# questions.
4179#
4180
4181########################################################################
4182# This file is responsible for detecting, verifying and setting up the
4183# toolchain, i.e. the compiler, linker and related utilities. It will setup
4184# proper paths to the binaries, but it will not setup any flags.
4185#
4186# The binaries used is determined by the toolchain type, which is the family of
4187# compilers and related tools that are used.
4188########################################################################
4189
4190
4191# All valid toolchains, regardless of platform (used by help.m4)
4192VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4193
4194# These toolchains are valid on different platforms
4195VALID_TOOLCHAINS_linux="gcc clang"
4196VALID_TOOLCHAINS_solaris="solstudio"
4197VALID_TOOLCHAINS_macosx="gcc clang"
4198VALID_TOOLCHAINS_aix="xlc"
4199VALID_TOOLCHAINS_windows="microsoft"
4200
4201# Toolchain descriptions
4202TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4203TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4204TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4205TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4206TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4207
4208# Setup a number of variables describing how native output files are
4209# named on this platform/toolchain.
4210
4211
4212# Determine which toolchain type to use, and make sure it is valid for this
4213# platform. Setup various information about the selected toolchain.
4214
4215
4216# Before we start detecting the toolchain executables, we might need some
4217# special setup, e.g. additional paths etc.
4218
4219
4220# Restore path, etc
4221
4222
4223# Check if a compiler is of the toolchain type we expect, and save the version
4224# information from it. If the compiler does not match the expected type,
4225# this function will abort using AC_MSG_ERROR. If it matches, the version will
4226# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4227# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4228#
4229# $1 = compiler to test (CC or CXX)
4230# $2 = human readable name of compiler (C or C++)
4231
4232
4233# Try to locate the given C or C++ compiler in the path, or otherwise.
4234#
4235# $1 = compiler to test (CC or CXX)
4236# $2 = human readable name of compiler (C or C++)
4237# $3 = list of compiler names to search for
4238
4239
4240# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4241# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4242# archiver (AR). Verify that the compilers are correct according to the
4243# toolchain type.
4244
4245
4246# Setup additional tools that is considered a part of the toolchain, but not the
4247# core part. Many of these are highly platform-specific and do not exist,
4248# and/or are not needed on all platforms.
4249
4250
4251# Setup the build tools (i.e, the compiler and linker used to build programs
4252# that should be run on the build platform, not the target platform, as a build
4253# helper). Since the non-cross-compile case uses the normal, target compilers
4254# for this, we can only do this after these have been setup.
4255
4256
4257# Setup legacy variables that are still needed as alternative ways to refer to
4258# parts of the toolchain.
4259
4260
4261# Do some additional checks on the detected tools.
4262
4263
4264# Setup the JTReg Regression Test Harness.
4265
4266
4267#
4268# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4269# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4270#
4271# This code is free software; you can redistribute it and/or modify it
4272# under the terms of the GNU General Public License version 2 only, as
4273# published by the Free Software Foundation.  Oracle designates this
4274# particular file as subject to the "Classpath" exception as provided
4275# by Oracle in the LICENSE file that accompanied this code.
4276#
4277# This code is distributed in the hope that it will be useful, but WITHOUT
4278# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4279# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4280# version 2 for more details (a copy is included in the LICENSE file that
4281# accompanied this code).
4282#
4283# You should have received a copy of the GNU General Public License version
4284# 2 along with this work; if not, write to the Free Software Foundation,
4285# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4286#
4287# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4288# or visit www.oracle.com if you need additional information or have any
4289# questions.
4290#
4291
4292################################################################################
4293# The order of these defines the priority by which we try to find them.
4294VALID_VS_VERSIONS="2013 2012 2010"
4295
4296VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4297VS_VERSION_INTERNAL_2010=100
4298VS_MSVCR_2010=msvcr100.dll
4299# We don't use msvcp on Visual Studio 2010
4300#VS_MSVCP_2010=msvcp100.dll
4301VS_ENVVAR_2010="VS100COMNTOOLS"
4302VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4303VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4304VS_VS_PLATFORM_NAME_2010="v100"
4305VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4306
4307VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4308VS_VERSION_INTERNAL_2012=110
4309VS_MSVCR_2012=msvcr110.dll
4310VS_MSVCP_2012=msvcp110.dll
4311VS_ENVVAR_2012="VS110COMNTOOLS"
4312VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4313VS_SDK_INSTALLDIR_2012=
4314VS_VS_PLATFORM_NAME_2012="v110"
4315VS_SDK_PLATFORM_NAME_2012=
4316
4317VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4318VS_VERSION_INTERNAL_2013=120
4319VS_MSVCR_2013=msvcr120.dll
4320VS_MSVCP_2013=msvcp120.dll
4321VS_ENVVAR_2013="VS120COMNTOOLS"
4322VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4323VS_SDK_INSTALLDIR_2013=
4324VS_VS_PLATFORM_NAME_2013="v120"
4325VS_SDK_PLATFORM_NAME_2013=
4326
4327################################################################################
4328
4329
4330
4331################################################################################
4332
4333
4334
4335################################################################################
4336# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4337# build environment and assigns it to VS_ENV_CMD
4338
4339
4340################################################################################
4341
4342
4343
4344################################################################################
4345# Check if the VS env variables were setup prior to running configure.
4346# If not, then find vcvarsall.bat and run it automatically, and integrate
4347# the set env variables into the spec file.
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362# This line needs to be here, verbatim, after all includes and the dummy hook
4363# definitions. It is replaced with custom functionality when building
4364# custom sources.
4365#CUSTOM_AUTOCONF_INCLUDE
4366
4367# Do not change or remove the following line, it is needed for consistency checks:
4368DATE_WHEN_GENERATED=1429260097
4369
4370###############################################################################
4371#
4372# Initialization / Boot-strapping
4373#
4374# The bootstrapping process needs to solve the "chicken or the egg" problem,
4375# thus it jumps back and forth, each time gaining something needed later on.
4376#
4377###############################################################################
4378
4379# If we are requested to print additional help, do that and then exit.
4380# This must be the very first call.
4381
4382  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4383    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4384    $PRINTF "Which are valid to use depends on the build platform.\n"
4385    for toolchain in $VALID_TOOLCHAINS_all; do
4386      # Use indirect variable referencing
4387      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4388      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4389      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4390    done
4391
4392    # And now exit directly
4393    exit 0
4394  fi
4395
4396
4397# Basic initialization that must happen first of all in the normal process.
4398
4399  # Save the original command line. This is passed to us by the wrapper configure script.
4400
4401  # Save the path variable before it gets changed
4402  ORIGINAL_PATH="$PATH"
4403
4404  DATE_WHEN_CONFIGURED=`LANG=C date`
4405
4406  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4407$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4408  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4409$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4410
4411
4412  # Start with tools that do not need have cross compilation support
4413  # and can be expected to be found in the default PATH. These tools are
4414  # used by configure. Nor are these tools expected to be found in the
4415  # devkit from the builddeps server either, since they are
4416  # needed to download the devkit.
4417
4418  # First are all the simple required tools.
4419
4420
4421
4422  # Publish this variable in the help.
4423
4424
4425  if test "x$BASENAME" = x; then
4426    # The variable is not set by user, try to locate tool using the code snippet
4427    for ac_prog in basename
4428do
4429  # Extract the first word of "$ac_prog", so it can be a program name with args.
4430set dummy $ac_prog; ac_word=$2
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
4433if ${ac_cv_path_BASENAME+:} false; then :
4434  $as_echo_n "(cached) " >&6
4435else
4436  case $BASENAME in
4437  [\\/]* | ?:[\\/]*)
4438  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4439  ;;
4440  *)
4441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in $PATH
4443do
4444  IFS=$as_save_IFS
4445  test -z "$as_dir" && as_dir=.
4446    for ac_exec_ext in '' $ac_executable_extensions; do
4447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4448    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450    break 2
4451  fi
4452done
4453  done
4454IFS=$as_save_IFS
4455
4456  ;;
4457esac
4458fi
4459BASENAME=$ac_cv_path_BASENAME
4460if test -n "$BASENAME"; then
4461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4462$as_echo "$BASENAME" >&6; }
4463else
4464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
4466fi
4467
4468
4469  test -n "$BASENAME" && break
4470done
4471
4472  else
4473    # The variable is set, but is it from the command line or the environment?
4474
4475    # Try to remove the string !BASENAME! from our list.
4476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4478      # If it failed, the variable was not from the command line. Ignore it,
4479      # but warn the user (except for BASH, which is always set by the calling BASH).
4480      if test "xBASENAME" != xBASH; then
4481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4482$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4483      fi
4484      # Try to locate tool using the code snippet
4485      for ac_prog in basename
4486do
4487  # Extract the first word of "$ac_prog", so it can be a program name with args.
4488set dummy $ac_prog; ac_word=$2
4489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4490$as_echo_n "checking for $ac_word... " >&6; }
4491if ${ac_cv_path_BASENAME+:} false; then :
4492  $as_echo_n "(cached) " >&6
4493else
4494  case $BASENAME in
4495  [\\/]* | ?:[\\/]*)
4496  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4497  ;;
4498  *)
4499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500for as_dir in $PATH
4501do
4502  IFS=$as_save_IFS
4503  test -z "$as_dir" && as_dir=.
4504    for ac_exec_ext in '' $ac_executable_extensions; do
4505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4506    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4508    break 2
4509  fi
4510done
4511  done
4512IFS=$as_save_IFS
4513
4514  ;;
4515esac
4516fi
4517BASENAME=$ac_cv_path_BASENAME
4518if test -n "$BASENAME"; then
4519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4520$as_echo "$BASENAME" >&6; }
4521else
4522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4523$as_echo "no" >&6; }
4524fi
4525
4526
4527  test -n "$BASENAME" && break
4528done
4529
4530    else
4531      # If it succeeded, then it was overridden by the user. We will use it
4532      # for the tool.
4533
4534      # First remove it from the list of overridden variables, so we can test
4535      # for unknown variables in the end.
4536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4537
4538      # Check if the provided tool contains a complete path.
4539      tool_specified="$BASENAME"
4540      tool_basename="${tool_specified##*/}"
4541      if test "x$tool_basename" = "x$tool_specified"; then
4542        # A command without a complete path is provided, search $PATH.
4543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4544$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4545        # Extract the first word of "$tool_basename", so it can be a program name with args.
4546set dummy $tool_basename; ac_word=$2
4547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4548$as_echo_n "checking for $ac_word... " >&6; }
4549if ${ac_cv_path_BASENAME+:} false; then :
4550  $as_echo_n "(cached) " >&6
4551else
4552  case $BASENAME in
4553  [\\/]* | ?:[\\/]*)
4554  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4555  ;;
4556  *)
4557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in $PATH
4559do
4560  IFS=$as_save_IFS
4561  test -z "$as_dir" && as_dir=.
4562    for ac_exec_ext in '' $ac_executable_extensions; do
4563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4564    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566    break 2
4567  fi
4568done
4569  done
4570IFS=$as_save_IFS
4571
4572  ;;
4573esac
4574fi
4575BASENAME=$ac_cv_path_BASENAME
4576if test -n "$BASENAME"; then
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4578$as_echo "$BASENAME" >&6; }
4579else
4580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
4582fi
4583
4584
4585        if test "x$BASENAME" = x; then
4586          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4587        fi
4588      else
4589        # Otherwise we believe it is a complete path. Use it as it is.
4590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4591$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4593$as_echo_n "checking for BASENAME... " >&6; }
4594        if test ! -x "$tool_specified"; then
4595          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4596$as_echo "not found" >&6; }
4597          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4598        fi
4599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4600$as_echo "$tool_specified" >&6; }
4601      fi
4602    fi
4603  fi
4604
4605
4606
4607  if test "x$BASENAME" = x; then
4608    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4609  fi
4610
4611
4612
4613
4614
4615  # Publish this variable in the help.
4616
4617
4618  if test "x$BASH" = x; then
4619    # The variable is not set by user, try to locate tool using the code snippet
4620    for ac_prog in bash
4621do
4622  # Extract the first word of "$ac_prog", so it can be a program name with args.
4623set dummy $ac_prog; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_BASH+:} false; then :
4627  $as_echo_n "(cached) " >&6
4628else
4629  case $BASH in
4630  [\\/]* | ?:[\\/]*)
4631  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4632  ;;
4633  *)
4634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in $PATH
4636do
4637  IFS=$as_save_IFS
4638  test -z "$as_dir" && as_dir=.
4639    for ac_exec_ext in '' $ac_executable_extensions; do
4640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643    break 2
4644  fi
4645done
4646  done
4647IFS=$as_save_IFS
4648
4649  ;;
4650esac
4651fi
4652BASH=$ac_cv_path_BASH
4653if test -n "$BASH"; then
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4655$as_echo "$BASH" >&6; }
4656else
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
4661
4662  test -n "$BASH" && break
4663done
4664
4665  else
4666    # The variable is set, but is it from the command line or the environment?
4667
4668    # Try to remove the string !BASH! from our list.
4669    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4670    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4671      # If it failed, the variable was not from the command line. Ignore it,
4672      # but warn the user (except for BASH, which is always set by the calling BASH).
4673      if test "xBASH" != xBASH; then
4674        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4675$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4676      fi
4677      # Try to locate tool using the code snippet
4678      for ac_prog in bash
4679do
4680  # Extract the first word of "$ac_prog", so it can be a program name with args.
4681set dummy $ac_prog; ac_word=$2
4682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683$as_echo_n "checking for $ac_word... " >&6; }
4684if ${ac_cv_path_BASH+:} false; then :
4685  $as_echo_n "(cached) " >&6
4686else
4687  case $BASH in
4688  [\\/]* | ?:[\\/]*)
4689  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4690  ;;
4691  *)
4692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693for as_dir in $PATH
4694do
4695  IFS=$as_save_IFS
4696  test -z "$as_dir" && as_dir=.
4697    for ac_exec_ext in '' $ac_executable_extensions; do
4698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701    break 2
4702  fi
4703done
4704  done
4705IFS=$as_save_IFS
4706
4707  ;;
4708esac
4709fi
4710BASH=$ac_cv_path_BASH
4711if test -n "$BASH"; then
4712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4713$as_echo "$BASH" >&6; }
4714else
4715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4716$as_echo "no" >&6; }
4717fi
4718
4719
4720  test -n "$BASH" && break
4721done
4722
4723    else
4724      # If it succeeded, then it was overridden by the user. We will use it
4725      # for the tool.
4726
4727      # First remove it from the list of overridden variables, so we can test
4728      # for unknown variables in the end.
4729      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4730
4731      # Check if the provided tool contains a complete path.
4732      tool_specified="$BASH"
4733      tool_basename="${tool_specified##*/}"
4734      if test "x$tool_basename" = "x$tool_specified"; then
4735        # A command without a complete path is provided, search $PATH.
4736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4737$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4738        # Extract the first word of "$tool_basename", so it can be a program name with args.
4739set dummy $tool_basename; ac_word=$2
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if ${ac_cv_path_BASH+:} false; then :
4743  $as_echo_n "(cached) " >&6
4744else
4745  case $BASH in
4746  [\\/]* | ?:[\\/]*)
4747  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4748  ;;
4749  *)
4750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in $PATH
4752do
4753  IFS=$as_save_IFS
4754  test -z "$as_dir" && as_dir=.
4755    for ac_exec_ext in '' $ac_executable_extensions; do
4756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4757    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759    break 2
4760  fi
4761done
4762  done
4763IFS=$as_save_IFS
4764
4765  ;;
4766esac
4767fi
4768BASH=$ac_cv_path_BASH
4769if test -n "$BASH"; then
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4771$as_echo "$BASH" >&6; }
4772else
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777
4778        if test "x$BASH" = x; then
4779          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4780        fi
4781      else
4782        # Otherwise we believe it is a complete path. Use it as it is.
4783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4784$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4786$as_echo_n "checking for BASH... " >&6; }
4787        if test ! -x "$tool_specified"; then
4788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4789$as_echo "not found" >&6; }
4790          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4791        fi
4792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4793$as_echo "$tool_specified" >&6; }
4794      fi
4795    fi
4796  fi
4797
4798
4799
4800  if test "x$BASH" = x; then
4801    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4802  fi
4803
4804
4805
4806
4807
4808  # Publish this variable in the help.
4809
4810
4811  if test "x$CAT" = x; then
4812    # The variable is not set by user, try to locate tool using the code snippet
4813    for ac_prog in cat
4814do
4815  # Extract the first word of "$ac_prog", so it can be a program name with args.
4816set dummy $ac_prog; ac_word=$2
4817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4818$as_echo_n "checking for $ac_word... " >&6; }
4819if ${ac_cv_path_CAT+:} false; then :
4820  $as_echo_n "(cached) " >&6
4821else
4822  case $CAT in
4823  [\\/]* | ?:[\\/]*)
4824  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4825  ;;
4826  *)
4827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4828for as_dir in $PATH
4829do
4830  IFS=$as_save_IFS
4831  test -z "$as_dir" && as_dir=.
4832    for ac_exec_ext in '' $ac_executable_extensions; do
4833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4834    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4836    break 2
4837  fi
4838done
4839  done
4840IFS=$as_save_IFS
4841
4842  ;;
4843esac
4844fi
4845CAT=$ac_cv_path_CAT
4846if test -n "$CAT"; then
4847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4848$as_echo "$CAT" >&6; }
4849else
4850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4851$as_echo "no" >&6; }
4852fi
4853
4854
4855  test -n "$CAT" && break
4856done
4857
4858  else
4859    # The variable is set, but is it from the command line or the environment?
4860
4861    # Try to remove the string !CAT! from our list.
4862    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4863    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4864      # If it failed, the variable was not from the command line. Ignore it,
4865      # but warn the user (except for BASH, which is always set by the calling BASH).
4866      if test "xCAT" != xBASH; then
4867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4868$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4869      fi
4870      # Try to locate tool using the code snippet
4871      for ac_prog in cat
4872do
4873  # Extract the first word of "$ac_prog", so it can be a program name with args.
4874set dummy $ac_prog; ac_word=$2
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if ${ac_cv_path_CAT+:} false; then :
4878  $as_echo_n "(cached) " >&6
4879else
4880  case $CAT in
4881  [\\/]* | ?:[\\/]*)
4882  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4883  ;;
4884  *)
4885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in $PATH
4887do
4888  IFS=$as_save_IFS
4889  test -z "$as_dir" && as_dir=.
4890    for ac_exec_ext in '' $ac_executable_extensions; do
4891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4892    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894    break 2
4895  fi
4896done
4897  done
4898IFS=$as_save_IFS
4899
4900  ;;
4901esac
4902fi
4903CAT=$ac_cv_path_CAT
4904if test -n "$CAT"; then
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4906$as_echo "$CAT" >&6; }
4907else
4908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912
4913  test -n "$CAT" && break
4914done
4915
4916    else
4917      # If it succeeded, then it was overridden by the user. We will use it
4918      # for the tool.
4919
4920      # First remove it from the list of overridden variables, so we can test
4921      # for unknown variables in the end.
4922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4923
4924      # Check if the provided tool contains a complete path.
4925      tool_specified="$CAT"
4926      tool_basename="${tool_specified##*/}"
4927      if test "x$tool_basename" = "x$tool_specified"; then
4928        # A command without a complete path is provided, search $PATH.
4929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4930$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4931        # Extract the first word of "$tool_basename", so it can be a program name with args.
4932set dummy $tool_basename; ac_word=$2
4933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934$as_echo_n "checking for $ac_word... " >&6; }
4935if ${ac_cv_path_CAT+:} false; then :
4936  $as_echo_n "(cached) " >&6
4937else
4938  case $CAT in
4939  [\\/]* | ?:[\\/]*)
4940  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4941  ;;
4942  *)
4943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944for as_dir in $PATH
4945do
4946  IFS=$as_save_IFS
4947  test -z "$as_dir" && as_dir=.
4948    for ac_exec_ext in '' $ac_executable_extensions; do
4949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4950    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952    break 2
4953  fi
4954done
4955  done
4956IFS=$as_save_IFS
4957
4958  ;;
4959esac
4960fi
4961CAT=$ac_cv_path_CAT
4962if test -n "$CAT"; then
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4964$as_echo "$CAT" >&6; }
4965else
4966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
4968fi
4969
4970
4971        if test "x$CAT" = x; then
4972          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4973        fi
4974      else
4975        # Otherwise we believe it is a complete path. Use it as it is.
4976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4977$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4979$as_echo_n "checking for CAT... " >&6; }
4980        if test ! -x "$tool_specified"; then
4981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4982$as_echo "not found" >&6; }
4983          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4984        fi
4985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4986$as_echo "$tool_specified" >&6; }
4987      fi
4988    fi
4989  fi
4990
4991
4992
4993  if test "x$CAT" = x; then
4994    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4995  fi
4996
4997
4998
4999
5000
5001  # Publish this variable in the help.
5002
5003
5004  if test "x$CHMOD" = x; then
5005    # The variable is not set by user, try to locate tool using the code snippet
5006    for ac_prog in chmod
5007do
5008  # Extract the first word of "$ac_prog", so it can be a program name with args.
5009set dummy $ac_prog; ac_word=$2
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5011$as_echo_n "checking for $ac_word... " >&6; }
5012if ${ac_cv_path_CHMOD+:} false; then :
5013  $as_echo_n "(cached) " >&6
5014else
5015  case $CHMOD in
5016  [\\/]* | ?:[\\/]*)
5017  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5018  ;;
5019  *)
5020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5021for as_dir in $PATH
5022do
5023  IFS=$as_save_IFS
5024  test -z "$as_dir" && as_dir=.
5025    for ac_exec_ext in '' $ac_executable_extensions; do
5026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5027    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5029    break 2
5030  fi
5031done
5032  done
5033IFS=$as_save_IFS
5034
5035  ;;
5036esac
5037fi
5038CHMOD=$ac_cv_path_CHMOD
5039if test -n "$CHMOD"; then
5040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5041$as_echo "$CHMOD" >&6; }
5042else
5043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5044$as_echo "no" >&6; }
5045fi
5046
5047
5048  test -n "$CHMOD" && break
5049done
5050
5051  else
5052    # The variable is set, but is it from the command line or the environment?
5053
5054    # Try to remove the string !CHMOD! from our list.
5055    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5056    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5057      # If it failed, the variable was not from the command line. Ignore it,
5058      # but warn the user (except for BASH, which is always set by the calling BASH).
5059      if test "xCHMOD" != xBASH; then
5060        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5061$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5062      fi
5063      # Try to locate tool using the code snippet
5064      for ac_prog in chmod
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if ${ac_cv_path_CHMOD+:} false; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $CHMOD in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5085    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096CHMOD=$ac_cv_path_CHMOD
5097if test -n "$CHMOD"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5099$as_echo "$CHMOD" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$CHMOD" && break
5107done
5108
5109    else
5110      # If it succeeded, then it was overridden by the user. We will use it
5111      # for the tool.
5112
5113      # First remove it from the list of overridden variables, so we can test
5114      # for unknown variables in the end.
5115      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5116
5117      # Check if the provided tool contains a complete path.
5118      tool_specified="$CHMOD"
5119      tool_basename="${tool_specified##*/}"
5120      if test "x$tool_basename" = "x$tool_specified"; then
5121        # A command without a complete path is provided, search $PATH.
5122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5123$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5124        # Extract the first word of "$tool_basename", so it can be a program name with args.
5125set dummy $tool_basename; ac_word=$2
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
5128if ${ac_cv_path_CHMOD+:} false; then :
5129  $as_echo_n "(cached) " >&6
5130else
5131  case $CHMOD in
5132  [\\/]* | ?:[\\/]*)
5133  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5134  ;;
5135  *)
5136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137for as_dir in $PATH
5138do
5139  IFS=$as_save_IFS
5140  test -z "$as_dir" && as_dir=.
5141    for ac_exec_ext in '' $ac_executable_extensions; do
5142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5143    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145    break 2
5146  fi
5147done
5148  done
5149IFS=$as_save_IFS
5150
5151  ;;
5152esac
5153fi
5154CHMOD=$ac_cv_path_CHMOD
5155if test -n "$CHMOD"; then
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5157$as_echo "$CHMOD" >&6; }
5158else
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164        if test "x$CHMOD" = x; then
5165          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5166        fi
5167      else
5168        # Otherwise we believe it is a complete path. Use it as it is.
5169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5170$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5172$as_echo_n "checking for CHMOD... " >&6; }
5173        if test ! -x "$tool_specified"; then
5174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5175$as_echo "not found" >&6; }
5176          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5177        fi
5178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5179$as_echo "$tool_specified" >&6; }
5180      fi
5181    fi
5182  fi
5183
5184
5185
5186  if test "x$CHMOD" = x; then
5187    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5188  fi
5189
5190
5191
5192
5193
5194  # Publish this variable in the help.
5195
5196
5197  if test "x$CMP" = x; then
5198    # The variable is not set by user, try to locate tool using the code snippet
5199    for ac_prog in cmp
5200do
5201  # Extract the first word of "$ac_prog", so it can be a program name with args.
5202set dummy $ac_prog; ac_word=$2
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5204$as_echo_n "checking for $ac_word... " >&6; }
5205if ${ac_cv_path_CMP+:} false; then :
5206  $as_echo_n "(cached) " >&6
5207else
5208  case $CMP in
5209  [\\/]* | ?:[\\/]*)
5210  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5211  ;;
5212  *)
5213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5214for as_dir in $PATH
5215do
5216  IFS=$as_save_IFS
5217  test -z "$as_dir" && as_dir=.
5218    for ac_exec_ext in '' $ac_executable_extensions; do
5219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5220    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5222    break 2
5223  fi
5224done
5225  done
5226IFS=$as_save_IFS
5227
5228  ;;
5229esac
5230fi
5231CMP=$ac_cv_path_CMP
5232if test -n "$CMP"; then
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5234$as_echo "$CMP" >&6; }
5235else
5236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237$as_echo "no" >&6; }
5238fi
5239
5240
5241  test -n "$CMP" && break
5242done
5243
5244  else
5245    # The variable is set, but is it from the command line or the environment?
5246
5247    # Try to remove the string !CMP! from our list.
5248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5250      # If it failed, the variable was not from the command line. Ignore it,
5251      # but warn the user (except for BASH, which is always set by the calling BASH).
5252      if test "xCMP" != xBASH; then
5253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5254$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5255      fi
5256      # Try to locate tool using the code snippet
5257      for ac_prog in cmp
5258do
5259  # Extract the first word of "$ac_prog", so it can be a program name with args.
5260set dummy $ac_prog; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
5263if ${ac_cv_path_CMP+:} false; then :
5264  $as_echo_n "(cached) " >&6
5265else
5266  case $CMP in
5267  [\\/]* | ?:[\\/]*)
5268  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5269  ;;
5270  *)
5271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in $PATH
5273do
5274  IFS=$as_save_IFS
5275  test -z "$as_dir" && as_dir=.
5276    for ac_exec_ext in '' $ac_executable_extensions; do
5277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5278    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280    break 2
5281  fi
5282done
5283  done
5284IFS=$as_save_IFS
5285
5286  ;;
5287esac
5288fi
5289CMP=$ac_cv_path_CMP
5290if test -n "$CMP"; then
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5292$as_echo "$CMP" >&6; }
5293else
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
5299  test -n "$CMP" && break
5300done
5301
5302    else
5303      # If it succeeded, then it was overridden by the user. We will use it
5304      # for the tool.
5305
5306      # First remove it from the list of overridden variables, so we can test
5307      # for unknown variables in the end.
5308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5309
5310      # Check if the provided tool contains a complete path.
5311      tool_specified="$CMP"
5312      tool_basename="${tool_specified##*/}"
5313      if test "x$tool_basename" = "x$tool_specified"; then
5314        # A command without a complete path is provided, search $PATH.
5315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5316$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5317        # Extract the first word of "$tool_basename", so it can be a program name with args.
5318set dummy $tool_basename; ac_word=$2
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320$as_echo_n "checking for $ac_word... " >&6; }
5321if ${ac_cv_path_CMP+:} false; then :
5322  $as_echo_n "(cached) " >&6
5323else
5324  case $CMP in
5325  [\\/]* | ?:[\\/]*)
5326  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5327  ;;
5328  *)
5329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330for as_dir in $PATH
5331do
5332  IFS=$as_save_IFS
5333  test -z "$as_dir" && as_dir=.
5334    for ac_exec_ext in '' $ac_executable_extensions; do
5335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5338    break 2
5339  fi
5340done
5341  done
5342IFS=$as_save_IFS
5343
5344  ;;
5345esac
5346fi
5347CMP=$ac_cv_path_CMP
5348if test -n "$CMP"; then
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5350$as_echo "$CMP" >&6; }
5351else
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353$as_echo "no" >&6; }
5354fi
5355
5356
5357        if test "x$CMP" = x; then
5358          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5359        fi
5360      else
5361        # Otherwise we believe it is a complete path. Use it as it is.
5362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5363$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5365$as_echo_n "checking for CMP... " >&6; }
5366        if test ! -x "$tool_specified"; then
5367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5368$as_echo "not found" >&6; }
5369          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5370        fi
5371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5372$as_echo "$tool_specified" >&6; }
5373      fi
5374    fi
5375  fi
5376
5377
5378
5379  if test "x$CMP" = x; then
5380    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5381  fi
5382
5383
5384
5385
5386
5387  # Publish this variable in the help.
5388
5389
5390  if test "x$COMM" = x; then
5391    # The variable is not set by user, try to locate tool using the code snippet
5392    for ac_prog in comm
5393do
5394  # Extract the first word of "$ac_prog", so it can be a program name with args.
5395set dummy $ac_prog; ac_word=$2
5396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5397$as_echo_n "checking for $ac_word... " >&6; }
5398if ${ac_cv_path_COMM+:} false; then :
5399  $as_echo_n "(cached) " >&6
5400else
5401  case $COMM in
5402  [\\/]* | ?:[\\/]*)
5403  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5404  ;;
5405  *)
5406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5407for as_dir in $PATH
5408do
5409  IFS=$as_save_IFS
5410  test -z "$as_dir" && as_dir=.
5411    for ac_exec_ext in '' $ac_executable_extensions; do
5412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5413    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5415    break 2
5416  fi
5417done
5418  done
5419IFS=$as_save_IFS
5420
5421  ;;
5422esac
5423fi
5424COMM=$ac_cv_path_COMM
5425if test -n "$COMM"; then
5426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5427$as_echo "$COMM" >&6; }
5428else
5429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5430$as_echo "no" >&6; }
5431fi
5432
5433
5434  test -n "$COMM" && break
5435done
5436
5437  else
5438    # The variable is set, but is it from the command line or the environment?
5439
5440    # Try to remove the string !COMM! from our list.
5441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5443      # If it failed, the variable was not from the command line. Ignore it,
5444      # but warn the user (except for BASH, which is always set by the calling BASH).
5445      if test "xCOMM" != xBASH; then
5446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5447$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5448      fi
5449      # Try to locate tool using the code snippet
5450      for ac_prog in comm
5451do
5452  # Extract the first word of "$ac_prog", so it can be a program name with args.
5453set dummy $ac_prog; ac_word=$2
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455$as_echo_n "checking for $ac_word... " >&6; }
5456if ${ac_cv_path_COMM+:} false; then :
5457  $as_echo_n "(cached) " >&6
5458else
5459  case $COMM in
5460  [\\/]* | ?:[\\/]*)
5461  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5462  ;;
5463  *)
5464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5465for as_dir in $PATH
5466do
5467  IFS=$as_save_IFS
5468  test -z "$as_dir" && as_dir=.
5469    for ac_exec_ext in '' $ac_executable_extensions; do
5470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5471    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5473    break 2
5474  fi
5475done
5476  done
5477IFS=$as_save_IFS
5478
5479  ;;
5480esac
5481fi
5482COMM=$ac_cv_path_COMM
5483if test -n "$COMM"; then
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5485$as_echo "$COMM" >&6; }
5486else
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488$as_echo "no" >&6; }
5489fi
5490
5491
5492  test -n "$COMM" && break
5493done
5494
5495    else
5496      # If it succeeded, then it was overridden by the user. We will use it
5497      # for the tool.
5498
5499      # First remove it from the list of overridden variables, so we can test
5500      # for unknown variables in the end.
5501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5502
5503      # Check if the provided tool contains a complete path.
5504      tool_specified="$COMM"
5505      tool_basename="${tool_specified##*/}"
5506      if test "x$tool_basename" = "x$tool_specified"; then
5507        # A command without a complete path is provided, search $PATH.
5508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5509$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5510        # Extract the first word of "$tool_basename", so it can be a program name with args.
5511set dummy $tool_basename; ac_word=$2
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
5514if ${ac_cv_path_COMM+:} false; then :
5515  $as_echo_n "(cached) " >&6
5516else
5517  case $COMM in
5518  [\\/]* | ?:[\\/]*)
5519  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5520  ;;
5521  *)
5522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525  IFS=$as_save_IFS
5526  test -z "$as_dir" && as_dir=.
5527    for ac_exec_ext in '' $ac_executable_extensions; do
5528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5529    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531    break 2
5532  fi
5533done
5534  done
5535IFS=$as_save_IFS
5536
5537  ;;
5538esac
5539fi
5540COMM=$ac_cv_path_COMM
5541if test -n "$COMM"; then
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5543$as_echo "$COMM" >&6; }
5544else
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
5547fi
5548
5549
5550        if test "x$COMM" = x; then
5551          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5552        fi
5553      else
5554        # Otherwise we believe it is a complete path. Use it as it is.
5555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5556$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5557        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5558$as_echo_n "checking for COMM... " >&6; }
5559        if test ! -x "$tool_specified"; then
5560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5561$as_echo "not found" >&6; }
5562          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5563        fi
5564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5565$as_echo "$tool_specified" >&6; }
5566      fi
5567    fi
5568  fi
5569
5570
5571
5572  if test "x$COMM" = x; then
5573    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5574  fi
5575
5576
5577
5578
5579
5580  # Publish this variable in the help.
5581
5582
5583  if test "x$CP" = x; then
5584    # The variable is not set by user, try to locate tool using the code snippet
5585    for ac_prog in cp
5586do
5587  # Extract the first word of "$ac_prog", so it can be a program name with args.
5588set dummy $ac_prog; ac_word=$2
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590$as_echo_n "checking for $ac_word... " >&6; }
5591if ${ac_cv_path_CP+:} false; then :
5592  $as_echo_n "(cached) " >&6
5593else
5594  case $CP in
5595  [\\/]* | ?:[\\/]*)
5596  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5597  ;;
5598  *)
5599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600for as_dir in $PATH
5601do
5602  IFS=$as_save_IFS
5603  test -z "$as_dir" && as_dir=.
5604    for ac_exec_ext in '' $ac_executable_extensions; do
5605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5606    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5608    break 2
5609  fi
5610done
5611  done
5612IFS=$as_save_IFS
5613
5614  ;;
5615esac
5616fi
5617CP=$ac_cv_path_CP
5618if test -n "$CP"; then
5619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5620$as_echo "$CP" >&6; }
5621else
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623$as_echo "no" >&6; }
5624fi
5625
5626
5627  test -n "$CP" && break
5628done
5629
5630  else
5631    # The variable is set, but is it from the command line or the environment?
5632
5633    # Try to remove the string !CP! from our list.
5634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5636      # If it failed, the variable was not from the command line. Ignore it,
5637      # but warn the user (except for BASH, which is always set by the calling BASH).
5638      if test "xCP" != xBASH; then
5639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5640$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5641      fi
5642      # Try to locate tool using the code snippet
5643      for ac_prog in cp
5644do
5645  # Extract the first word of "$ac_prog", so it can be a program name with args.
5646set dummy $ac_prog; ac_word=$2
5647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5648$as_echo_n "checking for $ac_word... " >&6; }
5649if ${ac_cv_path_CP+:} false; then :
5650  $as_echo_n "(cached) " >&6
5651else
5652  case $CP in
5653  [\\/]* | ?:[\\/]*)
5654  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5655  ;;
5656  *)
5657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658for as_dir in $PATH
5659do
5660  IFS=$as_save_IFS
5661  test -z "$as_dir" && as_dir=.
5662    for ac_exec_ext in '' $ac_executable_extensions; do
5663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5664    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5666    break 2
5667  fi
5668done
5669  done
5670IFS=$as_save_IFS
5671
5672  ;;
5673esac
5674fi
5675CP=$ac_cv_path_CP
5676if test -n "$CP"; then
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5678$as_echo "$CP" >&6; }
5679else
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681$as_echo "no" >&6; }
5682fi
5683
5684
5685  test -n "$CP" && break
5686done
5687
5688    else
5689      # If it succeeded, then it was overridden by the user. We will use it
5690      # for the tool.
5691
5692      # First remove it from the list of overridden variables, so we can test
5693      # for unknown variables in the end.
5694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5695
5696      # Check if the provided tool contains a complete path.
5697      tool_specified="$CP"
5698      tool_basename="${tool_specified##*/}"
5699      if test "x$tool_basename" = "x$tool_specified"; then
5700        # A command without a complete path is provided, search $PATH.
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5702$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5703        # Extract the first word of "$tool_basename", so it can be a program name with args.
5704set dummy $tool_basename; ac_word=$2
5705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5706$as_echo_n "checking for $ac_word... " >&6; }
5707if ${ac_cv_path_CP+:} false; then :
5708  $as_echo_n "(cached) " >&6
5709else
5710  case $CP in
5711  [\\/]* | ?:[\\/]*)
5712  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5713  ;;
5714  *)
5715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716for as_dir in $PATH
5717do
5718  IFS=$as_save_IFS
5719  test -z "$as_dir" && as_dir=.
5720    for ac_exec_ext in '' $ac_executable_extensions; do
5721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5722    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5724    break 2
5725  fi
5726done
5727  done
5728IFS=$as_save_IFS
5729
5730  ;;
5731esac
5732fi
5733CP=$ac_cv_path_CP
5734if test -n "$CP"; then
5735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5736$as_echo "$CP" >&6; }
5737else
5738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739$as_echo "no" >&6; }
5740fi
5741
5742
5743        if test "x$CP" = x; then
5744          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5745        fi
5746      else
5747        # Otherwise we believe it is a complete path. Use it as it is.
5748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5749$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5751$as_echo_n "checking for CP... " >&6; }
5752        if test ! -x "$tool_specified"; then
5753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5754$as_echo "not found" >&6; }
5755          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5756        fi
5757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5758$as_echo "$tool_specified" >&6; }
5759      fi
5760    fi
5761  fi
5762
5763
5764
5765  if test "x$CP" = x; then
5766    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5767  fi
5768
5769
5770
5771
5772
5773  # Publish this variable in the help.
5774
5775
5776  if test "x$CUT" = x; then
5777    # The variable is not set by user, try to locate tool using the code snippet
5778    for ac_prog in cut
5779do
5780  # Extract the first word of "$ac_prog", so it can be a program name with args.
5781set dummy $ac_prog; ac_word=$2
5782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783$as_echo_n "checking for $ac_word... " >&6; }
5784if ${ac_cv_path_CUT+:} false; then :
5785  $as_echo_n "(cached) " >&6
5786else
5787  case $CUT in
5788  [\\/]* | ?:[\\/]*)
5789  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5790  ;;
5791  *)
5792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793for as_dir in $PATH
5794do
5795  IFS=$as_save_IFS
5796  test -z "$as_dir" && as_dir=.
5797    for ac_exec_ext in '' $ac_executable_extensions; do
5798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5799    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5801    break 2
5802  fi
5803done
5804  done
5805IFS=$as_save_IFS
5806
5807  ;;
5808esac
5809fi
5810CUT=$ac_cv_path_CUT
5811if test -n "$CUT"; then
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5813$as_echo "$CUT" >&6; }
5814else
5815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5816$as_echo "no" >&6; }
5817fi
5818
5819
5820  test -n "$CUT" && break
5821done
5822
5823  else
5824    # The variable is set, but is it from the command line or the environment?
5825
5826    # Try to remove the string !CUT! from our list.
5827    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5828    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5829      # If it failed, the variable was not from the command line. Ignore it,
5830      # but warn the user (except for BASH, which is always set by the calling BASH).
5831      if test "xCUT" != xBASH; then
5832        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5833$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5834      fi
5835      # Try to locate tool using the code snippet
5836      for ac_prog in cut
5837do
5838  # Extract the first word of "$ac_prog", so it can be a program name with args.
5839set dummy $ac_prog; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_path_CUT+:} false; then :
5843  $as_echo_n "(cached) " >&6
5844else
5845  case $CUT in
5846  [\\/]* | ?:[\\/]*)
5847  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5848  ;;
5849  *)
5850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851for as_dir in $PATH
5852do
5853  IFS=$as_save_IFS
5854  test -z "$as_dir" && as_dir=.
5855    for ac_exec_ext in '' $ac_executable_extensions; do
5856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5857    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5859    break 2
5860  fi
5861done
5862  done
5863IFS=$as_save_IFS
5864
5865  ;;
5866esac
5867fi
5868CUT=$ac_cv_path_CUT
5869if test -n "$CUT"; then
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5871$as_echo "$CUT" >&6; }
5872else
5873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5874$as_echo "no" >&6; }
5875fi
5876
5877
5878  test -n "$CUT" && break
5879done
5880
5881    else
5882      # If it succeeded, then it was overridden by the user. We will use it
5883      # for the tool.
5884
5885      # First remove it from the list of overridden variables, so we can test
5886      # for unknown variables in the end.
5887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5888
5889      # Check if the provided tool contains a complete path.
5890      tool_specified="$CUT"
5891      tool_basename="${tool_specified##*/}"
5892      if test "x$tool_basename" = "x$tool_specified"; then
5893        # A command without a complete path is provided, search $PATH.
5894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5895$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5896        # Extract the first word of "$tool_basename", so it can be a program name with args.
5897set dummy $tool_basename; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if ${ac_cv_path_CUT+:} false; then :
5901  $as_echo_n "(cached) " >&6
5902else
5903  case $CUT in
5904  [\\/]* | ?:[\\/]*)
5905  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5906  ;;
5907  *)
5908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911  IFS=$as_save_IFS
5912  test -z "$as_dir" && as_dir=.
5913    for ac_exec_ext in '' $ac_executable_extensions; do
5914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917    break 2
5918  fi
5919done
5920  done
5921IFS=$as_save_IFS
5922
5923  ;;
5924esac
5925fi
5926CUT=$ac_cv_path_CUT
5927if test -n "$CUT"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5929$as_echo "$CUT" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936        if test "x$CUT" = x; then
5937          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5938        fi
5939      else
5940        # Otherwise we believe it is a complete path. Use it as it is.
5941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5942$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5944$as_echo_n "checking for CUT... " >&6; }
5945        if test ! -x "$tool_specified"; then
5946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5947$as_echo "not found" >&6; }
5948          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5949        fi
5950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5951$as_echo "$tool_specified" >&6; }
5952      fi
5953    fi
5954  fi
5955
5956
5957
5958  if test "x$CUT" = x; then
5959    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5960  fi
5961
5962
5963
5964
5965
5966  # Publish this variable in the help.
5967
5968
5969  if test "x$DATE" = x; then
5970    # The variable is not set by user, try to locate tool using the code snippet
5971    for ac_prog in date
5972do
5973  # Extract the first word of "$ac_prog", so it can be a program name with args.
5974set dummy $ac_prog; ac_word=$2
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976$as_echo_n "checking for $ac_word... " >&6; }
5977if ${ac_cv_path_DATE+:} false; then :
5978  $as_echo_n "(cached) " >&6
5979else
5980  case $DATE in
5981  [\\/]* | ?:[\\/]*)
5982  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5983  ;;
5984  *)
5985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH
5987do
5988  IFS=$as_save_IFS
5989  test -z "$as_dir" && as_dir=.
5990    for ac_exec_ext in '' $ac_executable_extensions; do
5991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5992    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5994    break 2
5995  fi
5996done
5997  done
5998IFS=$as_save_IFS
5999
6000  ;;
6001esac
6002fi
6003DATE=$ac_cv_path_DATE
6004if test -n "$DATE"; then
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6006$as_echo "$DATE" >&6; }
6007else
6008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
6010fi
6011
6012
6013  test -n "$DATE" && break
6014done
6015
6016  else
6017    # The variable is set, but is it from the command line or the environment?
6018
6019    # Try to remove the string !DATE! from our list.
6020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6022      # If it failed, the variable was not from the command line. Ignore it,
6023      # but warn the user (except for BASH, which is always set by the calling BASH).
6024      if test "xDATE" != xBASH; then
6025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6026$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6027      fi
6028      # Try to locate tool using the code snippet
6029      for ac_prog in date
6030do
6031  # Extract the first word of "$ac_prog", so it can be a program name with args.
6032set dummy $ac_prog; ac_word=$2
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034$as_echo_n "checking for $ac_word... " >&6; }
6035if ${ac_cv_path_DATE+:} false; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  case $DATE in
6039  [\\/]* | ?:[\\/]*)
6040  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6041  ;;
6042  *)
6043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044for as_dir in $PATH
6045do
6046  IFS=$as_save_IFS
6047  test -z "$as_dir" && as_dir=.
6048    for ac_exec_ext in '' $ac_executable_extensions; do
6049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6050    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6052    break 2
6053  fi
6054done
6055  done
6056IFS=$as_save_IFS
6057
6058  ;;
6059esac
6060fi
6061DATE=$ac_cv_path_DATE
6062if test -n "$DATE"; then
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6064$as_echo "$DATE" >&6; }
6065else
6066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071  test -n "$DATE" && break
6072done
6073
6074    else
6075      # If it succeeded, then it was overridden by the user. We will use it
6076      # for the tool.
6077
6078      # First remove it from the list of overridden variables, so we can test
6079      # for unknown variables in the end.
6080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6081
6082      # Check if the provided tool contains a complete path.
6083      tool_specified="$DATE"
6084      tool_basename="${tool_specified##*/}"
6085      if test "x$tool_basename" = "x$tool_specified"; then
6086        # A command without a complete path is provided, search $PATH.
6087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6088$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6089        # Extract the first word of "$tool_basename", so it can be a program name with args.
6090set dummy $tool_basename; ac_word=$2
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6092$as_echo_n "checking for $ac_word... " >&6; }
6093if ${ac_cv_path_DATE+:} false; then :
6094  $as_echo_n "(cached) " >&6
6095else
6096  case $DATE in
6097  [\\/]* | ?:[\\/]*)
6098  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6099  ;;
6100  *)
6101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104  IFS=$as_save_IFS
6105  test -z "$as_dir" && as_dir=.
6106    for ac_exec_ext in '' $ac_executable_extensions; do
6107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6108    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110    break 2
6111  fi
6112done
6113  done
6114IFS=$as_save_IFS
6115
6116  ;;
6117esac
6118fi
6119DATE=$ac_cv_path_DATE
6120if test -n "$DATE"; then
6121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6122$as_echo "$DATE" >&6; }
6123else
6124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6125$as_echo "no" >&6; }
6126fi
6127
6128
6129        if test "x$DATE" = x; then
6130          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6131        fi
6132      else
6133        # Otherwise we believe it is a complete path. Use it as it is.
6134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6135$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6137$as_echo_n "checking for DATE... " >&6; }
6138        if test ! -x "$tool_specified"; then
6139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6140$as_echo "not found" >&6; }
6141          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6142        fi
6143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6144$as_echo "$tool_specified" >&6; }
6145      fi
6146    fi
6147  fi
6148
6149
6150
6151  if test "x$DATE" = x; then
6152    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6153  fi
6154
6155
6156
6157
6158
6159  # Publish this variable in the help.
6160
6161
6162  if test "x$DIFF" = x; then
6163    # The variable is not set by user, try to locate tool using the code snippet
6164    for ac_prog in gdiff diff
6165do
6166  # Extract the first word of "$ac_prog", so it can be a program name with args.
6167set dummy $ac_prog; ac_word=$2
6168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6169$as_echo_n "checking for $ac_word... " >&6; }
6170if ${ac_cv_path_DIFF+:} false; then :
6171  $as_echo_n "(cached) " >&6
6172else
6173  case $DIFF in
6174  [\\/]* | ?:[\\/]*)
6175  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6176  ;;
6177  *)
6178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6179for as_dir in $PATH
6180do
6181  IFS=$as_save_IFS
6182  test -z "$as_dir" && as_dir=.
6183    for ac_exec_ext in '' $ac_executable_extensions; do
6184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6185    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6187    break 2
6188  fi
6189done
6190  done
6191IFS=$as_save_IFS
6192
6193  ;;
6194esac
6195fi
6196DIFF=$ac_cv_path_DIFF
6197if test -n "$DIFF"; then
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6199$as_echo "$DIFF" >&6; }
6200else
6201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202$as_echo "no" >&6; }
6203fi
6204
6205
6206  test -n "$DIFF" && break
6207done
6208
6209  else
6210    # The variable is set, but is it from the command line or the environment?
6211
6212    # Try to remove the string !DIFF! from our list.
6213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6215      # If it failed, the variable was not from the command line. Ignore it,
6216      # but warn the user (except for BASH, which is always set by the calling BASH).
6217      if test "xDIFF" != xBASH; then
6218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6219$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6220      fi
6221      # Try to locate tool using the code snippet
6222      for ac_prog in gdiff diff
6223do
6224  # Extract the first word of "$ac_prog", so it can be a program name with args.
6225set dummy $ac_prog; ac_word=$2
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6227$as_echo_n "checking for $ac_word... " >&6; }
6228if ${ac_cv_path_DIFF+:} false; then :
6229  $as_echo_n "(cached) " >&6
6230else
6231  case $DIFF in
6232  [\\/]* | ?:[\\/]*)
6233  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6234  ;;
6235  *)
6236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239  IFS=$as_save_IFS
6240  test -z "$as_dir" && as_dir=.
6241    for ac_exec_ext in '' $ac_executable_extensions; do
6242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6243    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245    break 2
6246  fi
6247done
6248  done
6249IFS=$as_save_IFS
6250
6251  ;;
6252esac
6253fi
6254DIFF=$ac_cv_path_DIFF
6255if test -n "$DIFF"; then
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6257$as_echo "$DIFF" >&6; }
6258else
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6260$as_echo "no" >&6; }
6261fi
6262
6263
6264  test -n "$DIFF" && break
6265done
6266
6267    else
6268      # If it succeeded, then it was overridden by the user. We will use it
6269      # for the tool.
6270
6271      # First remove it from the list of overridden variables, so we can test
6272      # for unknown variables in the end.
6273      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6274
6275      # Check if the provided tool contains a complete path.
6276      tool_specified="$DIFF"
6277      tool_basename="${tool_specified##*/}"
6278      if test "x$tool_basename" = "x$tool_specified"; then
6279        # A command without a complete path is provided, search $PATH.
6280        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6281$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6282        # Extract the first word of "$tool_basename", so it can be a program name with args.
6283set dummy $tool_basename; ac_word=$2
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6285$as_echo_n "checking for $ac_word... " >&6; }
6286if ${ac_cv_path_DIFF+:} false; then :
6287  $as_echo_n "(cached) " >&6
6288else
6289  case $DIFF in
6290  [\\/]* | ?:[\\/]*)
6291  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6292  ;;
6293  *)
6294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6295for as_dir in $PATH
6296do
6297  IFS=$as_save_IFS
6298  test -z "$as_dir" && as_dir=.
6299    for ac_exec_ext in '' $ac_executable_extensions; do
6300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6301    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6303    break 2
6304  fi
6305done
6306  done
6307IFS=$as_save_IFS
6308
6309  ;;
6310esac
6311fi
6312DIFF=$ac_cv_path_DIFF
6313if test -n "$DIFF"; then
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6315$as_echo "$DIFF" >&6; }
6316else
6317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318$as_echo "no" >&6; }
6319fi
6320
6321
6322        if test "x$DIFF" = x; then
6323          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6324        fi
6325      else
6326        # Otherwise we believe it is a complete path. Use it as it is.
6327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6328$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6329        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6330$as_echo_n "checking for DIFF... " >&6; }
6331        if test ! -x "$tool_specified"; then
6332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6333$as_echo "not found" >&6; }
6334          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6335        fi
6336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6337$as_echo "$tool_specified" >&6; }
6338      fi
6339    fi
6340  fi
6341
6342
6343
6344  if test "x$DIFF" = x; then
6345    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6346  fi
6347
6348
6349
6350
6351
6352  # Publish this variable in the help.
6353
6354
6355  if test "x$DIRNAME" = x; then
6356    # The variable is not set by user, try to locate tool using the code snippet
6357    for ac_prog in dirname
6358do
6359  # Extract the first word of "$ac_prog", so it can be a program name with args.
6360set dummy $ac_prog; ac_word=$2
6361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6362$as_echo_n "checking for $ac_word... " >&6; }
6363if ${ac_cv_path_DIRNAME+:} false; then :
6364  $as_echo_n "(cached) " >&6
6365else
6366  case $DIRNAME in
6367  [\\/]* | ?:[\\/]*)
6368  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6369  ;;
6370  *)
6371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6372for as_dir in $PATH
6373do
6374  IFS=$as_save_IFS
6375  test -z "$as_dir" && as_dir=.
6376    for ac_exec_ext in '' $ac_executable_extensions; do
6377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6378    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6380    break 2
6381  fi
6382done
6383  done
6384IFS=$as_save_IFS
6385
6386  ;;
6387esac
6388fi
6389DIRNAME=$ac_cv_path_DIRNAME
6390if test -n "$DIRNAME"; then
6391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6392$as_echo "$DIRNAME" >&6; }
6393else
6394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6395$as_echo "no" >&6; }
6396fi
6397
6398
6399  test -n "$DIRNAME" && break
6400done
6401
6402  else
6403    # The variable is set, but is it from the command line or the environment?
6404
6405    # Try to remove the string !DIRNAME! from our list.
6406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6408      # If it failed, the variable was not from the command line. Ignore it,
6409      # but warn the user (except for BASH, which is always set by the calling BASH).
6410      if test "xDIRNAME" != xBASH; then
6411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6412$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6413      fi
6414      # Try to locate tool using the code snippet
6415      for ac_prog in dirname
6416do
6417  # Extract the first word of "$ac_prog", so it can be a program name with args.
6418set dummy $ac_prog; ac_word=$2
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420$as_echo_n "checking for $ac_word... " >&6; }
6421if ${ac_cv_path_DIRNAME+:} false; then :
6422  $as_echo_n "(cached) " >&6
6423else
6424  case $DIRNAME in
6425  [\\/]* | ?:[\\/]*)
6426  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6427  ;;
6428  *)
6429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432  IFS=$as_save_IFS
6433  test -z "$as_dir" && as_dir=.
6434    for ac_exec_ext in '' $ac_executable_extensions; do
6435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6436    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438    break 2
6439  fi
6440done
6441  done
6442IFS=$as_save_IFS
6443
6444  ;;
6445esac
6446fi
6447DIRNAME=$ac_cv_path_DIRNAME
6448if test -n "$DIRNAME"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6450$as_echo "$DIRNAME" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457  test -n "$DIRNAME" && break
6458done
6459
6460    else
6461      # If it succeeded, then it was overridden by the user. We will use it
6462      # for the tool.
6463
6464      # First remove it from the list of overridden variables, so we can test
6465      # for unknown variables in the end.
6466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6467
6468      # Check if the provided tool contains a complete path.
6469      tool_specified="$DIRNAME"
6470      tool_basename="${tool_specified##*/}"
6471      if test "x$tool_basename" = "x$tool_specified"; then
6472        # A command without a complete path is provided, search $PATH.
6473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6474$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6475        # Extract the first word of "$tool_basename", so it can be a program name with args.
6476set dummy $tool_basename; ac_word=$2
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478$as_echo_n "checking for $ac_word... " >&6; }
6479if ${ac_cv_path_DIRNAME+:} false; then :
6480  $as_echo_n "(cached) " >&6
6481else
6482  case $DIRNAME in
6483  [\\/]* | ?:[\\/]*)
6484  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6485  ;;
6486  *)
6487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490  IFS=$as_save_IFS
6491  test -z "$as_dir" && as_dir=.
6492    for ac_exec_ext in '' $ac_executable_extensions; do
6493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496    break 2
6497  fi
6498done
6499  done
6500IFS=$as_save_IFS
6501
6502  ;;
6503esac
6504fi
6505DIRNAME=$ac_cv_path_DIRNAME
6506if test -n "$DIRNAME"; then
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6508$as_echo "$DIRNAME" >&6; }
6509else
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514
6515        if test "x$DIRNAME" = x; then
6516          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6517        fi
6518      else
6519        # Otherwise we believe it is a complete path. Use it as it is.
6520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6521$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6523$as_echo_n "checking for DIRNAME... " >&6; }
6524        if test ! -x "$tool_specified"; then
6525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6526$as_echo "not found" >&6; }
6527          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6528        fi
6529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6530$as_echo "$tool_specified" >&6; }
6531      fi
6532    fi
6533  fi
6534
6535
6536
6537  if test "x$DIRNAME" = x; then
6538    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6539  fi
6540
6541
6542
6543
6544
6545  # Publish this variable in the help.
6546
6547
6548  if test "x$ECHO" = x; then
6549    # The variable is not set by user, try to locate tool using the code snippet
6550    for ac_prog in echo
6551do
6552  # Extract the first word of "$ac_prog", so it can be a program name with args.
6553set dummy $ac_prog; ac_word=$2
6554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6555$as_echo_n "checking for $ac_word... " >&6; }
6556if ${ac_cv_path_ECHO+:} false; then :
6557  $as_echo_n "(cached) " >&6
6558else
6559  case $ECHO in
6560  [\\/]* | ?:[\\/]*)
6561  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6562  ;;
6563  *)
6564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6565for as_dir in $PATH
6566do
6567  IFS=$as_save_IFS
6568  test -z "$as_dir" && as_dir=.
6569    for ac_exec_ext in '' $ac_executable_extensions; do
6570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6571    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6573    break 2
6574  fi
6575done
6576  done
6577IFS=$as_save_IFS
6578
6579  ;;
6580esac
6581fi
6582ECHO=$ac_cv_path_ECHO
6583if test -n "$ECHO"; then
6584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6585$as_echo "$ECHO" >&6; }
6586else
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588$as_echo "no" >&6; }
6589fi
6590
6591
6592  test -n "$ECHO" && break
6593done
6594
6595  else
6596    # The variable is set, but is it from the command line or the environment?
6597
6598    # Try to remove the string !ECHO! from our list.
6599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6601      # If it failed, the variable was not from the command line. Ignore it,
6602      # but warn the user (except for BASH, which is always set by the calling BASH).
6603      if test "xECHO" != xBASH; then
6604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6605$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6606      fi
6607      # Try to locate tool using the code snippet
6608      for ac_prog in echo
6609do
6610  # Extract the first word of "$ac_prog", so it can be a program name with args.
6611set dummy $ac_prog; ac_word=$2
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6613$as_echo_n "checking for $ac_word... " >&6; }
6614if ${ac_cv_path_ECHO+:} false; then :
6615  $as_echo_n "(cached) " >&6
6616else
6617  case $ECHO in
6618  [\\/]* | ?:[\\/]*)
6619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6620  ;;
6621  *)
6622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6623for as_dir in $PATH
6624do
6625  IFS=$as_save_IFS
6626  test -z "$as_dir" && as_dir=.
6627    for ac_exec_ext in '' $ac_executable_extensions; do
6628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6631    break 2
6632  fi
6633done
6634  done
6635IFS=$as_save_IFS
6636
6637  ;;
6638esac
6639fi
6640ECHO=$ac_cv_path_ECHO
6641if test -n "$ECHO"; then
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6643$as_echo "$ECHO" >&6; }
6644else
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6646$as_echo "no" >&6; }
6647fi
6648
6649
6650  test -n "$ECHO" && break
6651done
6652
6653    else
6654      # If it succeeded, then it was overridden by the user. We will use it
6655      # for the tool.
6656
6657      # First remove it from the list of overridden variables, so we can test
6658      # for unknown variables in the end.
6659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6660
6661      # Check if the provided tool contains a complete path.
6662      tool_specified="$ECHO"
6663      tool_basename="${tool_specified##*/}"
6664      if test "x$tool_basename" = "x$tool_specified"; then
6665        # A command without a complete path is provided, search $PATH.
6666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6667$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6668        # Extract the first word of "$tool_basename", so it can be a program name with args.
6669set dummy $tool_basename; ac_word=$2
6670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6671$as_echo_n "checking for $ac_word... " >&6; }
6672if ${ac_cv_path_ECHO+:} false; then :
6673  $as_echo_n "(cached) " >&6
6674else
6675  case $ECHO in
6676  [\\/]* | ?:[\\/]*)
6677  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6678  ;;
6679  *)
6680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6681for as_dir in $PATH
6682do
6683  IFS=$as_save_IFS
6684  test -z "$as_dir" && as_dir=.
6685    for ac_exec_ext in '' $ac_executable_extensions; do
6686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6687    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6689    break 2
6690  fi
6691done
6692  done
6693IFS=$as_save_IFS
6694
6695  ;;
6696esac
6697fi
6698ECHO=$ac_cv_path_ECHO
6699if test -n "$ECHO"; then
6700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6701$as_echo "$ECHO" >&6; }
6702else
6703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6704$as_echo "no" >&6; }
6705fi
6706
6707
6708        if test "x$ECHO" = x; then
6709          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6710        fi
6711      else
6712        # Otherwise we believe it is a complete path. Use it as it is.
6713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6714$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6716$as_echo_n "checking for ECHO... " >&6; }
6717        if test ! -x "$tool_specified"; then
6718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6719$as_echo "not found" >&6; }
6720          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6721        fi
6722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6723$as_echo "$tool_specified" >&6; }
6724      fi
6725    fi
6726  fi
6727
6728
6729
6730  if test "x$ECHO" = x; then
6731    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6732  fi
6733
6734
6735
6736
6737
6738  # Publish this variable in the help.
6739
6740
6741  if test "x$EXPR" = x; then
6742    # The variable is not set by user, try to locate tool using the code snippet
6743    for ac_prog in expr
6744do
6745  # Extract the first word of "$ac_prog", so it can be a program name with args.
6746set dummy $ac_prog; ac_word=$2
6747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6748$as_echo_n "checking for $ac_word... " >&6; }
6749if ${ac_cv_path_EXPR+:} false; then :
6750  $as_echo_n "(cached) " >&6
6751else
6752  case $EXPR in
6753  [\\/]* | ?:[\\/]*)
6754  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6755  ;;
6756  *)
6757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6758for as_dir in $PATH
6759do
6760  IFS=$as_save_IFS
6761  test -z "$as_dir" && as_dir=.
6762    for ac_exec_ext in '' $ac_executable_extensions; do
6763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6764    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6766    break 2
6767  fi
6768done
6769  done
6770IFS=$as_save_IFS
6771
6772  ;;
6773esac
6774fi
6775EXPR=$ac_cv_path_EXPR
6776if test -n "$EXPR"; then
6777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6778$as_echo "$EXPR" >&6; }
6779else
6780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6781$as_echo "no" >&6; }
6782fi
6783
6784
6785  test -n "$EXPR" && break
6786done
6787
6788  else
6789    # The variable is set, but is it from the command line or the environment?
6790
6791    # Try to remove the string !EXPR! from our list.
6792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6794      # If it failed, the variable was not from the command line. Ignore it,
6795      # but warn the user (except for BASH, which is always set by the calling BASH).
6796      if test "xEXPR" != xBASH; then
6797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6798$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6799      fi
6800      # Try to locate tool using the code snippet
6801      for ac_prog in expr
6802do
6803  # Extract the first word of "$ac_prog", so it can be a program name with args.
6804set dummy $ac_prog; ac_word=$2
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6806$as_echo_n "checking for $ac_word... " >&6; }
6807if ${ac_cv_path_EXPR+:} false; then :
6808  $as_echo_n "(cached) " >&6
6809else
6810  case $EXPR in
6811  [\\/]* | ?:[\\/]*)
6812  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6813  ;;
6814  *)
6815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6816for as_dir in $PATH
6817do
6818  IFS=$as_save_IFS
6819  test -z "$as_dir" && as_dir=.
6820    for ac_exec_ext in '' $ac_executable_extensions; do
6821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6822    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6824    break 2
6825  fi
6826done
6827  done
6828IFS=$as_save_IFS
6829
6830  ;;
6831esac
6832fi
6833EXPR=$ac_cv_path_EXPR
6834if test -n "$EXPR"; then
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6836$as_echo "$EXPR" >&6; }
6837else
6838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839$as_echo "no" >&6; }
6840fi
6841
6842
6843  test -n "$EXPR" && break
6844done
6845
6846    else
6847      # If it succeeded, then it was overridden by the user. We will use it
6848      # for the tool.
6849
6850      # First remove it from the list of overridden variables, so we can test
6851      # for unknown variables in the end.
6852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6853
6854      # Check if the provided tool contains a complete path.
6855      tool_specified="$EXPR"
6856      tool_basename="${tool_specified##*/}"
6857      if test "x$tool_basename" = "x$tool_specified"; then
6858        # A command without a complete path is provided, search $PATH.
6859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6860$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6861        # Extract the first word of "$tool_basename", so it can be a program name with args.
6862set dummy $tool_basename; ac_word=$2
6863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6864$as_echo_n "checking for $ac_word... " >&6; }
6865if ${ac_cv_path_EXPR+:} false; then :
6866  $as_echo_n "(cached) " >&6
6867else
6868  case $EXPR in
6869  [\\/]* | ?:[\\/]*)
6870  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6871  ;;
6872  *)
6873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6874for as_dir in $PATH
6875do
6876  IFS=$as_save_IFS
6877  test -z "$as_dir" && as_dir=.
6878    for ac_exec_ext in '' $ac_executable_extensions; do
6879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6880    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6882    break 2
6883  fi
6884done
6885  done
6886IFS=$as_save_IFS
6887
6888  ;;
6889esac
6890fi
6891EXPR=$ac_cv_path_EXPR
6892if test -n "$EXPR"; then
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6894$as_echo "$EXPR" >&6; }
6895else
6896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6897$as_echo "no" >&6; }
6898fi
6899
6900
6901        if test "x$EXPR" = x; then
6902          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6903        fi
6904      else
6905        # Otherwise we believe it is a complete path. Use it as it is.
6906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6907$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6908        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6909$as_echo_n "checking for EXPR... " >&6; }
6910        if test ! -x "$tool_specified"; then
6911          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6912$as_echo "not found" >&6; }
6913          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6914        fi
6915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6916$as_echo "$tool_specified" >&6; }
6917      fi
6918    fi
6919  fi
6920
6921
6922
6923  if test "x$EXPR" = x; then
6924    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6925  fi
6926
6927
6928
6929
6930
6931  # Publish this variable in the help.
6932
6933
6934  if test "x$FILE" = x; then
6935    # The variable is not set by user, try to locate tool using the code snippet
6936    for ac_prog in file
6937do
6938  # Extract the first word of "$ac_prog", so it can be a program name with args.
6939set dummy $ac_prog; ac_word=$2
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6941$as_echo_n "checking for $ac_word... " >&6; }
6942if ${ac_cv_path_FILE+:} false; then :
6943  $as_echo_n "(cached) " >&6
6944else
6945  case $FILE in
6946  [\\/]* | ?:[\\/]*)
6947  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6948  ;;
6949  *)
6950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6951for as_dir in $PATH
6952do
6953  IFS=$as_save_IFS
6954  test -z "$as_dir" && as_dir=.
6955    for ac_exec_ext in '' $ac_executable_extensions; do
6956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6957    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6959    break 2
6960  fi
6961done
6962  done
6963IFS=$as_save_IFS
6964
6965  ;;
6966esac
6967fi
6968FILE=$ac_cv_path_FILE
6969if test -n "$FILE"; then
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6971$as_echo "$FILE" >&6; }
6972else
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6974$as_echo "no" >&6; }
6975fi
6976
6977
6978  test -n "$FILE" && break
6979done
6980
6981  else
6982    # The variable is set, but is it from the command line or the environment?
6983
6984    # Try to remove the string !FILE! from our list.
6985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6987      # If it failed, the variable was not from the command line. Ignore it,
6988      # but warn the user (except for BASH, which is always set by the calling BASH).
6989      if test "xFILE" != xBASH; then
6990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6991$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6992      fi
6993      # Try to locate tool using the code snippet
6994      for ac_prog in file
6995do
6996  # Extract the first word of "$ac_prog", so it can be a program name with args.
6997set dummy $ac_prog; ac_word=$2
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999$as_echo_n "checking for $ac_word... " >&6; }
7000if ${ac_cv_path_FILE+:} false; then :
7001  $as_echo_n "(cached) " >&6
7002else
7003  case $FILE in
7004  [\\/]* | ?:[\\/]*)
7005  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7006  ;;
7007  *)
7008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009for as_dir in $PATH
7010do
7011  IFS=$as_save_IFS
7012  test -z "$as_dir" && as_dir=.
7013    for ac_exec_ext in '' $ac_executable_extensions; do
7014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7017    break 2
7018  fi
7019done
7020  done
7021IFS=$as_save_IFS
7022
7023  ;;
7024esac
7025fi
7026FILE=$ac_cv_path_FILE
7027if test -n "$FILE"; then
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7029$as_echo "$FILE" >&6; }
7030else
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032$as_echo "no" >&6; }
7033fi
7034
7035
7036  test -n "$FILE" && break
7037done
7038
7039    else
7040      # If it succeeded, then it was overridden by the user. We will use it
7041      # for the tool.
7042
7043      # First remove it from the list of overridden variables, so we can test
7044      # for unknown variables in the end.
7045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7046
7047      # Check if the provided tool contains a complete path.
7048      tool_specified="$FILE"
7049      tool_basename="${tool_specified##*/}"
7050      if test "x$tool_basename" = "x$tool_specified"; then
7051        # A command without a complete path is provided, search $PATH.
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7053$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7054        # Extract the first word of "$tool_basename", so it can be a program name with args.
7055set dummy $tool_basename; ac_word=$2
7056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7057$as_echo_n "checking for $ac_word... " >&6; }
7058if ${ac_cv_path_FILE+:} false; then :
7059  $as_echo_n "(cached) " >&6
7060else
7061  case $FILE in
7062  [\\/]* | ?:[\\/]*)
7063  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7064  ;;
7065  *)
7066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7067for as_dir in $PATH
7068do
7069  IFS=$as_save_IFS
7070  test -z "$as_dir" && as_dir=.
7071    for ac_exec_ext in '' $ac_executable_extensions; do
7072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7073    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7075    break 2
7076  fi
7077done
7078  done
7079IFS=$as_save_IFS
7080
7081  ;;
7082esac
7083fi
7084FILE=$ac_cv_path_FILE
7085if test -n "$FILE"; then
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7087$as_echo "$FILE" >&6; }
7088else
7089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7090$as_echo "no" >&6; }
7091fi
7092
7093
7094        if test "x$FILE" = x; then
7095          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7096        fi
7097      else
7098        # Otherwise we believe it is a complete path. Use it as it is.
7099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7100$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7102$as_echo_n "checking for FILE... " >&6; }
7103        if test ! -x "$tool_specified"; then
7104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7105$as_echo "not found" >&6; }
7106          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7107        fi
7108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7109$as_echo "$tool_specified" >&6; }
7110      fi
7111    fi
7112  fi
7113
7114
7115
7116  if test "x$FILE" = x; then
7117    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7118  fi
7119
7120
7121
7122
7123
7124  # Publish this variable in the help.
7125
7126
7127  if test "x$FIND" = x; then
7128    # The variable is not set by user, try to locate tool using the code snippet
7129    for ac_prog in find
7130do
7131  # Extract the first word of "$ac_prog", so it can be a program name with args.
7132set dummy $ac_prog; ac_word=$2
7133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7134$as_echo_n "checking for $ac_word... " >&6; }
7135if ${ac_cv_path_FIND+:} false; then :
7136  $as_echo_n "(cached) " >&6
7137else
7138  case $FIND in
7139  [\\/]* | ?:[\\/]*)
7140  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7141  ;;
7142  *)
7143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7144for as_dir in $PATH
7145do
7146  IFS=$as_save_IFS
7147  test -z "$as_dir" && as_dir=.
7148    for ac_exec_ext in '' $ac_executable_extensions; do
7149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7150    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7152    break 2
7153  fi
7154done
7155  done
7156IFS=$as_save_IFS
7157
7158  ;;
7159esac
7160fi
7161FIND=$ac_cv_path_FIND
7162if test -n "$FIND"; then
7163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7164$as_echo "$FIND" >&6; }
7165else
7166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7167$as_echo "no" >&6; }
7168fi
7169
7170
7171  test -n "$FIND" && break
7172done
7173
7174  else
7175    # The variable is set, but is it from the command line or the environment?
7176
7177    # Try to remove the string !FIND! from our list.
7178    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7179    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7180      # If it failed, the variable was not from the command line. Ignore it,
7181      # but warn the user (except for BASH, which is always set by the calling BASH).
7182      if test "xFIND" != xBASH; then
7183        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7184$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7185      fi
7186      # Try to locate tool using the code snippet
7187      for ac_prog in find
7188do
7189  # Extract the first word of "$ac_prog", so it can be a program name with args.
7190set dummy $ac_prog; ac_word=$2
7191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7192$as_echo_n "checking for $ac_word... " >&6; }
7193if ${ac_cv_path_FIND+:} false; then :
7194  $as_echo_n "(cached) " >&6
7195else
7196  case $FIND in
7197  [\\/]* | ?:[\\/]*)
7198  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7199  ;;
7200  *)
7201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7202for as_dir in $PATH
7203do
7204  IFS=$as_save_IFS
7205  test -z "$as_dir" && as_dir=.
7206    for ac_exec_ext in '' $ac_executable_extensions; do
7207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7208    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7210    break 2
7211  fi
7212done
7213  done
7214IFS=$as_save_IFS
7215
7216  ;;
7217esac
7218fi
7219FIND=$ac_cv_path_FIND
7220if test -n "$FIND"; then
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7222$as_echo "$FIND" >&6; }
7223else
7224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225$as_echo "no" >&6; }
7226fi
7227
7228
7229  test -n "$FIND" && break
7230done
7231
7232    else
7233      # If it succeeded, then it was overridden by the user. We will use it
7234      # for the tool.
7235
7236      # First remove it from the list of overridden variables, so we can test
7237      # for unknown variables in the end.
7238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7239
7240      # Check if the provided tool contains a complete path.
7241      tool_specified="$FIND"
7242      tool_basename="${tool_specified##*/}"
7243      if test "x$tool_basename" = "x$tool_specified"; then
7244        # A command without a complete path is provided, search $PATH.
7245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7246$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7247        # Extract the first word of "$tool_basename", so it can be a program name with args.
7248set dummy $tool_basename; ac_word=$2
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250$as_echo_n "checking for $ac_word... " >&6; }
7251if ${ac_cv_path_FIND+:} false; then :
7252  $as_echo_n "(cached) " >&6
7253else
7254  case $FIND in
7255  [\\/]* | ?:[\\/]*)
7256  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7257  ;;
7258  *)
7259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260for as_dir in $PATH
7261do
7262  IFS=$as_save_IFS
7263  test -z "$as_dir" && as_dir=.
7264    for ac_exec_ext in '' $ac_executable_extensions; do
7265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268    break 2
7269  fi
7270done
7271  done
7272IFS=$as_save_IFS
7273
7274  ;;
7275esac
7276fi
7277FIND=$ac_cv_path_FIND
7278if test -n "$FIND"; then
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7280$as_echo "$FIND" >&6; }
7281else
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283$as_echo "no" >&6; }
7284fi
7285
7286
7287        if test "x$FIND" = x; then
7288          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7289        fi
7290      else
7291        # Otherwise we believe it is a complete path. Use it as it is.
7292        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7293$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7295$as_echo_n "checking for FIND... " >&6; }
7296        if test ! -x "$tool_specified"; then
7297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7298$as_echo "not found" >&6; }
7299          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7300        fi
7301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7302$as_echo "$tool_specified" >&6; }
7303      fi
7304    fi
7305  fi
7306
7307
7308
7309  if test "x$FIND" = x; then
7310    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7311  fi
7312
7313
7314
7315
7316
7317  # Publish this variable in the help.
7318
7319
7320  if test "x$HEAD" = x; then
7321    # The variable is not set by user, try to locate tool using the code snippet
7322    for ac_prog in head
7323do
7324  # Extract the first word of "$ac_prog", so it can be a program name with args.
7325set dummy $ac_prog; ac_word=$2
7326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7327$as_echo_n "checking for $ac_word... " >&6; }
7328if ${ac_cv_path_HEAD+:} false; then :
7329  $as_echo_n "(cached) " >&6
7330else
7331  case $HEAD in
7332  [\\/]* | ?:[\\/]*)
7333  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7334  ;;
7335  *)
7336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7337for as_dir in $PATH
7338do
7339  IFS=$as_save_IFS
7340  test -z "$as_dir" && as_dir=.
7341    for ac_exec_ext in '' $ac_executable_extensions; do
7342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7343    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7345    break 2
7346  fi
7347done
7348  done
7349IFS=$as_save_IFS
7350
7351  ;;
7352esac
7353fi
7354HEAD=$ac_cv_path_HEAD
7355if test -n "$HEAD"; then
7356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7357$as_echo "$HEAD" >&6; }
7358else
7359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7360$as_echo "no" >&6; }
7361fi
7362
7363
7364  test -n "$HEAD" && break
7365done
7366
7367  else
7368    # The variable is set, but is it from the command line or the environment?
7369
7370    # Try to remove the string !HEAD! from our list.
7371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7373      # If it failed, the variable was not from the command line. Ignore it,
7374      # but warn the user (except for BASH, which is always set by the calling BASH).
7375      if test "xHEAD" != xBASH; then
7376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7377$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7378      fi
7379      # Try to locate tool using the code snippet
7380      for ac_prog in head
7381do
7382  # Extract the first word of "$ac_prog", so it can be a program name with args.
7383set dummy $ac_prog; ac_word=$2
7384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7385$as_echo_n "checking for $ac_word... " >&6; }
7386if ${ac_cv_path_HEAD+:} false; then :
7387  $as_echo_n "(cached) " >&6
7388else
7389  case $HEAD in
7390  [\\/]* | ?:[\\/]*)
7391  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7392  ;;
7393  *)
7394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395for as_dir in $PATH
7396do
7397  IFS=$as_save_IFS
7398  test -z "$as_dir" && as_dir=.
7399    for ac_exec_ext in '' $ac_executable_extensions; do
7400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7401    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403    break 2
7404  fi
7405done
7406  done
7407IFS=$as_save_IFS
7408
7409  ;;
7410esac
7411fi
7412HEAD=$ac_cv_path_HEAD
7413if test -n "$HEAD"; then
7414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7415$as_echo "$HEAD" >&6; }
7416else
7417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7418$as_echo "no" >&6; }
7419fi
7420
7421
7422  test -n "$HEAD" && break
7423done
7424
7425    else
7426      # If it succeeded, then it was overridden by the user. We will use it
7427      # for the tool.
7428
7429      # First remove it from the list of overridden variables, so we can test
7430      # for unknown variables in the end.
7431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7432
7433      # Check if the provided tool contains a complete path.
7434      tool_specified="$HEAD"
7435      tool_basename="${tool_specified##*/}"
7436      if test "x$tool_basename" = "x$tool_specified"; then
7437        # A command without a complete path is provided, search $PATH.
7438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7439$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7440        # Extract the first word of "$tool_basename", so it can be a program name with args.
7441set dummy $tool_basename; ac_word=$2
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7443$as_echo_n "checking for $ac_word... " >&6; }
7444if ${ac_cv_path_HEAD+:} false; then :
7445  $as_echo_n "(cached) " >&6
7446else
7447  case $HEAD in
7448  [\\/]* | ?:[\\/]*)
7449  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7450  ;;
7451  *)
7452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7453for as_dir in $PATH
7454do
7455  IFS=$as_save_IFS
7456  test -z "$as_dir" && as_dir=.
7457    for ac_exec_ext in '' $ac_executable_extensions; do
7458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7459    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7461    break 2
7462  fi
7463done
7464  done
7465IFS=$as_save_IFS
7466
7467  ;;
7468esac
7469fi
7470HEAD=$ac_cv_path_HEAD
7471if test -n "$HEAD"; then
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7473$as_echo "$HEAD" >&6; }
7474else
7475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7476$as_echo "no" >&6; }
7477fi
7478
7479
7480        if test "x$HEAD" = x; then
7481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7482        fi
7483      else
7484        # Otherwise we believe it is a complete path. Use it as it is.
7485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7486$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7488$as_echo_n "checking for HEAD... " >&6; }
7489        if test ! -x "$tool_specified"; then
7490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7491$as_echo "not found" >&6; }
7492          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7493        fi
7494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7495$as_echo "$tool_specified" >&6; }
7496      fi
7497    fi
7498  fi
7499
7500
7501
7502  if test "x$HEAD" = x; then
7503    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7504  fi
7505
7506
7507
7508
7509
7510  # Publish this variable in the help.
7511
7512
7513  if test "x$LN" = x; then
7514    # The variable is not set by user, try to locate tool using the code snippet
7515    for ac_prog in ln
7516do
7517  # Extract the first word of "$ac_prog", so it can be a program name with args.
7518set dummy $ac_prog; ac_word=$2
7519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7520$as_echo_n "checking for $ac_word... " >&6; }
7521if ${ac_cv_path_LN+:} false; then :
7522  $as_echo_n "(cached) " >&6
7523else
7524  case $LN in
7525  [\\/]* | ?:[\\/]*)
7526  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7527  ;;
7528  *)
7529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7530for as_dir in $PATH
7531do
7532  IFS=$as_save_IFS
7533  test -z "$as_dir" && as_dir=.
7534    for ac_exec_ext in '' $ac_executable_extensions; do
7535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7536    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7538    break 2
7539  fi
7540done
7541  done
7542IFS=$as_save_IFS
7543
7544  ;;
7545esac
7546fi
7547LN=$ac_cv_path_LN
7548if test -n "$LN"; then
7549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7550$as_echo "$LN" >&6; }
7551else
7552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7553$as_echo "no" >&6; }
7554fi
7555
7556
7557  test -n "$LN" && break
7558done
7559
7560  else
7561    # The variable is set, but is it from the command line or the environment?
7562
7563    # Try to remove the string !LN! from our list.
7564    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7565    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7566      # If it failed, the variable was not from the command line. Ignore it,
7567      # but warn the user (except for BASH, which is always set by the calling BASH).
7568      if test "xLN" != xBASH; then
7569        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7570$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7571      fi
7572      # Try to locate tool using the code snippet
7573      for ac_prog in ln
7574do
7575  # Extract the first word of "$ac_prog", so it can be a program name with args.
7576set dummy $ac_prog; ac_word=$2
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if ${ac_cv_path_LN+:} false; then :
7580  $as_echo_n "(cached) " >&6
7581else
7582  case $LN in
7583  [\\/]* | ?:[\\/]*)
7584  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7585  ;;
7586  *)
7587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590  IFS=$as_save_IFS
7591  test -z "$as_dir" && as_dir=.
7592    for ac_exec_ext in '' $ac_executable_extensions; do
7593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596    break 2
7597  fi
7598done
7599  done
7600IFS=$as_save_IFS
7601
7602  ;;
7603esac
7604fi
7605LN=$ac_cv_path_LN
7606if test -n "$LN"; then
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7608$as_echo "$LN" >&6; }
7609else
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
7612fi
7613
7614
7615  test -n "$LN" && break
7616done
7617
7618    else
7619      # If it succeeded, then it was overridden by the user. We will use it
7620      # for the tool.
7621
7622      # First remove it from the list of overridden variables, so we can test
7623      # for unknown variables in the end.
7624      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7625
7626      # Check if the provided tool contains a complete path.
7627      tool_specified="$LN"
7628      tool_basename="${tool_specified##*/}"
7629      if test "x$tool_basename" = "x$tool_specified"; then
7630        # A command without a complete path is provided, search $PATH.
7631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7632$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7633        # Extract the first word of "$tool_basename", so it can be a program name with args.
7634set dummy $tool_basename; ac_word=$2
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7636$as_echo_n "checking for $ac_word... " >&6; }
7637if ${ac_cv_path_LN+:} false; then :
7638  $as_echo_n "(cached) " >&6
7639else
7640  case $LN in
7641  [\\/]* | ?:[\\/]*)
7642  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7643  ;;
7644  *)
7645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646for as_dir in $PATH
7647do
7648  IFS=$as_save_IFS
7649  test -z "$as_dir" && as_dir=.
7650    for ac_exec_ext in '' $ac_executable_extensions; do
7651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7652    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7654    break 2
7655  fi
7656done
7657  done
7658IFS=$as_save_IFS
7659
7660  ;;
7661esac
7662fi
7663LN=$ac_cv_path_LN
7664if test -n "$LN"; then
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7666$as_echo "$LN" >&6; }
7667else
7668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669$as_echo "no" >&6; }
7670fi
7671
7672
7673        if test "x$LN" = x; then
7674          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7675        fi
7676      else
7677        # Otherwise we believe it is a complete path. Use it as it is.
7678        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7679$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7681$as_echo_n "checking for LN... " >&6; }
7682        if test ! -x "$tool_specified"; then
7683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7684$as_echo "not found" >&6; }
7685          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7686        fi
7687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7688$as_echo "$tool_specified" >&6; }
7689      fi
7690    fi
7691  fi
7692
7693
7694
7695  if test "x$LN" = x; then
7696    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7697  fi
7698
7699
7700
7701
7702
7703  # Publish this variable in the help.
7704
7705
7706  if test "x$LS" = x; then
7707    # The variable is not set by user, try to locate tool using the code snippet
7708    for ac_prog in ls
7709do
7710  # Extract the first word of "$ac_prog", so it can be a program name with args.
7711set dummy $ac_prog; ac_word=$2
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7713$as_echo_n "checking for $ac_word... " >&6; }
7714if ${ac_cv_path_LS+:} false; then :
7715  $as_echo_n "(cached) " >&6
7716else
7717  case $LS in
7718  [\\/]* | ?:[\\/]*)
7719  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7720  ;;
7721  *)
7722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7723for as_dir in $PATH
7724do
7725  IFS=$as_save_IFS
7726  test -z "$as_dir" && as_dir=.
7727    for ac_exec_ext in '' $ac_executable_extensions; do
7728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7729    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7731    break 2
7732  fi
7733done
7734  done
7735IFS=$as_save_IFS
7736
7737  ;;
7738esac
7739fi
7740LS=$ac_cv_path_LS
7741if test -n "$LS"; then
7742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7743$as_echo "$LS" >&6; }
7744else
7745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7746$as_echo "no" >&6; }
7747fi
7748
7749
7750  test -n "$LS" && break
7751done
7752
7753  else
7754    # The variable is set, but is it from the command line or the environment?
7755
7756    # Try to remove the string !LS! from our list.
7757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7759      # If it failed, the variable was not from the command line. Ignore it,
7760      # but warn the user (except for BASH, which is always set by the calling BASH).
7761      if test "xLS" != xBASH; then
7762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7763$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7764      fi
7765      # Try to locate tool using the code snippet
7766      for ac_prog in ls
7767do
7768  # Extract the first word of "$ac_prog", so it can be a program name with args.
7769set dummy $ac_prog; ac_word=$2
7770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7771$as_echo_n "checking for $ac_word... " >&6; }
7772if ${ac_cv_path_LS+:} false; then :
7773  $as_echo_n "(cached) " >&6
7774else
7775  case $LS in
7776  [\\/]* | ?:[\\/]*)
7777  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7778  ;;
7779  *)
7780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7781for as_dir in $PATH
7782do
7783  IFS=$as_save_IFS
7784  test -z "$as_dir" && as_dir=.
7785    for ac_exec_ext in '' $ac_executable_extensions; do
7786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7787    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7789    break 2
7790  fi
7791done
7792  done
7793IFS=$as_save_IFS
7794
7795  ;;
7796esac
7797fi
7798LS=$ac_cv_path_LS
7799if test -n "$LS"; then
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7801$as_echo "$LS" >&6; }
7802else
7803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7804$as_echo "no" >&6; }
7805fi
7806
7807
7808  test -n "$LS" && break
7809done
7810
7811    else
7812      # If it succeeded, then it was overridden by the user. We will use it
7813      # for the tool.
7814
7815      # First remove it from the list of overridden variables, so we can test
7816      # for unknown variables in the end.
7817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7818
7819      # Check if the provided tool contains a complete path.
7820      tool_specified="$LS"
7821      tool_basename="${tool_specified##*/}"
7822      if test "x$tool_basename" = "x$tool_specified"; then
7823        # A command without a complete path is provided, search $PATH.
7824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7825$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7826        # Extract the first word of "$tool_basename", so it can be a program name with args.
7827set dummy $tool_basename; ac_word=$2
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7829$as_echo_n "checking for $ac_word... " >&6; }
7830if ${ac_cv_path_LS+:} false; then :
7831  $as_echo_n "(cached) " >&6
7832else
7833  case $LS in
7834  [\\/]* | ?:[\\/]*)
7835  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7836  ;;
7837  *)
7838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7839for as_dir in $PATH
7840do
7841  IFS=$as_save_IFS
7842  test -z "$as_dir" && as_dir=.
7843    for ac_exec_ext in '' $ac_executable_extensions; do
7844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7845    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7847    break 2
7848  fi
7849done
7850  done
7851IFS=$as_save_IFS
7852
7853  ;;
7854esac
7855fi
7856LS=$ac_cv_path_LS
7857if test -n "$LS"; then
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7859$as_echo "$LS" >&6; }
7860else
7861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862$as_echo "no" >&6; }
7863fi
7864
7865
7866        if test "x$LS" = x; then
7867          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7868        fi
7869      else
7870        # Otherwise we believe it is a complete path. Use it as it is.
7871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7872$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7874$as_echo_n "checking for LS... " >&6; }
7875        if test ! -x "$tool_specified"; then
7876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7877$as_echo "not found" >&6; }
7878          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7879        fi
7880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7881$as_echo "$tool_specified" >&6; }
7882      fi
7883    fi
7884  fi
7885
7886
7887
7888  if test "x$LS" = x; then
7889    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7890  fi
7891
7892
7893
7894
7895
7896  # Publish this variable in the help.
7897
7898
7899  if test "x$MKDIR" = x; then
7900    # The variable is not set by user, try to locate tool using the code snippet
7901    for ac_prog in mkdir
7902do
7903  # Extract the first word of "$ac_prog", so it can be a program name with args.
7904set dummy $ac_prog; ac_word=$2
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7906$as_echo_n "checking for $ac_word... " >&6; }
7907if ${ac_cv_path_MKDIR+:} false; then :
7908  $as_echo_n "(cached) " >&6
7909else
7910  case $MKDIR in
7911  [\\/]* | ?:[\\/]*)
7912  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7913  ;;
7914  *)
7915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7916for as_dir in $PATH
7917do
7918  IFS=$as_save_IFS
7919  test -z "$as_dir" && as_dir=.
7920    for ac_exec_ext in '' $ac_executable_extensions; do
7921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7922    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7924    break 2
7925  fi
7926done
7927  done
7928IFS=$as_save_IFS
7929
7930  ;;
7931esac
7932fi
7933MKDIR=$ac_cv_path_MKDIR
7934if test -n "$MKDIR"; then
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7936$as_echo "$MKDIR" >&6; }
7937else
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7939$as_echo "no" >&6; }
7940fi
7941
7942
7943  test -n "$MKDIR" && break
7944done
7945
7946  else
7947    # The variable is set, but is it from the command line or the environment?
7948
7949    # Try to remove the string !MKDIR! from our list.
7950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7952      # If it failed, the variable was not from the command line. Ignore it,
7953      # but warn the user (except for BASH, which is always set by the calling BASH).
7954      if test "xMKDIR" != xBASH; then
7955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7956$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7957      fi
7958      # Try to locate tool using the code snippet
7959      for ac_prog in mkdir
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_MKDIR+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $MKDIR in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991MKDIR=$ac_cv_path_MKDIR
7992if test -n "$MKDIR"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7994$as_echo "$MKDIR" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$MKDIR" && break
8002done
8003
8004    else
8005      # If it succeeded, then it was overridden by the user. We will use it
8006      # for the tool.
8007
8008      # First remove it from the list of overridden variables, so we can test
8009      # for unknown variables in the end.
8010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8011
8012      # Check if the provided tool contains a complete path.
8013      tool_specified="$MKDIR"
8014      tool_basename="${tool_specified##*/}"
8015      if test "x$tool_basename" = "x$tool_specified"; then
8016        # A command without a complete path is provided, search $PATH.
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8018$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8019        # Extract the first word of "$tool_basename", so it can be a program name with args.
8020set dummy $tool_basename; ac_word=$2
8021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8022$as_echo_n "checking for $ac_word... " >&6; }
8023if ${ac_cv_path_MKDIR+:} false; then :
8024  $as_echo_n "(cached) " >&6
8025else
8026  case $MKDIR in
8027  [\\/]* | ?:[\\/]*)
8028  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8029  ;;
8030  *)
8031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8032for as_dir in $PATH
8033do
8034  IFS=$as_save_IFS
8035  test -z "$as_dir" && as_dir=.
8036    for ac_exec_ext in '' $ac_executable_extensions; do
8037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8038    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8040    break 2
8041  fi
8042done
8043  done
8044IFS=$as_save_IFS
8045
8046  ;;
8047esac
8048fi
8049MKDIR=$ac_cv_path_MKDIR
8050if test -n "$MKDIR"; then
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8052$as_echo "$MKDIR" >&6; }
8053else
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
8056fi
8057
8058
8059        if test "x$MKDIR" = x; then
8060          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8061        fi
8062      else
8063        # Otherwise we believe it is a complete path. Use it as it is.
8064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8065$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8067$as_echo_n "checking for MKDIR... " >&6; }
8068        if test ! -x "$tool_specified"; then
8069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8070$as_echo "not found" >&6; }
8071          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8072        fi
8073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8074$as_echo "$tool_specified" >&6; }
8075      fi
8076    fi
8077  fi
8078
8079
8080
8081  if test "x$MKDIR" = x; then
8082    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8083  fi
8084
8085
8086
8087
8088
8089  # Publish this variable in the help.
8090
8091
8092  if test "x$MKTEMP" = x; then
8093    # The variable is not set by user, try to locate tool using the code snippet
8094    for ac_prog in mktemp
8095do
8096  # Extract the first word of "$ac_prog", so it can be a program name with args.
8097set dummy $ac_prog; ac_word=$2
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8099$as_echo_n "checking for $ac_word... " >&6; }
8100if ${ac_cv_path_MKTEMP+:} false; then :
8101  $as_echo_n "(cached) " >&6
8102else
8103  case $MKTEMP in
8104  [\\/]* | ?:[\\/]*)
8105  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8106  ;;
8107  *)
8108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8109for as_dir in $PATH
8110do
8111  IFS=$as_save_IFS
8112  test -z "$as_dir" && as_dir=.
8113    for ac_exec_ext in '' $ac_executable_extensions; do
8114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8115    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8117    break 2
8118  fi
8119done
8120  done
8121IFS=$as_save_IFS
8122
8123  ;;
8124esac
8125fi
8126MKTEMP=$ac_cv_path_MKTEMP
8127if test -n "$MKTEMP"; then
8128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8129$as_echo "$MKTEMP" >&6; }
8130else
8131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8132$as_echo "no" >&6; }
8133fi
8134
8135
8136  test -n "$MKTEMP" && break
8137done
8138
8139  else
8140    # The variable is set, but is it from the command line or the environment?
8141
8142    # Try to remove the string !MKTEMP! from our list.
8143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8145      # If it failed, the variable was not from the command line. Ignore it,
8146      # but warn the user (except for BASH, which is always set by the calling BASH).
8147      if test "xMKTEMP" != xBASH; then
8148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8149$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8150      fi
8151      # Try to locate tool using the code snippet
8152      for ac_prog in mktemp
8153do
8154  # Extract the first word of "$ac_prog", so it can be a program name with args.
8155set dummy $ac_prog; ac_word=$2
8156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8157$as_echo_n "checking for $ac_word... " >&6; }
8158if ${ac_cv_path_MKTEMP+:} false; then :
8159  $as_echo_n "(cached) " >&6
8160else
8161  case $MKTEMP in
8162  [\\/]* | ?:[\\/]*)
8163  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8164  ;;
8165  *)
8166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8167for as_dir in $PATH
8168do
8169  IFS=$as_save_IFS
8170  test -z "$as_dir" && as_dir=.
8171    for ac_exec_ext in '' $ac_executable_extensions; do
8172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8173    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8175    break 2
8176  fi
8177done
8178  done
8179IFS=$as_save_IFS
8180
8181  ;;
8182esac
8183fi
8184MKTEMP=$ac_cv_path_MKTEMP
8185if test -n "$MKTEMP"; then
8186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8187$as_echo "$MKTEMP" >&6; }
8188else
8189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190$as_echo "no" >&6; }
8191fi
8192
8193
8194  test -n "$MKTEMP" && break
8195done
8196
8197    else
8198      # If it succeeded, then it was overridden by the user. We will use it
8199      # for the tool.
8200
8201      # First remove it from the list of overridden variables, so we can test
8202      # for unknown variables in the end.
8203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8204
8205      # Check if the provided tool contains a complete path.
8206      tool_specified="$MKTEMP"
8207      tool_basename="${tool_specified##*/}"
8208      if test "x$tool_basename" = "x$tool_specified"; then
8209        # A command without a complete path is provided, search $PATH.
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8211$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8212        # Extract the first word of "$tool_basename", so it can be a program name with args.
8213set dummy $tool_basename; ac_word=$2
8214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215$as_echo_n "checking for $ac_word... " >&6; }
8216if ${ac_cv_path_MKTEMP+:} false; then :
8217  $as_echo_n "(cached) " >&6
8218else
8219  case $MKTEMP in
8220  [\\/]* | ?:[\\/]*)
8221  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8222  ;;
8223  *)
8224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8225for as_dir in $PATH
8226do
8227  IFS=$as_save_IFS
8228  test -z "$as_dir" && as_dir=.
8229    for ac_exec_ext in '' $ac_executable_extensions; do
8230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8231    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8233    break 2
8234  fi
8235done
8236  done
8237IFS=$as_save_IFS
8238
8239  ;;
8240esac
8241fi
8242MKTEMP=$ac_cv_path_MKTEMP
8243if test -n "$MKTEMP"; then
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8245$as_echo "$MKTEMP" >&6; }
8246else
8247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248$as_echo "no" >&6; }
8249fi
8250
8251
8252        if test "x$MKTEMP" = x; then
8253          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8254        fi
8255      else
8256        # Otherwise we believe it is a complete path. Use it as it is.
8257        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8258$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8260$as_echo_n "checking for MKTEMP... " >&6; }
8261        if test ! -x "$tool_specified"; then
8262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8263$as_echo "not found" >&6; }
8264          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8265        fi
8266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8267$as_echo "$tool_specified" >&6; }
8268      fi
8269    fi
8270  fi
8271
8272
8273
8274  if test "x$MKTEMP" = x; then
8275    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8276  fi
8277
8278
8279
8280
8281
8282  # Publish this variable in the help.
8283
8284
8285  if test "x$MV" = x; then
8286    # The variable is not set by user, try to locate tool using the code snippet
8287    for ac_prog in mv
8288do
8289  # Extract the first word of "$ac_prog", so it can be a program name with args.
8290set dummy $ac_prog; ac_word=$2
8291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8292$as_echo_n "checking for $ac_word... " >&6; }
8293if ${ac_cv_path_MV+:} false; then :
8294  $as_echo_n "(cached) " >&6
8295else
8296  case $MV in
8297  [\\/]* | ?:[\\/]*)
8298  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8299  ;;
8300  *)
8301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8302for as_dir in $PATH
8303do
8304  IFS=$as_save_IFS
8305  test -z "$as_dir" && as_dir=.
8306    for ac_exec_ext in '' $ac_executable_extensions; do
8307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8308    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8310    break 2
8311  fi
8312done
8313  done
8314IFS=$as_save_IFS
8315
8316  ;;
8317esac
8318fi
8319MV=$ac_cv_path_MV
8320if test -n "$MV"; then
8321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8322$as_echo "$MV" >&6; }
8323else
8324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8325$as_echo "no" >&6; }
8326fi
8327
8328
8329  test -n "$MV" && break
8330done
8331
8332  else
8333    # The variable is set, but is it from the command line or the environment?
8334
8335    # Try to remove the string !MV! from our list.
8336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8338      # If it failed, the variable was not from the command line. Ignore it,
8339      # but warn the user (except for BASH, which is always set by the calling BASH).
8340      if test "xMV" != xBASH; then
8341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8342$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8343      fi
8344      # Try to locate tool using the code snippet
8345      for ac_prog in mv
8346do
8347  # Extract the first word of "$ac_prog", so it can be a program name with args.
8348set dummy $ac_prog; ac_word=$2
8349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8350$as_echo_n "checking for $ac_word... " >&6; }
8351if ${ac_cv_path_MV+:} false; then :
8352  $as_echo_n "(cached) " >&6
8353else
8354  case $MV in
8355  [\\/]* | ?:[\\/]*)
8356  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8357  ;;
8358  *)
8359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8360for as_dir in $PATH
8361do
8362  IFS=$as_save_IFS
8363  test -z "$as_dir" && as_dir=.
8364    for ac_exec_ext in '' $ac_executable_extensions; do
8365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8366    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8368    break 2
8369  fi
8370done
8371  done
8372IFS=$as_save_IFS
8373
8374  ;;
8375esac
8376fi
8377MV=$ac_cv_path_MV
8378if test -n "$MV"; then
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8380$as_echo "$MV" >&6; }
8381else
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383$as_echo "no" >&6; }
8384fi
8385
8386
8387  test -n "$MV" && break
8388done
8389
8390    else
8391      # If it succeeded, then it was overridden by the user. We will use it
8392      # for the tool.
8393
8394      # First remove it from the list of overridden variables, so we can test
8395      # for unknown variables in the end.
8396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8397
8398      # Check if the provided tool contains a complete path.
8399      tool_specified="$MV"
8400      tool_basename="${tool_specified##*/}"
8401      if test "x$tool_basename" = "x$tool_specified"; then
8402        # A command without a complete path is provided, search $PATH.
8403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8404$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8405        # Extract the first word of "$tool_basename", so it can be a program name with args.
8406set dummy $tool_basename; ac_word=$2
8407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8408$as_echo_n "checking for $ac_word... " >&6; }
8409if ${ac_cv_path_MV+:} false; then :
8410  $as_echo_n "(cached) " >&6
8411else
8412  case $MV in
8413  [\\/]* | ?:[\\/]*)
8414  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8415  ;;
8416  *)
8417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8418for as_dir in $PATH
8419do
8420  IFS=$as_save_IFS
8421  test -z "$as_dir" && as_dir=.
8422    for ac_exec_ext in '' $ac_executable_extensions; do
8423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8424    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8426    break 2
8427  fi
8428done
8429  done
8430IFS=$as_save_IFS
8431
8432  ;;
8433esac
8434fi
8435MV=$ac_cv_path_MV
8436if test -n "$MV"; then
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8438$as_echo "$MV" >&6; }
8439else
8440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441$as_echo "no" >&6; }
8442fi
8443
8444
8445        if test "x$MV" = x; then
8446          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8447        fi
8448      else
8449        # Otherwise we believe it is a complete path. Use it as it is.
8450        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8451$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8453$as_echo_n "checking for MV... " >&6; }
8454        if test ! -x "$tool_specified"; then
8455          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8456$as_echo "not found" >&6; }
8457          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8458        fi
8459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8460$as_echo "$tool_specified" >&6; }
8461      fi
8462    fi
8463  fi
8464
8465
8466
8467  if test "x$MV" = x; then
8468    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8469  fi
8470
8471
8472
8473
8474
8475  # Publish this variable in the help.
8476
8477
8478  if test "x$NAWK" = x; then
8479    # The variable is not set by user, try to locate tool using the code snippet
8480    for ac_prog in nawk gawk awk
8481do
8482  # Extract the first word of "$ac_prog", so it can be a program name with args.
8483set dummy $ac_prog; ac_word=$2
8484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8485$as_echo_n "checking for $ac_word... " >&6; }
8486if ${ac_cv_path_NAWK+:} false; then :
8487  $as_echo_n "(cached) " >&6
8488else
8489  case $NAWK in
8490  [\\/]* | ?:[\\/]*)
8491  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8492  ;;
8493  *)
8494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8495for as_dir in $PATH
8496do
8497  IFS=$as_save_IFS
8498  test -z "$as_dir" && as_dir=.
8499    for ac_exec_ext in '' $ac_executable_extensions; do
8500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8501    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8503    break 2
8504  fi
8505done
8506  done
8507IFS=$as_save_IFS
8508
8509  ;;
8510esac
8511fi
8512NAWK=$ac_cv_path_NAWK
8513if test -n "$NAWK"; then
8514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8515$as_echo "$NAWK" >&6; }
8516else
8517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8518$as_echo "no" >&6; }
8519fi
8520
8521
8522  test -n "$NAWK" && break
8523done
8524
8525  else
8526    # The variable is set, but is it from the command line or the environment?
8527
8528    # Try to remove the string !NAWK! from our list.
8529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8531      # If it failed, the variable was not from the command line. Ignore it,
8532      # but warn the user (except for BASH, which is always set by the calling BASH).
8533      if test "xNAWK" != xBASH; then
8534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8535$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8536      fi
8537      # Try to locate tool using the code snippet
8538      for ac_prog in nawk gawk awk
8539do
8540  # Extract the first word of "$ac_prog", so it can be a program name with args.
8541set dummy $ac_prog; ac_word=$2
8542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8543$as_echo_n "checking for $ac_word... " >&6; }
8544if ${ac_cv_path_NAWK+:} false; then :
8545  $as_echo_n "(cached) " >&6
8546else
8547  case $NAWK in
8548  [\\/]* | ?:[\\/]*)
8549  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8550  ;;
8551  *)
8552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8553for as_dir in $PATH
8554do
8555  IFS=$as_save_IFS
8556  test -z "$as_dir" && as_dir=.
8557    for ac_exec_ext in '' $ac_executable_extensions; do
8558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8559    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8561    break 2
8562  fi
8563done
8564  done
8565IFS=$as_save_IFS
8566
8567  ;;
8568esac
8569fi
8570NAWK=$ac_cv_path_NAWK
8571if test -n "$NAWK"; then
8572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8573$as_echo "$NAWK" >&6; }
8574else
8575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8576$as_echo "no" >&6; }
8577fi
8578
8579
8580  test -n "$NAWK" && break
8581done
8582
8583    else
8584      # If it succeeded, then it was overridden by the user. We will use it
8585      # for the tool.
8586
8587      # First remove it from the list of overridden variables, so we can test
8588      # for unknown variables in the end.
8589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8590
8591      # Check if the provided tool contains a complete path.
8592      tool_specified="$NAWK"
8593      tool_basename="${tool_specified##*/}"
8594      if test "x$tool_basename" = "x$tool_specified"; then
8595        # A command without a complete path is provided, search $PATH.
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8597$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8598        # Extract the first word of "$tool_basename", so it can be a program name with args.
8599set dummy $tool_basename; ac_word=$2
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601$as_echo_n "checking for $ac_word... " >&6; }
8602if ${ac_cv_path_NAWK+:} false; then :
8603  $as_echo_n "(cached) " >&6
8604else
8605  case $NAWK in
8606  [\\/]* | ?:[\\/]*)
8607  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8608  ;;
8609  *)
8610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611for as_dir in $PATH
8612do
8613  IFS=$as_save_IFS
8614  test -z "$as_dir" && as_dir=.
8615    for ac_exec_ext in '' $ac_executable_extensions; do
8616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8617    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8619    break 2
8620  fi
8621done
8622  done
8623IFS=$as_save_IFS
8624
8625  ;;
8626esac
8627fi
8628NAWK=$ac_cv_path_NAWK
8629if test -n "$NAWK"; then
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8631$as_echo "$NAWK" >&6; }
8632else
8633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8634$as_echo "no" >&6; }
8635fi
8636
8637
8638        if test "x$NAWK" = x; then
8639          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8640        fi
8641      else
8642        # Otherwise we believe it is a complete path. Use it as it is.
8643        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8644$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8646$as_echo_n "checking for NAWK... " >&6; }
8647        if test ! -x "$tool_specified"; then
8648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8649$as_echo "not found" >&6; }
8650          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8651        fi
8652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8653$as_echo "$tool_specified" >&6; }
8654      fi
8655    fi
8656  fi
8657
8658
8659
8660  if test "x$NAWK" = x; then
8661    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8662  fi
8663
8664
8665
8666
8667
8668  # Publish this variable in the help.
8669
8670
8671  if test "x$PRINTF" = x; then
8672    # The variable is not set by user, try to locate tool using the code snippet
8673    for ac_prog in printf
8674do
8675  # Extract the first word of "$ac_prog", so it can be a program name with args.
8676set dummy $ac_prog; ac_word=$2
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678$as_echo_n "checking for $ac_word... " >&6; }
8679if ${ac_cv_path_PRINTF+:} false; then :
8680  $as_echo_n "(cached) " >&6
8681else
8682  case $PRINTF in
8683  [\\/]* | ?:[\\/]*)
8684  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8685  ;;
8686  *)
8687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688for as_dir in $PATH
8689do
8690  IFS=$as_save_IFS
8691  test -z "$as_dir" && as_dir=.
8692    for ac_exec_ext in '' $ac_executable_extensions; do
8693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696    break 2
8697  fi
8698done
8699  done
8700IFS=$as_save_IFS
8701
8702  ;;
8703esac
8704fi
8705PRINTF=$ac_cv_path_PRINTF
8706if test -n "$PRINTF"; then
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8708$as_echo "$PRINTF" >&6; }
8709else
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8711$as_echo "no" >&6; }
8712fi
8713
8714
8715  test -n "$PRINTF" && break
8716done
8717
8718  else
8719    # The variable is set, but is it from the command line or the environment?
8720
8721    # Try to remove the string !PRINTF! from our list.
8722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8724      # If it failed, the variable was not from the command line. Ignore it,
8725      # but warn the user (except for BASH, which is always set by the calling BASH).
8726      if test "xPRINTF" != xBASH; then
8727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8728$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8729      fi
8730      # Try to locate tool using the code snippet
8731      for ac_prog in printf
8732do
8733  # Extract the first word of "$ac_prog", so it can be a program name with args.
8734set dummy $ac_prog; ac_word=$2
8735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8736$as_echo_n "checking for $ac_word... " >&6; }
8737if ${ac_cv_path_PRINTF+:} false; then :
8738  $as_echo_n "(cached) " >&6
8739else
8740  case $PRINTF in
8741  [\\/]* | ?:[\\/]*)
8742  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8743  ;;
8744  *)
8745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8746for as_dir in $PATH
8747do
8748  IFS=$as_save_IFS
8749  test -z "$as_dir" && as_dir=.
8750    for ac_exec_ext in '' $ac_executable_extensions; do
8751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8752    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8754    break 2
8755  fi
8756done
8757  done
8758IFS=$as_save_IFS
8759
8760  ;;
8761esac
8762fi
8763PRINTF=$ac_cv_path_PRINTF
8764if test -n "$PRINTF"; then
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8766$as_echo "$PRINTF" >&6; }
8767else
8768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8769$as_echo "no" >&6; }
8770fi
8771
8772
8773  test -n "$PRINTF" && break
8774done
8775
8776    else
8777      # If it succeeded, then it was overridden by the user. We will use it
8778      # for the tool.
8779
8780      # First remove it from the list of overridden variables, so we can test
8781      # for unknown variables in the end.
8782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8783
8784      # Check if the provided tool contains a complete path.
8785      tool_specified="$PRINTF"
8786      tool_basename="${tool_specified##*/}"
8787      if test "x$tool_basename" = "x$tool_specified"; then
8788        # A command without a complete path is provided, search $PATH.
8789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8790$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8791        # Extract the first word of "$tool_basename", so it can be a program name with args.
8792set dummy $tool_basename; ac_word=$2
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8794$as_echo_n "checking for $ac_word... " >&6; }
8795if ${ac_cv_path_PRINTF+:} false; then :
8796  $as_echo_n "(cached) " >&6
8797else
8798  case $PRINTF in
8799  [\\/]* | ?:[\\/]*)
8800  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8801  ;;
8802  *)
8803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8804for as_dir in $PATH
8805do
8806  IFS=$as_save_IFS
8807  test -z "$as_dir" && as_dir=.
8808    for ac_exec_ext in '' $ac_executable_extensions; do
8809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8810    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8812    break 2
8813  fi
8814done
8815  done
8816IFS=$as_save_IFS
8817
8818  ;;
8819esac
8820fi
8821PRINTF=$ac_cv_path_PRINTF
8822if test -n "$PRINTF"; then
8823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8824$as_echo "$PRINTF" >&6; }
8825else
8826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827$as_echo "no" >&6; }
8828fi
8829
8830
8831        if test "x$PRINTF" = x; then
8832          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8833        fi
8834      else
8835        # Otherwise we believe it is a complete path. Use it as it is.
8836        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8837$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8839$as_echo_n "checking for PRINTF... " >&6; }
8840        if test ! -x "$tool_specified"; then
8841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8842$as_echo "not found" >&6; }
8843          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8844        fi
8845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8846$as_echo "$tool_specified" >&6; }
8847      fi
8848    fi
8849  fi
8850
8851
8852
8853  if test "x$PRINTF" = x; then
8854    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8855  fi
8856
8857
8858
8859
8860
8861  # Publish this variable in the help.
8862
8863
8864  if test "x$RM" = x; then
8865    # The variable is not set by user, try to locate tool using the code snippet
8866    for ac_prog in rm
8867do
8868  # Extract the first word of "$ac_prog", so it can be a program name with args.
8869set dummy $ac_prog; ac_word=$2
8870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8871$as_echo_n "checking for $ac_word... " >&6; }
8872if ${ac_cv_path_RM+:} false; then :
8873  $as_echo_n "(cached) " >&6
8874else
8875  case $RM in
8876  [\\/]* | ?:[\\/]*)
8877  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8878  ;;
8879  *)
8880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8881for as_dir in $PATH
8882do
8883  IFS=$as_save_IFS
8884  test -z "$as_dir" && as_dir=.
8885    for ac_exec_ext in '' $ac_executable_extensions; do
8886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8887    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8889    break 2
8890  fi
8891done
8892  done
8893IFS=$as_save_IFS
8894
8895  ;;
8896esac
8897fi
8898RM=$ac_cv_path_RM
8899if test -n "$RM"; then
8900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8901$as_echo "$RM" >&6; }
8902else
8903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8904$as_echo "no" >&6; }
8905fi
8906
8907
8908  test -n "$RM" && break
8909done
8910
8911  else
8912    # The variable is set, but is it from the command line or the environment?
8913
8914    # Try to remove the string !RM! from our list.
8915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8917      # If it failed, the variable was not from the command line. Ignore it,
8918      # but warn the user (except for BASH, which is always set by the calling BASH).
8919      if test "xRM" != xBASH; then
8920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8921$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8922      fi
8923      # Try to locate tool using the code snippet
8924      for ac_prog in rm
8925do
8926  # Extract the first word of "$ac_prog", so it can be a program name with args.
8927set dummy $ac_prog; ac_word=$2
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8929$as_echo_n "checking for $ac_word... " >&6; }
8930if ${ac_cv_path_RM+:} false; then :
8931  $as_echo_n "(cached) " >&6
8932else
8933  case $RM in
8934  [\\/]* | ?:[\\/]*)
8935  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8936  ;;
8937  *)
8938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8939for as_dir in $PATH
8940do
8941  IFS=$as_save_IFS
8942  test -z "$as_dir" && as_dir=.
8943    for ac_exec_ext in '' $ac_executable_extensions; do
8944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8945    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8947    break 2
8948  fi
8949done
8950  done
8951IFS=$as_save_IFS
8952
8953  ;;
8954esac
8955fi
8956RM=$ac_cv_path_RM
8957if test -n "$RM"; then
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8959$as_echo "$RM" >&6; }
8960else
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962$as_echo "no" >&6; }
8963fi
8964
8965
8966  test -n "$RM" && break
8967done
8968
8969    else
8970      # If it succeeded, then it was overridden by the user. We will use it
8971      # for the tool.
8972
8973      # First remove it from the list of overridden variables, so we can test
8974      # for unknown variables in the end.
8975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8976
8977      # Check if the provided tool contains a complete path.
8978      tool_specified="$RM"
8979      tool_basename="${tool_specified##*/}"
8980      if test "x$tool_basename" = "x$tool_specified"; then
8981        # A command without a complete path is provided, search $PATH.
8982        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8983$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8984        # Extract the first word of "$tool_basename", so it can be a program name with args.
8985set dummy $tool_basename; ac_word=$2
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987$as_echo_n "checking for $ac_word... " >&6; }
8988if ${ac_cv_path_RM+:} false; then :
8989  $as_echo_n "(cached) " >&6
8990else
8991  case $RM in
8992  [\\/]* | ?:[\\/]*)
8993  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8994  ;;
8995  *)
8996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8997for as_dir in $PATH
8998do
8999  IFS=$as_save_IFS
9000  test -z "$as_dir" && as_dir=.
9001    for ac_exec_ext in '' $ac_executable_extensions; do
9002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9003    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9005    break 2
9006  fi
9007done
9008  done
9009IFS=$as_save_IFS
9010
9011  ;;
9012esac
9013fi
9014RM=$ac_cv_path_RM
9015if test -n "$RM"; then
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9017$as_echo "$RM" >&6; }
9018else
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9020$as_echo "no" >&6; }
9021fi
9022
9023
9024        if test "x$RM" = x; then
9025          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9026        fi
9027      else
9028        # Otherwise we believe it is a complete path. Use it as it is.
9029        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9030$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9032$as_echo_n "checking for RM... " >&6; }
9033        if test ! -x "$tool_specified"; then
9034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9035$as_echo "not found" >&6; }
9036          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9037        fi
9038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9039$as_echo "$tool_specified" >&6; }
9040      fi
9041    fi
9042  fi
9043
9044
9045
9046  if test "x$RM" = x; then
9047    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9048  fi
9049
9050
9051
9052
9053
9054  # Publish this variable in the help.
9055
9056
9057  if test "x$SH" = x; then
9058    # The variable is not set by user, try to locate tool using the code snippet
9059    for ac_prog in sh
9060do
9061  # Extract the first word of "$ac_prog", so it can be a program name with args.
9062set dummy $ac_prog; ac_word=$2
9063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9064$as_echo_n "checking for $ac_word... " >&6; }
9065if ${ac_cv_path_SH+:} false; then :
9066  $as_echo_n "(cached) " >&6
9067else
9068  case $SH in
9069  [\\/]* | ?:[\\/]*)
9070  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9071  ;;
9072  *)
9073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9074for as_dir in $PATH
9075do
9076  IFS=$as_save_IFS
9077  test -z "$as_dir" && as_dir=.
9078    for ac_exec_ext in '' $ac_executable_extensions; do
9079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9080    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9082    break 2
9083  fi
9084done
9085  done
9086IFS=$as_save_IFS
9087
9088  ;;
9089esac
9090fi
9091SH=$ac_cv_path_SH
9092if test -n "$SH"; then
9093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9094$as_echo "$SH" >&6; }
9095else
9096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097$as_echo "no" >&6; }
9098fi
9099
9100
9101  test -n "$SH" && break
9102done
9103
9104  else
9105    # The variable is set, but is it from the command line or the environment?
9106
9107    # Try to remove the string !SH! from our list.
9108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9110      # If it failed, the variable was not from the command line. Ignore it,
9111      # but warn the user (except for BASH, which is always set by the calling BASH).
9112      if test "xSH" != xBASH; then
9113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9114$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9115      fi
9116      # Try to locate tool using the code snippet
9117      for ac_prog in sh
9118do
9119  # Extract the first word of "$ac_prog", so it can be a program name with args.
9120set dummy $ac_prog; ac_word=$2
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9122$as_echo_n "checking for $ac_word... " >&6; }
9123if ${ac_cv_path_SH+:} false; then :
9124  $as_echo_n "(cached) " >&6
9125else
9126  case $SH in
9127  [\\/]* | ?:[\\/]*)
9128  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9129  ;;
9130  *)
9131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9132for as_dir in $PATH
9133do
9134  IFS=$as_save_IFS
9135  test -z "$as_dir" && as_dir=.
9136    for ac_exec_ext in '' $ac_executable_extensions; do
9137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9138    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9140    break 2
9141  fi
9142done
9143  done
9144IFS=$as_save_IFS
9145
9146  ;;
9147esac
9148fi
9149SH=$ac_cv_path_SH
9150if test -n "$SH"; then
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9152$as_echo "$SH" >&6; }
9153else
9154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9155$as_echo "no" >&6; }
9156fi
9157
9158
9159  test -n "$SH" && break
9160done
9161
9162    else
9163      # If it succeeded, then it was overridden by the user. We will use it
9164      # for the tool.
9165
9166      # First remove it from the list of overridden variables, so we can test
9167      # for unknown variables in the end.
9168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9169
9170      # Check if the provided tool contains a complete path.
9171      tool_specified="$SH"
9172      tool_basename="${tool_specified##*/}"
9173      if test "x$tool_basename" = "x$tool_specified"; then
9174        # A command without a complete path is provided, search $PATH.
9175        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9176$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9177        # Extract the first word of "$tool_basename", so it can be a program name with args.
9178set dummy $tool_basename; ac_word=$2
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9180$as_echo_n "checking for $ac_word... " >&6; }
9181if ${ac_cv_path_SH+:} false; then :
9182  $as_echo_n "(cached) " >&6
9183else
9184  case $SH in
9185  [\\/]* | ?:[\\/]*)
9186  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9187  ;;
9188  *)
9189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9190for as_dir in $PATH
9191do
9192  IFS=$as_save_IFS
9193  test -z "$as_dir" && as_dir=.
9194    for ac_exec_ext in '' $ac_executable_extensions; do
9195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9196    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9198    break 2
9199  fi
9200done
9201  done
9202IFS=$as_save_IFS
9203
9204  ;;
9205esac
9206fi
9207SH=$ac_cv_path_SH
9208if test -n "$SH"; then
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9210$as_echo "$SH" >&6; }
9211else
9212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9213$as_echo "no" >&6; }
9214fi
9215
9216
9217        if test "x$SH" = x; then
9218          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9219        fi
9220      else
9221        # Otherwise we believe it is a complete path. Use it as it is.
9222        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9223$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9224        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9225$as_echo_n "checking for SH... " >&6; }
9226        if test ! -x "$tool_specified"; then
9227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9228$as_echo "not found" >&6; }
9229          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9230        fi
9231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9232$as_echo "$tool_specified" >&6; }
9233      fi
9234    fi
9235  fi
9236
9237
9238
9239  if test "x$SH" = x; then
9240    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9241  fi
9242
9243
9244
9245
9246
9247  # Publish this variable in the help.
9248
9249
9250  if test "x$SORT" = x; then
9251    # The variable is not set by user, try to locate tool using the code snippet
9252    for ac_prog in sort
9253do
9254  # Extract the first word of "$ac_prog", so it can be a program name with args.
9255set dummy $ac_prog; ac_word=$2
9256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9257$as_echo_n "checking for $ac_word... " >&6; }
9258if ${ac_cv_path_SORT+:} false; then :
9259  $as_echo_n "(cached) " >&6
9260else
9261  case $SORT in
9262  [\\/]* | ?:[\\/]*)
9263  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9264  ;;
9265  *)
9266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9267for as_dir in $PATH
9268do
9269  IFS=$as_save_IFS
9270  test -z "$as_dir" && as_dir=.
9271    for ac_exec_ext in '' $ac_executable_extensions; do
9272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9273    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9275    break 2
9276  fi
9277done
9278  done
9279IFS=$as_save_IFS
9280
9281  ;;
9282esac
9283fi
9284SORT=$ac_cv_path_SORT
9285if test -n "$SORT"; then
9286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9287$as_echo "$SORT" >&6; }
9288else
9289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9290$as_echo "no" >&6; }
9291fi
9292
9293
9294  test -n "$SORT" && break
9295done
9296
9297  else
9298    # The variable is set, but is it from the command line or the environment?
9299
9300    # Try to remove the string !SORT! from our list.
9301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9303      # If it failed, the variable was not from the command line. Ignore it,
9304      # but warn the user (except for BASH, which is always set by the calling BASH).
9305      if test "xSORT" != xBASH; then
9306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9307$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9308      fi
9309      # Try to locate tool using the code snippet
9310      for ac_prog in sort
9311do
9312  # Extract the first word of "$ac_prog", so it can be a program name with args.
9313set dummy $ac_prog; ac_word=$2
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315$as_echo_n "checking for $ac_word... " >&6; }
9316if ${ac_cv_path_SORT+:} false; then :
9317  $as_echo_n "(cached) " >&6
9318else
9319  case $SORT in
9320  [\\/]* | ?:[\\/]*)
9321  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9322  ;;
9323  *)
9324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325for as_dir in $PATH
9326do
9327  IFS=$as_save_IFS
9328  test -z "$as_dir" && as_dir=.
9329    for ac_exec_ext in '' $ac_executable_extensions; do
9330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9331    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333    break 2
9334  fi
9335done
9336  done
9337IFS=$as_save_IFS
9338
9339  ;;
9340esac
9341fi
9342SORT=$ac_cv_path_SORT
9343if test -n "$SORT"; then
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9345$as_echo "$SORT" >&6; }
9346else
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
9349fi
9350
9351
9352  test -n "$SORT" && break
9353done
9354
9355    else
9356      # If it succeeded, then it was overridden by the user. We will use it
9357      # for the tool.
9358
9359      # First remove it from the list of overridden variables, so we can test
9360      # for unknown variables in the end.
9361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9362
9363      # Check if the provided tool contains a complete path.
9364      tool_specified="$SORT"
9365      tool_basename="${tool_specified##*/}"
9366      if test "x$tool_basename" = "x$tool_specified"; then
9367        # A command without a complete path is provided, search $PATH.
9368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9369$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9370        # Extract the first word of "$tool_basename", so it can be a program name with args.
9371set dummy $tool_basename; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_SORT+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $SORT in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400SORT=$ac_cv_path_SORT
9401if test -n "$SORT"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9403$as_echo "$SORT" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410        if test "x$SORT" = x; then
9411          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9412        fi
9413      else
9414        # Otherwise we believe it is a complete path. Use it as it is.
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9416$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9418$as_echo_n "checking for SORT... " >&6; }
9419        if test ! -x "$tool_specified"; then
9420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9421$as_echo "not found" >&6; }
9422          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9423        fi
9424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9425$as_echo "$tool_specified" >&6; }
9426      fi
9427    fi
9428  fi
9429
9430
9431
9432  if test "x$SORT" = x; then
9433    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9434  fi
9435
9436
9437
9438
9439
9440  # Publish this variable in the help.
9441
9442
9443  if test "x$TAIL" = x; then
9444    # The variable is not set by user, try to locate tool using the code snippet
9445    for ac_prog in tail
9446do
9447  # Extract the first word of "$ac_prog", so it can be a program name with args.
9448set dummy $ac_prog; ac_word=$2
9449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9450$as_echo_n "checking for $ac_word... " >&6; }
9451if ${ac_cv_path_TAIL+:} false; then :
9452  $as_echo_n "(cached) " >&6
9453else
9454  case $TAIL in
9455  [\\/]* | ?:[\\/]*)
9456  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9457  ;;
9458  *)
9459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460for as_dir in $PATH
9461do
9462  IFS=$as_save_IFS
9463  test -z "$as_dir" && as_dir=.
9464    for ac_exec_ext in '' $ac_executable_extensions; do
9465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9466    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468    break 2
9469  fi
9470done
9471  done
9472IFS=$as_save_IFS
9473
9474  ;;
9475esac
9476fi
9477TAIL=$ac_cv_path_TAIL
9478if test -n "$TAIL"; then
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9480$as_echo "$TAIL" >&6; }
9481else
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
9484fi
9485
9486
9487  test -n "$TAIL" && break
9488done
9489
9490  else
9491    # The variable is set, but is it from the command line or the environment?
9492
9493    # Try to remove the string !TAIL! from our list.
9494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9496      # If it failed, the variable was not from the command line. Ignore it,
9497      # but warn the user (except for BASH, which is always set by the calling BASH).
9498      if test "xTAIL" != xBASH; then
9499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9500$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9501      fi
9502      # Try to locate tool using the code snippet
9503      for ac_prog in tail
9504do
9505  # Extract the first word of "$ac_prog", so it can be a program name with args.
9506set dummy $ac_prog; ac_word=$2
9507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9508$as_echo_n "checking for $ac_word... " >&6; }
9509if ${ac_cv_path_TAIL+:} false; then :
9510  $as_echo_n "(cached) " >&6
9511else
9512  case $TAIL in
9513  [\\/]* | ?:[\\/]*)
9514  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9515  ;;
9516  *)
9517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9518for as_dir in $PATH
9519do
9520  IFS=$as_save_IFS
9521  test -z "$as_dir" && as_dir=.
9522    for ac_exec_ext in '' $ac_executable_extensions; do
9523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9524    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9526    break 2
9527  fi
9528done
9529  done
9530IFS=$as_save_IFS
9531
9532  ;;
9533esac
9534fi
9535TAIL=$ac_cv_path_TAIL
9536if test -n "$TAIL"; then
9537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9538$as_echo "$TAIL" >&6; }
9539else
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541$as_echo "no" >&6; }
9542fi
9543
9544
9545  test -n "$TAIL" && break
9546done
9547
9548    else
9549      # If it succeeded, then it was overridden by the user. We will use it
9550      # for the tool.
9551
9552      # First remove it from the list of overridden variables, so we can test
9553      # for unknown variables in the end.
9554      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9555
9556      # Check if the provided tool contains a complete path.
9557      tool_specified="$TAIL"
9558      tool_basename="${tool_specified##*/}"
9559      if test "x$tool_basename" = "x$tool_specified"; then
9560        # A command without a complete path is provided, search $PATH.
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9562$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9563        # Extract the first word of "$tool_basename", so it can be a program name with args.
9564set dummy $tool_basename; ac_word=$2
9565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9566$as_echo_n "checking for $ac_word... " >&6; }
9567if ${ac_cv_path_TAIL+:} false; then :
9568  $as_echo_n "(cached) " >&6
9569else
9570  case $TAIL in
9571  [\\/]* | ?:[\\/]*)
9572  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9573  ;;
9574  *)
9575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9576for as_dir in $PATH
9577do
9578  IFS=$as_save_IFS
9579  test -z "$as_dir" && as_dir=.
9580    for ac_exec_ext in '' $ac_executable_extensions; do
9581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9582    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9584    break 2
9585  fi
9586done
9587  done
9588IFS=$as_save_IFS
9589
9590  ;;
9591esac
9592fi
9593TAIL=$ac_cv_path_TAIL
9594if test -n "$TAIL"; then
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9596$as_echo "$TAIL" >&6; }
9597else
9598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9599$as_echo "no" >&6; }
9600fi
9601
9602
9603        if test "x$TAIL" = x; then
9604          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9605        fi
9606      else
9607        # Otherwise we believe it is a complete path. Use it as it is.
9608        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9609$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9611$as_echo_n "checking for TAIL... " >&6; }
9612        if test ! -x "$tool_specified"; then
9613          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9614$as_echo "not found" >&6; }
9615          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9616        fi
9617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9618$as_echo "$tool_specified" >&6; }
9619      fi
9620    fi
9621  fi
9622
9623
9624
9625  if test "x$TAIL" = x; then
9626    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9627  fi
9628
9629
9630
9631
9632
9633  # Publish this variable in the help.
9634
9635
9636  if test "x$TAR" = x; then
9637    # The variable is not set by user, try to locate tool using the code snippet
9638    for ac_prog in tar
9639do
9640  # Extract the first word of "$ac_prog", so it can be a program name with args.
9641set dummy $ac_prog; ac_word=$2
9642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9643$as_echo_n "checking for $ac_word... " >&6; }
9644if ${ac_cv_path_TAR+:} false; then :
9645  $as_echo_n "(cached) " >&6
9646else
9647  case $TAR in
9648  [\\/]* | ?:[\\/]*)
9649  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9650  ;;
9651  *)
9652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9653for as_dir in $PATH
9654do
9655  IFS=$as_save_IFS
9656  test -z "$as_dir" && as_dir=.
9657    for ac_exec_ext in '' $ac_executable_extensions; do
9658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9659    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9661    break 2
9662  fi
9663done
9664  done
9665IFS=$as_save_IFS
9666
9667  ;;
9668esac
9669fi
9670TAR=$ac_cv_path_TAR
9671if test -n "$TAR"; then
9672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9673$as_echo "$TAR" >&6; }
9674else
9675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676$as_echo "no" >&6; }
9677fi
9678
9679
9680  test -n "$TAR" && break
9681done
9682
9683  else
9684    # The variable is set, but is it from the command line or the environment?
9685
9686    # Try to remove the string !TAR! from our list.
9687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9689      # If it failed, the variable was not from the command line. Ignore it,
9690      # but warn the user (except for BASH, which is always set by the calling BASH).
9691      if test "xTAR" != xBASH; then
9692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9693$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9694      fi
9695      # Try to locate tool using the code snippet
9696      for ac_prog in tar
9697do
9698  # Extract the first word of "$ac_prog", so it can be a program name with args.
9699set dummy $ac_prog; ac_word=$2
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9701$as_echo_n "checking for $ac_word... " >&6; }
9702if ${ac_cv_path_TAR+:} false; then :
9703  $as_echo_n "(cached) " >&6
9704else
9705  case $TAR in
9706  [\\/]* | ?:[\\/]*)
9707  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9708  ;;
9709  *)
9710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711for as_dir in $PATH
9712do
9713  IFS=$as_save_IFS
9714  test -z "$as_dir" && as_dir=.
9715    for ac_exec_ext in '' $ac_executable_extensions; do
9716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9717    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9719    break 2
9720  fi
9721done
9722  done
9723IFS=$as_save_IFS
9724
9725  ;;
9726esac
9727fi
9728TAR=$ac_cv_path_TAR
9729if test -n "$TAR"; then
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9731$as_echo "$TAR" >&6; }
9732else
9733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734$as_echo "no" >&6; }
9735fi
9736
9737
9738  test -n "$TAR" && break
9739done
9740
9741    else
9742      # If it succeeded, then it was overridden by the user. We will use it
9743      # for the tool.
9744
9745      # First remove it from the list of overridden variables, so we can test
9746      # for unknown variables in the end.
9747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9748
9749      # Check if the provided tool contains a complete path.
9750      tool_specified="$TAR"
9751      tool_basename="${tool_specified##*/}"
9752      if test "x$tool_basename" = "x$tool_specified"; then
9753        # A command without a complete path is provided, search $PATH.
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9755$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9756        # Extract the first word of "$tool_basename", so it can be a program name with args.
9757set dummy $tool_basename; ac_word=$2
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9759$as_echo_n "checking for $ac_word... " >&6; }
9760if ${ac_cv_path_TAR+:} false; then :
9761  $as_echo_n "(cached) " >&6
9762else
9763  case $TAR in
9764  [\\/]* | ?:[\\/]*)
9765  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9766  ;;
9767  *)
9768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9769for as_dir in $PATH
9770do
9771  IFS=$as_save_IFS
9772  test -z "$as_dir" && as_dir=.
9773    for ac_exec_ext in '' $ac_executable_extensions; do
9774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9775    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9777    break 2
9778  fi
9779done
9780  done
9781IFS=$as_save_IFS
9782
9783  ;;
9784esac
9785fi
9786TAR=$ac_cv_path_TAR
9787if test -n "$TAR"; then
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9789$as_echo "$TAR" >&6; }
9790else
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792$as_echo "no" >&6; }
9793fi
9794
9795
9796        if test "x$TAR" = x; then
9797          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9798        fi
9799      else
9800        # Otherwise we believe it is a complete path. Use it as it is.
9801        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9802$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9804$as_echo_n "checking for TAR... " >&6; }
9805        if test ! -x "$tool_specified"; then
9806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9807$as_echo "not found" >&6; }
9808          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9809        fi
9810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9811$as_echo "$tool_specified" >&6; }
9812      fi
9813    fi
9814  fi
9815
9816
9817
9818  if test "x$TAR" = x; then
9819    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9820  fi
9821
9822
9823
9824
9825
9826  # Publish this variable in the help.
9827
9828
9829  if test "x$TEE" = x; then
9830    # The variable is not set by user, try to locate tool using the code snippet
9831    for ac_prog in tee
9832do
9833  # Extract the first word of "$ac_prog", so it can be a program name with args.
9834set dummy $ac_prog; ac_word=$2
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9836$as_echo_n "checking for $ac_word... " >&6; }
9837if ${ac_cv_path_TEE+:} false; then :
9838  $as_echo_n "(cached) " >&6
9839else
9840  case $TEE in
9841  [\\/]* | ?:[\\/]*)
9842  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9843  ;;
9844  *)
9845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9846for as_dir in $PATH
9847do
9848  IFS=$as_save_IFS
9849  test -z "$as_dir" && as_dir=.
9850    for ac_exec_ext in '' $ac_executable_extensions; do
9851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9852    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9854    break 2
9855  fi
9856done
9857  done
9858IFS=$as_save_IFS
9859
9860  ;;
9861esac
9862fi
9863TEE=$ac_cv_path_TEE
9864if test -n "$TEE"; then
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9866$as_echo "$TEE" >&6; }
9867else
9868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869$as_echo "no" >&6; }
9870fi
9871
9872
9873  test -n "$TEE" && break
9874done
9875
9876  else
9877    # The variable is set, but is it from the command line or the environment?
9878
9879    # Try to remove the string !TEE! from our list.
9880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9882      # If it failed, the variable was not from the command line. Ignore it,
9883      # but warn the user (except for BASH, which is always set by the calling BASH).
9884      if test "xTEE" != xBASH; then
9885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9886$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9887      fi
9888      # Try to locate tool using the code snippet
9889      for ac_prog in tee
9890do
9891  # Extract the first word of "$ac_prog", so it can be a program name with args.
9892set dummy $ac_prog; ac_word=$2
9893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9894$as_echo_n "checking for $ac_word... " >&6; }
9895if ${ac_cv_path_TEE+:} false; then :
9896  $as_echo_n "(cached) " >&6
9897else
9898  case $TEE in
9899  [\\/]* | ?:[\\/]*)
9900  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9901  ;;
9902  *)
9903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904for as_dir in $PATH
9905do
9906  IFS=$as_save_IFS
9907  test -z "$as_dir" && as_dir=.
9908    for ac_exec_ext in '' $ac_executable_extensions; do
9909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9910    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9912    break 2
9913  fi
9914done
9915  done
9916IFS=$as_save_IFS
9917
9918  ;;
9919esac
9920fi
9921TEE=$ac_cv_path_TEE
9922if test -n "$TEE"; then
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9924$as_echo "$TEE" >&6; }
9925else
9926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
9928fi
9929
9930
9931  test -n "$TEE" && break
9932done
9933
9934    else
9935      # If it succeeded, then it was overridden by the user. We will use it
9936      # for the tool.
9937
9938      # First remove it from the list of overridden variables, so we can test
9939      # for unknown variables in the end.
9940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9941
9942      # Check if the provided tool contains a complete path.
9943      tool_specified="$TEE"
9944      tool_basename="${tool_specified##*/}"
9945      if test "x$tool_basename" = "x$tool_specified"; then
9946        # A command without a complete path is provided, search $PATH.
9947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9948$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9949        # Extract the first word of "$tool_basename", so it can be a program name with args.
9950set dummy $tool_basename; ac_word=$2
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9952$as_echo_n "checking for $ac_word... " >&6; }
9953if ${ac_cv_path_TEE+:} false; then :
9954  $as_echo_n "(cached) " >&6
9955else
9956  case $TEE in
9957  [\\/]* | ?:[\\/]*)
9958  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9959  ;;
9960  *)
9961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962for as_dir in $PATH
9963do
9964  IFS=$as_save_IFS
9965  test -z "$as_dir" && as_dir=.
9966    for ac_exec_ext in '' $ac_executable_extensions; do
9967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9968    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970    break 2
9971  fi
9972done
9973  done
9974IFS=$as_save_IFS
9975
9976  ;;
9977esac
9978fi
9979TEE=$ac_cv_path_TEE
9980if test -n "$TEE"; then
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9982$as_echo "$TEE" >&6; }
9983else
9984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985$as_echo "no" >&6; }
9986fi
9987
9988
9989        if test "x$TEE" = x; then
9990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9991        fi
9992      else
9993        # Otherwise we believe it is a complete path. Use it as it is.
9994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9995$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9997$as_echo_n "checking for TEE... " >&6; }
9998        if test ! -x "$tool_specified"; then
9999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10000$as_echo "not found" >&6; }
10001          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10002        fi
10003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10004$as_echo "$tool_specified" >&6; }
10005      fi
10006    fi
10007  fi
10008
10009
10010
10011  if test "x$TEE" = x; then
10012    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10013  fi
10014
10015
10016
10017
10018
10019  # Publish this variable in the help.
10020
10021
10022  if test "x$TOUCH" = x; then
10023    # The variable is not set by user, try to locate tool using the code snippet
10024    for ac_prog in touch
10025do
10026  # Extract the first word of "$ac_prog", so it can be a program name with args.
10027set dummy $ac_prog; ac_word=$2
10028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10029$as_echo_n "checking for $ac_word... " >&6; }
10030if ${ac_cv_path_TOUCH+:} false; then :
10031  $as_echo_n "(cached) " >&6
10032else
10033  case $TOUCH in
10034  [\\/]* | ?:[\\/]*)
10035  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10036  ;;
10037  *)
10038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10039for as_dir in $PATH
10040do
10041  IFS=$as_save_IFS
10042  test -z "$as_dir" && as_dir=.
10043    for ac_exec_ext in '' $ac_executable_extensions; do
10044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10045    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10047    break 2
10048  fi
10049done
10050  done
10051IFS=$as_save_IFS
10052
10053  ;;
10054esac
10055fi
10056TOUCH=$ac_cv_path_TOUCH
10057if test -n "$TOUCH"; then
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10059$as_echo "$TOUCH" >&6; }
10060else
10061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10062$as_echo "no" >&6; }
10063fi
10064
10065
10066  test -n "$TOUCH" && break
10067done
10068
10069  else
10070    # The variable is set, but is it from the command line or the environment?
10071
10072    # Try to remove the string !TOUCH! from our list.
10073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10075      # If it failed, the variable was not from the command line. Ignore it,
10076      # but warn the user (except for BASH, which is always set by the calling BASH).
10077      if test "xTOUCH" != xBASH; then
10078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10079$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10080      fi
10081      # Try to locate tool using the code snippet
10082      for ac_prog in touch
10083do
10084  # Extract the first word of "$ac_prog", so it can be a program name with args.
10085set dummy $ac_prog; ac_word=$2
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087$as_echo_n "checking for $ac_word... " >&6; }
10088if ${ac_cv_path_TOUCH+:} false; then :
10089  $as_echo_n "(cached) " >&6
10090else
10091  case $TOUCH in
10092  [\\/]* | ?:[\\/]*)
10093  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10094  ;;
10095  *)
10096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097for as_dir in $PATH
10098do
10099  IFS=$as_save_IFS
10100  test -z "$as_dir" && as_dir=.
10101    for ac_exec_ext in '' $ac_executable_extensions; do
10102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105    break 2
10106  fi
10107done
10108  done
10109IFS=$as_save_IFS
10110
10111  ;;
10112esac
10113fi
10114TOUCH=$ac_cv_path_TOUCH
10115if test -n "$TOUCH"; then
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10117$as_echo "$TOUCH" >&6; }
10118else
10119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120$as_echo "no" >&6; }
10121fi
10122
10123
10124  test -n "$TOUCH" && break
10125done
10126
10127    else
10128      # If it succeeded, then it was overridden by the user. We will use it
10129      # for the tool.
10130
10131      # First remove it from the list of overridden variables, so we can test
10132      # for unknown variables in the end.
10133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10134
10135      # Check if the provided tool contains a complete path.
10136      tool_specified="$TOUCH"
10137      tool_basename="${tool_specified##*/}"
10138      if test "x$tool_basename" = "x$tool_specified"; then
10139        # A command without a complete path is provided, search $PATH.
10140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10141$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10142        # Extract the first word of "$tool_basename", so it can be a program name with args.
10143set dummy $tool_basename; ac_word=$2
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145$as_echo_n "checking for $ac_word... " >&6; }
10146if ${ac_cv_path_TOUCH+:} false; then :
10147  $as_echo_n "(cached) " >&6
10148else
10149  case $TOUCH in
10150  [\\/]* | ?:[\\/]*)
10151  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10152  ;;
10153  *)
10154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155for as_dir in $PATH
10156do
10157  IFS=$as_save_IFS
10158  test -z "$as_dir" && as_dir=.
10159    for ac_exec_ext in '' $ac_executable_extensions; do
10160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163    break 2
10164  fi
10165done
10166  done
10167IFS=$as_save_IFS
10168
10169  ;;
10170esac
10171fi
10172TOUCH=$ac_cv_path_TOUCH
10173if test -n "$TOUCH"; then
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10175$as_echo "$TOUCH" >&6; }
10176else
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178$as_echo "no" >&6; }
10179fi
10180
10181
10182        if test "x$TOUCH" = x; then
10183          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10184        fi
10185      else
10186        # Otherwise we believe it is a complete path. Use it as it is.
10187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10188$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10190$as_echo_n "checking for TOUCH... " >&6; }
10191        if test ! -x "$tool_specified"; then
10192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10193$as_echo "not found" >&6; }
10194          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10195        fi
10196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10197$as_echo "$tool_specified" >&6; }
10198      fi
10199    fi
10200  fi
10201
10202
10203
10204  if test "x$TOUCH" = x; then
10205    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10206  fi
10207
10208
10209
10210
10211
10212  # Publish this variable in the help.
10213
10214
10215  if test "x$TR" = x; then
10216    # The variable is not set by user, try to locate tool using the code snippet
10217    for ac_prog in tr
10218do
10219  # Extract the first word of "$ac_prog", so it can be a program name with args.
10220set dummy $ac_prog; ac_word=$2
10221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10222$as_echo_n "checking for $ac_word... " >&6; }
10223if ${ac_cv_path_TR+:} false; then :
10224  $as_echo_n "(cached) " >&6
10225else
10226  case $TR in
10227  [\\/]* | ?:[\\/]*)
10228  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10229  ;;
10230  *)
10231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10232for as_dir in $PATH
10233do
10234  IFS=$as_save_IFS
10235  test -z "$as_dir" && as_dir=.
10236    for ac_exec_ext in '' $ac_executable_extensions; do
10237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10238    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10240    break 2
10241  fi
10242done
10243  done
10244IFS=$as_save_IFS
10245
10246  ;;
10247esac
10248fi
10249TR=$ac_cv_path_TR
10250if test -n "$TR"; then
10251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10252$as_echo "$TR" >&6; }
10253else
10254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255$as_echo "no" >&6; }
10256fi
10257
10258
10259  test -n "$TR" && break
10260done
10261
10262  else
10263    # The variable is set, but is it from the command line or the environment?
10264
10265    # Try to remove the string !TR! from our list.
10266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10268      # If it failed, the variable was not from the command line. Ignore it,
10269      # but warn the user (except for BASH, which is always set by the calling BASH).
10270      if test "xTR" != xBASH; then
10271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10272$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10273      fi
10274      # Try to locate tool using the code snippet
10275      for ac_prog in tr
10276do
10277  # Extract the first word of "$ac_prog", so it can be a program name with args.
10278set dummy $ac_prog; ac_word=$2
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280$as_echo_n "checking for $ac_word... " >&6; }
10281if ${ac_cv_path_TR+:} false; then :
10282  $as_echo_n "(cached) " >&6
10283else
10284  case $TR in
10285  [\\/]* | ?:[\\/]*)
10286  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10287  ;;
10288  *)
10289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290for as_dir in $PATH
10291do
10292  IFS=$as_save_IFS
10293  test -z "$as_dir" && as_dir=.
10294    for ac_exec_ext in '' $ac_executable_extensions; do
10295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10296    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298    break 2
10299  fi
10300done
10301  done
10302IFS=$as_save_IFS
10303
10304  ;;
10305esac
10306fi
10307TR=$ac_cv_path_TR
10308if test -n "$TR"; then
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10310$as_echo "$TR" >&6; }
10311else
10312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
10314fi
10315
10316
10317  test -n "$TR" && break
10318done
10319
10320    else
10321      # If it succeeded, then it was overridden by the user. We will use it
10322      # for the tool.
10323
10324      # First remove it from the list of overridden variables, so we can test
10325      # for unknown variables in the end.
10326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10327
10328      # Check if the provided tool contains a complete path.
10329      tool_specified="$TR"
10330      tool_basename="${tool_specified##*/}"
10331      if test "x$tool_basename" = "x$tool_specified"; then
10332        # A command without a complete path is provided, search $PATH.
10333        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10334$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10335        # Extract the first word of "$tool_basename", so it can be a program name with args.
10336set dummy $tool_basename; ac_word=$2
10337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10338$as_echo_n "checking for $ac_word... " >&6; }
10339if ${ac_cv_path_TR+:} false; then :
10340  $as_echo_n "(cached) " >&6
10341else
10342  case $TR in
10343  [\\/]* | ?:[\\/]*)
10344  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10345  ;;
10346  *)
10347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10348for as_dir in $PATH
10349do
10350  IFS=$as_save_IFS
10351  test -z "$as_dir" && as_dir=.
10352    for ac_exec_ext in '' $ac_executable_extensions; do
10353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10354    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10356    break 2
10357  fi
10358done
10359  done
10360IFS=$as_save_IFS
10361
10362  ;;
10363esac
10364fi
10365TR=$ac_cv_path_TR
10366if test -n "$TR"; then
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10368$as_echo "$TR" >&6; }
10369else
10370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10371$as_echo "no" >&6; }
10372fi
10373
10374
10375        if test "x$TR" = x; then
10376          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10377        fi
10378      else
10379        # Otherwise we believe it is a complete path. Use it as it is.
10380        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10381$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10383$as_echo_n "checking for TR... " >&6; }
10384        if test ! -x "$tool_specified"; then
10385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10386$as_echo "not found" >&6; }
10387          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10388        fi
10389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10390$as_echo "$tool_specified" >&6; }
10391      fi
10392    fi
10393  fi
10394
10395
10396
10397  if test "x$TR" = x; then
10398    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10399  fi
10400
10401
10402
10403
10404
10405  # Publish this variable in the help.
10406
10407
10408  if test "x$UNAME" = x; then
10409    # The variable is not set by user, try to locate tool using the code snippet
10410    for ac_prog in uname
10411do
10412  # Extract the first word of "$ac_prog", so it can be a program name with args.
10413set dummy $ac_prog; ac_word=$2
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415$as_echo_n "checking for $ac_word... " >&6; }
10416if ${ac_cv_path_UNAME+:} false; then :
10417  $as_echo_n "(cached) " >&6
10418else
10419  case $UNAME in
10420  [\\/]* | ?:[\\/]*)
10421  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10422  ;;
10423  *)
10424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425for as_dir in $PATH
10426do
10427  IFS=$as_save_IFS
10428  test -z "$as_dir" && as_dir=.
10429    for ac_exec_ext in '' $ac_executable_extensions; do
10430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10431    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433    break 2
10434  fi
10435done
10436  done
10437IFS=$as_save_IFS
10438
10439  ;;
10440esac
10441fi
10442UNAME=$ac_cv_path_UNAME
10443if test -n "$UNAME"; then
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10445$as_echo "$UNAME" >&6; }
10446else
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448$as_echo "no" >&6; }
10449fi
10450
10451
10452  test -n "$UNAME" && break
10453done
10454
10455  else
10456    # The variable is set, but is it from the command line or the environment?
10457
10458    # Try to remove the string !UNAME! from our list.
10459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10461      # If it failed, the variable was not from the command line. Ignore it,
10462      # but warn the user (except for BASH, which is always set by the calling BASH).
10463      if test "xUNAME" != xBASH; then
10464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10465$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10466      fi
10467      # Try to locate tool using the code snippet
10468      for ac_prog in uname
10469do
10470  # Extract the first word of "$ac_prog", so it can be a program name with args.
10471set dummy $ac_prog; ac_word=$2
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10473$as_echo_n "checking for $ac_word... " >&6; }
10474if ${ac_cv_path_UNAME+:} false; then :
10475  $as_echo_n "(cached) " >&6
10476else
10477  case $UNAME in
10478  [\\/]* | ?:[\\/]*)
10479  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10480  ;;
10481  *)
10482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483for as_dir in $PATH
10484do
10485  IFS=$as_save_IFS
10486  test -z "$as_dir" && as_dir=.
10487    for ac_exec_ext in '' $ac_executable_extensions; do
10488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10489    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10491    break 2
10492  fi
10493done
10494  done
10495IFS=$as_save_IFS
10496
10497  ;;
10498esac
10499fi
10500UNAME=$ac_cv_path_UNAME
10501if test -n "$UNAME"; then
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10503$as_echo "$UNAME" >&6; }
10504else
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
10507fi
10508
10509
10510  test -n "$UNAME" && break
10511done
10512
10513    else
10514      # If it succeeded, then it was overridden by the user. We will use it
10515      # for the tool.
10516
10517      # First remove it from the list of overridden variables, so we can test
10518      # for unknown variables in the end.
10519      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10520
10521      # Check if the provided tool contains a complete path.
10522      tool_specified="$UNAME"
10523      tool_basename="${tool_specified##*/}"
10524      if test "x$tool_basename" = "x$tool_specified"; then
10525        # A command without a complete path is provided, search $PATH.
10526        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10527$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10528        # Extract the first word of "$tool_basename", so it can be a program name with args.
10529set dummy $tool_basename; ac_word=$2
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531$as_echo_n "checking for $ac_word... " >&6; }
10532if ${ac_cv_path_UNAME+:} false; then :
10533  $as_echo_n "(cached) " >&6
10534else
10535  case $UNAME in
10536  [\\/]* | ?:[\\/]*)
10537  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10538  ;;
10539  *)
10540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541for as_dir in $PATH
10542do
10543  IFS=$as_save_IFS
10544  test -z "$as_dir" && as_dir=.
10545    for ac_exec_ext in '' $ac_executable_extensions; do
10546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549    break 2
10550  fi
10551done
10552  done
10553IFS=$as_save_IFS
10554
10555  ;;
10556esac
10557fi
10558UNAME=$ac_cv_path_UNAME
10559if test -n "$UNAME"; then
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10561$as_echo "$UNAME" >&6; }
10562else
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
10565fi
10566
10567
10568        if test "x$UNAME" = x; then
10569          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10570        fi
10571      else
10572        # Otherwise we believe it is a complete path. Use it as it is.
10573        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10574$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10576$as_echo_n "checking for UNAME... " >&6; }
10577        if test ! -x "$tool_specified"; then
10578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10579$as_echo "not found" >&6; }
10580          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10581        fi
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10583$as_echo "$tool_specified" >&6; }
10584      fi
10585    fi
10586  fi
10587
10588
10589
10590  if test "x$UNAME" = x; then
10591    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10592  fi
10593
10594
10595
10596
10597
10598  # Publish this variable in the help.
10599
10600
10601  if test "x$UNIQ" = x; then
10602    # The variable is not set by user, try to locate tool using the code snippet
10603    for ac_prog in uniq
10604do
10605  # Extract the first word of "$ac_prog", so it can be a program name with args.
10606set dummy $ac_prog; ac_word=$2
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10608$as_echo_n "checking for $ac_word... " >&6; }
10609if ${ac_cv_path_UNIQ+:} false; then :
10610  $as_echo_n "(cached) " >&6
10611else
10612  case $UNIQ in
10613  [\\/]* | ?:[\\/]*)
10614  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10615  ;;
10616  *)
10617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10618for as_dir in $PATH
10619do
10620  IFS=$as_save_IFS
10621  test -z "$as_dir" && as_dir=.
10622    for ac_exec_ext in '' $ac_executable_extensions; do
10623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10624    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10626    break 2
10627  fi
10628done
10629  done
10630IFS=$as_save_IFS
10631
10632  ;;
10633esac
10634fi
10635UNIQ=$ac_cv_path_UNIQ
10636if test -n "$UNIQ"; then
10637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10638$as_echo "$UNIQ" >&6; }
10639else
10640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641$as_echo "no" >&6; }
10642fi
10643
10644
10645  test -n "$UNIQ" && break
10646done
10647
10648  else
10649    # The variable is set, but is it from the command line or the environment?
10650
10651    # Try to remove the string !UNIQ! from our list.
10652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10654      # If it failed, the variable was not from the command line. Ignore it,
10655      # but warn the user (except for BASH, which is always set by the calling BASH).
10656      if test "xUNIQ" != xBASH; then
10657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10658$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10659      fi
10660      # Try to locate tool using the code snippet
10661      for ac_prog in uniq
10662do
10663  # Extract the first word of "$ac_prog", so it can be a program name with args.
10664set dummy $ac_prog; ac_word=$2
10665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10666$as_echo_n "checking for $ac_word... " >&6; }
10667if ${ac_cv_path_UNIQ+:} false; then :
10668  $as_echo_n "(cached) " >&6
10669else
10670  case $UNIQ in
10671  [\\/]* | ?:[\\/]*)
10672  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10673  ;;
10674  *)
10675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10676for as_dir in $PATH
10677do
10678  IFS=$as_save_IFS
10679  test -z "$as_dir" && as_dir=.
10680    for ac_exec_ext in '' $ac_executable_extensions; do
10681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10682    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10684    break 2
10685  fi
10686done
10687  done
10688IFS=$as_save_IFS
10689
10690  ;;
10691esac
10692fi
10693UNIQ=$ac_cv_path_UNIQ
10694if test -n "$UNIQ"; then
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10696$as_echo "$UNIQ" >&6; }
10697else
10698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699$as_echo "no" >&6; }
10700fi
10701
10702
10703  test -n "$UNIQ" && break
10704done
10705
10706    else
10707      # If it succeeded, then it was overridden by the user. We will use it
10708      # for the tool.
10709
10710      # First remove it from the list of overridden variables, so we can test
10711      # for unknown variables in the end.
10712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10713
10714      # Check if the provided tool contains a complete path.
10715      tool_specified="$UNIQ"
10716      tool_basename="${tool_specified##*/}"
10717      if test "x$tool_basename" = "x$tool_specified"; then
10718        # A command without a complete path is provided, search $PATH.
10719        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10720$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10721        # Extract the first word of "$tool_basename", so it can be a program name with args.
10722set dummy $tool_basename; ac_word=$2
10723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10724$as_echo_n "checking for $ac_word... " >&6; }
10725if ${ac_cv_path_UNIQ+:} false; then :
10726  $as_echo_n "(cached) " >&6
10727else
10728  case $UNIQ in
10729  [\\/]* | ?:[\\/]*)
10730  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10731  ;;
10732  *)
10733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10734for as_dir in $PATH
10735do
10736  IFS=$as_save_IFS
10737  test -z "$as_dir" && as_dir=.
10738    for ac_exec_ext in '' $ac_executable_extensions; do
10739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10740    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10742    break 2
10743  fi
10744done
10745  done
10746IFS=$as_save_IFS
10747
10748  ;;
10749esac
10750fi
10751UNIQ=$ac_cv_path_UNIQ
10752if test -n "$UNIQ"; then
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10754$as_echo "$UNIQ" >&6; }
10755else
10756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
10758fi
10759
10760
10761        if test "x$UNIQ" = x; then
10762          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10763        fi
10764      else
10765        # Otherwise we believe it is a complete path. Use it as it is.
10766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10767$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10769$as_echo_n "checking for UNIQ... " >&6; }
10770        if test ! -x "$tool_specified"; then
10771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10772$as_echo "not found" >&6; }
10773          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10774        fi
10775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10776$as_echo "$tool_specified" >&6; }
10777      fi
10778    fi
10779  fi
10780
10781
10782
10783  if test "x$UNIQ" = x; then
10784    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10785  fi
10786
10787
10788
10789
10790
10791  # Publish this variable in the help.
10792
10793
10794  if test "x$WC" = x; then
10795    # The variable is not set by user, try to locate tool using the code snippet
10796    for ac_prog in wc
10797do
10798  # Extract the first word of "$ac_prog", so it can be a program name with args.
10799set dummy $ac_prog; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_WC+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $WC in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828WC=$ac_cv_path_WC
10829if test -n "$WC"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10831$as_echo "$WC" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838  test -n "$WC" && break
10839done
10840
10841  else
10842    # The variable is set, but is it from the command line or the environment?
10843
10844    # Try to remove the string !WC! from our list.
10845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10847      # If it failed, the variable was not from the command line. Ignore it,
10848      # but warn the user (except for BASH, which is always set by the calling BASH).
10849      if test "xWC" != xBASH; then
10850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10851$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10852      fi
10853      # Try to locate tool using the code snippet
10854      for ac_prog in wc
10855do
10856  # Extract the first word of "$ac_prog", so it can be a program name with args.
10857set dummy $ac_prog; ac_word=$2
10858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10859$as_echo_n "checking for $ac_word... " >&6; }
10860if ${ac_cv_path_WC+:} false; then :
10861  $as_echo_n "(cached) " >&6
10862else
10863  case $WC in
10864  [\\/]* | ?:[\\/]*)
10865  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10866  ;;
10867  *)
10868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10869for as_dir in $PATH
10870do
10871  IFS=$as_save_IFS
10872  test -z "$as_dir" && as_dir=.
10873    for ac_exec_ext in '' $ac_executable_extensions; do
10874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10875    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10877    break 2
10878  fi
10879done
10880  done
10881IFS=$as_save_IFS
10882
10883  ;;
10884esac
10885fi
10886WC=$ac_cv_path_WC
10887if test -n "$WC"; then
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10889$as_echo "$WC" >&6; }
10890else
10891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10892$as_echo "no" >&6; }
10893fi
10894
10895
10896  test -n "$WC" && break
10897done
10898
10899    else
10900      # If it succeeded, then it was overridden by the user. We will use it
10901      # for the tool.
10902
10903      # First remove it from the list of overridden variables, so we can test
10904      # for unknown variables in the end.
10905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10906
10907      # Check if the provided tool contains a complete path.
10908      tool_specified="$WC"
10909      tool_basename="${tool_specified##*/}"
10910      if test "x$tool_basename" = "x$tool_specified"; then
10911        # A command without a complete path is provided, search $PATH.
10912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10913$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10914        # Extract the first word of "$tool_basename", so it can be a program name with args.
10915set dummy $tool_basename; ac_word=$2
10916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10917$as_echo_n "checking for $ac_word... " >&6; }
10918if ${ac_cv_path_WC+:} false; then :
10919  $as_echo_n "(cached) " >&6
10920else
10921  case $WC in
10922  [\\/]* | ?:[\\/]*)
10923  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10924  ;;
10925  *)
10926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10927for as_dir in $PATH
10928do
10929  IFS=$as_save_IFS
10930  test -z "$as_dir" && as_dir=.
10931    for ac_exec_ext in '' $ac_executable_extensions; do
10932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10933    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10935    break 2
10936  fi
10937done
10938  done
10939IFS=$as_save_IFS
10940
10941  ;;
10942esac
10943fi
10944WC=$ac_cv_path_WC
10945if test -n "$WC"; then
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10947$as_echo "$WC" >&6; }
10948else
10949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950$as_echo "no" >&6; }
10951fi
10952
10953
10954        if test "x$WC" = x; then
10955          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10956        fi
10957      else
10958        # Otherwise we believe it is a complete path. Use it as it is.
10959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10960$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10962$as_echo_n "checking for WC... " >&6; }
10963        if test ! -x "$tool_specified"; then
10964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10965$as_echo "not found" >&6; }
10966          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10967        fi
10968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10969$as_echo "$tool_specified" >&6; }
10970      fi
10971    fi
10972  fi
10973
10974
10975
10976  if test "x$WC" = x; then
10977    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10978  fi
10979
10980
10981
10982
10983
10984  # Publish this variable in the help.
10985
10986
10987  if test "x$WHICH" = x; then
10988    # The variable is not set by user, try to locate tool using the code snippet
10989    for ac_prog in which
10990do
10991  # Extract the first word of "$ac_prog", so it can be a program name with args.
10992set dummy $ac_prog; ac_word=$2
10993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10994$as_echo_n "checking for $ac_word... " >&6; }
10995if ${ac_cv_path_WHICH+:} false; then :
10996  $as_echo_n "(cached) " >&6
10997else
10998  case $WHICH in
10999  [\\/]* | ?:[\\/]*)
11000  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11001  ;;
11002  *)
11003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11004for as_dir in $PATH
11005do
11006  IFS=$as_save_IFS
11007  test -z "$as_dir" && as_dir=.
11008    for ac_exec_ext in '' $ac_executable_extensions; do
11009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11010    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11012    break 2
11013  fi
11014done
11015  done
11016IFS=$as_save_IFS
11017
11018  ;;
11019esac
11020fi
11021WHICH=$ac_cv_path_WHICH
11022if test -n "$WHICH"; then
11023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11024$as_echo "$WHICH" >&6; }
11025else
11026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11027$as_echo "no" >&6; }
11028fi
11029
11030
11031  test -n "$WHICH" && break
11032done
11033
11034  else
11035    # The variable is set, but is it from the command line or the environment?
11036
11037    # Try to remove the string !WHICH! from our list.
11038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11040      # If it failed, the variable was not from the command line. Ignore it,
11041      # but warn the user (except for BASH, which is always set by the calling BASH).
11042      if test "xWHICH" != xBASH; then
11043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11044$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11045      fi
11046      # Try to locate tool using the code snippet
11047      for ac_prog in which
11048do
11049  # Extract the first word of "$ac_prog", so it can be a program name with args.
11050set dummy $ac_prog; ac_word=$2
11051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11052$as_echo_n "checking for $ac_word... " >&6; }
11053if ${ac_cv_path_WHICH+:} false; then :
11054  $as_echo_n "(cached) " >&6
11055else
11056  case $WHICH in
11057  [\\/]* | ?:[\\/]*)
11058  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11059  ;;
11060  *)
11061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11062for as_dir in $PATH
11063do
11064  IFS=$as_save_IFS
11065  test -z "$as_dir" && as_dir=.
11066    for ac_exec_ext in '' $ac_executable_extensions; do
11067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11068    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11070    break 2
11071  fi
11072done
11073  done
11074IFS=$as_save_IFS
11075
11076  ;;
11077esac
11078fi
11079WHICH=$ac_cv_path_WHICH
11080if test -n "$WHICH"; then
11081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11082$as_echo "$WHICH" >&6; }
11083else
11084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11085$as_echo "no" >&6; }
11086fi
11087
11088
11089  test -n "$WHICH" && break
11090done
11091
11092    else
11093      # If it succeeded, then it was overridden by the user. We will use it
11094      # for the tool.
11095
11096      # First remove it from the list of overridden variables, so we can test
11097      # for unknown variables in the end.
11098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11099
11100      # Check if the provided tool contains a complete path.
11101      tool_specified="$WHICH"
11102      tool_basename="${tool_specified##*/}"
11103      if test "x$tool_basename" = "x$tool_specified"; then
11104        # A command without a complete path is provided, search $PATH.
11105        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11106$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11107        # Extract the first word of "$tool_basename", so it can be a program name with args.
11108set dummy $tool_basename; ac_word=$2
11109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11110$as_echo_n "checking for $ac_word... " >&6; }
11111if ${ac_cv_path_WHICH+:} false; then :
11112  $as_echo_n "(cached) " >&6
11113else
11114  case $WHICH in
11115  [\\/]* | ?:[\\/]*)
11116  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11117  ;;
11118  *)
11119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11120for as_dir in $PATH
11121do
11122  IFS=$as_save_IFS
11123  test -z "$as_dir" && as_dir=.
11124    for ac_exec_ext in '' $ac_executable_extensions; do
11125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11126    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11128    break 2
11129  fi
11130done
11131  done
11132IFS=$as_save_IFS
11133
11134  ;;
11135esac
11136fi
11137WHICH=$ac_cv_path_WHICH
11138if test -n "$WHICH"; then
11139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11140$as_echo "$WHICH" >&6; }
11141else
11142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11143$as_echo "no" >&6; }
11144fi
11145
11146
11147        if test "x$WHICH" = x; then
11148          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11149        fi
11150      else
11151        # Otherwise we believe it is a complete path. Use it as it is.
11152        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11153$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11155$as_echo_n "checking for WHICH... " >&6; }
11156        if test ! -x "$tool_specified"; then
11157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11158$as_echo "not found" >&6; }
11159          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11160        fi
11161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11162$as_echo "$tool_specified" >&6; }
11163      fi
11164    fi
11165  fi
11166
11167
11168
11169  if test "x$WHICH" = x; then
11170    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11171  fi
11172
11173
11174
11175
11176
11177  # Publish this variable in the help.
11178
11179
11180  if test "x$XARGS" = x; then
11181    # The variable is not set by user, try to locate tool using the code snippet
11182    for ac_prog in xargs
11183do
11184  # Extract the first word of "$ac_prog", so it can be a program name with args.
11185set dummy $ac_prog; ac_word=$2
11186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11187$as_echo_n "checking for $ac_word... " >&6; }
11188if ${ac_cv_path_XARGS+:} false; then :
11189  $as_echo_n "(cached) " >&6
11190else
11191  case $XARGS in
11192  [\\/]* | ?:[\\/]*)
11193  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11194  ;;
11195  *)
11196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11197for as_dir in $PATH
11198do
11199  IFS=$as_save_IFS
11200  test -z "$as_dir" && as_dir=.
11201    for ac_exec_ext in '' $ac_executable_extensions; do
11202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11203    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11205    break 2
11206  fi
11207done
11208  done
11209IFS=$as_save_IFS
11210
11211  ;;
11212esac
11213fi
11214XARGS=$ac_cv_path_XARGS
11215if test -n "$XARGS"; then
11216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11217$as_echo "$XARGS" >&6; }
11218else
11219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11220$as_echo "no" >&6; }
11221fi
11222
11223
11224  test -n "$XARGS" && break
11225done
11226
11227  else
11228    # The variable is set, but is it from the command line or the environment?
11229
11230    # Try to remove the string !XARGS! from our list.
11231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11233      # If it failed, the variable was not from the command line. Ignore it,
11234      # but warn the user (except for BASH, which is always set by the calling BASH).
11235      if test "xXARGS" != xBASH; then
11236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11237$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11238      fi
11239      # Try to locate tool using the code snippet
11240      for ac_prog in xargs
11241do
11242  # Extract the first word of "$ac_prog", so it can be a program name with args.
11243set dummy $ac_prog; ac_word=$2
11244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11245$as_echo_n "checking for $ac_word... " >&6; }
11246if ${ac_cv_path_XARGS+:} false; then :
11247  $as_echo_n "(cached) " >&6
11248else
11249  case $XARGS in
11250  [\\/]* | ?:[\\/]*)
11251  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11252  ;;
11253  *)
11254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11255for as_dir in $PATH
11256do
11257  IFS=$as_save_IFS
11258  test -z "$as_dir" && as_dir=.
11259    for ac_exec_ext in '' $ac_executable_extensions; do
11260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11261    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11263    break 2
11264  fi
11265done
11266  done
11267IFS=$as_save_IFS
11268
11269  ;;
11270esac
11271fi
11272XARGS=$ac_cv_path_XARGS
11273if test -n "$XARGS"; then
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11275$as_echo "$XARGS" >&6; }
11276else
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278$as_echo "no" >&6; }
11279fi
11280
11281
11282  test -n "$XARGS" && break
11283done
11284
11285    else
11286      # If it succeeded, then it was overridden by the user. We will use it
11287      # for the tool.
11288
11289      # First remove it from the list of overridden variables, so we can test
11290      # for unknown variables in the end.
11291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11292
11293      # Check if the provided tool contains a complete path.
11294      tool_specified="$XARGS"
11295      tool_basename="${tool_specified##*/}"
11296      if test "x$tool_basename" = "x$tool_specified"; then
11297        # A command without a complete path is provided, search $PATH.
11298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11299$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11300        # Extract the first word of "$tool_basename", so it can be a program name with args.
11301set dummy $tool_basename; ac_word=$2
11302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11303$as_echo_n "checking for $ac_word... " >&6; }
11304if ${ac_cv_path_XARGS+:} false; then :
11305  $as_echo_n "(cached) " >&6
11306else
11307  case $XARGS in
11308  [\\/]* | ?:[\\/]*)
11309  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11310  ;;
11311  *)
11312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11313for as_dir in $PATH
11314do
11315  IFS=$as_save_IFS
11316  test -z "$as_dir" && as_dir=.
11317    for ac_exec_ext in '' $ac_executable_extensions; do
11318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11319    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11321    break 2
11322  fi
11323done
11324  done
11325IFS=$as_save_IFS
11326
11327  ;;
11328esac
11329fi
11330XARGS=$ac_cv_path_XARGS
11331if test -n "$XARGS"; then
11332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11333$as_echo "$XARGS" >&6; }
11334else
11335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
11337fi
11338
11339
11340        if test "x$XARGS" = x; then
11341          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11342        fi
11343      else
11344        # Otherwise we believe it is a complete path. Use it as it is.
11345        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11346$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11348$as_echo_n "checking for XARGS... " >&6; }
11349        if test ! -x "$tool_specified"; then
11350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11351$as_echo "not found" >&6; }
11352          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11353        fi
11354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11355$as_echo "$tool_specified" >&6; }
11356      fi
11357    fi
11358  fi
11359
11360
11361
11362  if test "x$XARGS" = x; then
11363    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11364  fi
11365
11366
11367
11368  # Then required tools that require some special treatment.
11369
11370
11371  # Publish this variable in the help.
11372
11373
11374  if test "x$AWK" = x; then
11375    # The variable is not set by user, try to locate tool using the code snippet
11376    for ac_prog in gawk mawk nawk awk
11377do
11378  # Extract the first word of "$ac_prog", so it can be a program name with args.
11379set dummy $ac_prog; ac_word=$2
11380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11381$as_echo_n "checking for $ac_word... " >&6; }
11382if ${ac_cv_prog_AWK+:} false; then :
11383  $as_echo_n "(cached) " >&6
11384else
11385  if test -n "$AWK"; then
11386  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11387else
11388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11389for as_dir in $PATH
11390do
11391  IFS=$as_save_IFS
11392  test -z "$as_dir" && as_dir=.
11393    for ac_exec_ext in '' $ac_executable_extensions; do
11394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11395    ac_cv_prog_AWK="$ac_prog"
11396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11397    break 2
11398  fi
11399done
11400  done
11401IFS=$as_save_IFS
11402
11403fi
11404fi
11405AWK=$ac_cv_prog_AWK
11406if test -n "$AWK"; then
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11408$as_echo "$AWK" >&6; }
11409else
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
11412fi
11413
11414
11415  test -n "$AWK" && break
11416done
11417
11418  else
11419    # The variable is set, but is it from the command line or the environment?
11420
11421    # Try to remove the string !AWK! from our list.
11422    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11423    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11424      # If it failed, the variable was not from the command line. Ignore it,
11425      # but warn the user (except for BASH, which is always set by the calling BASH).
11426      if test "xAWK" != xBASH; then
11427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11428$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11429      fi
11430      # Try to locate tool using the code snippet
11431      for ac_prog in gawk mawk nawk awk
11432do
11433  # Extract the first word of "$ac_prog", so it can be a program name with args.
11434set dummy $ac_prog; ac_word=$2
11435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436$as_echo_n "checking for $ac_word... " >&6; }
11437if ${ac_cv_prog_AWK+:} false; then :
11438  $as_echo_n "(cached) " >&6
11439else
11440  if test -n "$AWK"; then
11441  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11442else
11443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11444for as_dir in $PATH
11445do
11446  IFS=$as_save_IFS
11447  test -z "$as_dir" && as_dir=.
11448    for ac_exec_ext in '' $ac_executable_extensions; do
11449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11450    ac_cv_prog_AWK="$ac_prog"
11451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11452    break 2
11453  fi
11454done
11455  done
11456IFS=$as_save_IFS
11457
11458fi
11459fi
11460AWK=$ac_cv_prog_AWK
11461if test -n "$AWK"; then
11462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11463$as_echo "$AWK" >&6; }
11464else
11465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11466$as_echo "no" >&6; }
11467fi
11468
11469
11470  test -n "$AWK" && break
11471done
11472
11473    else
11474      # If it succeeded, then it was overridden by the user. We will use it
11475      # for the tool.
11476
11477      # First remove it from the list of overridden variables, so we can test
11478      # for unknown variables in the end.
11479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11480
11481      # Check if the provided tool contains a complete path.
11482      tool_specified="$AWK"
11483      tool_basename="${tool_specified##*/}"
11484      if test "x$tool_basename" = "x$tool_specified"; then
11485        # A command without a complete path is provided, search $PATH.
11486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11487$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11488        # Extract the first word of "$tool_basename", so it can be a program name with args.
11489set dummy $tool_basename; ac_word=$2
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491$as_echo_n "checking for $ac_word... " >&6; }
11492if ${ac_cv_path_AWK+:} false; then :
11493  $as_echo_n "(cached) " >&6
11494else
11495  case $AWK in
11496  [\\/]* | ?:[\\/]*)
11497  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11498  ;;
11499  *)
11500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501for as_dir in $PATH
11502do
11503  IFS=$as_save_IFS
11504  test -z "$as_dir" && as_dir=.
11505    for ac_exec_ext in '' $ac_executable_extensions; do
11506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11507    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509    break 2
11510  fi
11511done
11512  done
11513IFS=$as_save_IFS
11514
11515  ;;
11516esac
11517fi
11518AWK=$ac_cv_path_AWK
11519if test -n "$AWK"; then
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11521$as_echo "$AWK" >&6; }
11522else
11523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
11525fi
11526
11527
11528        if test "x$AWK" = x; then
11529          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11530        fi
11531      else
11532        # Otherwise we believe it is a complete path. Use it as it is.
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11534$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11536$as_echo_n "checking for AWK... " >&6; }
11537        if test ! -x "$tool_specified"; then
11538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11539$as_echo "not found" >&6; }
11540          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11541        fi
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11543$as_echo "$tool_specified" >&6; }
11544      fi
11545    fi
11546  fi
11547
11548
11549  if test "x$AWK" = x; then
11550    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11551  fi
11552
11553
11554
11555
11556  # Publish this variable in the help.
11557
11558
11559  if test "x$GREP" = x; then
11560    # The variable is not set by user, try to locate tool using the code snippet
11561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11562$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11563if ${ac_cv_path_GREP+:} false; then :
11564  $as_echo_n "(cached) " >&6
11565else
11566  if test -z "$GREP"; then
11567  ac_path_GREP_found=false
11568  # Loop through the user's path and test for each of PROGNAME-LIST
11569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11570for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11571do
11572  IFS=$as_save_IFS
11573  test -z "$as_dir" && as_dir=.
11574    for ac_prog in grep ggrep; do
11575    for ac_exec_ext in '' $ac_executable_extensions; do
11576      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11577      as_fn_executable_p "$ac_path_GREP" || continue
11578# Check for GNU ac_path_GREP and select it if it is found.
11579  # Check for GNU $ac_path_GREP
11580case `"$ac_path_GREP" --version 2>&1` in
11581*GNU*)
11582  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11583*)
11584  ac_count=0
11585  $as_echo_n 0123456789 >"conftest.in"
11586  while :
11587  do
11588    cat "conftest.in" "conftest.in" >"conftest.tmp"
11589    mv "conftest.tmp" "conftest.in"
11590    cp "conftest.in" "conftest.nl"
11591    $as_echo 'GREP' >> "conftest.nl"
11592    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11593    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11594    as_fn_arith $ac_count + 1 && ac_count=$as_val
11595    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11596      # Best one so far, save it but keep looking for a better one
11597      ac_cv_path_GREP="$ac_path_GREP"
11598      ac_path_GREP_max=$ac_count
11599    fi
11600    # 10*(2^10) chars as input seems more than enough
11601    test $ac_count -gt 10 && break
11602  done
11603  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11604esac
11605
11606      $ac_path_GREP_found && break 3
11607    done
11608  done
11609  done
11610IFS=$as_save_IFS
11611  if test -z "$ac_cv_path_GREP"; then
11612    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11613  fi
11614else
11615  ac_cv_path_GREP=$GREP
11616fi
11617
11618fi
11619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11620$as_echo "$ac_cv_path_GREP" >&6; }
11621 GREP="$ac_cv_path_GREP"
11622
11623
11624  else
11625    # The variable is set, but is it from the command line or the environment?
11626
11627    # Try to remove the string !GREP! from our list.
11628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11630      # If it failed, the variable was not from the command line. Ignore it,
11631      # but warn the user (except for BASH, which is always set by the calling BASH).
11632      if test "xGREP" != xBASH; then
11633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11634$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11635      fi
11636      # Try to locate tool using the code snippet
11637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11638$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11639if ${ac_cv_path_GREP+:} false; then :
11640  $as_echo_n "(cached) " >&6
11641else
11642  if test -z "$GREP"; then
11643  ac_path_GREP_found=false
11644  # Loop through the user's path and test for each of PROGNAME-LIST
11645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11646for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11647do
11648  IFS=$as_save_IFS
11649  test -z "$as_dir" && as_dir=.
11650    for ac_prog in grep ggrep; do
11651    for ac_exec_ext in '' $ac_executable_extensions; do
11652      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11653      as_fn_executable_p "$ac_path_GREP" || continue
11654# Check for GNU ac_path_GREP and select it if it is found.
11655  # Check for GNU $ac_path_GREP
11656case `"$ac_path_GREP" --version 2>&1` in
11657*GNU*)
11658  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11659*)
11660  ac_count=0
11661  $as_echo_n 0123456789 >"conftest.in"
11662  while :
11663  do
11664    cat "conftest.in" "conftest.in" >"conftest.tmp"
11665    mv "conftest.tmp" "conftest.in"
11666    cp "conftest.in" "conftest.nl"
11667    $as_echo 'GREP' >> "conftest.nl"
11668    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11669    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11670    as_fn_arith $ac_count + 1 && ac_count=$as_val
11671    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11672      # Best one so far, save it but keep looking for a better one
11673      ac_cv_path_GREP="$ac_path_GREP"
11674      ac_path_GREP_max=$ac_count
11675    fi
11676    # 10*(2^10) chars as input seems more than enough
11677    test $ac_count -gt 10 && break
11678  done
11679  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11680esac
11681
11682      $ac_path_GREP_found && break 3
11683    done
11684  done
11685  done
11686IFS=$as_save_IFS
11687  if test -z "$ac_cv_path_GREP"; then
11688    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11689  fi
11690else
11691  ac_cv_path_GREP=$GREP
11692fi
11693
11694fi
11695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11696$as_echo "$ac_cv_path_GREP" >&6; }
11697 GREP="$ac_cv_path_GREP"
11698
11699
11700    else
11701      # If it succeeded, then it was overridden by the user. We will use it
11702      # for the tool.
11703
11704      # First remove it from the list of overridden variables, so we can test
11705      # for unknown variables in the end.
11706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11707
11708      # Check if the provided tool contains a complete path.
11709      tool_specified="$GREP"
11710      tool_basename="${tool_specified##*/}"
11711      if test "x$tool_basename" = "x$tool_specified"; then
11712        # A command without a complete path is provided, search $PATH.
11713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11714$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11715        # Extract the first word of "$tool_basename", so it can be a program name with args.
11716set dummy $tool_basename; ac_word=$2
11717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11718$as_echo_n "checking for $ac_word... " >&6; }
11719if ${ac_cv_path_GREP+:} false; then :
11720  $as_echo_n "(cached) " >&6
11721else
11722  case $GREP in
11723  [\\/]* | ?:[\\/]*)
11724  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11725  ;;
11726  *)
11727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11728for as_dir in $PATH
11729do
11730  IFS=$as_save_IFS
11731  test -z "$as_dir" && as_dir=.
11732    for ac_exec_ext in '' $ac_executable_extensions; do
11733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11734    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11736    break 2
11737  fi
11738done
11739  done
11740IFS=$as_save_IFS
11741
11742  ;;
11743esac
11744fi
11745GREP=$ac_cv_path_GREP
11746if test -n "$GREP"; then
11747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11748$as_echo "$GREP" >&6; }
11749else
11750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751$as_echo "no" >&6; }
11752fi
11753
11754
11755        if test "x$GREP" = x; then
11756          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11757        fi
11758      else
11759        # Otherwise we believe it is a complete path. Use it as it is.
11760        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11761$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11763$as_echo_n "checking for GREP... " >&6; }
11764        if test ! -x "$tool_specified"; then
11765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11766$as_echo "not found" >&6; }
11767          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11768        fi
11769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11770$as_echo "$tool_specified" >&6; }
11771      fi
11772    fi
11773  fi
11774
11775
11776  if test "x$GREP" = x; then
11777    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11778  fi
11779
11780
11781
11782
11783  # Publish this variable in the help.
11784
11785
11786  if test "x$EGREP" = x; then
11787    # The variable is not set by user, try to locate tool using the code snippet
11788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11789$as_echo_n "checking for egrep... " >&6; }
11790if ${ac_cv_path_EGREP+:} false; then :
11791  $as_echo_n "(cached) " >&6
11792else
11793  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11794   then ac_cv_path_EGREP="$GREP -E"
11795   else
11796     if test -z "$EGREP"; then
11797  ac_path_EGREP_found=false
11798  # Loop through the user's path and test for each of PROGNAME-LIST
11799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11800for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11801do
11802  IFS=$as_save_IFS
11803  test -z "$as_dir" && as_dir=.
11804    for ac_prog in egrep; do
11805    for ac_exec_ext in '' $ac_executable_extensions; do
11806      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11807      as_fn_executable_p "$ac_path_EGREP" || continue
11808# Check for GNU ac_path_EGREP and select it if it is found.
11809  # Check for GNU $ac_path_EGREP
11810case `"$ac_path_EGREP" --version 2>&1` in
11811*GNU*)
11812  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11813*)
11814  ac_count=0
11815  $as_echo_n 0123456789 >"conftest.in"
11816  while :
11817  do
11818    cat "conftest.in" "conftest.in" >"conftest.tmp"
11819    mv "conftest.tmp" "conftest.in"
11820    cp "conftest.in" "conftest.nl"
11821    $as_echo 'EGREP' >> "conftest.nl"
11822    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11823    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11824    as_fn_arith $ac_count + 1 && ac_count=$as_val
11825    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11826      # Best one so far, save it but keep looking for a better one
11827      ac_cv_path_EGREP="$ac_path_EGREP"
11828      ac_path_EGREP_max=$ac_count
11829    fi
11830    # 10*(2^10) chars as input seems more than enough
11831    test $ac_count -gt 10 && break
11832  done
11833  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11834esac
11835
11836      $ac_path_EGREP_found && break 3
11837    done
11838  done
11839  done
11840IFS=$as_save_IFS
11841  if test -z "$ac_cv_path_EGREP"; then
11842    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11843  fi
11844else
11845  ac_cv_path_EGREP=$EGREP
11846fi
11847
11848   fi
11849fi
11850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11851$as_echo "$ac_cv_path_EGREP" >&6; }
11852 EGREP="$ac_cv_path_EGREP"
11853
11854
11855  else
11856    # The variable is set, but is it from the command line or the environment?
11857
11858    # Try to remove the string !EGREP! from our list.
11859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11861      # If it failed, the variable was not from the command line. Ignore it,
11862      # but warn the user (except for BASH, which is always set by the calling BASH).
11863      if test "xEGREP" != xBASH; then
11864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11865$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11866      fi
11867      # Try to locate tool using the code snippet
11868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11869$as_echo_n "checking for egrep... " >&6; }
11870if ${ac_cv_path_EGREP+:} false; then :
11871  $as_echo_n "(cached) " >&6
11872else
11873  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11874   then ac_cv_path_EGREP="$GREP -E"
11875   else
11876     if test -z "$EGREP"; then
11877  ac_path_EGREP_found=false
11878  # Loop through the user's path and test for each of PROGNAME-LIST
11879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11880for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11881do
11882  IFS=$as_save_IFS
11883  test -z "$as_dir" && as_dir=.
11884    for ac_prog in egrep; do
11885    for ac_exec_ext in '' $ac_executable_extensions; do
11886      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11887      as_fn_executable_p "$ac_path_EGREP" || continue
11888# Check for GNU ac_path_EGREP and select it if it is found.
11889  # Check for GNU $ac_path_EGREP
11890case `"$ac_path_EGREP" --version 2>&1` in
11891*GNU*)
11892  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11893*)
11894  ac_count=0
11895  $as_echo_n 0123456789 >"conftest.in"
11896  while :
11897  do
11898    cat "conftest.in" "conftest.in" >"conftest.tmp"
11899    mv "conftest.tmp" "conftest.in"
11900    cp "conftest.in" "conftest.nl"
11901    $as_echo 'EGREP' >> "conftest.nl"
11902    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11903    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11904    as_fn_arith $ac_count + 1 && ac_count=$as_val
11905    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11906      # Best one so far, save it but keep looking for a better one
11907      ac_cv_path_EGREP="$ac_path_EGREP"
11908      ac_path_EGREP_max=$ac_count
11909    fi
11910    # 10*(2^10) chars as input seems more than enough
11911    test $ac_count -gt 10 && break
11912  done
11913  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11914esac
11915
11916      $ac_path_EGREP_found && break 3
11917    done
11918  done
11919  done
11920IFS=$as_save_IFS
11921  if test -z "$ac_cv_path_EGREP"; then
11922    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11923  fi
11924else
11925  ac_cv_path_EGREP=$EGREP
11926fi
11927
11928   fi
11929fi
11930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11931$as_echo "$ac_cv_path_EGREP" >&6; }
11932 EGREP="$ac_cv_path_EGREP"
11933
11934
11935    else
11936      # If it succeeded, then it was overridden by the user. We will use it
11937      # for the tool.
11938
11939      # First remove it from the list of overridden variables, so we can test
11940      # for unknown variables in the end.
11941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11942
11943      # Check if the provided tool contains a complete path.
11944      tool_specified="$EGREP"
11945      tool_basename="${tool_specified##*/}"
11946      if test "x$tool_basename" = "x$tool_specified"; then
11947        # A command without a complete path is provided, search $PATH.
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11949$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11950        # Extract the first word of "$tool_basename", so it can be a program name with args.
11951set dummy $tool_basename; ac_word=$2
11952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11953$as_echo_n "checking for $ac_word... " >&6; }
11954if ${ac_cv_path_EGREP+:} false; then :
11955  $as_echo_n "(cached) " >&6
11956else
11957  case $EGREP in
11958  [\\/]* | ?:[\\/]*)
11959  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11960  ;;
11961  *)
11962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11963for as_dir in $PATH
11964do
11965  IFS=$as_save_IFS
11966  test -z "$as_dir" && as_dir=.
11967    for ac_exec_ext in '' $ac_executable_extensions; do
11968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11969    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11971    break 2
11972  fi
11973done
11974  done
11975IFS=$as_save_IFS
11976
11977  ;;
11978esac
11979fi
11980EGREP=$ac_cv_path_EGREP
11981if test -n "$EGREP"; then
11982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11983$as_echo "$EGREP" >&6; }
11984else
11985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11986$as_echo "no" >&6; }
11987fi
11988
11989
11990        if test "x$EGREP" = x; then
11991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11992        fi
11993      else
11994        # Otherwise we believe it is a complete path. Use it as it is.
11995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11996$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11998$as_echo_n "checking for EGREP... " >&6; }
11999        if test ! -x "$tool_specified"; then
12000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12001$as_echo "not found" >&6; }
12002          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12003        fi
12004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12005$as_echo "$tool_specified" >&6; }
12006      fi
12007    fi
12008  fi
12009
12010
12011  if test "x$EGREP" = x; then
12012    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12013  fi
12014
12015
12016
12017
12018  # Publish this variable in the help.
12019
12020
12021  if test "x$FGREP" = x; then
12022    # The variable is not set by user, try to locate tool using the code snippet
12023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12024$as_echo_n "checking for fgrep... " >&6; }
12025if ${ac_cv_path_FGREP+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12029   then ac_cv_path_FGREP="$GREP -F"
12030   else
12031     if test -z "$FGREP"; then
12032  ac_path_FGREP_found=false
12033  # Loop through the user's path and test for each of PROGNAME-LIST
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_prog in fgrep; do
12040    for ac_exec_ext in '' $ac_executable_extensions; do
12041      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12042      as_fn_executable_p "$ac_path_FGREP" || continue
12043# Check for GNU ac_path_FGREP and select it if it is found.
12044  # Check for GNU $ac_path_FGREP
12045case `"$ac_path_FGREP" --version 2>&1` in
12046*GNU*)
12047  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12048*)
12049  ac_count=0
12050  $as_echo_n 0123456789 >"conftest.in"
12051  while :
12052  do
12053    cat "conftest.in" "conftest.in" >"conftest.tmp"
12054    mv "conftest.tmp" "conftest.in"
12055    cp "conftest.in" "conftest.nl"
12056    $as_echo 'FGREP' >> "conftest.nl"
12057    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12058    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12059    as_fn_arith $ac_count + 1 && ac_count=$as_val
12060    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12061      # Best one so far, save it but keep looking for a better one
12062      ac_cv_path_FGREP="$ac_path_FGREP"
12063      ac_path_FGREP_max=$ac_count
12064    fi
12065    # 10*(2^10) chars as input seems more than enough
12066    test $ac_count -gt 10 && break
12067  done
12068  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12069esac
12070
12071      $ac_path_FGREP_found && break 3
12072    done
12073  done
12074  done
12075IFS=$as_save_IFS
12076  if test -z "$ac_cv_path_FGREP"; then
12077    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12078  fi
12079else
12080  ac_cv_path_FGREP=$FGREP
12081fi
12082
12083   fi
12084fi
12085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12086$as_echo "$ac_cv_path_FGREP" >&6; }
12087 FGREP="$ac_cv_path_FGREP"
12088
12089
12090  else
12091    # The variable is set, but is it from the command line or the environment?
12092
12093    # Try to remove the string !FGREP! from our list.
12094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12096      # If it failed, the variable was not from the command line. Ignore it,
12097      # but warn the user (except for BASH, which is always set by the calling BASH).
12098      if test "xFGREP" != xBASH; then
12099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12100$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12101      fi
12102      # Try to locate tool using the code snippet
12103      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12104$as_echo_n "checking for fgrep... " >&6; }
12105if ${ac_cv_path_FGREP+:} false; then :
12106  $as_echo_n "(cached) " >&6
12107else
12108  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12109   then ac_cv_path_FGREP="$GREP -F"
12110   else
12111     if test -z "$FGREP"; then
12112  ac_path_FGREP_found=false
12113  # Loop through the user's path and test for each of PROGNAME-LIST
12114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12115for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12116do
12117  IFS=$as_save_IFS
12118  test -z "$as_dir" && as_dir=.
12119    for ac_prog in fgrep; do
12120    for ac_exec_ext in '' $ac_executable_extensions; do
12121      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12122      as_fn_executable_p "$ac_path_FGREP" || continue
12123# Check for GNU ac_path_FGREP and select it if it is found.
12124  # Check for GNU $ac_path_FGREP
12125case `"$ac_path_FGREP" --version 2>&1` in
12126*GNU*)
12127  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12128*)
12129  ac_count=0
12130  $as_echo_n 0123456789 >"conftest.in"
12131  while :
12132  do
12133    cat "conftest.in" "conftest.in" >"conftest.tmp"
12134    mv "conftest.tmp" "conftest.in"
12135    cp "conftest.in" "conftest.nl"
12136    $as_echo 'FGREP' >> "conftest.nl"
12137    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12138    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12139    as_fn_arith $ac_count + 1 && ac_count=$as_val
12140    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12141      # Best one so far, save it but keep looking for a better one
12142      ac_cv_path_FGREP="$ac_path_FGREP"
12143      ac_path_FGREP_max=$ac_count
12144    fi
12145    # 10*(2^10) chars as input seems more than enough
12146    test $ac_count -gt 10 && break
12147  done
12148  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12149esac
12150
12151      $ac_path_FGREP_found && break 3
12152    done
12153  done
12154  done
12155IFS=$as_save_IFS
12156  if test -z "$ac_cv_path_FGREP"; then
12157    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12158  fi
12159else
12160  ac_cv_path_FGREP=$FGREP
12161fi
12162
12163   fi
12164fi
12165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12166$as_echo "$ac_cv_path_FGREP" >&6; }
12167 FGREP="$ac_cv_path_FGREP"
12168
12169
12170    else
12171      # If it succeeded, then it was overridden by the user. We will use it
12172      # for the tool.
12173
12174      # First remove it from the list of overridden variables, so we can test
12175      # for unknown variables in the end.
12176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12177
12178      # Check if the provided tool contains a complete path.
12179      tool_specified="$FGREP"
12180      tool_basename="${tool_specified##*/}"
12181      if test "x$tool_basename" = "x$tool_specified"; then
12182        # A command without a complete path is provided, search $PATH.
12183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12184$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12185        # Extract the first word of "$tool_basename", so it can be a program name with args.
12186set dummy $tool_basename; ac_word=$2
12187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12188$as_echo_n "checking for $ac_word... " >&6; }
12189if ${ac_cv_path_FGREP+:} false; then :
12190  $as_echo_n "(cached) " >&6
12191else
12192  case $FGREP in
12193  [\\/]* | ?:[\\/]*)
12194  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12195  ;;
12196  *)
12197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12198for as_dir in $PATH
12199do
12200  IFS=$as_save_IFS
12201  test -z "$as_dir" && as_dir=.
12202    for ac_exec_ext in '' $ac_executable_extensions; do
12203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12204    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12206    break 2
12207  fi
12208done
12209  done
12210IFS=$as_save_IFS
12211
12212  ;;
12213esac
12214fi
12215FGREP=$ac_cv_path_FGREP
12216if test -n "$FGREP"; then
12217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12218$as_echo "$FGREP" >&6; }
12219else
12220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12221$as_echo "no" >&6; }
12222fi
12223
12224
12225        if test "x$FGREP" = x; then
12226          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12227        fi
12228      else
12229        # Otherwise we believe it is a complete path. Use it as it is.
12230        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12231$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12232        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12233$as_echo_n "checking for FGREP... " >&6; }
12234        if test ! -x "$tool_specified"; then
12235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12236$as_echo "not found" >&6; }
12237          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12238        fi
12239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12240$as_echo "$tool_specified" >&6; }
12241      fi
12242    fi
12243  fi
12244
12245
12246  if test "x$FGREP" = x; then
12247    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12248  fi
12249
12250
12251
12252
12253  # Publish this variable in the help.
12254
12255
12256  if test "x$SED" = x; then
12257    # The variable is not set by user, try to locate tool using the code snippet
12258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12259$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12260if ${ac_cv_path_SED+:} false; then :
12261  $as_echo_n "(cached) " >&6
12262else
12263            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12264     for ac_i in 1 2 3 4 5 6 7; do
12265       ac_script="$ac_script$as_nl$ac_script"
12266     done
12267     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12268     { ac_script=; unset ac_script;}
12269     if test -z "$SED"; then
12270  ac_path_SED_found=false
12271  # Loop through the user's path and test for each of PROGNAME-LIST
12272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12273for as_dir in $PATH
12274do
12275  IFS=$as_save_IFS
12276  test -z "$as_dir" && as_dir=.
12277    for ac_prog in sed gsed; do
12278    for ac_exec_ext in '' $ac_executable_extensions; do
12279      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12280      as_fn_executable_p "$ac_path_SED" || continue
12281# Check for GNU ac_path_SED and select it if it is found.
12282  # Check for GNU $ac_path_SED
12283case `"$ac_path_SED" --version 2>&1` in
12284*GNU*)
12285  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12286*)
12287  ac_count=0
12288  $as_echo_n 0123456789 >"conftest.in"
12289  while :
12290  do
12291    cat "conftest.in" "conftest.in" >"conftest.tmp"
12292    mv "conftest.tmp" "conftest.in"
12293    cp "conftest.in" "conftest.nl"
12294    $as_echo '' >> "conftest.nl"
12295    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12296    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12297    as_fn_arith $ac_count + 1 && ac_count=$as_val
12298    if test $ac_count -gt ${ac_path_SED_max-0}; then
12299      # Best one so far, save it but keep looking for a better one
12300      ac_cv_path_SED="$ac_path_SED"
12301      ac_path_SED_max=$ac_count
12302    fi
12303    # 10*(2^10) chars as input seems more than enough
12304    test $ac_count -gt 10 && break
12305  done
12306  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12307esac
12308
12309      $ac_path_SED_found && break 3
12310    done
12311  done
12312  done
12313IFS=$as_save_IFS
12314  if test -z "$ac_cv_path_SED"; then
12315    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12316  fi
12317else
12318  ac_cv_path_SED=$SED
12319fi
12320
12321fi
12322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12323$as_echo "$ac_cv_path_SED" >&6; }
12324 SED="$ac_cv_path_SED"
12325  rm -f conftest.sed
12326
12327  else
12328    # The variable is set, but is it from the command line or the environment?
12329
12330    # Try to remove the string !SED! from our list.
12331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12333      # If it failed, the variable was not from the command line. Ignore it,
12334      # but warn the user (except for BASH, which is always set by the calling BASH).
12335      if test "xSED" != xBASH; then
12336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12337$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12338      fi
12339      # Try to locate tool using the code snippet
12340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12341$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12342if ${ac_cv_path_SED+:} false; then :
12343  $as_echo_n "(cached) " >&6
12344else
12345            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12346     for ac_i in 1 2 3 4 5 6 7; do
12347       ac_script="$ac_script$as_nl$ac_script"
12348     done
12349     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12350     { ac_script=; unset ac_script;}
12351     if test -z "$SED"; then
12352  ac_path_SED_found=false
12353  # Loop through the user's path and test for each of PROGNAME-LIST
12354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12355for as_dir in $PATH
12356do
12357  IFS=$as_save_IFS
12358  test -z "$as_dir" && as_dir=.
12359    for ac_prog in sed gsed; do
12360    for ac_exec_ext in '' $ac_executable_extensions; do
12361      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12362      as_fn_executable_p "$ac_path_SED" || continue
12363# Check for GNU ac_path_SED and select it if it is found.
12364  # Check for GNU $ac_path_SED
12365case `"$ac_path_SED" --version 2>&1` in
12366*GNU*)
12367  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12368*)
12369  ac_count=0
12370  $as_echo_n 0123456789 >"conftest.in"
12371  while :
12372  do
12373    cat "conftest.in" "conftest.in" >"conftest.tmp"
12374    mv "conftest.tmp" "conftest.in"
12375    cp "conftest.in" "conftest.nl"
12376    $as_echo '' >> "conftest.nl"
12377    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12378    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12379    as_fn_arith $ac_count + 1 && ac_count=$as_val
12380    if test $ac_count -gt ${ac_path_SED_max-0}; then
12381      # Best one so far, save it but keep looking for a better one
12382      ac_cv_path_SED="$ac_path_SED"
12383      ac_path_SED_max=$ac_count
12384    fi
12385    # 10*(2^10) chars as input seems more than enough
12386    test $ac_count -gt 10 && break
12387  done
12388  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12389esac
12390
12391      $ac_path_SED_found && break 3
12392    done
12393  done
12394  done
12395IFS=$as_save_IFS
12396  if test -z "$ac_cv_path_SED"; then
12397    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12398  fi
12399else
12400  ac_cv_path_SED=$SED
12401fi
12402
12403fi
12404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12405$as_echo "$ac_cv_path_SED" >&6; }
12406 SED="$ac_cv_path_SED"
12407  rm -f conftest.sed
12408
12409    else
12410      # If it succeeded, then it was overridden by the user. We will use it
12411      # for the tool.
12412
12413      # First remove it from the list of overridden variables, so we can test
12414      # for unknown variables in the end.
12415      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12416
12417      # Check if the provided tool contains a complete path.
12418      tool_specified="$SED"
12419      tool_basename="${tool_specified##*/}"
12420      if test "x$tool_basename" = "x$tool_specified"; then
12421        # A command without a complete path is provided, search $PATH.
12422        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12423$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12424        # Extract the first word of "$tool_basename", so it can be a program name with args.
12425set dummy $tool_basename; ac_word=$2
12426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12427$as_echo_n "checking for $ac_word... " >&6; }
12428if ${ac_cv_path_SED+:} false; then :
12429  $as_echo_n "(cached) " >&6
12430else
12431  case $SED in
12432  [\\/]* | ?:[\\/]*)
12433  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12434  ;;
12435  *)
12436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12437for as_dir in $PATH
12438do
12439  IFS=$as_save_IFS
12440  test -z "$as_dir" && as_dir=.
12441    for ac_exec_ext in '' $ac_executable_extensions; do
12442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12443    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12445    break 2
12446  fi
12447done
12448  done
12449IFS=$as_save_IFS
12450
12451  ;;
12452esac
12453fi
12454SED=$ac_cv_path_SED
12455if test -n "$SED"; then
12456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12457$as_echo "$SED" >&6; }
12458else
12459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12460$as_echo "no" >&6; }
12461fi
12462
12463
12464        if test "x$SED" = x; then
12465          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12466        fi
12467      else
12468        # Otherwise we believe it is a complete path. Use it as it is.
12469        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12470$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12471        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12472$as_echo_n "checking for SED... " >&6; }
12473        if test ! -x "$tool_specified"; then
12474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12475$as_echo "not found" >&6; }
12476          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12477        fi
12478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12479$as_echo "$tool_specified" >&6; }
12480      fi
12481    fi
12482  fi
12483
12484
12485  if test "x$SED" = x; then
12486    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12487  fi
12488
12489
12490
12491  # Always force rm.
12492  RM="$RM -f"
12493
12494  # pwd behaves differently on various platforms and some don't support the -L flag.
12495  # Always use the bash builtin pwd to get uniform behavior.
12496  THEPWDCMD=pwd
12497
12498  # These are not required on all platforms
12499
12500
12501  # Publish this variable in the help.
12502
12503
12504  if test "x$CYGPATH" = x; then
12505    # The variable is not set by user, try to locate tool using the code snippet
12506    for ac_prog in cygpath
12507do
12508  # Extract the first word of "$ac_prog", so it can be a program name with args.
12509set dummy $ac_prog; ac_word=$2
12510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12511$as_echo_n "checking for $ac_word... " >&6; }
12512if ${ac_cv_path_CYGPATH+:} false; then :
12513  $as_echo_n "(cached) " >&6
12514else
12515  case $CYGPATH in
12516  [\\/]* | ?:[\\/]*)
12517  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12518  ;;
12519  *)
12520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12521for as_dir in $PATH
12522do
12523  IFS=$as_save_IFS
12524  test -z "$as_dir" && as_dir=.
12525    for ac_exec_ext in '' $ac_executable_extensions; do
12526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12527    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12529    break 2
12530  fi
12531done
12532  done
12533IFS=$as_save_IFS
12534
12535  ;;
12536esac
12537fi
12538CYGPATH=$ac_cv_path_CYGPATH
12539if test -n "$CYGPATH"; then
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12541$as_echo "$CYGPATH" >&6; }
12542else
12543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12544$as_echo "no" >&6; }
12545fi
12546
12547
12548  test -n "$CYGPATH" && break
12549done
12550
12551  else
12552    # The variable is set, but is it from the command line or the environment?
12553
12554    # Try to remove the string !CYGPATH! from our list.
12555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12557      # If it failed, the variable was not from the command line. Ignore it,
12558      # but warn the user (except for BASH, which is always set by the calling BASH).
12559      if test "xCYGPATH" != xBASH; then
12560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12561$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12562      fi
12563      # Try to locate tool using the code snippet
12564      for ac_prog in cygpath
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_CYGPATH+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $CYGPATH in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596CYGPATH=$ac_cv_path_CYGPATH
12597if test -n "$CYGPATH"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12599$as_echo "$CYGPATH" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$CYGPATH" && break
12607done
12608
12609    else
12610      # If it succeeded, then it was overridden by the user. We will use it
12611      # for the tool.
12612
12613      # First remove it from the list of overridden variables, so we can test
12614      # for unknown variables in the end.
12615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12616
12617      # Check if the provided tool contains a complete path.
12618      tool_specified="$CYGPATH"
12619      tool_basename="${tool_specified##*/}"
12620      if test "x$tool_basename" = "x$tool_specified"; then
12621        # A command without a complete path is provided, search $PATH.
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12623$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12624        # Extract the first word of "$tool_basename", so it can be a program name with args.
12625set dummy $tool_basename; ac_word=$2
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12627$as_echo_n "checking for $ac_word... " >&6; }
12628if ${ac_cv_path_CYGPATH+:} false; then :
12629  $as_echo_n "(cached) " >&6
12630else
12631  case $CYGPATH in
12632  [\\/]* | ?:[\\/]*)
12633  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12634  ;;
12635  *)
12636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12637for as_dir in $PATH
12638do
12639  IFS=$as_save_IFS
12640  test -z "$as_dir" && as_dir=.
12641    for ac_exec_ext in '' $ac_executable_extensions; do
12642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12643    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12645    break 2
12646  fi
12647done
12648  done
12649IFS=$as_save_IFS
12650
12651  ;;
12652esac
12653fi
12654CYGPATH=$ac_cv_path_CYGPATH
12655if test -n "$CYGPATH"; then
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12657$as_echo "$CYGPATH" >&6; }
12658else
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
12661fi
12662
12663
12664        if test "x$CYGPATH" = x; then
12665          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12666        fi
12667      else
12668        # Otherwise we believe it is a complete path. Use it as it is.
12669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12670$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12672$as_echo_n "checking for CYGPATH... " >&6; }
12673        if test ! -x "$tool_specified"; then
12674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12675$as_echo "not found" >&6; }
12676          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12677        fi
12678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12679$as_echo "$tool_specified" >&6; }
12680      fi
12681    fi
12682  fi
12683
12684
12685
12686
12687  # Publish this variable in the help.
12688
12689
12690  if test "x$READLINK" = x; then
12691    # The variable is not set by user, try to locate tool using the code snippet
12692    for ac_prog in greadlink readlink
12693do
12694  # Extract the first word of "$ac_prog", so it can be a program name with args.
12695set dummy $ac_prog; ac_word=$2
12696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12697$as_echo_n "checking for $ac_word... " >&6; }
12698if ${ac_cv_path_READLINK+:} false; then :
12699  $as_echo_n "(cached) " >&6
12700else
12701  case $READLINK in
12702  [\\/]* | ?:[\\/]*)
12703  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12704  ;;
12705  *)
12706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12707for as_dir in $PATH
12708do
12709  IFS=$as_save_IFS
12710  test -z "$as_dir" && as_dir=.
12711    for ac_exec_ext in '' $ac_executable_extensions; do
12712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12713    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12715    break 2
12716  fi
12717done
12718  done
12719IFS=$as_save_IFS
12720
12721  ;;
12722esac
12723fi
12724READLINK=$ac_cv_path_READLINK
12725if test -n "$READLINK"; then
12726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12727$as_echo "$READLINK" >&6; }
12728else
12729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12730$as_echo "no" >&6; }
12731fi
12732
12733
12734  test -n "$READLINK" && break
12735done
12736
12737  else
12738    # The variable is set, but is it from the command line or the environment?
12739
12740    # Try to remove the string !READLINK! from our list.
12741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12743      # If it failed, the variable was not from the command line. Ignore it,
12744      # but warn the user (except for BASH, which is always set by the calling BASH).
12745      if test "xREADLINK" != xBASH; then
12746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12747$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12748      fi
12749      # Try to locate tool using the code snippet
12750      for ac_prog in greadlink readlink
12751do
12752  # Extract the first word of "$ac_prog", so it can be a program name with args.
12753set dummy $ac_prog; ac_word=$2
12754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12755$as_echo_n "checking for $ac_word... " >&6; }
12756if ${ac_cv_path_READLINK+:} false; then :
12757  $as_echo_n "(cached) " >&6
12758else
12759  case $READLINK in
12760  [\\/]* | ?:[\\/]*)
12761  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12762  ;;
12763  *)
12764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12765for as_dir in $PATH
12766do
12767  IFS=$as_save_IFS
12768  test -z "$as_dir" && as_dir=.
12769    for ac_exec_ext in '' $ac_executable_extensions; do
12770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12771    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12773    break 2
12774  fi
12775done
12776  done
12777IFS=$as_save_IFS
12778
12779  ;;
12780esac
12781fi
12782READLINK=$ac_cv_path_READLINK
12783if test -n "$READLINK"; then
12784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12785$as_echo "$READLINK" >&6; }
12786else
12787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12788$as_echo "no" >&6; }
12789fi
12790
12791
12792  test -n "$READLINK" && break
12793done
12794
12795    else
12796      # If it succeeded, then it was overridden by the user. We will use it
12797      # for the tool.
12798
12799      # First remove it from the list of overridden variables, so we can test
12800      # for unknown variables in the end.
12801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12802
12803      # Check if the provided tool contains a complete path.
12804      tool_specified="$READLINK"
12805      tool_basename="${tool_specified##*/}"
12806      if test "x$tool_basename" = "x$tool_specified"; then
12807        # A command without a complete path is provided, search $PATH.
12808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12809$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12810        # Extract the first word of "$tool_basename", so it can be a program name with args.
12811set dummy $tool_basename; ac_word=$2
12812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12813$as_echo_n "checking for $ac_word... " >&6; }
12814if ${ac_cv_path_READLINK+:} false; then :
12815  $as_echo_n "(cached) " >&6
12816else
12817  case $READLINK in
12818  [\\/]* | ?:[\\/]*)
12819  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12820  ;;
12821  *)
12822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12823for as_dir in $PATH
12824do
12825  IFS=$as_save_IFS
12826  test -z "$as_dir" && as_dir=.
12827    for ac_exec_ext in '' $ac_executable_extensions; do
12828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12829    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12831    break 2
12832  fi
12833done
12834  done
12835IFS=$as_save_IFS
12836
12837  ;;
12838esac
12839fi
12840READLINK=$ac_cv_path_READLINK
12841if test -n "$READLINK"; then
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12843$as_echo "$READLINK" >&6; }
12844else
12845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12846$as_echo "no" >&6; }
12847fi
12848
12849
12850        if test "x$READLINK" = x; then
12851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12852        fi
12853      else
12854        # Otherwise we believe it is a complete path. Use it as it is.
12855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12856$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12858$as_echo_n "checking for READLINK... " >&6; }
12859        if test ! -x "$tool_specified"; then
12860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12861$as_echo "not found" >&6; }
12862          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12863        fi
12864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12865$as_echo "$tool_specified" >&6; }
12866      fi
12867    fi
12868  fi
12869
12870
12871
12872
12873  # Publish this variable in the help.
12874
12875
12876  if test "x$DF" = x; then
12877    # The variable is not set by user, try to locate tool using the code snippet
12878    for ac_prog in df
12879do
12880  # Extract the first word of "$ac_prog", so it can be a program name with args.
12881set dummy $ac_prog; ac_word=$2
12882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12883$as_echo_n "checking for $ac_word... " >&6; }
12884if ${ac_cv_path_DF+:} false; then :
12885  $as_echo_n "(cached) " >&6
12886else
12887  case $DF in
12888  [\\/]* | ?:[\\/]*)
12889  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12890  ;;
12891  *)
12892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12893for as_dir in $PATH
12894do
12895  IFS=$as_save_IFS
12896  test -z "$as_dir" && as_dir=.
12897    for ac_exec_ext in '' $ac_executable_extensions; do
12898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12899    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12901    break 2
12902  fi
12903done
12904  done
12905IFS=$as_save_IFS
12906
12907  ;;
12908esac
12909fi
12910DF=$ac_cv_path_DF
12911if test -n "$DF"; then
12912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12913$as_echo "$DF" >&6; }
12914else
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12916$as_echo "no" >&6; }
12917fi
12918
12919
12920  test -n "$DF" && break
12921done
12922
12923  else
12924    # The variable is set, but is it from the command line or the environment?
12925
12926    # Try to remove the string !DF! from our list.
12927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12929      # If it failed, the variable was not from the command line. Ignore it,
12930      # but warn the user (except for BASH, which is always set by the calling BASH).
12931      if test "xDF" != xBASH; then
12932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12933$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12934      fi
12935      # Try to locate tool using the code snippet
12936      for ac_prog in df
12937do
12938  # Extract the first word of "$ac_prog", so it can be a program name with args.
12939set dummy $ac_prog; ac_word=$2
12940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12941$as_echo_n "checking for $ac_word... " >&6; }
12942if ${ac_cv_path_DF+:} false; then :
12943  $as_echo_n "(cached) " >&6
12944else
12945  case $DF in
12946  [\\/]* | ?:[\\/]*)
12947  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12948  ;;
12949  *)
12950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12951for as_dir in $PATH
12952do
12953  IFS=$as_save_IFS
12954  test -z "$as_dir" && as_dir=.
12955    for ac_exec_ext in '' $ac_executable_extensions; do
12956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12957    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12959    break 2
12960  fi
12961done
12962  done
12963IFS=$as_save_IFS
12964
12965  ;;
12966esac
12967fi
12968DF=$ac_cv_path_DF
12969if test -n "$DF"; then
12970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12971$as_echo "$DF" >&6; }
12972else
12973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12974$as_echo "no" >&6; }
12975fi
12976
12977
12978  test -n "$DF" && break
12979done
12980
12981    else
12982      # If it succeeded, then it was overridden by the user. We will use it
12983      # for the tool.
12984
12985      # First remove it from the list of overridden variables, so we can test
12986      # for unknown variables in the end.
12987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12988
12989      # Check if the provided tool contains a complete path.
12990      tool_specified="$DF"
12991      tool_basename="${tool_specified##*/}"
12992      if test "x$tool_basename" = "x$tool_specified"; then
12993        # A command without a complete path is provided, search $PATH.
12994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12995$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12996        # Extract the first word of "$tool_basename", so it can be a program name with args.
12997set dummy $tool_basename; ac_word=$2
12998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12999$as_echo_n "checking for $ac_word... " >&6; }
13000if ${ac_cv_path_DF+:} false; then :
13001  $as_echo_n "(cached) " >&6
13002else
13003  case $DF in
13004  [\\/]* | ?:[\\/]*)
13005  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13006  ;;
13007  *)
13008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13009for as_dir in $PATH
13010do
13011  IFS=$as_save_IFS
13012  test -z "$as_dir" && as_dir=.
13013    for ac_exec_ext in '' $ac_executable_extensions; do
13014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13015    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13017    break 2
13018  fi
13019done
13020  done
13021IFS=$as_save_IFS
13022
13023  ;;
13024esac
13025fi
13026DF=$ac_cv_path_DF
13027if test -n "$DF"; then
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13029$as_echo "$DF" >&6; }
13030else
13031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13032$as_echo "no" >&6; }
13033fi
13034
13035
13036        if test "x$DF" = x; then
13037          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13038        fi
13039      else
13040        # Otherwise we believe it is a complete path. Use it as it is.
13041        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13042$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13044$as_echo_n "checking for DF... " >&6; }
13045        if test ! -x "$tool_specified"; then
13046          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13047$as_echo "not found" >&6; }
13048          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13049        fi
13050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13051$as_echo "$tool_specified" >&6; }
13052      fi
13053    fi
13054  fi
13055
13056
13057
13058
13059  # Publish this variable in the help.
13060
13061
13062  if test "x$SETFILE" = x; then
13063    # The variable is not set by user, try to locate tool using the code snippet
13064    for ac_prog in SetFile
13065do
13066  # Extract the first word of "$ac_prog", so it can be a program name with args.
13067set dummy $ac_prog; ac_word=$2
13068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13069$as_echo_n "checking for $ac_word... " >&6; }
13070if ${ac_cv_path_SETFILE+:} false; then :
13071  $as_echo_n "(cached) " >&6
13072else
13073  case $SETFILE in
13074  [\\/]* | ?:[\\/]*)
13075  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13076  ;;
13077  *)
13078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13079for as_dir in $PATH
13080do
13081  IFS=$as_save_IFS
13082  test -z "$as_dir" && as_dir=.
13083    for ac_exec_ext in '' $ac_executable_extensions; do
13084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13085    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13087    break 2
13088  fi
13089done
13090  done
13091IFS=$as_save_IFS
13092
13093  ;;
13094esac
13095fi
13096SETFILE=$ac_cv_path_SETFILE
13097if test -n "$SETFILE"; then
13098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13099$as_echo "$SETFILE" >&6; }
13100else
13101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13102$as_echo "no" >&6; }
13103fi
13104
13105
13106  test -n "$SETFILE" && break
13107done
13108
13109  else
13110    # The variable is set, but is it from the command line or the environment?
13111
13112    # Try to remove the string !SETFILE! from our list.
13113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13115      # If it failed, the variable was not from the command line. Ignore it,
13116      # but warn the user (except for BASH, which is always set by the calling BASH).
13117      if test "xSETFILE" != xBASH; then
13118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13119$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13120      fi
13121      # Try to locate tool using the code snippet
13122      for ac_prog in SetFile
13123do
13124  # Extract the first word of "$ac_prog", so it can be a program name with args.
13125set dummy $ac_prog; ac_word=$2
13126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13127$as_echo_n "checking for $ac_word... " >&6; }
13128if ${ac_cv_path_SETFILE+:} false; then :
13129  $as_echo_n "(cached) " >&6
13130else
13131  case $SETFILE in
13132  [\\/]* | ?:[\\/]*)
13133  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13134  ;;
13135  *)
13136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137for as_dir in $PATH
13138do
13139  IFS=$as_save_IFS
13140  test -z "$as_dir" && as_dir=.
13141    for ac_exec_ext in '' $ac_executable_extensions; do
13142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13143    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13145    break 2
13146  fi
13147done
13148  done
13149IFS=$as_save_IFS
13150
13151  ;;
13152esac
13153fi
13154SETFILE=$ac_cv_path_SETFILE
13155if test -n "$SETFILE"; then
13156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13157$as_echo "$SETFILE" >&6; }
13158else
13159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13160$as_echo "no" >&6; }
13161fi
13162
13163
13164  test -n "$SETFILE" && break
13165done
13166
13167    else
13168      # If it succeeded, then it was overridden by the user. We will use it
13169      # for the tool.
13170
13171      # First remove it from the list of overridden variables, so we can test
13172      # for unknown variables in the end.
13173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13174
13175      # Check if the provided tool contains a complete path.
13176      tool_specified="$SETFILE"
13177      tool_basename="${tool_specified##*/}"
13178      if test "x$tool_basename" = "x$tool_specified"; then
13179        # A command without a complete path is provided, search $PATH.
13180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13181$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13182        # Extract the first word of "$tool_basename", so it can be a program name with args.
13183set dummy $tool_basename; ac_word=$2
13184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13185$as_echo_n "checking for $ac_word... " >&6; }
13186if ${ac_cv_path_SETFILE+:} false; then :
13187  $as_echo_n "(cached) " >&6
13188else
13189  case $SETFILE in
13190  [\\/]* | ?:[\\/]*)
13191  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13192  ;;
13193  *)
13194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13195for as_dir in $PATH
13196do
13197  IFS=$as_save_IFS
13198  test -z "$as_dir" && as_dir=.
13199    for ac_exec_ext in '' $ac_executable_extensions; do
13200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13201    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13203    break 2
13204  fi
13205done
13206  done
13207IFS=$as_save_IFS
13208
13209  ;;
13210esac
13211fi
13212SETFILE=$ac_cv_path_SETFILE
13213if test -n "$SETFILE"; then
13214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13215$as_echo "$SETFILE" >&6; }
13216else
13217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13218$as_echo "no" >&6; }
13219fi
13220
13221
13222        if test "x$SETFILE" = x; then
13223          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13224        fi
13225      else
13226        # Otherwise we believe it is a complete path. Use it as it is.
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13228$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13230$as_echo_n "checking for SETFILE... " >&6; }
13231        if test ! -x "$tool_specified"; then
13232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13233$as_echo "not found" >&6; }
13234          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13235        fi
13236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13237$as_echo "$tool_specified" >&6; }
13238      fi
13239    fi
13240  fi
13241
13242
13243
13244
13245  # Publish this variable in the help.
13246
13247
13248  if test "x$CPIO" = x; then
13249    # The variable is not set by user, try to locate tool using the code snippet
13250    for ac_prog in cpio bsdcpio
13251do
13252  # Extract the first word of "$ac_prog", so it can be a program name with args.
13253set dummy $ac_prog; ac_word=$2
13254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13255$as_echo_n "checking for $ac_word... " >&6; }
13256if ${ac_cv_path_CPIO+:} false; then :
13257  $as_echo_n "(cached) " >&6
13258else
13259  case $CPIO in
13260  [\\/]* | ?:[\\/]*)
13261  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13262  ;;
13263  *)
13264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13265for as_dir in $PATH
13266do
13267  IFS=$as_save_IFS
13268  test -z "$as_dir" && as_dir=.
13269    for ac_exec_ext in '' $ac_executable_extensions; do
13270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13271    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13273    break 2
13274  fi
13275done
13276  done
13277IFS=$as_save_IFS
13278
13279  ;;
13280esac
13281fi
13282CPIO=$ac_cv_path_CPIO
13283if test -n "$CPIO"; then
13284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13285$as_echo "$CPIO" >&6; }
13286else
13287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13288$as_echo "no" >&6; }
13289fi
13290
13291
13292  test -n "$CPIO" && break
13293done
13294
13295  else
13296    # The variable is set, but is it from the command line or the environment?
13297
13298    # Try to remove the string !CPIO! from our list.
13299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13301      # If it failed, the variable was not from the command line. Ignore it,
13302      # but warn the user (except for BASH, which is always set by the calling BASH).
13303      if test "xCPIO" != xBASH; then
13304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13305$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13306      fi
13307      # Try to locate tool using the code snippet
13308      for ac_prog in cpio bsdcpio
13309do
13310  # Extract the first word of "$ac_prog", so it can be a program name with args.
13311set dummy $ac_prog; ac_word=$2
13312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13313$as_echo_n "checking for $ac_word... " >&6; }
13314if ${ac_cv_path_CPIO+:} false; then :
13315  $as_echo_n "(cached) " >&6
13316else
13317  case $CPIO in
13318  [\\/]* | ?:[\\/]*)
13319  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13320  ;;
13321  *)
13322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13323for as_dir in $PATH
13324do
13325  IFS=$as_save_IFS
13326  test -z "$as_dir" && as_dir=.
13327    for ac_exec_ext in '' $ac_executable_extensions; do
13328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13329    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13331    break 2
13332  fi
13333done
13334  done
13335IFS=$as_save_IFS
13336
13337  ;;
13338esac
13339fi
13340CPIO=$ac_cv_path_CPIO
13341if test -n "$CPIO"; then
13342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13343$as_echo "$CPIO" >&6; }
13344else
13345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13346$as_echo "no" >&6; }
13347fi
13348
13349
13350  test -n "$CPIO" && break
13351done
13352
13353    else
13354      # If it succeeded, then it was overridden by the user. We will use it
13355      # for the tool.
13356
13357      # First remove it from the list of overridden variables, so we can test
13358      # for unknown variables in the end.
13359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13360
13361      # Check if the provided tool contains a complete path.
13362      tool_specified="$CPIO"
13363      tool_basename="${tool_specified##*/}"
13364      if test "x$tool_basename" = "x$tool_specified"; then
13365        # A command without a complete path is provided, search $PATH.
13366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13367$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13368        # Extract the first word of "$tool_basename", so it can be a program name with args.
13369set dummy $tool_basename; ac_word=$2
13370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13371$as_echo_n "checking for $ac_word... " >&6; }
13372if ${ac_cv_path_CPIO+:} false; then :
13373  $as_echo_n "(cached) " >&6
13374else
13375  case $CPIO in
13376  [\\/]* | ?:[\\/]*)
13377  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13378  ;;
13379  *)
13380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13381for as_dir in $PATH
13382do
13383  IFS=$as_save_IFS
13384  test -z "$as_dir" && as_dir=.
13385    for ac_exec_ext in '' $ac_executable_extensions; do
13386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13387    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13389    break 2
13390  fi
13391done
13392  done
13393IFS=$as_save_IFS
13394
13395  ;;
13396esac
13397fi
13398CPIO=$ac_cv_path_CPIO
13399if test -n "$CPIO"; then
13400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13401$as_echo "$CPIO" >&6; }
13402else
13403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13404$as_echo "no" >&6; }
13405fi
13406
13407
13408        if test "x$CPIO" = x; then
13409          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13410        fi
13411      else
13412        # Otherwise we believe it is a complete path. Use it as it is.
13413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13414$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13416$as_echo_n "checking for CPIO... " >&6; }
13417        if test ! -x "$tool_specified"; then
13418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13419$as_echo "not found" >&6; }
13420          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13421        fi
13422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13423$as_echo "$tool_specified" >&6; }
13424      fi
13425    fi
13426  fi
13427
13428
13429
13430
13431# Now we can determine OpenJDK build and target platforms. This is required to
13432# have early on.
13433# Make sure we can run config.sub.
13434$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13435  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13436
13437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13438$as_echo_n "checking build system type... " >&6; }
13439if ${ac_cv_build+:} false; then :
13440  $as_echo_n "(cached) " >&6
13441else
13442  ac_build_alias=$build_alias
13443test "x$ac_build_alias" = x &&
13444  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13445test "x$ac_build_alias" = x &&
13446  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13447ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13448  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13449
13450fi
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13452$as_echo "$ac_cv_build" >&6; }
13453case $ac_cv_build in
13454*-*-*) ;;
13455*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13456esac
13457build=$ac_cv_build
13458ac_save_IFS=$IFS; IFS='-'
13459set x $ac_cv_build
13460shift
13461build_cpu=$1
13462build_vendor=$2
13463shift; shift
13464# Remember, the first character of IFS is used to create $*,
13465# except with old shells:
13466build_os=$*
13467IFS=$ac_save_IFS
13468case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13469
13470
13471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13472$as_echo_n "checking host system type... " >&6; }
13473if ${ac_cv_host+:} false; then :
13474  $as_echo_n "(cached) " >&6
13475else
13476  if test "x$host_alias" = x; then
13477  ac_cv_host=$ac_cv_build
13478else
13479  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13480    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13481fi
13482
13483fi
13484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13485$as_echo "$ac_cv_host" >&6; }
13486case $ac_cv_host in
13487*-*-*) ;;
13488*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13489esac
13490host=$ac_cv_host
13491ac_save_IFS=$IFS; IFS='-'
13492set x $ac_cv_host
13493shift
13494host_cpu=$1
13495host_vendor=$2
13496shift; shift
13497# Remember, the first character of IFS is used to create $*,
13498# except with old shells:
13499host_os=$*
13500IFS=$ac_save_IFS
13501case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13502
13503
13504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13505$as_echo_n "checking target system type... " >&6; }
13506if ${ac_cv_target+:} false; then :
13507  $as_echo_n "(cached) " >&6
13508else
13509  if test "x$target_alias" = x; then
13510  ac_cv_target=$ac_cv_host
13511else
13512  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13513    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13514fi
13515
13516fi
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13518$as_echo "$ac_cv_target" >&6; }
13519case $ac_cv_target in
13520*-*-*) ;;
13521*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13522esac
13523target=$ac_cv_target
13524ac_save_IFS=$IFS; IFS='-'
13525set x $ac_cv_target
13526shift
13527target_cpu=$1
13528target_vendor=$2
13529shift; shift
13530# Remember, the first character of IFS is used to create $*,
13531# except with old shells:
13532target_os=$*
13533IFS=$ac_save_IFS
13534case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13535
13536
13537# The aliases save the names the user supplied, while $host etc.
13538# will get canonicalized.
13539test -n "$target_alias" &&
13540  test "$program_prefix$program_suffix$program_transform_name" = \
13541    NONENONEs,x,x, &&
13542  program_prefix=${target_alias}-
13543
13544  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13545  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13546  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13547  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13548  # to use the configure naming style.
13549
13550
13551
13552
13553
13554  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13555  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13556  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13557  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13558  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13559  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13560
13561
13562
13563  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13564
13565  case "$build_os" in
13566    *linux*)
13567      VAR_OS=linux
13568      VAR_OS_TYPE=unix
13569      ;;
13570    *solaris*)
13571      VAR_OS=solaris
13572      VAR_OS_TYPE=unix
13573      ;;
13574    *darwin*)
13575      VAR_OS=macosx
13576      VAR_OS_TYPE=unix
13577      ;;
13578    *bsd*)
13579      VAR_OS=bsd
13580      VAR_OS_TYPE=unix
13581      ;;
13582    *cygwin*)
13583      VAR_OS=windows
13584      VAR_OS_ENV=windows.cygwin
13585      ;;
13586    *mingw*)
13587      VAR_OS=windows
13588      VAR_OS_ENV=windows.msys
13589      ;;
13590    *aix*)
13591      VAR_OS=aix
13592      VAR_OS_TYPE=unix
13593      ;;
13594    *)
13595      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13596      ;;
13597  esac
13598
13599
13600  # First argument is the cpu name from the trip/quad
13601  case "$build_cpu" in
13602    x86_64)
13603      VAR_CPU=x86_64
13604      VAR_CPU_ARCH=x86
13605      VAR_CPU_BITS=64
13606      VAR_CPU_ENDIAN=little
13607      ;;
13608    i?86)
13609      VAR_CPU=x86
13610      VAR_CPU_ARCH=x86
13611      VAR_CPU_BITS=32
13612      VAR_CPU_ENDIAN=little
13613      ;;
13614    arm*)
13615      VAR_CPU=arm
13616      VAR_CPU_ARCH=arm
13617      VAR_CPU_BITS=32
13618      VAR_CPU_ENDIAN=little
13619      ;;
13620    aarch64)
13621      VAR_CPU=aarch64
13622      VAR_CPU_ARCH=aarch64
13623      VAR_CPU_BITS=64
13624      VAR_CPU_ENDIAN=little
13625      ;;
13626    powerpc)
13627      VAR_CPU=ppc
13628      VAR_CPU_ARCH=ppc
13629      VAR_CPU_BITS=32
13630      VAR_CPU_ENDIAN=big
13631      ;;
13632    powerpc64)
13633      VAR_CPU=ppc64
13634      VAR_CPU_ARCH=ppc
13635      VAR_CPU_BITS=64
13636      VAR_CPU_ENDIAN=big
13637      ;;
13638    powerpc64le)
13639      VAR_CPU=ppc64
13640      VAR_CPU_ARCH=ppc
13641      VAR_CPU_BITS=64
13642      VAR_CPU_ENDIAN=little
13643      ;;
13644    s390)
13645      VAR_CPU=s390
13646      VAR_CPU_ARCH=s390
13647      VAR_CPU_BITS=32
13648      VAR_CPU_ENDIAN=big
13649      ;;
13650    s390x)
13651      VAR_CPU=s390x
13652      VAR_CPU_ARCH=s390
13653      VAR_CPU_BITS=64
13654      VAR_CPU_ENDIAN=big
13655      ;;
13656    sparc)
13657      VAR_CPU=sparc
13658      VAR_CPU_ARCH=sparc
13659      VAR_CPU_BITS=32
13660      VAR_CPU_ENDIAN=big
13661      ;;
13662    sparcv9|sparc64)
13663      VAR_CPU=sparcv9
13664      VAR_CPU_ARCH=sparc
13665      VAR_CPU_BITS=64
13666      VAR_CPU_ENDIAN=big
13667      ;;
13668    *)
13669      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13670      ;;
13671  esac
13672
13673  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13674  OPENJDK_BUILD_OS="$VAR_OS"
13675  if test "x$VAR_OS_TYPE" != x; then
13676    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13677  else
13678    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13679  fi
13680  if test "x$VAR_OS_ENV" != x; then
13681    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13682  else
13683    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13684  fi
13685  OPENJDK_BUILD_CPU="$VAR_CPU"
13686  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13687  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13688  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13689
13690
13691
13692
13693
13694
13695
13696
13697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13698$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13700$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13701
13702  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13703
13704  case "$host_os" in
13705    *linux*)
13706      VAR_OS=linux
13707      VAR_OS_TYPE=unix
13708      ;;
13709    *solaris*)
13710      VAR_OS=solaris
13711      VAR_OS_TYPE=unix
13712      ;;
13713    *darwin*)
13714      VAR_OS=macosx
13715      VAR_OS_TYPE=unix
13716      ;;
13717    *bsd*)
13718      VAR_OS=bsd
13719      VAR_OS_TYPE=unix
13720      ;;
13721    *cygwin*)
13722      VAR_OS=windows
13723      VAR_OS_ENV=windows.cygwin
13724      ;;
13725    *mingw*)
13726      VAR_OS=windows
13727      VAR_OS_ENV=windows.msys
13728      ;;
13729    *aix*)
13730      VAR_OS=aix
13731      VAR_OS_TYPE=unix
13732      ;;
13733    *)
13734      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13735      ;;
13736  esac
13737
13738
13739  # First argument is the cpu name from the trip/quad
13740  case "$host_cpu" in
13741    x86_64)
13742      VAR_CPU=x86_64
13743      VAR_CPU_ARCH=x86
13744      VAR_CPU_BITS=64
13745      VAR_CPU_ENDIAN=little
13746      ;;
13747    i?86)
13748      VAR_CPU=x86
13749      VAR_CPU_ARCH=x86
13750      VAR_CPU_BITS=32
13751      VAR_CPU_ENDIAN=little
13752      ;;
13753    arm*)
13754      VAR_CPU=arm
13755      VAR_CPU_ARCH=arm
13756      VAR_CPU_BITS=32
13757      VAR_CPU_ENDIAN=little
13758      ;;
13759    aarch64)
13760      VAR_CPU=aarch64
13761      VAR_CPU_ARCH=aarch64
13762      VAR_CPU_BITS=64
13763      VAR_CPU_ENDIAN=little
13764      ;;
13765    powerpc)
13766      VAR_CPU=ppc
13767      VAR_CPU_ARCH=ppc
13768      VAR_CPU_BITS=32
13769      VAR_CPU_ENDIAN=big
13770      ;;
13771    powerpc64)
13772      VAR_CPU=ppc64
13773      VAR_CPU_ARCH=ppc
13774      VAR_CPU_BITS=64
13775      VAR_CPU_ENDIAN=big
13776      ;;
13777    powerpc64le)
13778      VAR_CPU=ppc64
13779      VAR_CPU_ARCH=ppc
13780      VAR_CPU_BITS=64
13781      VAR_CPU_ENDIAN=little
13782      ;;
13783    s390)
13784      VAR_CPU=s390
13785      VAR_CPU_ARCH=s390
13786      VAR_CPU_BITS=32
13787      VAR_CPU_ENDIAN=big
13788      ;;
13789    s390x)
13790      VAR_CPU=s390x
13791      VAR_CPU_ARCH=s390
13792      VAR_CPU_BITS=64
13793      VAR_CPU_ENDIAN=big
13794      ;;
13795    sparc)
13796      VAR_CPU=sparc
13797      VAR_CPU_ARCH=sparc
13798      VAR_CPU_BITS=32
13799      VAR_CPU_ENDIAN=big
13800      ;;
13801    sparcv9|sparc64)
13802      VAR_CPU=sparcv9
13803      VAR_CPU_ARCH=sparc
13804      VAR_CPU_BITS=64
13805      VAR_CPU_ENDIAN=big
13806      ;;
13807    *)
13808      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13809      ;;
13810  esac
13811
13812  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13813  OPENJDK_TARGET_OS="$VAR_OS"
13814  if test "x$VAR_OS_TYPE" != x; then
13815    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13816  else
13817    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13818  fi
13819  if test "x$VAR_OS_ENV" != x; then
13820    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13821  else
13822    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13823  fi
13824  OPENJDK_TARGET_CPU="$VAR_CPU"
13825  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13826  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13827  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13828
13829
13830
13831
13832
13833
13834
13835
13836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13837$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13839$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13840
13841
13842
13843# Check whether --with-target-bits was given.
13844if test "${with_target_bits+set}" = set; then :
13845  withval=$with_target_bits;
13846fi
13847
13848
13849  # We have three types of compiles:
13850  # native  == normal compilation, target system == build system
13851  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13852  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13853  #
13854  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13855    # We're doing a proper cross-compilation
13856    COMPILE_TYPE="cross"
13857  else
13858    COMPILE_TYPE="native"
13859  fi
13860
13861  if test "x$with_target_bits" != x; then
13862    if test "x$COMPILE_TYPE" = "xcross"; then
13863      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13864    fi
13865
13866    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13867      # A reduced build is requested
13868      COMPILE_TYPE="reduced"
13869      OPENJDK_TARGET_CPU_BITS=32
13870      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13871        OPENJDK_TARGET_CPU=x86
13872      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13873        OPENJDK_TARGET_CPU=sparc
13874      else
13875        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13876      fi
13877    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13878      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
13879    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13880      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13881$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13882    else
13883      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13884    fi
13885  fi
13886
13887
13888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13889$as_echo_n "checking compilation type... " >&6; }
13890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13891$as_echo "$COMPILE_TYPE" >&6; }
13892
13893
13894  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13895    REQUIRED_OS_NAME=SunOS
13896    REQUIRED_OS_VERSION=5.10
13897  fi
13898  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13899    REQUIRED_OS_NAME=Linux
13900    REQUIRED_OS_VERSION=2.6
13901  fi
13902  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13903    REQUIRED_OS_NAME=Windows
13904    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13905      REQUIRED_OS_VERSION=5.2
13906    else
13907      REQUIRED_OS_VERSION=5.1
13908    fi
13909  fi
13910  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13911    REQUIRED_OS_NAME=Darwin
13912    REQUIRED_OS_VERSION=11.2
13913  fi
13914
13915
13916
13917
13918
13919  # Also store the legacy naming of the cpu.
13920  # Ie i586 and amd64 instead of x86 and x86_64
13921  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13922  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13923    OPENJDK_TARGET_CPU_LEGACY="i586"
13924  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13925    # On all platforms except MacOSX replace x86_64 with amd64.
13926    OPENJDK_TARGET_CPU_LEGACY="amd64"
13927  fi
13928
13929
13930  # And the second legacy naming of the cpu.
13931  # Ie i386 and amd64 instead of x86 and x86_64.
13932  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13933  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13934    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13935  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13936    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13937  fi
13938
13939
13940  # This is the name of the cpu (but using i386 and amd64 instead of
13941  # x86 and x86_64, respectively), preceeded by a /, to be used when
13942  # locating libraries. On macosx, it's empty, though.
13943  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13944  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13945    OPENJDK_TARGET_CPU_LIBDIR=""
13946  fi
13947
13948
13949  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13950  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13951  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13952  OPENJDK_TARGET_CPU_ISADIR=""
13953  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13954    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13955      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13956    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13957      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13958    fi
13959  fi
13960
13961
13962  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13963  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13964  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13965    # On linux only, we replace x86 with i386.
13966    OPENJDK_TARGET_CPU_OSARCH="i386"
13967  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13968    # On all platforms except macosx, we replace x86_64 with amd64.
13969    OPENJDK_TARGET_CPU_OSARCH="amd64"
13970  fi
13971
13972
13973  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13974  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13975    OPENJDK_TARGET_CPU_JLI="i386"
13976  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13977    # On all platforms except macosx, we replace x86_64 with amd64.
13978    OPENJDK_TARGET_CPU_JLI="amd64"
13979  fi
13980  # Now setup the -D flags for building libjli.
13981  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13982  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13983    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13984      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13985    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13986      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13987    fi
13988  fi
13989
13990
13991  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13992      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13993  else
13994      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13995  fi
13996
13997
13998  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13999    A_LP64="LP64:="
14000    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14001    # unpack200.exe
14002    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14003      ADD_LP64="-D_LP64=1"
14004    fi
14005  fi
14006  LP64=$A_LP64
14007
14008
14009  if test "x$COMPILE_TYPE" = "xcross"; then
14010    # FIXME: ... or should this include reduced builds..?
14011    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14012  else
14013    DEFINE_CROSS_COMPILE_ARCH=""
14014  fi
14015
14016
14017  # ZERO_ARCHDEF is used to enable architecture-specific code
14018  case "${OPENJDK_TARGET_CPU}" in
14019    ppc)     ZERO_ARCHDEF=PPC32 ;;
14020    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14021    s390*)   ZERO_ARCHDEF=S390  ;;
14022    sparc*)  ZERO_ARCHDEF=SPARC ;;
14023    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14024    x86)     ZERO_ARCHDEF=IA32  ;;
14025    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14026  esac
14027
14028
14029
14030
14031# Continue setting up basic stuff. Most remaining code require fundamental tools.
14032
14033  # Save the current directory this script was started from
14034  CURDIR="$PWD"
14035
14036  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14037    PATH_SEP=";"
14038
14039  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14040  if test $SRC_ROOT_LENGTH -gt 100; then
14041    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14042  fi
14043
14044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14046$as_echo_n "checking cygwin release... " >&6; }
14047    CYGWIN_VERSION=`$UNAME -r`
14048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14049$as_echo "$CYGWIN_VERSION" >&6; }
14050    WINDOWS_ENV_VENDOR='cygwin'
14051    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14052
14053    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14054    if test "x$CYGWIN_VERSION_OK" = x; then
14055      { $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
14056$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;}
14057      as_fn_error $? "Cannot continue" "$LINENO" 5
14058    fi
14059    if test "x$CYGPATH" = x; then
14060      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14061    fi
14062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14063$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14064    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14065    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14066    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14067    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14069$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14070    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14071    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14072    if test "x$test_cygdrive_prefix" = x; then
14073      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14074    fi
14075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14077$as_echo_n "checking msys release... " >&6; }
14078    MSYS_VERSION=`$UNAME -r`
14079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14080$as_echo "$MSYS_VERSION" >&6; }
14081
14082    WINDOWS_ENV_VENDOR='msys'
14083    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14084
14085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14086$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14087    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14088    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14089
14090  windows_path="$MSYS_ROOT_PATH"
14091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14092    unix_path=`$CYGPATH -u "$windows_path"`
14093    MSYS_ROOT_PATH="$unix_path"
14094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14096    MSYS_ROOT_PATH="$unix_path"
14097  fi
14098
14099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14100$as_echo "$MSYS_ROOT_PATH" >&6; }
14101    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14102  else
14103    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14104  fi
14105
14106  # Test if windows or unix (cygwin/msys) find is first in path.
14107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14108$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14109  FIND_BINARY_OUTPUT=`find --version 2>&1`
14110  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14112$as_echo "unix style" >&6; }
14113  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14115$as_echo "Windows" >&6; }
14116    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14117$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14118    { $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
14119$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14120    as_fn_error $? "Cannot continue" "$LINENO" 5
14121  else
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14123$as_echo "unknown" >&6; }
14124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14125$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14126  fi
14127
14128  else
14129    PATH_SEP=":"
14130  fi
14131
14132
14133  # We get the top-level directory from the supporting wrappers.
14134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14135$as_echo_n "checking for top-level directory... " >&6; }
14136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14137$as_echo "$TOPDIR" >&6; }
14138
14139
14140  # Save the original version of TOPDIR for string comparisons
14141  ORIGINAL_TOPDIR="$TOPDIR"
14142
14143
14144  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14145
14146  # Only process if variable expands to non-empty
14147
14148  if test "x$CURDIR" != x; then
14149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14150
14151  # Input might be given as Windows format, start by converting to
14152  # unix format.
14153  path="$CURDIR"
14154  new_path=`$CYGPATH -u "$path"`
14155
14156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14159  # "foo.exe" is OK but "foo" is an error.
14160  #
14161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14162  # It is also a way to make sure we got the proper file name for the real test later on.
14163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14164  if test "x$test_shortpath" = x; then
14165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14166$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14167    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14168  fi
14169
14170  # Call helper function which possibly converts this using DOS-style short mode.
14171  # If so, the updated path is stored in $new_path.
14172
14173  input_path="$new_path"
14174  # Check if we need to convert this using DOS-style short mode. If the path
14175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14176  # take no chances and rewrite it.
14177  # Note: m4 eats our [], so we need to use [ and ] instead.
14178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14179  if test "x$has_forbidden_chars" != x; then
14180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14184      # Going to short mode and back again did indeed matter. Since short mode is
14185      # case insensitive, let's make it lowercase to improve readability.
14186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14187      # Now convert it back to Unix-stile (cygpath)
14188      input_path=`$CYGPATH -u "$shortmode_path"`
14189      new_path="$input_path"
14190    fi
14191  fi
14192
14193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14194  if test "x$test_cygdrive_prefix" = x; then
14195    # As a simple fix, exclude /usr/bin since it's not a real path.
14196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14198      # a path prefixed by /cygdrive for fixpath to work.
14199      new_path="$CYGWIN_ROOT_PATH$input_path"
14200    fi
14201  fi
14202
14203
14204  if test "x$path" != "x$new_path"; then
14205    CURDIR="$new_path"
14206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14207$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14208  fi
14209
14210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14211
14212  path="$CURDIR"
14213  has_colon=`$ECHO $path | $GREP ^.:`
14214  new_path="$path"
14215  if test "x$has_colon" = x; then
14216    # Not in mixed or Windows style, start by that.
14217    new_path=`cmd //c echo $path`
14218  fi
14219
14220
14221  input_path="$new_path"
14222  # Check if we need to convert this using DOS-style short mode. If the path
14223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14224  # take no chances and rewrite it.
14225  # Note: m4 eats our [], so we need to use [ and ] instead.
14226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14227  if test "x$has_forbidden_chars" != x; then
14228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14230  fi
14231
14232
14233  windows_path="$new_path"
14234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14235    unix_path=`$CYGPATH -u "$windows_path"`
14236    new_path="$unix_path"
14237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14239    new_path="$unix_path"
14240  fi
14241
14242  if test "x$path" != "x$new_path"; then
14243    CURDIR="$new_path"
14244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14245$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14246  fi
14247
14248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14250
14251    else
14252      # We're on a unix platform. Hooray! :)
14253      path="$CURDIR"
14254      has_space=`$ECHO "$path" | $GREP " "`
14255      if test "x$has_space" != x; then
14256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14257$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14259      fi
14260
14261      # Use eval to expand a potential ~
14262      eval path="$path"
14263      if test ! -f "$path" && test ! -d "$path"; then
14264        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14265      fi
14266
14267      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14268    fi
14269  fi
14270
14271
14272  # Only process if variable expands to non-empty
14273
14274  if test "x$TOPDIR" != x; then
14275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14276
14277  # Input might be given as Windows format, start by converting to
14278  # unix format.
14279  path="$TOPDIR"
14280  new_path=`$CYGPATH -u "$path"`
14281
14282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14285  # "foo.exe" is OK but "foo" is an error.
14286  #
14287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14288  # It is also a way to make sure we got the proper file name for the real test later on.
14289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14290  if test "x$test_shortpath" = x; then
14291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14292$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14293    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14294  fi
14295
14296  # Call helper function which possibly converts this using DOS-style short mode.
14297  # If so, the updated path is stored in $new_path.
14298
14299  input_path="$new_path"
14300  # Check if we need to convert this using DOS-style short mode. If the path
14301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14302  # take no chances and rewrite it.
14303  # Note: m4 eats our [], so we need to use [ and ] instead.
14304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14305  if test "x$has_forbidden_chars" != x; then
14306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14310      # Going to short mode and back again did indeed matter. Since short mode is
14311      # case insensitive, let's make it lowercase to improve readability.
14312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14313      # Now convert it back to Unix-stile (cygpath)
14314      input_path=`$CYGPATH -u "$shortmode_path"`
14315      new_path="$input_path"
14316    fi
14317  fi
14318
14319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14320  if test "x$test_cygdrive_prefix" = x; then
14321    # As a simple fix, exclude /usr/bin since it's not a real path.
14322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14324      # a path prefixed by /cygdrive for fixpath to work.
14325      new_path="$CYGWIN_ROOT_PATH$input_path"
14326    fi
14327  fi
14328
14329
14330  if test "x$path" != "x$new_path"; then
14331    TOPDIR="$new_path"
14332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14333$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14334  fi
14335
14336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14337
14338  path="$TOPDIR"
14339  has_colon=`$ECHO $path | $GREP ^.:`
14340  new_path="$path"
14341  if test "x$has_colon" = x; then
14342    # Not in mixed or Windows style, start by that.
14343    new_path=`cmd //c echo $path`
14344  fi
14345
14346
14347  input_path="$new_path"
14348  # Check if we need to convert this using DOS-style short mode. If the path
14349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14350  # take no chances and rewrite it.
14351  # Note: m4 eats our [], so we need to use [ and ] instead.
14352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14353  if test "x$has_forbidden_chars" != x; then
14354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14356  fi
14357
14358
14359  windows_path="$new_path"
14360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14361    unix_path=`$CYGPATH -u "$windows_path"`
14362    new_path="$unix_path"
14363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14365    new_path="$unix_path"
14366  fi
14367
14368  if test "x$path" != "x$new_path"; then
14369    TOPDIR="$new_path"
14370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14371$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14372  fi
14373
14374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14376
14377    else
14378      # We're on a unix platform. Hooray! :)
14379      path="$TOPDIR"
14380      has_space=`$ECHO "$path" | $GREP " "`
14381      if test "x$has_space" != x; then
14382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14383$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14385      fi
14386
14387      # Use eval to expand a potential ~
14388      eval path="$path"
14389      if test ! -f "$path" && test ! -d "$path"; then
14390        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14391      fi
14392
14393      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14394    fi
14395  fi
14396
14397  # SRC_ROOT is a traditional alias for TOPDIR.
14398  SRC_ROOT=$TOPDIR
14399
14400  # Calculate a canonical version of TOPDIR for string comparisons
14401  CANONICAL_TOPDIR=$TOPDIR
14402
14403  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14404    # Follow a chain of symbolic links. Use readlink
14405    # where it exists, else fall back to horribly
14406    # complicated shell code.
14407    if test "x$READLINK_TESTED" != yes; then
14408      # On MacOSX there is a readlink tool with a different
14409      # purpose than the GNU readlink tool. Check the found readlink.
14410      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14411      if test "x$ISGNU" = x; then
14412        # A readlink that we do not know how to use.
14413        # Are there other non-GNU readlinks out there?
14414        READLINK_TESTED=yes
14415        READLINK=
14416      fi
14417    fi
14418
14419    if test "x$READLINK" != x; then
14420      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14421    else
14422      # Save the current directory for restoring afterwards
14423      STARTDIR=$PWD
14424      COUNTER=0
14425      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14426      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14427      cd $sym_link_dir
14428      # Use -P flag to resolve symlinks in directories.
14429      cd `$THEPWDCMD -P`
14430      sym_link_dir=`$THEPWDCMD -P`
14431      # Resolve file symlinks
14432      while test $COUNTER -lt 20; do
14433        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14434        if test "x$ISLINK" == x; then
14435          # This is not a symbolic link! We are done!
14436          break
14437        fi
14438        # Again resolve directory symlinks since the target of the just found
14439        # link could be in a different directory
14440        cd `$DIRNAME $ISLINK`
14441        sym_link_dir=`$THEPWDCMD -P`
14442        sym_link_file=`$BASENAME $ISLINK`
14443        let COUNTER=COUNTER+1
14444      done
14445      cd $STARTDIR
14446      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14447    fi
14448  fi
14449
14450
14451
14452  # Locate the directory of this script.
14453  AUTOCONF_DIR=$TOPDIR/common/autoconf
14454
14455
14456# Check if it's a pure open build or if custom sources are to be used.
14457
14458  # Check whether --enable-openjdk-only was given.
14459if test "${enable_openjdk_only+set}" = set; then :
14460  enableval=$enable_openjdk_only;
14461else
14462  enable_openjdk_only="no"
14463fi
14464
14465
14466  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14467$as_echo_n "checking for presence of closed sources... " >&6; }
14468  if test -d "$SRC_ROOT/jdk/src/closed"; then
14469    CLOSED_SOURCE_PRESENT=yes
14470  else
14471    CLOSED_SOURCE_PRESENT=no
14472  fi
14473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14474$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14475
14476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14477$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14478  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14480$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14481
14482  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14483    OPENJDK=true
14484    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14485      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14486$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14487    fi
14488  else
14489    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14490      OPENJDK=true
14491    else
14492      OPENJDK=false
14493    fi
14494  fi
14495
14496  if test "x$OPENJDK" = "xtrue"; then
14497    SET_OPENJDK="OPENJDK=true"
14498  fi
14499
14500
14501
14502  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14503  # the IncludeCustomExtension macro.
14504
14505
14506# Check whether --with-custom-make-dir was given.
14507if test "${with_custom_make_dir+set}" = set; then :
14508  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
14509$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14510fi
14511
14512
14513
14514
14515# These are needed to be able to create a configuration name (and thus the output directory)
14516
14517  ###############################################################################
14518  #
14519  # Check which variant of the JDK that we want to build.
14520  # Currently we have:
14521  #    normal:   standard edition
14522  # but the custom make system may add other variants
14523  #
14524  # Effectively the JDK variant gives a name to a specific set of
14525  # modules to compile into the JDK. In the future, these modules
14526  # might even be Jigsaw modules.
14527  #
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14529$as_echo_n "checking which variant of the JDK to build... " >&6; }
14530
14531# Check whether --with-jdk-variant was given.
14532if test "${with_jdk_variant+set}" = set; then :
14533  withval=$with_jdk_variant;
14534fi
14535
14536
14537  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14538    JDK_VARIANT="normal"
14539  else
14540    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14541  fi
14542
14543
14544
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14546$as_echo "$JDK_VARIANT" >&6; }
14547
14548
14549###############################################################################
14550#
14551# Check which interpreter of the JVM we want to build.
14552# Currently we have:
14553#    template: Template interpreter (the default)
14554#    cpp     : C++ interpreter
14555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14556$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14557
14558# Check whether --with-jvm-interpreter was given.
14559if test "${with_jvm_interpreter+set}" = set; then :
14560  withval=$with_jvm_interpreter;
14561fi
14562
14563
14564if test "x$with_jvm_interpreter" = x; then
14565     with_jvm_interpreter="template"
14566fi
14567
14568JVM_INTERPRETER="$with_jvm_interpreter"
14569
14570if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14571   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14572fi
14573
14574
14575
14576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14577$as_echo "$with_jvm_interpreter" >&6; }
14578
14579
14580
14581  ###############################################################################
14582  #
14583  # Check which variants of the JVM that we want to build.
14584  # Currently we have:
14585  #    server: normal interpreter and a tiered C1/C2 compiler
14586  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14587  #    minimal1: reduced form of client with optional VM services and features stripped out
14588  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14589  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14590  #    zero: no machine code interpreter, no compiler
14591  #    zeroshark: zero interpreter and shark/llvm compiler backend
14592#    core: interpreter only, no compiler (only works on some platforms)
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14594$as_echo_n "checking which variants of the JVM to build... " >&6; }
14595
14596# Check whether --with-jvm-variants was given.
14597if test "${with_jvm_variants+set}" = set; then :
14598  withval=$with_jvm_variants;
14599fi
14600
14601
14602  if test "x$with_jvm_variants" = x; then
14603    with_jvm_variants="server"
14604  fi
14605
14606  JVM_VARIANTS=",$with_jvm_variants,"
14607  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,//'`
14608
14609  if test "x$TEST_VARIANTS" != "x,"; then
14610     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14611  fi
14612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14613$as_echo "$with_jvm_variants" >&6; }
14614
14615  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14616  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14617  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14618  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14619  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14620  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14621  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14622
14623  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14624    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14625      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14626    fi
14627  fi
14628  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14629    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14630      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14631    fi
14632  fi
14633  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14634    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14635      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14636    fi
14637  fi
14638
14639  # Replace the commas with AND for use in the build directory name.
14640  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14641  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/'`
14642  if test "x$COUNT_VARIANTS" != "x,1"; then
14643    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14644  else
14645    BUILDING_MULTIPLE_JVM_VARIANTS=no
14646  fi
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657  INCLUDE_SA=true
14658  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14659    INCLUDE_SA=false
14660  fi
14661  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14662    INCLUDE_SA=false
14663  fi
14664  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14665    INCLUDE_SA=false
14666  fi
14667  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14668    INCLUDE_SA=false
14669  fi
14670
14671
14672  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14673    MACOSX_UNIVERSAL="true"
14674  fi
14675
14676
14677
14678
14679  ###############################################################################
14680  #
14681  # Set the debug level
14682  #    release: no debug information, all optimizations, no asserts.
14683  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14684  #    fastdebug: debug information (-g), all optimizations, all asserts
14685  #    slowdebug: debug information (-g), no optimizations, all asserts
14686  #
14687  DEBUG_LEVEL="release"
14688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14689$as_echo_n "checking which debug level to use... " >&6; }
14690  # Check whether --enable-debug was given.
14691if test "${enable_debug+set}" = set; then :
14692  enableval=$enable_debug;
14693        ENABLE_DEBUG="${enableval}"
14694        DEBUG_LEVEL="fastdebug"
14695
14696else
14697  ENABLE_DEBUG="no"
14698fi
14699
14700
14701
14702# Check whether --with-debug-level was given.
14703if test "${with_debug_level+set}" = set; then :
14704  withval=$with_debug_level;
14705        DEBUG_LEVEL="${withval}"
14706        if test "x$ENABLE_DEBUG" = xyes; then
14707          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14708        fi
14709
14710fi
14711
14712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14713$as_echo "$DEBUG_LEVEL" >&6; }
14714
14715  if test "x$DEBUG_LEVEL" != xrelease && \
14716      test "x$DEBUG_LEVEL" != xoptimized && \
14717      test "x$DEBUG_LEVEL" != xfastdebug && \
14718      test "x$DEBUG_LEVEL" != xslowdebug; then
14719    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14720  fi
14721
14722
14723  ###############################################################################
14724  #
14725  # Setup legacy vars/targets and new vars to deal with different debug levels.
14726  #
14727
14728  case $DEBUG_LEVEL in
14729    release )
14730      VARIANT="OPT"
14731      FASTDEBUG="false"
14732      DEBUG_CLASSFILES="false"
14733      BUILD_VARIANT_RELEASE=""
14734      HOTSPOT_DEBUG_LEVEL="product"
14735      HOTSPOT_EXPORT="product"
14736      ;;
14737    fastdebug )
14738      VARIANT="DBG"
14739      FASTDEBUG="true"
14740      DEBUG_CLASSFILES="true"
14741      BUILD_VARIANT_RELEASE="-fastdebug"
14742      HOTSPOT_DEBUG_LEVEL="fastdebug"
14743      HOTSPOT_EXPORT="fastdebug"
14744      ;;
14745    slowdebug )
14746      VARIANT="DBG"
14747      FASTDEBUG="false"
14748      DEBUG_CLASSFILES="true"
14749      BUILD_VARIANT_RELEASE="-debug"
14750      HOTSPOT_DEBUG_LEVEL="debug"
14751      HOTSPOT_EXPORT="debug"
14752      ;;
14753    optimized )
14754      VARIANT="OPT"
14755      FASTDEBUG="false"
14756      DEBUG_CLASSFILES="false"
14757      BUILD_VARIANT_RELEASE="-optimized"
14758      HOTSPOT_DEBUG_LEVEL="optimized"
14759      HOTSPOT_EXPORT="optimized"
14760      ;;
14761  esac
14762
14763  # The debug level 'optimized' is a little special because it is currently only
14764  # applicable to the HotSpot build where it means to build a completely
14765  # optimized version of the VM without any debugging code (like for the
14766  # 'release' debug level which is called 'product' in the HotSpot build) but
14767  # with the exception that it can contain additional code which is otherwise
14768  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14769  # test new and/or experimental features which are not intended for customer
14770  # shipment. Because these new features need to be tested and benchmarked in
14771  # real world scenarios, we want to build the containing JDK at the 'release'
14772  # debug level.
14773  if test "x$DEBUG_LEVEL" = xoptimized; then
14774    DEBUG_LEVEL="release"
14775  fi
14776
14777  #####
14778  # Generate the legacy makefile targets for hotspot.
14779  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14780  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14781  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14782  # But until then ...
14783  HOTSPOT_TARGET=""
14784
14785  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14786    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14787  fi
14788
14789  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14790    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14791  fi
14792
14793  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14794    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14795  fi
14796
14797  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14798    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14799  fi
14800
14801  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14802    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14803  fi
14804
14805  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14806    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14807  fi
14808
14809  if test "x$JVM_VARIANT_CORE" = xtrue; then
14810    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14811  fi
14812
14813  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14814
14815  # On Macosx universal binaries are produced, but they only contain
14816  # 64 bit intel. This invalidates control of which jvms are built
14817  # from configure, but only server is valid anyway. Fix this
14818  # when hotspot makefiles are rewritten.
14819  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14820    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14821  fi
14822
14823  #####
14824
14825
14826
14827
14828
14829
14830
14831
14832# With basic setup done, call the custom early hook.
14833
14834
14835# Check if we have devkits, extra paths or sysroot set.
14836
14837
14838# Check whether --with-devkit was given.
14839if test "${with_devkit+set}" = set; then :
14840  withval=$with_devkit;
14841
14842  # Only process if variable expands to non-empty
14843
14844  if test "x$with_devkit" != x; then
14845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14846
14847  # Input might be given as Windows format, start by converting to
14848  # unix format.
14849  path="$with_devkit"
14850  new_path=`$CYGPATH -u "$path"`
14851
14852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14855  # "foo.exe" is OK but "foo" is an error.
14856  #
14857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14858  # It is also a way to make sure we got the proper file name for the real test later on.
14859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14860  if test "x$test_shortpath" = x; then
14861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14862$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14863    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14864  fi
14865
14866  # Call helper function which possibly converts this using DOS-style short mode.
14867  # If so, the updated path is stored in $new_path.
14868
14869  input_path="$new_path"
14870  # Check if we need to convert this using DOS-style short mode. If the path
14871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14872  # take no chances and rewrite it.
14873  # Note: m4 eats our [], so we need to use [ and ] instead.
14874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14875  if test "x$has_forbidden_chars" != x; then
14876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14880      # Going to short mode and back again did indeed matter. Since short mode is
14881      # case insensitive, let's make it lowercase to improve readability.
14882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14883      # Now convert it back to Unix-stile (cygpath)
14884      input_path=`$CYGPATH -u "$shortmode_path"`
14885      new_path="$input_path"
14886    fi
14887  fi
14888
14889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14890  if test "x$test_cygdrive_prefix" = x; then
14891    # As a simple fix, exclude /usr/bin since it's not a real path.
14892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14894      # a path prefixed by /cygdrive for fixpath to work.
14895      new_path="$CYGWIN_ROOT_PATH$input_path"
14896    fi
14897  fi
14898
14899
14900  if test "x$path" != "x$new_path"; then
14901    with_devkit="$new_path"
14902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14903$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14904  fi
14905
14906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14907
14908  path="$with_devkit"
14909  has_colon=`$ECHO $path | $GREP ^.:`
14910  new_path="$path"
14911  if test "x$has_colon" = x; then
14912    # Not in mixed or Windows style, start by that.
14913    new_path=`cmd //c echo $path`
14914  fi
14915
14916
14917  input_path="$new_path"
14918  # Check if we need to convert this using DOS-style short mode. If the path
14919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14920  # take no chances and rewrite it.
14921  # Note: m4 eats our [], so we need to use [ and ] instead.
14922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14923  if test "x$has_forbidden_chars" != x; then
14924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14926  fi
14927
14928
14929  windows_path="$new_path"
14930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14931    unix_path=`$CYGPATH -u "$windows_path"`
14932    new_path="$unix_path"
14933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14935    new_path="$unix_path"
14936  fi
14937
14938  if test "x$path" != "x$new_path"; then
14939    with_devkit="$new_path"
14940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14941$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14942  fi
14943
14944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14946
14947    else
14948      # We're on a unix platform. Hooray! :)
14949      path="$with_devkit"
14950      has_space=`$ECHO "$path" | $GREP " "`
14951      if test "x$has_space" != x; then
14952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14953$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14955      fi
14956
14957      # Use eval to expand a potential ~
14958      eval path="$path"
14959      if test ! -f "$path" && test ! -d "$path"; then
14960        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14961      fi
14962
14963      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14964    fi
14965  fi
14966
14967        DEVKIT_ROOT="$with_devkit"
14968        # Check for a meta data info file in the root of the devkit
14969        if test -f "$DEVKIT_ROOT/devkit.info"; then
14970          # This potentially sets the following:
14971          # DEVKIT_NAME: A descriptive name of the devkit
14972          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14973          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14974          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14975          . $DEVKIT_ROOT/devkit.info
14976        fi
14977
14978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14979$as_echo_n "checking for devkit... " >&6; }
14980        if test "x$DEVKIT_NAME" != x; then
14981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14982$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14983        else
14984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14985$as_echo "$DEVKIT_ROOT" >&6; }
14986        fi
14987
14988        if test "x$DEVKIT_EXTRA_PATH" != x; then
14989
14990  if test "x$DEVKIT_EXTRA_PATH" != x; then
14991    if test "x$EXTRA_PATH" = x; then
14992      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14993    else
14994      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14995    fi
14996  fi
14997
14998        fi
14999
15000        # Fallback default of just /bin if DEVKIT_PATH is not defined
15001        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15002          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15003        fi
15004
15005  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15006    if test "x$TOOLCHAIN_PATH" = x; then
15007      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15008    else
15009      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15010    fi
15011  fi
15012
15013
15014        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15015        # places for backwards compatiblity.
15016        if test "x$DEVKIT_SYSROOT" != x; then
15017          SYSROOT="$DEVKIT_SYSROOT"
15018        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15019          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15020        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15021          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15022        fi
15023
15024
15025fi
15026
15027
15028  # You can force the sysroot if the sysroot encoded into the compiler tools
15029  # is not correct.
15030
15031# Check whether --with-sys-root was given.
15032if test "${with_sys_root+set}" = set; then :
15033  withval=$with_sys_root; SYSROOT=$with_sys_root
15034
15035fi
15036
15037
15038
15039# Check whether --with-sysroot was given.
15040if test "${with_sysroot+set}" = set; then :
15041  withval=$with_sysroot; SYSROOT=$with_sysroot
15042
15043fi
15044
15045
15046
15047# Check whether --with-tools-dir was given.
15048if test "${with_tools_dir+set}" = set; then :
15049  withval=$with_tools_dir;
15050  if test "x$with_tools_dir" != x; then
15051    if test "x$TOOLCHAIN_PATH" = x; then
15052      TOOLCHAIN_PATH="$with_tools_dir"
15053    else
15054      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15055    fi
15056  fi
15057
15058
15059fi
15060
15061
15062
15063# Check whether --with-toolchain-path was given.
15064if test "${with_toolchain_path+set}" = set; then :
15065  withval=$with_toolchain_path;
15066  if test "x$with_toolchain_path" != x; then
15067    if test "x$TOOLCHAIN_PATH" = x; then
15068      TOOLCHAIN_PATH="$with_toolchain_path"
15069    else
15070      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15071    fi
15072  fi
15073
15074
15075fi
15076
15077
15078
15079# Check whether --with-extra-path was given.
15080if test "${with_extra_path+set}" = set; then :
15081  withval=$with_extra_path;
15082  if test "x$with_extra_path" != x; then
15083    if test "x$EXTRA_PATH" = x; then
15084      EXTRA_PATH="$with_extra_path"
15085    else
15086      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15087    fi
15088  fi
15089
15090
15091fi
15092
15093
15094  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15095    # detect if Xcode is installed by running xcodebuild -version
15096    # if no Xcode installed, xcodebuild exits with 1
15097    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15098    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15099      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15100      # fall back on the stub binary in /usr/bin/xcodebuild
15101      # Extract the first word of "xcodebuild", so it can be a program name with args.
15102set dummy xcodebuild; ac_word=$2
15103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15104$as_echo_n "checking for $ac_word... " >&6; }
15105if ${ac_cv_path_XCODEBUILD+:} false; then :
15106  $as_echo_n "(cached) " >&6
15107else
15108  case $XCODEBUILD in
15109  [\\/]* | ?:[\\/]*)
15110  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15111  ;;
15112  *)
15113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15114for as_dir in $TOOLCHAIN_PATH
15115do
15116  IFS=$as_save_IFS
15117  test -z "$as_dir" && as_dir=.
15118    for ac_exec_ext in '' $ac_executable_extensions; do
15119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15120    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15122    break 2
15123  fi
15124done
15125  done
15126IFS=$as_save_IFS
15127
15128  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15129  ;;
15130esac
15131fi
15132XCODEBUILD=$ac_cv_path_XCODEBUILD
15133if test -n "$XCODEBUILD"; then
15134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15135$as_echo "$XCODEBUILD" >&6; }
15136else
15137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15138$as_echo "no" >&6; }
15139fi
15140
15141
15142    else
15143      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15144      # when only the command line tools are installed there are no SDKs, so headers
15145      # are copied into the system frameworks
15146      XCODEBUILD=
15147
15148    fi
15149
15150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15151$as_echo_n "checking for sdk name... " >&6; }
15152
15153# Check whether --with-sdk-name was given.
15154if test "${with_sdk_name+set}" = set; then :
15155  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15156
15157fi
15158
15159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15160$as_echo "$SDKNAME" >&6; }
15161
15162    # if toolchain path is specified then don't rely on system headers, they may not compile
15163    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15164    test -z "$TOOLCHAIN_PATH" && \
15165      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15166
15167    if test -z "$SYSROOT"; then
15168      if test -n "$XCODEBUILD"; then
15169        # if we don't have system headers, use default SDK name (last resort)
15170        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15171          SDKNAME=${SDKNAME:-macosx}
15172        fi
15173
15174        if test -n "$SDKNAME"; then
15175          # Call xcodebuild to determine SYSROOT
15176          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15177        fi
15178      else
15179        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15180          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
15181        fi
15182      fi
15183    else
15184      # warn user if --with-sdk-name was also set
15185      if test -n "$with_sdk_name"; then
15186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15187$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15188      fi
15189    fi
15190
15191    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15192      # If no system framework headers, then SYSROOT must be set, or we won't build
15193      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
15194    fi
15195
15196    # Perform a basic sanity test
15197    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15198      if test -z "$SYSROOT"; then
15199        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
15200      else
15201        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15202      fi
15203    fi
15204
15205    # set SDKROOT too, Xcode tools will pick it up
15206    SDKROOT=$SYSROOT
15207
15208  fi
15209
15210  # Prepend the extra path to the global path
15211
15212  if test "x$EXTRA_PATH" != x; then
15213    if test "x$PATH" = x; then
15214      PATH="$EXTRA_PATH"
15215    else
15216      PATH="$EXTRA_PATH:$PATH"
15217    fi
15218  fi
15219
15220
15221  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15222    # Add extra search paths on solaris for utilities like ar and as etc...
15223    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15224  fi
15225
15226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15227$as_echo_n "checking for sysroot... " >&6; }
15228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15229$as_echo "$SYSROOT" >&6; }
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15231$as_echo_n "checking for toolchain path... " >&6; }
15232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15233$as_echo "$TOOLCHAIN_PATH" >&6; }
15234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15235$as_echo_n "checking for extra path... " >&6; }
15236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15237$as_echo "$EXTRA_PATH" >&6; }
15238
15239
15240# To properly create a configuration name, we need to have the OpenJDK target
15241# and options (variants and debug level) parsed.
15242
15243
15244
15245# Check whether --with-conf-name was given.
15246if test "${with_conf_name+set}" = set; then :
15247  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15248fi
15249
15250
15251  # Test from where we are running configure, in or outside of src root.
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15253$as_echo_n "checking where to store configuration... " >&6; }
15254  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15255      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15256      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15257    # We are running configure from the src root.
15258    # Create a default ./build/target-variant-debuglevel output root.
15259    if test "x${CONF_NAME}" = x; then
15260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15261$as_echo "in default location" >&6; }
15262      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15263    else
15264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15265$as_echo "in build directory with custom name" >&6; }
15266    fi
15267    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15268    $MKDIR -p "$OUTPUT_ROOT"
15269    if test ! -d "$OUTPUT_ROOT"; then
15270      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15271    fi
15272  else
15273    # We are running configure from outside of the src dir.
15274    # Then use the current directory as output dir!
15275    # If configuration is situated in normal build directory, just use the build
15276    # directory name as configuration name, otherwise use the complete path.
15277    if test "x${CONF_NAME}" = x; then
15278      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15279    fi
15280    OUTPUT_ROOT="$CURDIR"
15281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15282$as_echo "in current directory" >&6; }
15283
15284    # WARNING: This might be a bad thing to do. You need to be sure you want to
15285    # have a configuration in this directory. Do some sanity checks!
15286
15287    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15288      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15289      # other files
15290      files_present=`$LS $OUTPUT_ROOT`
15291      # Configure has already touched config.log and confdefs.h in the current dir when this check
15292      # is performed.
15293      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15294      | $TR -d '\n'`
15295      if test "x$filtered_files" != x; then
15296        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15297$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15298        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15299$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15300        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15301$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15302        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15303$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15304        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15305$as_echo "$as_me: seriously mess up just about everything." >&6;}
15306        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15307$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15308        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15309$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15310        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15311      fi
15312    fi
15313  fi
15314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15315$as_echo_n "checking what configuration name to use... " >&6; }
15316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15317$as_echo "$CONF_NAME" >&6; }
15318
15319
15320  # Only process if variable expands to non-empty
15321
15322  if test "x$OUTPUT_ROOT" != x; then
15323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15324
15325  # Input might be given as Windows format, start by converting to
15326  # unix format.
15327  path="$OUTPUT_ROOT"
15328  new_path=`$CYGPATH -u "$path"`
15329
15330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15333  # "foo.exe" is OK but "foo" is an error.
15334  #
15335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15336  # It is also a way to make sure we got the proper file name for the real test later on.
15337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15338  if test "x$test_shortpath" = x; then
15339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15340$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15341    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15342  fi
15343
15344  # Call helper function which possibly converts this using DOS-style short mode.
15345  # If so, the updated path is stored in $new_path.
15346
15347  input_path="$new_path"
15348  # Check if we need to convert this using DOS-style short mode. If the path
15349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15350  # take no chances and rewrite it.
15351  # Note: m4 eats our [], so we need to use [ and ] instead.
15352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15353  if test "x$has_forbidden_chars" != x; then
15354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15358      # Going to short mode and back again did indeed matter. Since short mode is
15359      # case insensitive, let's make it lowercase to improve readability.
15360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15361      # Now convert it back to Unix-stile (cygpath)
15362      input_path=`$CYGPATH -u "$shortmode_path"`
15363      new_path="$input_path"
15364    fi
15365  fi
15366
15367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15368  if test "x$test_cygdrive_prefix" = x; then
15369    # As a simple fix, exclude /usr/bin since it's not a real path.
15370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15372      # a path prefixed by /cygdrive for fixpath to work.
15373      new_path="$CYGWIN_ROOT_PATH$input_path"
15374    fi
15375  fi
15376
15377
15378  if test "x$path" != "x$new_path"; then
15379    OUTPUT_ROOT="$new_path"
15380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15381$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15382  fi
15383
15384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15385
15386  path="$OUTPUT_ROOT"
15387  has_colon=`$ECHO $path | $GREP ^.:`
15388  new_path="$path"
15389  if test "x$has_colon" = x; then
15390    # Not in mixed or Windows style, start by that.
15391    new_path=`cmd //c echo $path`
15392  fi
15393
15394
15395  input_path="$new_path"
15396  # Check if we need to convert this using DOS-style short mode. If the path
15397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15398  # take no chances and rewrite it.
15399  # Note: m4 eats our [], so we need to use [ and ] instead.
15400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15401  if test "x$has_forbidden_chars" != x; then
15402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15404  fi
15405
15406
15407  windows_path="$new_path"
15408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15409    unix_path=`$CYGPATH -u "$windows_path"`
15410    new_path="$unix_path"
15411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15413    new_path="$unix_path"
15414  fi
15415
15416  if test "x$path" != "x$new_path"; then
15417    OUTPUT_ROOT="$new_path"
15418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15419$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15420  fi
15421
15422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15424
15425    else
15426      # We're on a unix platform. Hooray! :)
15427      path="$OUTPUT_ROOT"
15428      has_space=`$ECHO "$path" | $GREP " "`
15429      if test "x$has_space" != x; then
15430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15431$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15433      fi
15434
15435      # Use eval to expand a potential ~
15436      eval path="$path"
15437      if test ! -f "$path" && test ! -d "$path"; then
15438        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15439      fi
15440
15441      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15442    fi
15443  fi
15444
15445
15446  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15447  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15448
15449  SPEC=$OUTPUT_ROOT/spec.gmk
15450
15451  CONF_NAME=$CONF_NAME
15452
15453  OUTPUT_ROOT=$OUTPUT_ROOT
15454
15455
15456
15457  # The spec.gmk file contains all variables for the make system.
15458  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15459
15460  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15461  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15462
15463  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15464  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15465
15466  # The compare.sh is used to compare the build output to other builds.
15467  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15468
15469  # The generated Makefile knows where the spec.gmk is and where the source is.
15470  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15471  # which will look for generated configurations
15472  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15473
15474
15475
15476# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15477
15478  for ac_prog in apt-get yum port pkgutil pkgadd
15479do
15480  # Extract the first word of "$ac_prog", so it can be a program name with args.
15481set dummy $ac_prog; ac_word=$2
15482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15483$as_echo_n "checking for $ac_word... " >&6; }
15484if ${ac_cv_prog_PKGHANDLER+:} false; then :
15485  $as_echo_n "(cached) " >&6
15486else
15487  if test -n "$PKGHANDLER"; then
15488  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15489else
15490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15491for as_dir in $PATH
15492do
15493  IFS=$as_save_IFS
15494  test -z "$as_dir" && as_dir=.
15495    for ac_exec_ext in '' $ac_executable_extensions; do
15496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15497    ac_cv_prog_PKGHANDLER="$ac_prog"
15498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15499    break 2
15500  fi
15501done
15502  done
15503IFS=$as_save_IFS
15504
15505fi
15506fi
15507PKGHANDLER=$ac_cv_prog_PKGHANDLER
15508if test -n "$PKGHANDLER"; then
15509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15510$as_echo "$PKGHANDLER" >&6; }
15511else
15512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15513$as_echo "no" >&6; }
15514fi
15515
15516
15517  test -n "$PKGHANDLER" && break
15518done
15519
15520
15521
15522# Setup tools that requires more complex handling, or that is not needed by the configure script.
15523
15524
15525  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15526  if test "x$MAKE" != x; then
15527    # User has supplied a make, test it.
15528    if test ! -f "$MAKE"; then
15529      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15530    fi
15531
15532  MAKE_CANDIDATE=""$MAKE""
15533  DESCRIPTION="user supplied MAKE=$MAKE"
15534
15535  # On Cygwin, we require a newer version of make than on other platforms
15536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15537    MAKE_VERSION_EXPR="-e 4\."
15538    MAKE_REQUIRED_VERSION="4.0"
15539   else
15540    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15541    MAKE_REQUIRED_VERSION="3.81"
15542  fi
15543
15544  if test "x$MAKE_CANDIDATE" != x; then
15545    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15546$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15547    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15548    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15549    if test "x$IS_GNU_MAKE" = x; then
15550      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15551$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15552    else
15553      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15554      if test "x$IS_MODERN_MAKE" = x; then
15555        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15556$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15557      else
15558        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15559          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15560            MAKE_EXPECTED_ENV='cygwin'
15561          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15562            MAKE_EXPECTED_ENV='msys'
15563          else
15564            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15565          fi
15566          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15567          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15568        else
15569          # Not relevant for non-Windows
15570          IS_MAKE_CORRECT_ENV=true
15571        fi
15572        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15573          { $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
15574$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;}
15575        else
15576          FOUND_MAKE=$MAKE_CANDIDATE
15577
15578  # Only process if variable expands to non-empty
15579
15580  if test "x$FOUND_MAKE" != x; then
15581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15582
15583  # First separate the path from the arguments. This will split at the first
15584  # space.
15585  complete="$FOUND_MAKE"
15586  path="${complete%% *}"
15587  tmp="$complete EOL"
15588  arguments="${tmp#* }"
15589
15590  # Input might be given as Windows format, start by converting to
15591  # unix format.
15592  new_path=`$CYGPATH -u "$path"`
15593
15594  # Now try to locate executable using which
15595  new_path=`$WHICH "$new_path" 2> /dev/null`
15596  # bat and cmd files are not always considered executable in cygwin causing which
15597  # to not find them
15598  if test "x$new_path" = x \
15599      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15600      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15601    new_path=`$CYGPATH -u "$path"`
15602  fi
15603  if test "x$new_path" = x; then
15604    # Oops. Which didn't find the executable.
15605    # The splitting of arguments from the executable at a space might have been incorrect,
15606    # since paths with space are more likely in Windows. Give it another try with the whole
15607    # argument.
15608    path="$complete"
15609    arguments="EOL"
15610    new_path=`$CYGPATH -u "$path"`
15611    new_path=`$WHICH "$new_path" 2> /dev/null`
15612    # bat and cmd files are not always considered executable in cygwin causing which
15613    # to not find them
15614    if test "x$new_path" = x \
15615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15617      new_path=`$CYGPATH -u "$path"`
15618    fi
15619    if test "x$new_path" = x; then
15620      # It's still not found. Now this is an unrecoverable error.
15621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15622$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15623      has_space=`$ECHO "$complete" | $GREP " "`
15624      if test "x$has_space" != x; then
15625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15627      fi
15628      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15629    fi
15630  fi
15631
15632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15635  # "foo.exe" is OK but "foo" is an error.
15636  #
15637  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15638  # It is also a way to make sure we got the proper file name for the real test later on.
15639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15640  if test "x$test_shortpath" = x; then
15641    # Short path failed, file does not exist as specified.
15642    # Try adding .exe or .cmd
15643    if test -f "${new_path}.exe"; then
15644      input_to_shortpath="${new_path}.exe"
15645    elif test -f "${new_path}.cmd"; then
15646      input_to_shortpath="${new_path}.cmd"
15647    else
15648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15649$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15652      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15653    fi
15654  else
15655    input_to_shortpath="$new_path"
15656  fi
15657
15658  # Call helper function which possibly converts this using DOS-style short mode.
15659  # If so, the updated path is stored in $new_path.
15660  new_path="$input_to_shortpath"
15661
15662  input_path="$input_to_shortpath"
15663  # Check if we need to convert this using DOS-style short mode. If the path
15664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15665  # take no chances and rewrite it.
15666  # Note: m4 eats our [], so we need to use [ and ] instead.
15667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15668  if test "x$has_forbidden_chars" != x; then
15669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15673      # Going to short mode and back again did indeed matter. Since short mode is
15674      # case insensitive, let's make it lowercase to improve readability.
15675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15676      # Now convert it back to Unix-stile (cygpath)
15677      input_path=`$CYGPATH -u "$shortmode_path"`
15678      new_path="$input_path"
15679    fi
15680  fi
15681
15682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15683  if test "x$test_cygdrive_prefix" = x; then
15684    # As a simple fix, exclude /usr/bin since it's not a real path.
15685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15687      # a path prefixed by /cygdrive for fixpath to work.
15688      new_path="$CYGWIN_ROOT_PATH$input_path"
15689    fi
15690  fi
15691
15692  # remove trailing .exe if any
15693  new_path="${new_path/%.exe/}"
15694
15695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15696
15697  # First separate the path from the arguments. This will split at the first
15698  # space.
15699  complete="$FOUND_MAKE"
15700  path="${complete%% *}"
15701  tmp="$complete EOL"
15702  arguments="${tmp#* }"
15703
15704  # Input might be given as Windows format, start by converting to
15705  # unix format.
15706  new_path="$path"
15707
15708  windows_path="$new_path"
15709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15710    unix_path=`$CYGPATH -u "$windows_path"`
15711    new_path="$unix_path"
15712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15714    new_path="$unix_path"
15715  fi
15716
15717
15718  # Now try to locate executable using which
15719  new_path=`$WHICH "$new_path" 2> /dev/null`
15720
15721  if test "x$new_path" = x; then
15722    # Oops. Which didn't find the executable.
15723    # The splitting of arguments from the executable at a space might have been incorrect,
15724    # since paths with space are more likely in Windows. Give it another try with the whole
15725    # argument.
15726    path="$complete"
15727    arguments="EOL"
15728    new_path="$path"
15729
15730  windows_path="$new_path"
15731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15732    unix_path=`$CYGPATH -u "$windows_path"`
15733    new_path="$unix_path"
15734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15736    new_path="$unix_path"
15737  fi
15738
15739
15740    new_path=`$WHICH "$new_path" 2> /dev/null`
15741    # bat and cmd files are not always considered executable in MSYS causing which
15742    # to not find them
15743    if test "x$new_path" = x \
15744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15746      new_path="$path"
15747
15748  windows_path="$new_path"
15749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15750    unix_path=`$CYGPATH -u "$windows_path"`
15751    new_path="$unix_path"
15752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15754    new_path="$unix_path"
15755  fi
15756
15757    fi
15758
15759    if test "x$new_path" = x; then
15760      # It's still not found. Now this is an unrecoverable error.
15761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15763      has_space=`$ECHO "$complete" | $GREP " "`
15764      if test "x$has_space" != x; then
15765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15767      fi
15768      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15769    fi
15770  fi
15771
15772  # Now new_path has a complete unix path to the binary
15773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15774    # Keep paths in /bin as-is, but remove trailing .exe if any
15775    new_path="${new_path/%.exe/}"
15776    # Do not save /bin paths to all_fixpath_prefixes!
15777  else
15778    # Not in mixed or Windows style, start by that.
15779    new_path=`cmd //c echo $new_path`
15780
15781  input_path="$new_path"
15782  # Check if we need to convert this using DOS-style short mode. If the path
15783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15784  # take no chances and rewrite it.
15785  # Note: m4 eats our [], so we need to use [ and ] instead.
15786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15787  if test "x$has_forbidden_chars" != x; then
15788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15790  fi
15791
15792    # Output is in $new_path
15793
15794  windows_path="$new_path"
15795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15796    unix_path=`$CYGPATH -u "$windows_path"`
15797    new_path="$unix_path"
15798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15800    new_path="$unix_path"
15801  fi
15802
15803    # remove trailing .exe if any
15804    new_path="${new_path/%.exe/}"
15805
15806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15808  fi
15809
15810    else
15811      # We're on a unix platform. Hooray! :)
15812      # First separate the path from the arguments. This will split at the first
15813      # space.
15814      complete="$FOUND_MAKE"
15815      path="${complete%% *}"
15816      tmp="$complete EOL"
15817      arguments="${tmp#* }"
15818
15819      # Cannot rely on the command "which" here since it doesn't always work.
15820      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15821      if test -z "$is_absolute_path"; then
15822        # Path to executable is not absolute. Find it.
15823        IFS_save="$IFS"
15824        IFS=:
15825        for p in $PATH; do
15826          if test -f "$p/$path" && test -x "$p/$path"; then
15827            new_path="$p/$path"
15828            break
15829          fi
15830        done
15831        IFS="$IFS_save"
15832      else
15833        # This is an absolute path, we can use it without further modifications.
15834        new_path="$path"
15835      fi
15836
15837      if test "x$new_path" = x; then
15838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15839$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15840        has_space=`$ECHO "$complete" | $GREP " "`
15841        if test "x$has_space" != x; then
15842          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15843$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15844        fi
15845        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15846      fi
15847    fi
15848
15849    # Now join together the path and the arguments once again
15850    if test "x$arguments" != xEOL; then
15851      new_complete="$new_path ${arguments% *}"
15852    else
15853      new_complete="$new_path"
15854    fi
15855
15856    if test "x$complete" != "x$new_complete"; then
15857      FOUND_MAKE="$new_complete"
15858      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15859$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15860    fi
15861  fi
15862
15863        fi
15864      fi
15865    fi
15866  fi
15867
15868    if test "x$FOUND_MAKE" = x; then
15869      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15870    fi
15871  else
15872    # Try our hardest to locate a correct version of GNU make
15873    for ac_prog in gmake
15874do
15875  # Extract the first word of "$ac_prog", so it can be a program name with args.
15876set dummy $ac_prog; ac_word=$2
15877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15878$as_echo_n "checking for $ac_word... " >&6; }
15879if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15880  $as_echo_n "(cached) " >&6
15881else
15882  case $CHECK_GMAKE in
15883  [\\/]* | ?:[\\/]*)
15884  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15885  ;;
15886  *)
15887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15888for as_dir in $PATH
15889do
15890  IFS=$as_save_IFS
15891  test -z "$as_dir" && as_dir=.
15892    for ac_exec_ext in '' $ac_executable_extensions; do
15893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15894    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15896    break 2
15897  fi
15898done
15899  done
15900IFS=$as_save_IFS
15901
15902  ;;
15903esac
15904fi
15905CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15906if test -n "$CHECK_GMAKE"; then
15907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15908$as_echo "$CHECK_GMAKE" >&6; }
15909else
15910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15911$as_echo "no" >&6; }
15912fi
15913
15914
15915  test -n "$CHECK_GMAKE" && break
15916done
15917
15918
15919  MAKE_CANDIDATE=""$CHECK_GMAKE""
15920  DESCRIPTION="gmake in PATH"
15921
15922  # On Cygwin, we require a newer version of make than on other platforms
15923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15924    MAKE_VERSION_EXPR="-e 4\."
15925    MAKE_REQUIRED_VERSION="4.0"
15926   else
15927    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15928    MAKE_REQUIRED_VERSION="3.81"
15929  fi
15930
15931  if test "x$MAKE_CANDIDATE" != x; then
15932    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15933$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15934    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15935    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15936    if test "x$IS_GNU_MAKE" = x; then
15937      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15938$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15939    else
15940      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15941      if test "x$IS_MODERN_MAKE" = x; then
15942        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15943$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15944      else
15945        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15946          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15947            MAKE_EXPECTED_ENV='cygwin'
15948          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15949            MAKE_EXPECTED_ENV='msys'
15950          else
15951            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15952          fi
15953          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15954          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15955        else
15956          # Not relevant for non-Windows
15957          IS_MAKE_CORRECT_ENV=true
15958        fi
15959        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15960          { $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
15961$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;}
15962        else
15963          FOUND_MAKE=$MAKE_CANDIDATE
15964
15965  # Only process if variable expands to non-empty
15966
15967  if test "x$FOUND_MAKE" != x; then
15968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15969
15970  # First separate the path from the arguments. This will split at the first
15971  # space.
15972  complete="$FOUND_MAKE"
15973  path="${complete%% *}"
15974  tmp="$complete EOL"
15975  arguments="${tmp#* }"
15976
15977  # Input might be given as Windows format, start by converting to
15978  # unix format.
15979  new_path=`$CYGPATH -u "$path"`
15980
15981  # Now try to locate executable using which
15982  new_path=`$WHICH "$new_path" 2> /dev/null`
15983  # bat and cmd files are not always considered executable in cygwin causing which
15984  # to not find them
15985  if test "x$new_path" = x \
15986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15988    new_path=`$CYGPATH -u "$path"`
15989  fi
15990  if test "x$new_path" = x; then
15991    # Oops. Which didn't find the executable.
15992    # The splitting of arguments from the executable at a space might have been incorrect,
15993    # since paths with space are more likely in Windows. Give it another try with the whole
15994    # argument.
15995    path="$complete"
15996    arguments="EOL"
15997    new_path=`$CYGPATH -u "$path"`
15998    new_path=`$WHICH "$new_path" 2> /dev/null`
15999    # bat and cmd files are not always considered executable in cygwin causing which
16000    # to not find them
16001    if test "x$new_path" = x \
16002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16004      new_path=`$CYGPATH -u "$path"`
16005    fi
16006    if test "x$new_path" = x; then
16007      # It's still not found. Now this is an unrecoverable error.
16008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16009$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16010      has_space=`$ECHO "$complete" | $GREP " "`
16011      if test "x$has_space" != x; then
16012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16014      fi
16015      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16016    fi
16017  fi
16018
16019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16022  # "foo.exe" is OK but "foo" is an error.
16023  #
16024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16025  # It is also a way to make sure we got the proper file name for the real test later on.
16026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16027  if test "x$test_shortpath" = x; then
16028    # Short path failed, file does not exist as specified.
16029    # Try adding .exe or .cmd
16030    if test -f "${new_path}.exe"; then
16031      input_to_shortpath="${new_path}.exe"
16032    elif test -f "${new_path}.cmd"; then
16033      input_to_shortpath="${new_path}.cmd"
16034    else
16035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16036$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16039      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16040    fi
16041  else
16042    input_to_shortpath="$new_path"
16043  fi
16044
16045  # Call helper function which possibly converts this using DOS-style short mode.
16046  # If so, the updated path is stored in $new_path.
16047  new_path="$input_to_shortpath"
16048
16049  input_path="$input_to_shortpath"
16050  # Check if we need to convert this using DOS-style short mode. If the path
16051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16052  # take no chances and rewrite it.
16053  # Note: m4 eats our [], so we need to use [ and ] instead.
16054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16055  if test "x$has_forbidden_chars" != x; then
16056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16060      # Going to short mode and back again did indeed matter. Since short mode is
16061      # case insensitive, let's make it lowercase to improve readability.
16062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16063      # Now convert it back to Unix-stile (cygpath)
16064      input_path=`$CYGPATH -u "$shortmode_path"`
16065      new_path="$input_path"
16066    fi
16067  fi
16068
16069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16070  if test "x$test_cygdrive_prefix" = x; then
16071    # As a simple fix, exclude /usr/bin since it's not a real path.
16072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16074      # a path prefixed by /cygdrive for fixpath to work.
16075      new_path="$CYGWIN_ROOT_PATH$input_path"
16076    fi
16077  fi
16078
16079  # remove trailing .exe if any
16080  new_path="${new_path/%.exe/}"
16081
16082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16083
16084  # First separate the path from the arguments. This will split at the first
16085  # space.
16086  complete="$FOUND_MAKE"
16087  path="${complete%% *}"
16088  tmp="$complete EOL"
16089  arguments="${tmp#* }"
16090
16091  # Input might be given as Windows format, start by converting to
16092  # unix format.
16093  new_path="$path"
16094
16095  windows_path="$new_path"
16096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16097    unix_path=`$CYGPATH -u "$windows_path"`
16098    new_path="$unix_path"
16099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16101    new_path="$unix_path"
16102  fi
16103
16104
16105  # Now try to locate executable using which
16106  new_path=`$WHICH "$new_path" 2> /dev/null`
16107
16108  if test "x$new_path" = x; then
16109    # Oops. Which didn't find the executable.
16110    # The splitting of arguments from the executable at a space might have been incorrect,
16111    # since paths with space are more likely in Windows. Give it another try with the whole
16112    # argument.
16113    path="$complete"
16114    arguments="EOL"
16115    new_path="$path"
16116
16117  windows_path="$new_path"
16118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16119    unix_path=`$CYGPATH -u "$windows_path"`
16120    new_path="$unix_path"
16121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16123    new_path="$unix_path"
16124  fi
16125
16126
16127    new_path=`$WHICH "$new_path" 2> /dev/null`
16128    # bat and cmd files are not always considered executable in MSYS causing which
16129    # to not find them
16130    if test "x$new_path" = x \
16131        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16132        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16133      new_path="$path"
16134
16135  windows_path="$new_path"
16136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16137    unix_path=`$CYGPATH -u "$windows_path"`
16138    new_path="$unix_path"
16139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16141    new_path="$unix_path"
16142  fi
16143
16144    fi
16145
16146    if test "x$new_path" = x; then
16147      # It's still not found. Now this is an unrecoverable error.
16148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16149$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16150      has_space=`$ECHO "$complete" | $GREP " "`
16151      if test "x$has_space" != x; then
16152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16154      fi
16155      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16156    fi
16157  fi
16158
16159  # Now new_path has a complete unix path to the binary
16160  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16161    # Keep paths in /bin as-is, but remove trailing .exe if any
16162    new_path="${new_path/%.exe/}"
16163    # Do not save /bin paths to all_fixpath_prefixes!
16164  else
16165    # Not in mixed or Windows style, start by that.
16166    new_path=`cmd //c echo $new_path`
16167
16168  input_path="$new_path"
16169  # Check if we need to convert this using DOS-style short mode. If the path
16170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16171  # take no chances and rewrite it.
16172  # Note: m4 eats our [], so we need to use [ and ] instead.
16173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16174  if test "x$has_forbidden_chars" != x; then
16175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16177  fi
16178
16179    # Output is in $new_path
16180
16181  windows_path="$new_path"
16182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16183    unix_path=`$CYGPATH -u "$windows_path"`
16184    new_path="$unix_path"
16185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16187    new_path="$unix_path"
16188  fi
16189
16190    # remove trailing .exe if any
16191    new_path="${new_path/%.exe/}"
16192
16193    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16194    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16195  fi
16196
16197    else
16198      # We're on a unix platform. Hooray! :)
16199      # First separate the path from the arguments. This will split at the first
16200      # space.
16201      complete="$FOUND_MAKE"
16202      path="${complete%% *}"
16203      tmp="$complete EOL"
16204      arguments="${tmp#* }"
16205
16206      # Cannot rely on the command "which" here since it doesn't always work.
16207      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16208      if test -z "$is_absolute_path"; then
16209        # Path to executable is not absolute. Find it.
16210        IFS_save="$IFS"
16211        IFS=:
16212        for p in $PATH; do
16213          if test -f "$p/$path" && test -x "$p/$path"; then
16214            new_path="$p/$path"
16215            break
16216          fi
16217        done
16218        IFS="$IFS_save"
16219      else
16220        # This is an absolute path, we can use it without further modifications.
16221        new_path="$path"
16222      fi
16223
16224      if test "x$new_path" = x; then
16225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16227        has_space=`$ECHO "$complete" | $GREP " "`
16228        if test "x$has_space" != x; then
16229          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16231        fi
16232        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16233      fi
16234    fi
16235
16236    # Now join together the path and the arguments once again
16237    if test "x$arguments" != xEOL; then
16238      new_complete="$new_path ${arguments% *}"
16239    else
16240      new_complete="$new_path"
16241    fi
16242
16243    if test "x$complete" != "x$new_complete"; then
16244      FOUND_MAKE="$new_complete"
16245      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16246$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16247    fi
16248  fi
16249
16250        fi
16251      fi
16252    fi
16253  fi
16254
16255
16256    if test "x$FOUND_MAKE" = x; then
16257      for ac_prog in make
16258do
16259  # Extract the first word of "$ac_prog", so it can be a program name with args.
16260set dummy $ac_prog; ac_word=$2
16261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16262$as_echo_n "checking for $ac_word... " >&6; }
16263if ${ac_cv_path_CHECK_MAKE+:} false; then :
16264  $as_echo_n "(cached) " >&6
16265else
16266  case $CHECK_MAKE in
16267  [\\/]* | ?:[\\/]*)
16268  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16269  ;;
16270  *)
16271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16272for as_dir in $PATH
16273do
16274  IFS=$as_save_IFS
16275  test -z "$as_dir" && as_dir=.
16276    for ac_exec_ext in '' $ac_executable_extensions; do
16277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16278    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16280    break 2
16281  fi
16282done
16283  done
16284IFS=$as_save_IFS
16285
16286  ;;
16287esac
16288fi
16289CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16290if test -n "$CHECK_MAKE"; then
16291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16292$as_echo "$CHECK_MAKE" >&6; }
16293else
16294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16295$as_echo "no" >&6; }
16296fi
16297
16298
16299  test -n "$CHECK_MAKE" && break
16300done
16301
16302
16303  MAKE_CANDIDATE=""$CHECK_MAKE""
16304  DESCRIPTION="make in PATH"
16305
16306  # On Cygwin, we require a newer version of make than on other platforms
16307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16308    MAKE_VERSION_EXPR="-e 4\."
16309    MAKE_REQUIRED_VERSION="4.0"
16310   else
16311    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16312    MAKE_REQUIRED_VERSION="3.81"
16313  fi
16314
16315  if test "x$MAKE_CANDIDATE" != x; then
16316    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16317$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16318    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16319    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16320    if test "x$IS_GNU_MAKE" = x; then
16321      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16322$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16323    else
16324      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16325      if test "x$IS_MODERN_MAKE" = x; then
16326        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16327$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16328      else
16329        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16330          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16331            MAKE_EXPECTED_ENV='cygwin'
16332          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16333            MAKE_EXPECTED_ENV='msys'
16334          else
16335            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16336          fi
16337          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16338          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16339        else
16340          # Not relevant for non-Windows
16341          IS_MAKE_CORRECT_ENV=true
16342        fi
16343        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16344          { $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
16345$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;}
16346        else
16347          FOUND_MAKE=$MAKE_CANDIDATE
16348
16349  # Only process if variable expands to non-empty
16350
16351  if test "x$FOUND_MAKE" != x; then
16352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16353
16354  # First separate the path from the arguments. This will split at the first
16355  # space.
16356  complete="$FOUND_MAKE"
16357  path="${complete%% *}"
16358  tmp="$complete EOL"
16359  arguments="${tmp#* }"
16360
16361  # Input might be given as Windows format, start by converting to
16362  # unix format.
16363  new_path=`$CYGPATH -u "$path"`
16364
16365  # Now try to locate executable using which
16366  new_path=`$WHICH "$new_path" 2> /dev/null`
16367  # bat and cmd files are not always considered executable in cygwin causing which
16368  # to not find them
16369  if test "x$new_path" = x \
16370      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16371      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16372    new_path=`$CYGPATH -u "$path"`
16373  fi
16374  if test "x$new_path" = x; then
16375    # Oops. Which didn't find the executable.
16376    # The splitting of arguments from the executable at a space might have been incorrect,
16377    # since paths with space are more likely in Windows. Give it another try with the whole
16378    # argument.
16379    path="$complete"
16380    arguments="EOL"
16381    new_path=`$CYGPATH -u "$path"`
16382    new_path=`$WHICH "$new_path" 2> /dev/null`
16383    # bat and cmd files are not always considered executable in cygwin causing which
16384    # to not find them
16385    if test "x$new_path" = x \
16386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16388      new_path=`$CYGPATH -u "$path"`
16389    fi
16390    if test "x$new_path" = x; then
16391      # It's still not found. Now this is an unrecoverable error.
16392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16393$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16394      has_space=`$ECHO "$complete" | $GREP " "`
16395      if test "x$has_space" != x; then
16396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16398      fi
16399      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16400    fi
16401  fi
16402
16403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16406  # "foo.exe" is OK but "foo" is an error.
16407  #
16408  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16409  # It is also a way to make sure we got the proper file name for the real test later on.
16410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16411  if test "x$test_shortpath" = x; then
16412    # Short path failed, file does not exist as specified.
16413    # Try adding .exe or .cmd
16414    if test -f "${new_path}.exe"; then
16415      input_to_shortpath="${new_path}.exe"
16416    elif test -f "${new_path}.cmd"; then
16417      input_to_shortpath="${new_path}.cmd"
16418    else
16419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16420$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16423      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16424    fi
16425  else
16426    input_to_shortpath="$new_path"
16427  fi
16428
16429  # Call helper function which possibly converts this using DOS-style short mode.
16430  # If so, the updated path is stored in $new_path.
16431  new_path="$input_to_shortpath"
16432
16433  input_path="$input_to_shortpath"
16434  # Check if we need to convert this using DOS-style short mode. If the path
16435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16436  # take no chances and rewrite it.
16437  # Note: m4 eats our [], so we need to use [ and ] instead.
16438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16439  if test "x$has_forbidden_chars" != x; then
16440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16444      # Going to short mode and back again did indeed matter. Since short mode is
16445      # case insensitive, let's make it lowercase to improve readability.
16446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16447      # Now convert it back to Unix-stile (cygpath)
16448      input_path=`$CYGPATH -u "$shortmode_path"`
16449      new_path="$input_path"
16450    fi
16451  fi
16452
16453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16454  if test "x$test_cygdrive_prefix" = x; then
16455    # As a simple fix, exclude /usr/bin since it's not a real path.
16456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16458      # a path prefixed by /cygdrive for fixpath to work.
16459      new_path="$CYGWIN_ROOT_PATH$input_path"
16460    fi
16461  fi
16462
16463  # remove trailing .exe if any
16464  new_path="${new_path/%.exe/}"
16465
16466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16467
16468  # First separate the path from the arguments. This will split at the first
16469  # space.
16470  complete="$FOUND_MAKE"
16471  path="${complete%% *}"
16472  tmp="$complete EOL"
16473  arguments="${tmp#* }"
16474
16475  # Input might be given as Windows format, start by converting to
16476  # unix format.
16477  new_path="$path"
16478
16479  windows_path="$new_path"
16480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16481    unix_path=`$CYGPATH -u "$windows_path"`
16482    new_path="$unix_path"
16483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16485    new_path="$unix_path"
16486  fi
16487
16488
16489  # Now try to locate executable using which
16490  new_path=`$WHICH "$new_path" 2> /dev/null`
16491
16492  if test "x$new_path" = x; then
16493    # Oops. Which didn't find the executable.
16494    # The splitting of arguments from the executable at a space might have been incorrect,
16495    # since paths with space are more likely in Windows. Give it another try with the whole
16496    # argument.
16497    path="$complete"
16498    arguments="EOL"
16499    new_path="$path"
16500
16501  windows_path="$new_path"
16502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16503    unix_path=`$CYGPATH -u "$windows_path"`
16504    new_path="$unix_path"
16505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16507    new_path="$unix_path"
16508  fi
16509
16510
16511    new_path=`$WHICH "$new_path" 2> /dev/null`
16512    # bat and cmd files are not always considered executable in MSYS causing which
16513    # to not find them
16514    if test "x$new_path" = x \
16515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16517      new_path="$path"
16518
16519  windows_path="$new_path"
16520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16521    unix_path=`$CYGPATH -u "$windows_path"`
16522    new_path="$unix_path"
16523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16525    new_path="$unix_path"
16526  fi
16527
16528    fi
16529
16530    if test "x$new_path" = x; then
16531      # It's still not found. Now this is an unrecoverable error.
16532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16534      has_space=`$ECHO "$complete" | $GREP " "`
16535      if test "x$has_space" != x; then
16536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16538      fi
16539      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16540    fi
16541  fi
16542
16543  # Now new_path has a complete unix path to the binary
16544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16545    # Keep paths in /bin as-is, but remove trailing .exe if any
16546    new_path="${new_path/%.exe/}"
16547    # Do not save /bin paths to all_fixpath_prefixes!
16548  else
16549    # Not in mixed or Windows style, start by that.
16550    new_path=`cmd //c echo $new_path`
16551
16552  input_path="$new_path"
16553  # Check if we need to convert this using DOS-style short mode. If the path
16554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16555  # take no chances and rewrite it.
16556  # Note: m4 eats our [], so we need to use [ and ] instead.
16557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16558  if test "x$has_forbidden_chars" != x; then
16559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16561  fi
16562
16563    # Output is in $new_path
16564
16565  windows_path="$new_path"
16566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16567    unix_path=`$CYGPATH -u "$windows_path"`
16568    new_path="$unix_path"
16569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16571    new_path="$unix_path"
16572  fi
16573
16574    # remove trailing .exe if any
16575    new_path="${new_path/%.exe/}"
16576
16577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16579  fi
16580
16581    else
16582      # We're on a unix platform. Hooray! :)
16583      # First separate the path from the arguments. This will split at the first
16584      # space.
16585      complete="$FOUND_MAKE"
16586      path="${complete%% *}"
16587      tmp="$complete EOL"
16588      arguments="${tmp#* }"
16589
16590      # Cannot rely on the command "which" here since it doesn't always work.
16591      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16592      if test -z "$is_absolute_path"; then
16593        # Path to executable is not absolute. Find it.
16594        IFS_save="$IFS"
16595        IFS=:
16596        for p in $PATH; do
16597          if test -f "$p/$path" && test -x "$p/$path"; then
16598            new_path="$p/$path"
16599            break
16600          fi
16601        done
16602        IFS="$IFS_save"
16603      else
16604        # This is an absolute path, we can use it without further modifications.
16605        new_path="$path"
16606      fi
16607
16608      if test "x$new_path" = x; then
16609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16611        has_space=`$ECHO "$complete" | $GREP " "`
16612        if test "x$has_space" != x; then
16613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16615        fi
16616        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16617      fi
16618    fi
16619
16620    # Now join together the path and the arguments once again
16621    if test "x$arguments" != xEOL; then
16622      new_complete="$new_path ${arguments% *}"
16623    else
16624      new_complete="$new_path"
16625    fi
16626
16627    if test "x$complete" != "x$new_complete"; then
16628      FOUND_MAKE="$new_complete"
16629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16630$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16631    fi
16632  fi
16633
16634        fi
16635      fi
16636    fi
16637  fi
16638
16639    fi
16640
16641    if test "x$FOUND_MAKE" = x; then
16642      if test "x$TOOLCHAIN_PATH" != x; then
16643        # We have a toolchain path, check that as well before giving up.
16644        OLD_PATH=$PATH
16645        PATH=$TOOLCHAIN_PATH:$PATH
16646        for ac_prog in gmake
16647do
16648  # Extract the first word of "$ac_prog", so it can be a program name with args.
16649set dummy $ac_prog; ac_word=$2
16650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16651$as_echo_n "checking for $ac_word... " >&6; }
16652if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16653  $as_echo_n "(cached) " >&6
16654else
16655  case $CHECK_TOOLSDIR_GMAKE in
16656  [\\/]* | ?:[\\/]*)
16657  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16658  ;;
16659  *)
16660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16661for as_dir in $PATH
16662do
16663  IFS=$as_save_IFS
16664  test -z "$as_dir" && as_dir=.
16665    for ac_exec_ext in '' $ac_executable_extensions; do
16666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16667    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16669    break 2
16670  fi
16671done
16672  done
16673IFS=$as_save_IFS
16674
16675  ;;
16676esac
16677fi
16678CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16679if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16681$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16682else
16683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16684$as_echo "no" >&6; }
16685fi
16686
16687
16688  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16689done
16690
16691
16692  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16693  DESCRIPTION="gmake in tools-dir"
16694
16695  # On Cygwin, we require a newer version of make than on other platforms
16696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16697    MAKE_VERSION_EXPR="-e 4\."
16698    MAKE_REQUIRED_VERSION="4.0"
16699   else
16700    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16701    MAKE_REQUIRED_VERSION="3.81"
16702  fi
16703
16704  if test "x$MAKE_CANDIDATE" != x; then
16705    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16706$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16707    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16708    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16709    if test "x$IS_GNU_MAKE" = x; then
16710      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16711$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16712    else
16713      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16714      if test "x$IS_MODERN_MAKE" = x; then
16715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16716$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16717      else
16718        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16719          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16720            MAKE_EXPECTED_ENV='cygwin'
16721          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16722            MAKE_EXPECTED_ENV='msys'
16723          else
16724            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16725          fi
16726          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16727          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16728        else
16729          # Not relevant for non-Windows
16730          IS_MAKE_CORRECT_ENV=true
16731        fi
16732        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16733          { $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
16734$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;}
16735        else
16736          FOUND_MAKE=$MAKE_CANDIDATE
16737
16738  # Only process if variable expands to non-empty
16739
16740  if test "x$FOUND_MAKE" != x; then
16741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16742
16743  # First separate the path from the arguments. This will split at the first
16744  # space.
16745  complete="$FOUND_MAKE"
16746  path="${complete%% *}"
16747  tmp="$complete EOL"
16748  arguments="${tmp#* }"
16749
16750  # Input might be given as Windows format, start by converting to
16751  # unix format.
16752  new_path=`$CYGPATH -u "$path"`
16753
16754  # Now try to locate executable using which
16755  new_path=`$WHICH "$new_path" 2> /dev/null`
16756  # bat and cmd files are not always considered executable in cygwin causing which
16757  # to not find them
16758  if test "x$new_path" = x \
16759      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16760      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16761    new_path=`$CYGPATH -u "$path"`
16762  fi
16763  if test "x$new_path" = x; then
16764    # Oops. Which didn't find the executable.
16765    # The splitting of arguments from the executable at a space might have been incorrect,
16766    # since paths with space are more likely in Windows. Give it another try with the whole
16767    # argument.
16768    path="$complete"
16769    arguments="EOL"
16770    new_path=`$CYGPATH -u "$path"`
16771    new_path=`$WHICH "$new_path" 2> /dev/null`
16772    # bat and cmd files are not always considered executable in cygwin causing which
16773    # to not find them
16774    if test "x$new_path" = x \
16775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16777      new_path=`$CYGPATH -u "$path"`
16778    fi
16779    if test "x$new_path" = x; then
16780      # It's still not found. Now this is an unrecoverable error.
16781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16782$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16783      has_space=`$ECHO "$complete" | $GREP " "`
16784      if test "x$has_space" != x; then
16785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16787      fi
16788      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16789    fi
16790  fi
16791
16792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16795  # "foo.exe" is OK but "foo" is an error.
16796  #
16797  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16798  # It is also a way to make sure we got the proper file name for the real test later on.
16799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16800  if test "x$test_shortpath" = x; then
16801    # Short path failed, file does not exist as specified.
16802    # Try adding .exe or .cmd
16803    if test -f "${new_path}.exe"; then
16804      input_to_shortpath="${new_path}.exe"
16805    elif test -f "${new_path}.cmd"; then
16806      input_to_shortpath="${new_path}.cmd"
16807    else
16808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16809$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16812      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16813    fi
16814  else
16815    input_to_shortpath="$new_path"
16816  fi
16817
16818  # Call helper function which possibly converts this using DOS-style short mode.
16819  # If so, the updated path is stored in $new_path.
16820  new_path="$input_to_shortpath"
16821
16822  input_path="$input_to_shortpath"
16823  # Check if we need to convert this using DOS-style short mode. If the path
16824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16825  # take no chances and rewrite it.
16826  # Note: m4 eats our [], so we need to use [ and ] instead.
16827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16828  if test "x$has_forbidden_chars" != x; then
16829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16833      # Going to short mode and back again did indeed matter. Since short mode is
16834      # case insensitive, let's make it lowercase to improve readability.
16835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16836      # Now convert it back to Unix-stile (cygpath)
16837      input_path=`$CYGPATH -u "$shortmode_path"`
16838      new_path="$input_path"
16839    fi
16840  fi
16841
16842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16843  if test "x$test_cygdrive_prefix" = x; then
16844    # As a simple fix, exclude /usr/bin since it's not a real path.
16845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16847      # a path prefixed by /cygdrive for fixpath to work.
16848      new_path="$CYGWIN_ROOT_PATH$input_path"
16849    fi
16850  fi
16851
16852  # remove trailing .exe if any
16853  new_path="${new_path/%.exe/}"
16854
16855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16856
16857  # First separate the path from the arguments. This will split at the first
16858  # space.
16859  complete="$FOUND_MAKE"
16860  path="${complete%% *}"
16861  tmp="$complete EOL"
16862  arguments="${tmp#* }"
16863
16864  # Input might be given as Windows format, start by converting to
16865  # unix format.
16866  new_path="$path"
16867
16868  windows_path="$new_path"
16869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16870    unix_path=`$CYGPATH -u "$windows_path"`
16871    new_path="$unix_path"
16872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16874    new_path="$unix_path"
16875  fi
16876
16877
16878  # Now try to locate executable using which
16879  new_path=`$WHICH "$new_path" 2> /dev/null`
16880
16881  if test "x$new_path" = x; then
16882    # Oops. Which didn't find the executable.
16883    # The splitting of arguments from the executable at a space might have been incorrect,
16884    # since paths with space are more likely in Windows. Give it another try with the whole
16885    # argument.
16886    path="$complete"
16887    arguments="EOL"
16888    new_path="$path"
16889
16890  windows_path="$new_path"
16891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16892    unix_path=`$CYGPATH -u "$windows_path"`
16893    new_path="$unix_path"
16894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16896    new_path="$unix_path"
16897  fi
16898
16899
16900    new_path=`$WHICH "$new_path" 2> /dev/null`
16901    # bat and cmd files are not always considered executable in MSYS causing which
16902    # to not find them
16903    if test "x$new_path" = x \
16904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16906      new_path="$path"
16907
16908  windows_path="$new_path"
16909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16910    unix_path=`$CYGPATH -u "$windows_path"`
16911    new_path="$unix_path"
16912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16914    new_path="$unix_path"
16915  fi
16916
16917    fi
16918
16919    if test "x$new_path" = x; then
16920      # It's still not found. Now this is an unrecoverable error.
16921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16922$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16923      has_space=`$ECHO "$complete" | $GREP " "`
16924      if test "x$has_space" != x; then
16925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16927      fi
16928      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16929    fi
16930  fi
16931
16932  # Now new_path has a complete unix path to the binary
16933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16934    # Keep paths in /bin as-is, but remove trailing .exe if any
16935    new_path="${new_path/%.exe/}"
16936    # Do not save /bin paths to all_fixpath_prefixes!
16937  else
16938    # Not in mixed or Windows style, start by that.
16939    new_path=`cmd //c echo $new_path`
16940
16941  input_path="$new_path"
16942  # Check if we need to convert this using DOS-style short mode. If the path
16943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16944  # take no chances and rewrite it.
16945  # Note: m4 eats our [], so we need to use [ and ] instead.
16946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16947  if test "x$has_forbidden_chars" != x; then
16948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16950  fi
16951
16952    # Output is in $new_path
16953
16954  windows_path="$new_path"
16955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16956    unix_path=`$CYGPATH -u "$windows_path"`
16957    new_path="$unix_path"
16958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16960    new_path="$unix_path"
16961  fi
16962
16963    # remove trailing .exe if any
16964    new_path="${new_path/%.exe/}"
16965
16966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16968  fi
16969
16970    else
16971      # We're on a unix platform. Hooray! :)
16972      # First separate the path from the arguments. This will split at the first
16973      # space.
16974      complete="$FOUND_MAKE"
16975      path="${complete%% *}"
16976      tmp="$complete EOL"
16977      arguments="${tmp#* }"
16978
16979      # Cannot rely on the command "which" here since it doesn't always work.
16980      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16981      if test -z "$is_absolute_path"; then
16982        # Path to executable is not absolute. Find it.
16983        IFS_save="$IFS"
16984        IFS=:
16985        for p in $PATH; do
16986          if test -f "$p/$path" && test -x "$p/$path"; then
16987            new_path="$p/$path"
16988            break
16989          fi
16990        done
16991        IFS="$IFS_save"
16992      else
16993        # This is an absolute path, we can use it without further modifications.
16994        new_path="$path"
16995      fi
16996
16997      if test "x$new_path" = x; then
16998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17000        has_space=`$ECHO "$complete" | $GREP " "`
17001        if test "x$has_space" != x; then
17002          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17004        fi
17005        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17006      fi
17007    fi
17008
17009    # Now join together the path and the arguments once again
17010    if test "x$arguments" != xEOL; then
17011      new_complete="$new_path ${arguments% *}"
17012    else
17013      new_complete="$new_path"
17014    fi
17015
17016    if test "x$complete" != "x$new_complete"; then
17017      FOUND_MAKE="$new_complete"
17018      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17019$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17020    fi
17021  fi
17022
17023        fi
17024      fi
17025    fi
17026  fi
17027
17028        if test "x$FOUND_MAKE" = x; then
17029          for ac_prog in make
17030do
17031  # Extract the first word of "$ac_prog", so it can be a program name with args.
17032set dummy $ac_prog; ac_word=$2
17033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17034$as_echo_n "checking for $ac_word... " >&6; }
17035if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17036  $as_echo_n "(cached) " >&6
17037else
17038  case $CHECK_TOOLSDIR_MAKE in
17039  [\\/]* | ?:[\\/]*)
17040  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17041  ;;
17042  *)
17043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17044for as_dir in $PATH
17045do
17046  IFS=$as_save_IFS
17047  test -z "$as_dir" && as_dir=.
17048    for ac_exec_ext in '' $ac_executable_extensions; do
17049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17050    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17052    break 2
17053  fi
17054done
17055  done
17056IFS=$as_save_IFS
17057
17058  ;;
17059esac
17060fi
17061CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17062if test -n "$CHECK_TOOLSDIR_MAKE"; then
17063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17064$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17065else
17066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17067$as_echo "no" >&6; }
17068fi
17069
17070
17071  test -n "$CHECK_TOOLSDIR_MAKE" && break
17072done
17073
17074
17075  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17076  DESCRIPTION="make in tools-dir"
17077
17078  # On Cygwin, we require a newer version of make than on other platforms
17079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17080    MAKE_VERSION_EXPR="-e 4\."
17081    MAKE_REQUIRED_VERSION="4.0"
17082   else
17083    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17084    MAKE_REQUIRED_VERSION="3.81"
17085  fi
17086
17087  if test "x$MAKE_CANDIDATE" != x; then
17088    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17089$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17090    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17091    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17092    if test "x$IS_GNU_MAKE" = x; then
17093      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17094$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17095    else
17096      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17097      if test "x$IS_MODERN_MAKE" = x; then
17098        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17099$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17100      else
17101        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17102          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17103            MAKE_EXPECTED_ENV='cygwin'
17104          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17105            MAKE_EXPECTED_ENV='msys'
17106          else
17107            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17108          fi
17109          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17110          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17111        else
17112          # Not relevant for non-Windows
17113          IS_MAKE_CORRECT_ENV=true
17114        fi
17115        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17116          { $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
17117$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;}
17118        else
17119          FOUND_MAKE=$MAKE_CANDIDATE
17120
17121  # Only process if variable expands to non-empty
17122
17123  if test "x$FOUND_MAKE" != x; then
17124    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17125
17126  # First separate the path from the arguments. This will split at the first
17127  # space.
17128  complete="$FOUND_MAKE"
17129  path="${complete%% *}"
17130  tmp="$complete EOL"
17131  arguments="${tmp#* }"
17132
17133  # Input might be given as Windows format, start by converting to
17134  # unix format.
17135  new_path=`$CYGPATH -u "$path"`
17136
17137  # Now try to locate executable using which
17138  new_path=`$WHICH "$new_path" 2> /dev/null`
17139  # bat and cmd files are not always considered executable in cygwin causing which
17140  # to not find them
17141  if test "x$new_path" = x \
17142      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17143      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17144    new_path=`$CYGPATH -u "$path"`
17145  fi
17146  if test "x$new_path" = x; then
17147    # Oops. Which didn't find the executable.
17148    # The splitting of arguments from the executable at a space might have been incorrect,
17149    # since paths with space are more likely in Windows. Give it another try with the whole
17150    # argument.
17151    path="$complete"
17152    arguments="EOL"
17153    new_path=`$CYGPATH -u "$path"`
17154    new_path=`$WHICH "$new_path" 2> /dev/null`
17155    # bat and cmd files are not always considered executable in cygwin causing which
17156    # to not find them
17157    if test "x$new_path" = x \
17158        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17159        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17160      new_path=`$CYGPATH -u "$path"`
17161    fi
17162    if test "x$new_path" = x; then
17163      # It's still not found. Now this is an unrecoverable error.
17164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17165$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17166      has_space=`$ECHO "$complete" | $GREP " "`
17167      if test "x$has_space" != x; then
17168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17170      fi
17171      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17172    fi
17173  fi
17174
17175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17178  # "foo.exe" is OK but "foo" is an error.
17179  #
17180  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17181  # It is also a way to make sure we got the proper file name for the real test later on.
17182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17183  if test "x$test_shortpath" = x; then
17184    # Short path failed, file does not exist as specified.
17185    # Try adding .exe or .cmd
17186    if test -f "${new_path}.exe"; then
17187      input_to_shortpath="${new_path}.exe"
17188    elif test -f "${new_path}.cmd"; then
17189      input_to_shortpath="${new_path}.cmd"
17190    else
17191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17192$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17193      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17194$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17195      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17196    fi
17197  else
17198    input_to_shortpath="$new_path"
17199  fi
17200
17201  # Call helper function which possibly converts this using DOS-style short mode.
17202  # If so, the updated path is stored in $new_path.
17203  new_path="$input_to_shortpath"
17204
17205  input_path="$input_to_shortpath"
17206  # Check if we need to convert this using DOS-style short mode. If the path
17207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17208  # take no chances and rewrite it.
17209  # Note: m4 eats our [], so we need to use [ and ] instead.
17210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17211  if test "x$has_forbidden_chars" != x; then
17212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17216      # Going to short mode and back again did indeed matter. Since short mode is
17217      # case insensitive, let's make it lowercase to improve readability.
17218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17219      # Now convert it back to Unix-stile (cygpath)
17220      input_path=`$CYGPATH -u "$shortmode_path"`
17221      new_path="$input_path"
17222    fi
17223  fi
17224
17225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17226  if test "x$test_cygdrive_prefix" = x; then
17227    # As a simple fix, exclude /usr/bin since it's not a real path.
17228    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17230      # a path prefixed by /cygdrive for fixpath to work.
17231      new_path="$CYGWIN_ROOT_PATH$input_path"
17232    fi
17233  fi
17234
17235  # remove trailing .exe if any
17236  new_path="${new_path/%.exe/}"
17237
17238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17239
17240  # First separate the path from the arguments. This will split at the first
17241  # space.
17242  complete="$FOUND_MAKE"
17243  path="${complete%% *}"
17244  tmp="$complete EOL"
17245  arguments="${tmp#* }"
17246
17247  # Input might be given as Windows format, start by converting to
17248  # unix format.
17249  new_path="$path"
17250
17251  windows_path="$new_path"
17252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17253    unix_path=`$CYGPATH -u "$windows_path"`
17254    new_path="$unix_path"
17255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17257    new_path="$unix_path"
17258  fi
17259
17260
17261  # Now try to locate executable using which
17262  new_path=`$WHICH "$new_path" 2> /dev/null`
17263
17264  if test "x$new_path" = x; then
17265    # Oops. Which didn't find the executable.
17266    # The splitting of arguments from the executable at a space might have been incorrect,
17267    # since paths with space are more likely in Windows. Give it another try with the whole
17268    # argument.
17269    path="$complete"
17270    arguments="EOL"
17271    new_path="$path"
17272
17273  windows_path="$new_path"
17274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17275    unix_path=`$CYGPATH -u "$windows_path"`
17276    new_path="$unix_path"
17277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17279    new_path="$unix_path"
17280  fi
17281
17282
17283    new_path=`$WHICH "$new_path" 2> /dev/null`
17284    # bat and cmd files are not always considered executable in MSYS causing which
17285    # to not find them
17286    if test "x$new_path" = x \
17287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17289      new_path="$path"
17290
17291  windows_path="$new_path"
17292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17293    unix_path=`$CYGPATH -u "$windows_path"`
17294    new_path="$unix_path"
17295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17297    new_path="$unix_path"
17298  fi
17299
17300    fi
17301
17302    if test "x$new_path" = x; then
17303      # It's still not found. Now this is an unrecoverable error.
17304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17305$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17306      has_space=`$ECHO "$complete" | $GREP " "`
17307      if test "x$has_space" != x; then
17308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17310      fi
17311      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17312    fi
17313  fi
17314
17315  # Now new_path has a complete unix path to the binary
17316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17317    # Keep paths in /bin as-is, but remove trailing .exe if any
17318    new_path="${new_path/%.exe/}"
17319    # Do not save /bin paths to all_fixpath_prefixes!
17320  else
17321    # Not in mixed or Windows style, start by that.
17322    new_path=`cmd //c echo $new_path`
17323
17324  input_path="$new_path"
17325  # Check if we need to convert this using DOS-style short mode. If the path
17326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17327  # take no chances and rewrite it.
17328  # Note: m4 eats our [], so we need to use [ and ] instead.
17329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17330  if test "x$has_forbidden_chars" != x; then
17331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17333  fi
17334
17335    # Output is in $new_path
17336
17337  windows_path="$new_path"
17338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17339    unix_path=`$CYGPATH -u "$windows_path"`
17340    new_path="$unix_path"
17341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17343    new_path="$unix_path"
17344  fi
17345
17346    # remove trailing .exe if any
17347    new_path="${new_path/%.exe/}"
17348
17349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17351  fi
17352
17353    else
17354      # We're on a unix platform. Hooray! :)
17355      # First separate the path from the arguments. This will split at the first
17356      # space.
17357      complete="$FOUND_MAKE"
17358      path="${complete%% *}"
17359      tmp="$complete EOL"
17360      arguments="${tmp#* }"
17361
17362      # Cannot rely on the command "which" here since it doesn't always work.
17363      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17364      if test -z "$is_absolute_path"; then
17365        # Path to executable is not absolute. Find it.
17366        IFS_save="$IFS"
17367        IFS=:
17368        for p in $PATH; do
17369          if test -f "$p/$path" && test -x "$p/$path"; then
17370            new_path="$p/$path"
17371            break
17372          fi
17373        done
17374        IFS="$IFS_save"
17375      else
17376        # This is an absolute path, we can use it without further modifications.
17377        new_path="$path"
17378      fi
17379
17380      if test "x$new_path" = x; then
17381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17382$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17383        has_space=`$ECHO "$complete" | $GREP " "`
17384        if test "x$has_space" != x; then
17385          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17387        fi
17388        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17389      fi
17390    fi
17391
17392    # Now join together the path and the arguments once again
17393    if test "x$arguments" != xEOL; then
17394      new_complete="$new_path ${arguments% *}"
17395    else
17396      new_complete="$new_path"
17397    fi
17398
17399    if test "x$complete" != "x$new_complete"; then
17400      FOUND_MAKE="$new_complete"
17401      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17402$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17403    fi
17404  fi
17405
17406        fi
17407      fi
17408    fi
17409  fi
17410
17411        fi
17412        PATH=$OLD_PATH
17413      fi
17414    fi
17415
17416    if test "x$FOUND_MAKE" = x; then
17417      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17418    fi
17419  fi
17420
17421  MAKE=$FOUND_MAKE
17422
17423  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17424$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17425
17426
17427  # Check if make supports the output sync option and if so, setup using it.
17428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17429$as_echo_n "checking if make --output-sync is supported... " >&6; }
17430  if $MAKE --version -O > /dev/null 2>&1; then
17431    OUTPUT_SYNC_SUPPORTED=true
17432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17433$as_echo "yes" >&6; }
17434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17435$as_echo_n "checking for output-sync value... " >&6; }
17436
17437# Check whether --with-output-sync was given.
17438if test "${with_output_sync+set}" = set; then :
17439  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17440fi
17441
17442    if test "x$OUTPUT_SYNC" = "x"; then
17443      OUTPUT_SYNC=none
17444    fi
17445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17446$as_echo "$OUTPUT_SYNC" >&6; }
17447    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17448      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17449    fi
17450  else
17451    OUTPUT_SYNC_SUPPORTED=false
17452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17453$as_echo "no" >&6; }
17454  fi
17455
17456
17457
17458
17459
17460
17461  # Test if find supports -delete
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17463$as_echo_n "checking if find supports -delete... " >&6; }
17464  FIND_DELETE="-delete"
17465
17466  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17467
17468  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17469
17470  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17471  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17472    # No, it does not.
17473    rm $DELETEDIR/TestIfFindSupportsDelete
17474    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17475      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17476      FIND_DELETE="-print | xargs rm"
17477    else
17478      FIND_DELETE="-exec rm \{\} \+"
17479    fi
17480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17481$as_echo "no" >&6; }
17482  else
17483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17484$as_echo "yes" >&6; }
17485  fi
17486  rmdir $DELETEDIR
17487
17488
17489
17490  # These tools might not be installed by default,
17491  # need hint on how to install them.
17492
17493
17494
17495  # Publish this variable in the help.
17496
17497
17498  if test "x$UNZIP" = x; then
17499    # The variable is not set by user, try to locate tool using the code snippet
17500    for ac_prog in unzip
17501do
17502  # Extract the first word of "$ac_prog", so it can be a program name with args.
17503set dummy $ac_prog; ac_word=$2
17504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17505$as_echo_n "checking for $ac_word... " >&6; }
17506if ${ac_cv_path_UNZIP+:} false; then :
17507  $as_echo_n "(cached) " >&6
17508else
17509  case $UNZIP in
17510  [\\/]* | ?:[\\/]*)
17511  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17512  ;;
17513  *)
17514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17515for as_dir in $PATH
17516do
17517  IFS=$as_save_IFS
17518  test -z "$as_dir" && as_dir=.
17519    for ac_exec_ext in '' $ac_executable_extensions; do
17520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17521    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17523    break 2
17524  fi
17525done
17526  done
17527IFS=$as_save_IFS
17528
17529  ;;
17530esac
17531fi
17532UNZIP=$ac_cv_path_UNZIP
17533if test -n "$UNZIP"; then
17534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17535$as_echo "$UNZIP" >&6; }
17536else
17537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17538$as_echo "no" >&6; }
17539fi
17540
17541
17542  test -n "$UNZIP" && break
17543done
17544
17545  else
17546    # The variable is set, but is it from the command line or the environment?
17547
17548    # Try to remove the string !UNZIP! from our list.
17549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17551      # If it failed, the variable was not from the command line. Ignore it,
17552      # but warn the user (except for BASH, which is always set by the calling BASH).
17553      if test "xUNZIP" != xBASH; then
17554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17555$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17556      fi
17557      # Try to locate tool using the code snippet
17558      for ac_prog in unzip
17559do
17560  # Extract the first word of "$ac_prog", so it can be a program name with args.
17561set dummy $ac_prog; ac_word=$2
17562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17563$as_echo_n "checking for $ac_word... " >&6; }
17564if ${ac_cv_path_UNZIP+:} false; then :
17565  $as_echo_n "(cached) " >&6
17566else
17567  case $UNZIP in
17568  [\\/]* | ?:[\\/]*)
17569  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17570  ;;
17571  *)
17572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17573for as_dir in $PATH
17574do
17575  IFS=$as_save_IFS
17576  test -z "$as_dir" && as_dir=.
17577    for ac_exec_ext in '' $ac_executable_extensions; do
17578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17579    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17581    break 2
17582  fi
17583done
17584  done
17585IFS=$as_save_IFS
17586
17587  ;;
17588esac
17589fi
17590UNZIP=$ac_cv_path_UNZIP
17591if test -n "$UNZIP"; then
17592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17593$as_echo "$UNZIP" >&6; }
17594else
17595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17596$as_echo "no" >&6; }
17597fi
17598
17599
17600  test -n "$UNZIP" && break
17601done
17602
17603    else
17604      # If it succeeded, then it was overridden by the user. We will use it
17605      # for the tool.
17606
17607      # First remove it from the list of overridden variables, so we can test
17608      # for unknown variables in the end.
17609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17610
17611      # Check if the provided tool contains a complete path.
17612      tool_specified="$UNZIP"
17613      tool_basename="${tool_specified##*/}"
17614      if test "x$tool_basename" = "x$tool_specified"; then
17615        # A command without a complete path is provided, search $PATH.
17616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17617$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17618        # Extract the first word of "$tool_basename", so it can be a program name with args.
17619set dummy $tool_basename; ac_word=$2
17620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17621$as_echo_n "checking for $ac_word... " >&6; }
17622if ${ac_cv_path_UNZIP+:} false; then :
17623  $as_echo_n "(cached) " >&6
17624else
17625  case $UNZIP in
17626  [\\/]* | ?:[\\/]*)
17627  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17628  ;;
17629  *)
17630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17631for as_dir in $PATH
17632do
17633  IFS=$as_save_IFS
17634  test -z "$as_dir" && as_dir=.
17635    for ac_exec_ext in '' $ac_executable_extensions; do
17636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17637    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17639    break 2
17640  fi
17641done
17642  done
17643IFS=$as_save_IFS
17644
17645  ;;
17646esac
17647fi
17648UNZIP=$ac_cv_path_UNZIP
17649if test -n "$UNZIP"; then
17650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17651$as_echo "$UNZIP" >&6; }
17652else
17653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17654$as_echo "no" >&6; }
17655fi
17656
17657
17658        if test "x$UNZIP" = x; then
17659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17660        fi
17661      else
17662        # Otherwise we believe it is a complete path. Use it as it is.
17663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17664$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17666$as_echo_n "checking for UNZIP... " >&6; }
17667        if test ! -x "$tool_specified"; then
17668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17669$as_echo "not found" >&6; }
17670          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17671        fi
17672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17673$as_echo "$tool_specified" >&6; }
17674      fi
17675    fi
17676  fi
17677
17678
17679
17680  if test "x$UNZIP" = x; then
17681    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17682  fi
17683
17684
17685
17686
17687
17688  # Publish this variable in the help.
17689
17690
17691  if test "x$ZIP" = x; then
17692    # The variable is not set by user, try to locate tool using the code snippet
17693    for ac_prog in zip
17694do
17695  # Extract the first word of "$ac_prog", so it can be a program name with args.
17696set dummy $ac_prog; ac_word=$2
17697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17698$as_echo_n "checking for $ac_word... " >&6; }
17699if ${ac_cv_path_ZIP+:} false; then :
17700  $as_echo_n "(cached) " >&6
17701else
17702  case $ZIP in
17703  [\\/]* | ?:[\\/]*)
17704  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17705  ;;
17706  *)
17707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17708for as_dir in $PATH
17709do
17710  IFS=$as_save_IFS
17711  test -z "$as_dir" && as_dir=.
17712    for ac_exec_ext in '' $ac_executable_extensions; do
17713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17714    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17716    break 2
17717  fi
17718done
17719  done
17720IFS=$as_save_IFS
17721
17722  ;;
17723esac
17724fi
17725ZIP=$ac_cv_path_ZIP
17726if test -n "$ZIP"; then
17727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17728$as_echo "$ZIP" >&6; }
17729else
17730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17731$as_echo "no" >&6; }
17732fi
17733
17734
17735  test -n "$ZIP" && break
17736done
17737
17738  else
17739    # The variable is set, but is it from the command line or the environment?
17740
17741    # Try to remove the string !ZIP! from our list.
17742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17744      # If it failed, the variable was not from the command line. Ignore it,
17745      # but warn the user (except for BASH, which is always set by the calling BASH).
17746      if test "xZIP" != xBASH; then
17747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17748$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17749      fi
17750      # Try to locate tool using the code snippet
17751      for ac_prog in zip
17752do
17753  # Extract the first word of "$ac_prog", so it can be a program name with args.
17754set dummy $ac_prog; ac_word=$2
17755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17756$as_echo_n "checking for $ac_word... " >&6; }
17757if ${ac_cv_path_ZIP+:} false; then :
17758  $as_echo_n "(cached) " >&6
17759else
17760  case $ZIP in
17761  [\\/]* | ?:[\\/]*)
17762  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17763  ;;
17764  *)
17765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17766for as_dir in $PATH
17767do
17768  IFS=$as_save_IFS
17769  test -z "$as_dir" && as_dir=.
17770    for ac_exec_ext in '' $ac_executable_extensions; do
17771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17772    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17774    break 2
17775  fi
17776done
17777  done
17778IFS=$as_save_IFS
17779
17780  ;;
17781esac
17782fi
17783ZIP=$ac_cv_path_ZIP
17784if test -n "$ZIP"; then
17785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17786$as_echo "$ZIP" >&6; }
17787else
17788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17789$as_echo "no" >&6; }
17790fi
17791
17792
17793  test -n "$ZIP" && break
17794done
17795
17796    else
17797      # If it succeeded, then it was overridden by the user. We will use it
17798      # for the tool.
17799
17800      # First remove it from the list of overridden variables, so we can test
17801      # for unknown variables in the end.
17802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17803
17804      # Check if the provided tool contains a complete path.
17805      tool_specified="$ZIP"
17806      tool_basename="${tool_specified##*/}"
17807      if test "x$tool_basename" = "x$tool_specified"; then
17808        # A command without a complete path is provided, search $PATH.
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17810$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17811        # Extract the first word of "$tool_basename", so it can be a program name with args.
17812set dummy $tool_basename; ac_word=$2
17813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17814$as_echo_n "checking for $ac_word... " >&6; }
17815if ${ac_cv_path_ZIP+:} false; then :
17816  $as_echo_n "(cached) " >&6
17817else
17818  case $ZIP in
17819  [\\/]* | ?:[\\/]*)
17820  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17821  ;;
17822  *)
17823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17824for as_dir in $PATH
17825do
17826  IFS=$as_save_IFS
17827  test -z "$as_dir" && as_dir=.
17828    for ac_exec_ext in '' $ac_executable_extensions; do
17829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17830    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17832    break 2
17833  fi
17834done
17835  done
17836IFS=$as_save_IFS
17837
17838  ;;
17839esac
17840fi
17841ZIP=$ac_cv_path_ZIP
17842if test -n "$ZIP"; then
17843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17844$as_echo "$ZIP" >&6; }
17845else
17846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17847$as_echo "no" >&6; }
17848fi
17849
17850
17851        if test "x$ZIP" = x; then
17852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17853        fi
17854      else
17855        # Otherwise we believe it is a complete path. Use it as it is.
17856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17857$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17859$as_echo_n "checking for ZIP... " >&6; }
17860        if test ! -x "$tool_specified"; then
17861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17862$as_echo "not found" >&6; }
17863          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17864        fi
17865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17866$as_echo "$tool_specified" >&6; }
17867      fi
17868    fi
17869  fi
17870
17871
17872
17873  if test "x$ZIP" = x; then
17874    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17875  fi
17876
17877
17878
17879  # Non-required basic tools
17880
17881
17882
17883  # Publish this variable in the help.
17884
17885
17886  if test "x$LDD" = x; then
17887    # The variable is not set by user, try to locate tool using the code snippet
17888    for ac_prog in ldd
17889do
17890  # Extract the first word of "$ac_prog", so it can be a program name with args.
17891set dummy $ac_prog; ac_word=$2
17892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17893$as_echo_n "checking for $ac_word... " >&6; }
17894if ${ac_cv_path_LDD+:} false; then :
17895  $as_echo_n "(cached) " >&6
17896else
17897  case $LDD in
17898  [\\/]* | ?:[\\/]*)
17899  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17900  ;;
17901  *)
17902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17903for as_dir in $PATH
17904do
17905  IFS=$as_save_IFS
17906  test -z "$as_dir" && as_dir=.
17907    for ac_exec_ext in '' $ac_executable_extensions; do
17908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17909    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17911    break 2
17912  fi
17913done
17914  done
17915IFS=$as_save_IFS
17916
17917  ;;
17918esac
17919fi
17920LDD=$ac_cv_path_LDD
17921if test -n "$LDD"; then
17922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17923$as_echo "$LDD" >&6; }
17924else
17925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17926$as_echo "no" >&6; }
17927fi
17928
17929
17930  test -n "$LDD" && break
17931done
17932
17933  else
17934    # The variable is set, but is it from the command line or the environment?
17935
17936    # Try to remove the string !LDD! from our list.
17937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17939      # If it failed, the variable was not from the command line. Ignore it,
17940      # but warn the user (except for BASH, which is always set by the calling BASH).
17941      if test "xLDD" != xBASH; then
17942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17943$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17944      fi
17945      # Try to locate tool using the code snippet
17946      for ac_prog in ldd
17947do
17948  # Extract the first word of "$ac_prog", so it can be a program name with args.
17949set dummy $ac_prog; ac_word=$2
17950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17951$as_echo_n "checking for $ac_word... " >&6; }
17952if ${ac_cv_path_LDD+:} false; then :
17953  $as_echo_n "(cached) " >&6
17954else
17955  case $LDD in
17956  [\\/]* | ?:[\\/]*)
17957  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17958  ;;
17959  *)
17960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17961for as_dir in $PATH
17962do
17963  IFS=$as_save_IFS
17964  test -z "$as_dir" && as_dir=.
17965    for ac_exec_ext in '' $ac_executable_extensions; do
17966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17967    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17969    break 2
17970  fi
17971done
17972  done
17973IFS=$as_save_IFS
17974
17975  ;;
17976esac
17977fi
17978LDD=$ac_cv_path_LDD
17979if test -n "$LDD"; then
17980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17981$as_echo "$LDD" >&6; }
17982else
17983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17984$as_echo "no" >&6; }
17985fi
17986
17987
17988  test -n "$LDD" && break
17989done
17990
17991    else
17992      # If it succeeded, then it was overridden by the user. We will use it
17993      # for the tool.
17994
17995      # First remove it from the list of overridden variables, so we can test
17996      # for unknown variables in the end.
17997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17998
17999      # Check if the provided tool contains a complete path.
18000      tool_specified="$LDD"
18001      tool_basename="${tool_specified##*/}"
18002      if test "x$tool_basename" = "x$tool_specified"; then
18003        # A command without a complete path is provided, search $PATH.
18004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18005$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18006        # Extract the first word of "$tool_basename", so it can be a program name with args.
18007set dummy $tool_basename; ac_word=$2
18008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18009$as_echo_n "checking for $ac_word... " >&6; }
18010if ${ac_cv_path_LDD+:} false; then :
18011  $as_echo_n "(cached) " >&6
18012else
18013  case $LDD in
18014  [\\/]* | ?:[\\/]*)
18015  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18016  ;;
18017  *)
18018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18019for as_dir in $PATH
18020do
18021  IFS=$as_save_IFS
18022  test -z "$as_dir" && as_dir=.
18023    for ac_exec_ext in '' $ac_executable_extensions; do
18024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18025    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18027    break 2
18028  fi
18029done
18030  done
18031IFS=$as_save_IFS
18032
18033  ;;
18034esac
18035fi
18036LDD=$ac_cv_path_LDD
18037if test -n "$LDD"; then
18038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18039$as_echo "$LDD" >&6; }
18040else
18041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18042$as_echo "no" >&6; }
18043fi
18044
18045
18046        if test "x$LDD" = x; then
18047          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18048        fi
18049      else
18050        # Otherwise we believe it is a complete path. Use it as it is.
18051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18052$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18054$as_echo_n "checking for LDD... " >&6; }
18055        if test ! -x "$tool_specified"; then
18056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18057$as_echo "not found" >&6; }
18058          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18059        fi
18060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18061$as_echo "$tool_specified" >&6; }
18062      fi
18063    fi
18064  fi
18065
18066
18067  if test "x$LDD" = "x"; then
18068    # List shared lib dependencies is used for
18069    # debug output and checking for forbidden dependencies.
18070    # We can build without it.
18071    LDD="true"
18072  fi
18073
18074
18075  # Publish this variable in the help.
18076
18077
18078  if test "x$OTOOL" = x; then
18079    # The variable is not set by user, try to locate tool using the code snippet
18080    for ac_prog in otool
18081do
18082  # Extract the first word of "$ac_prog", so it can be a program name with args.
18083set dummy $ac_prog; ac_word=$2
18084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18085$as_echo_n "checking for $ac_word... " >&6; }
18086if ${ac_cv_path_OTOOL+:} false; then :
18087  $as_echo_n "(cached) " >&6
18088else
18089  case $OTOOL in
18090  [\\/]* | ?:[\\/]*)
18091  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18092  ;;
18093  *)
18094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18095for as_dir in $PATH
18096do
18097  IFS=$as_save_IFS
18098  test -z "$as_dir" && as_dir=.
18099    for ac_exec_ext in '' $ac_executable_extensions; do
18100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18101    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18103    break 2
18104  fi
18105done
18106  done
18107IFS=$as_save_IFS
18108
18109  ;;
18110esac
18111fi
18112OTOOL=$ac_cv_path_OTOOL
18113if test -n "$OTOOL"; then
18114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18115$as_echo "$OTOOL" >&6; }
18116else
18117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18118$as_echo "no" >&6; }
18119fi
18120
18121
18122  test -n "$OTOOL" && break
18123done
18124
18125  else
18126    # The variable is set, but is it from the command line or the environment?
18127
18128    # Try to remove the string !OTOOL! from our list.
18129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18131      # If it failed, the variable was not from the command line. Ignore it,
18132      # but warn the user (except for BASH, which is always set by the calling BASH).
18133      if test "xOTOOL" != xBASH; then
18134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18135$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18136      fi
18137      # Try to locate tool using the code snippet
18138      for ac_prog in otool
18139do
18140  # Extract the first word of "$ac_prog", so it can be a program name with args.
18141set dummy $ac_prog; ac_word=$2
18142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18143$as_echo_n "checking for $ac_word... " >&6; }
18144if ${ac_cv_path_OTOOL+:} false; then :
18145  $as_echo_n "(cached) " >&6
18146else
18147  case $OTOOL in
18148  [\\/]* | ?:[\\/]*)
18149  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18150  ;;
18151  *)
18152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18153for as_dir in $PATH
18154do
18155  IFS=$as_save_IFS
18156  test -z "$as_dir" && as_dir=.
18157    for ac_exec_ext in '' $ac_executable_extensions; do
18158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18159    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18161    break 2
18162  fi
18163done
18164  done
18165IFS=$as_save_IFS
18166
18167  ;;
18168esac
18169fi
18170OTOOL=$ac_cv_path_OTOOL
18171if test -n "$OTOOL"; then
18172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18173$as_echo "$OTOOL" >&6; }
18174else
18175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18176$as_echo "no" >&6; }
18177fi
18178
18179
18180  test -n "$OTOOL" && break
18181done
18182
18183    else
18184      # If it succeeded, then it was overridden by the user. We will use it
18185      # for the tool.
18186
18187      # First remove it from the list of overridden variables, so we can test
18188      # for unknown variables in the end.
18189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18190
18191      # Check if the provided tool contains a complete path.
18192      tool_specified="$OTOOL"
18193      tool_basename="${tool_specified##*/}"
18194      if test "x$tool_basename" = "x$tool_specified"; then
18195        # A command without a complete path is provided, search $PATH.
18196        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18197$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18198        # Extract the first word of "$tool_basename", so it can be a program name with args.
18199set dummy $tool_basename; ac_word=$2
18200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18201$as_echo_n "checking for $ac_word... " >&6; }
18202if ${ac_cv_path_OTOOL+:} false; then :
18203  $as_echo_n "(cached) " >&6
18204else
18205  case $OTOOL in
18206  [\\/]* | ?:[\\/]*)
18207  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18208  ;;
18209  *)
18210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18211for as_dir in $PATH
18212do
18213  IFS=$as_save_IFS
18214  test -z "$as_dir" && as_dir=.
18215    for ac_exec_ext in '' $ac_executable_extensions; do
18216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18217    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18219    break 2
18220  fi
18221done
18222  done
18223IFS=$as_save_IFS
18224
18225  ;;
18226esac
18227fi
18228OTOOL=$ac_cv_path_OTOOL
18229if test -n "$OTOOL"; then
18230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18231$as_echo "$OTOOL" >&6; }
18232else
18233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18234$as_echo "no" >&6; }
18235fi
18236
18237
18238        if test "x$OTOOL" = x; then
18239          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18240        fi
18241      else
18242        # Otherwise we believe it is a complete path. Use it as it is.
18243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18244$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18246$as_echo_n "checking for OTOOL... " >&6; }
18247        if test ! -x "$tool_specified"; then
18248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18249$as_echo "not found" >&6; }
18250          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18251        fi
18252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18253$as_echo "$tool_specified" >&6; }
18254      fi
18255    fi
18256  fi
18257
18258
18259  if test "x$OTOOL" = "x"; then
18260    OTOOL="true"
18261  fi
18262
18263
18264  # Publish this variable in the help.
18265
18266
18267  if test "x$READELF" = x; then
18268    # The variable is not set by user, try to locate tool using the code snippet
18269    for ac_prog in greadelf readelf
18270do
18271  # Extract the first word of "$ac_prog", so it can be a program name with args.
18272set dummy $ac_prog; ac_word=$2
18273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18274$as_echo_n "checking for $ac_word... " >&6; }
18275if ${ac_cv_path_READELF+:} false; then :
18276  $as_echo_n "(cached) " >&6
18277else
18278  case $READELF in
18279  [\\/]* | ?:[\\/]*)
18280  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18281  ;;
18282  *)
18283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18284for as_dir in $PATH
18285do
18286  IFS=$as_save_IFS
18287  test -z "$as_dir" && as_dir=.
18288    for ac_exec_ext in '' $ac_executable_extensions; do
18289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18290    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18292    break 2
18293  fi
18294done
18295  done
18296IFS=$as_save_IFS
18297
18298  ;;
18299esac
18300fi
18301READELF=$ac_cv_path_READELF
18302if test -n "$READELF"; then
18303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18304$as_echo "$READELF" >&6; }
18305else
18306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18307$as_echo "no" >&6; }
18308fi
18309
18310
18311  test -n "$READELF" && break
18312done
18313
18314  else
18315    # The variable is set, but is it from the command line or the environment?
18316
18317    # Try to remove the string !READELF! from our list.
18318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18320      # If it failed, the variable was not from the command line. Ignore it,
18321      # but warn the user (except for BASH, which is always set by the calling BASH).
18322      if test "xREADELF" != xBASH; then
18323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18324$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18325      fi
18326      # Try to locate tool using the code snippet
18327      for ac_prog in greadelf readelf
18328do
18329  # Extract the first word of "$ac_prog", so it can be a program name with args.
18330set dummy $ac_prog; ac_word=$2
18331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18332$as_echo_n "checking for $ac_word... " >&6; }
18333if ${ac_cv_path_READELF+:} false; then :
18334  $as_echo_n "(cached) " >&6
18335else
18336  case $READELF in
18337  [\\/]* | ?:[\\/]*)
18338  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18339  ;;
18340  *)
18341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18342for as_dir in $PATH
18343do
18344  IFS=$as_save_IFS
18345  test -z "$as_dir" && as_dir=.
18346    for ac_exec_ext in '' $ac_executable_extensions; do
18347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18348    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18350    break 2
18351  fi
18352done
18353  done
18354IFS=$as_save_IFS
18355
18356  ;;
18357esac
18358fi
18359READELF=$ac_cv_path_READELF
18360if test -n "$READELF"; then
18361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18362$as_echo "$READELF" >&6; }
18363else
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18365$as_echo "no" >&6; }
18366fi
18367
18368
18369  test -n "$READELF" && break
18370done
18371
18372    else
18373      # If it succeeded, then it was overridden by the user. We will use it
18374      # for the tool.
18375
18376      # First remove it from the list of overridden variables, so we can test
18377      # for unknown variables in the end.
18378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18379
18380      # Check if the provided tool contains a complete path.
18381      tool_specified="$READELF"
18382      tool_basename="${tool_specified##*/}"
18383      if test "x$tool_basename" = "x$tool_specified"; then
18384        # A command without a complete path is provided, search $PATH.
18385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18386$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18387        # Extract the first word of "$tool_basename", so it can be a program name with args.
18388set dummy $tool_basename; ac_word=$2
18389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18390$as_echo_n "checking for $ac_word... " >&6; }
18391if ${ac_cv_path_READELF+:} false; then :
18392  $as_echo_n "(cached) " >&6
18393else
18394  case $READELF in
18395  [\\/]* | ?:[\\/]*)
18396  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18397  ;;
18398  *)
18399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18400for as_dir in $PATH
18401do
18402  IFS=$as_save_IFS
18403  test -z "$as_dir" && as_dir=.
18404    for ac_exec_ext in '' $ac_executable_extensions; do
18405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18406    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18408    break 2
18409  fi
18410done
18411  done
18412IFS=$as_save_IFS
18413
18414  ;;
18415esac
18416fi
18417READELF=$ac_cv_path_READELF
18418if test -n "$READELF"; then
18419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18420$as_echo "$READELF" >&6; }
18421else
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18423$as_echo "no" >&6; }
18424fi
18425
18426
18427        if test "x$READELF" = x; then
18428          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18429        fi
18430      else
18431        # Otherwise we believe it is a complete path. Use it as it is.
18432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18433$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18435$as_echo_n "checking for READELF... " >&6; }
18436        if test ! -x "$tool_specified"; then
18437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18438$as_echo "not found" >&6; }
18439          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18440        fi
18441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18442$as_echo "$tool_specified" >&6; }
18443      fi
18444    fi
18445  fi
18446
18447
18448
18449
18450  # Publish this variable in the help.
18451
18452
18453  if test "x$HG" = x; then
18454    # The variable is not set by user, try to locate tool using the code snippet
18455    for ac_prog in hg
18456do
18457  # Extract the first word of "$ac_prog", so it can be a program name with args.
18458set dummy $ac_prog; ac_word=$2
18459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18460$as_echo_n "checking for $ac_word... " >&6; }
18461if ${ac_cv_path_HG+:} false; then :
18462  $as_echo_n "(cached) " >&6
18463else
18464  case $HG in
18465  [\\/]* | ?:[\\/]*)
18466  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18467  ;;
18468  *)
18469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18470for as_dir in $PATH
18471do
18472  IFS=$as_save_IFS
18473  test -z "$as_dir" && as_dir=.
18474    for ac_exec_ext in '' $ac_executable_extensions; do
18475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18476    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18478    break 2
18479  fi
18480done
18481  done
18482IFS=$as_save_IFS
18483
18484  ;;
18485esac
18486fi
18487HG=$ac_cv_path_HG
18488if test -n "$HG"; then
18489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18490$as_echo "$HG" >&6; }
18491else
18492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18493$as_echo "no" >&6; }
18494fi
18495
18496
18497  test -n "$HG" && break
18498done
18499
18500  else
18501    # The variable is set, but is it from the command line or the environment?
18502
18503    # Try to remove the string !HG! from our list.
18504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18506      # If it failed, the variable was not from the command line. Ignore it,
18507      # but warn the user (except for BASH, which is always set by the calling BASH).
18508      if test "xHG" != xBASH; then
18509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18510$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18511      fi
18512      # Try to locate tool using the code snippet
18513      for ac_prog in hg
18514do
18515  # Extract the first word of "$ac_prog", so it can be a program name with args.
18516set dummy $ac_prog; ac_word=$2
18517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18518$as_echo_n "checking for $ac_word... " >&6; }
18519if ${ac_cv_path_HG+:} false; then :
18520  $as_echo_n "(cached) " >&6
18521else
18522  case $HG in
18523  [\\/]* | ?:[\\/]*)
18524  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18525  ;;
18526  *)
18527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18528for as_dir in $PATH
18529do
18530  IFS=$as_save_IFS
18531  test -z "$as_dir" && as_dir=.
18532    for ac_exec_ext in '' $ac_executable_extensions; do
18533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18534    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18536    break 2
18537  fi
18538done
18539  done
18540IFS=$as_save_IFS
18541
18542  ;;
18543esac
18544fi
18545HG=$ac_cv_path_HG
18546if test -n "$HG"; then
18547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18548$as_echo "$HG" >&6; }
18549else
18550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18551$as_echo "no" >&6; }
18552fi
18553
18554
18555  test -n "$HG" && break
18556done
18557
18558    else
18559      # If it succeeded, then it was overridden by the user. We will use it
18560      # for the tool.
18561
18562      # First remove it from the list of overridden variables, so we can test
18563      # for unknown variables in the end.
18564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18565
18566      # Check if the provided tool contains a complete path.
18567      tool_specified="$HG"
18568      tool_basename="${tool_specified##*/}"
18569      if test "x$tool_basename" = "x$tool_specified"; then
18570        # A command without a complete path is provided, search $PATH.
18571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18572$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18573        # Extract the first word of "$tool_basename", so it can be a program name with args.
18574set dummy $tool_basename; ac_word=$2
18575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18576$as_echo_n "checking for $ac_word... " >&6; }
18577if ${ac_cv_path_HG+:} false; then :
18578  $as_echo_n "(cached) " >&6
18579else
18580  case $HG in
18581  [\\/]* | ?:[\\/]*)
18582  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18583  ;;
18584  *)
18585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18586for as_dir in $PATH
18587do
18588  IFS=$as_save_IFS
18589  test -z "$as_dir" && as_dir=.
18590    for ac_exec_ext in '' $ac_executable_extensions; do
18591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18592    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18594    break 2
18595  fi
18596done
18597  done
18598IFS=$as_save_IFS
18599
18600  ;;
18601esac
18602fi
18603HG=$ac_cv_path_HG
18604if test -n "$HG"; then
18605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18606$as_echo "$HG" >&6; }
18607else
18608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18609$as_echo "no" >&6; }
18610fi
18611
18612
18613        if test "x$HG" = x; then
18614          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18615        fi
18616      else
18617        # Otherwise we believe it is a complete path. Use it as it is.
18618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18619$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18621$as_echo_n "checking for HG... " >&6; }
18622        if test ! -x "$tool_specified"; then
18623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18624$as_echo "not found" >&6; }
18625          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18626        fi
18627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18628$as_echo "$tool_specified" >&6; }
18629      fi
18630    fi
18631  fi
18632
18633
18634
18635
18636  # Publish this variable in the help.
18637
18638
18639  if test "x$STAT" = x; then
18640    # The variable is not set by user, try to locate tool using the code snippet
18641    for ac_prog in stat
18642do
18643  # Extract the first word of "$ac_prog", so it can be a program name with args.
18644set dummy $ac_prog; ac_word=$2
18645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18646$as_echo_n "checking for $ac_word... " >&6; }
18647if ${ac_cv_path_STAT+:} false; then :
18648  $as_echo_n "(cached) " >&6
18649else
18650  case $STAT in
18651  [\\/]* | ?:[\\/]*)
18652  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18653  ;;
18654  *)
18655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18656for as_dir in $PATH
18657do
18658  IFS=$as_save_IFS
18659  test -z "$as_dir" && as_dir=.
18660    for ac_exec_ext in '' $ac_executable_extensions; do
18661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18662    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18664    break 2
18665  fi
18666done
18667  done
18668IFS=$as_save_IFS
18669
18670  ;;
18671esac
18672fi
18673STAT=$ac_cv_path_STAT
18674if test -n "$STAT"; then
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18676$as_echo "$STAT" >&6; }
18677else
18678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18679$as_echo "no" >&6; }
18680fi
18681
18682
18683  test -n "$STAT" && break
18684done
18685
18686  else
18687    # The variable is set, but is it from the command line or the environment?
18688
18689    # Try to remove the string !STAT! from our list.
18690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18692      # If it failed, the variable was not from the command line. Ignore it,
18693      # but warn the user (except for BASH, which is always set by the calling BASH).
18694      if test "xSTAT" != xBASH; then
18695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18696$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18697      fi
18698      # Try to locate tool using the code snippet
18699      for ac_prog in stat
18700do
18701  # Extract the first word of "$ac_prog", so it can be a program name with args.
18702set dummy $ac_prog; ac_word=$2
18703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18704$as_echo_n "checking for $ac_word... " >&6; }
18705if ${ac_cv_path_STAT+:} false; then :
18706  $as_echo_n "(cached) " >&6
18707else
18708  case $STAT in
18709  [\\/]* | ?:[\\/]*)
18710  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18711  ;;
18712  *)
18713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18714for as_dir in $PATH
18715do
18716  IFS=$as_save_IFS
18717  test -z "$as_dir" && as_dir=.
18718    for ac_exec_ext in '' $ac_executable_extensions; do
18719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18720    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18722    break 2
18723  fi
18724done
18725  done
18726IFS=$as_save_IFS
18727
18728  ;;
18729esac
18730fi
18731STAT=$ac_cv_path_STAT
18732if test -n "$STAT"; then
18733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18734$as_echo "$STAT" >&6; }
18735else
18736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18737$as_echo "no" >&6; }
18738fi
18739
18740
18741  test -n "$STAT" && break
18742done
18743
18744    else
18745      # If it succeeded, then it was overridden by the user. We will use it
18746      # for the tool.
18747
18748      # First remove it from the list of overridden variables, so we can test
18749      # for unknown variables in the end.
18750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18751
18752      # Check if the provided tool contains a complete path.
18753      tool_specified="$STAT"
18754      tool_basename="${tool_specified##*/}"
18755      if test "x$tool_basename" = "x$tool_specified"; then
18756        # A command without a complete path is provided, search $PATH.
18757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18758$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18759        # Extract the first word of "$tool_basename", so it can be a program name with args.
18760set dummy $tool_basename; ac_word=$2
18761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18762$as_echo_n "checking for $ac_word... " >&6; }
18763if ${ac_cv_path_STAT+:} false; then :
18764  $as_echo_n "(cached) " >&6
18765else
18766  case $STAT in
18767  [\\/]* | ?:[\\/]*)
18768  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18769  ;;
18770  *)
18771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18772for as_dir in $PATH
18773do
18774  IFS=$as_save_IFS
18775  test -z "$as_dir" && as_dir=.
18776    for ac_exec_ext in '' $ac_executable_extensions; do
18777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18778    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18780    break 2
18781  fi
18782done
18783  done
18784IFS=$as_save_IFS
18785
18786  ;;
18787esac
18788fi
18789STAT=$ac_cv_path_STAT
18790if test -n "$STAT"; then
18791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18792$as_echo "$STAT" >&6; }
18793else
18794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18795$as_echo "no" >&6; }
18796fi
18797
18798
18799        if test "x$STAT" = x; then
18800          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18801        fi
18802      else
18803        # Otherwise we believe it is a complete path. Use it as it is.
18804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18805$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18807$as_echo_n "checking for STAT... " >&6; }
18808        if test ! -x "$tool_specified"; then
18809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18810$as_echo "not found" >&6; }
18811          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18812        fi
18813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18814$as_echo "$tool_specified" >&6; }
18815      fi
18816    fi
18817  fi
18818
18819
18820
18821
18822  # Publish this variable in the help.
18823
18824
18825  if test "x$TIME" = x; then
18826    # The variable is not set by user, try to locate tool using the code snippet
18827    for ac_prog in time
18828do
18829  # Extract the first word of "$ac_prog", so it can be a program name with args.
18830set dummy $ac_prog; ac_word=$2
18831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18832$as_echo_n "checking for $ac_word... " >&6; }
18833if ${ac_cv_path_TIME+:} false; then :
18834  $as_echo_n "(cached) " >&6
18835else
18836  case $TIME in
18837  [\\/]* | ?:[\\/]*)
18838  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18839  ;;
18840  *)
18841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18842for as_dir in $PATH
18843do
18844  IFS=$as_save_IFS
18845  test -z "$as_dir" && as_dir=.
18846    for ac_exec_ext in '' $ac_executable_extensions; do
18847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18848    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18850    break 2
18851  fi
18852done
18853  done
18854IFS=$as_save_IFS
18855
18856  ;;
18857esac
18858fi
18859TIME=$ac_cv_path_TIME
18860if test -n "$TIME"; then
18861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18862$as_echo "$TIME" >&6; }
18863else
18864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18865$as_echo "no" >&6; }
18866fi
18867
18868
18869  test -n "$TIME" && break
18870done
18871
18872  else
18873    # The variable is set, but is it from the command line or the environment?
18874
18875    # Try to remove the string !TIME! from our list.
18876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18878      # If it failed, the variable was not from the command line. Ignore it,
18879      # but warn the user (except for BASH, which is always set by the calling BASH).
18880      if test "xTIME" != xBASH; then
18881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18882$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18883      fi
18884      # Try to locate tool using the code snippet
18885      for ac_prog in time
18886do
18887  # Extract the first word of "$ac_prog", so it can be a program name with args.
18888set dummy $ac_prog; ac_word=$2
18889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18890$as_echo_n "checking for $ac_word... " >&6; }
18891if ${ac_cv_path_TIME+:} false; then :
18892  $as_echo_n "(cached) " >&6
18893else
18894  case $TIME in
18895  [\\/]* | ?:[\\/]*)
18896  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18897  ;;
18898  *)
18899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18900for as_dir in $PATH
18901do
18902  IFS=$as_save_IFS
18903  test -z "$as_dir" && as_dir=.
18904    for ac_exec_ext in '' $ac_executable_extensions; do
18905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18906    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18908    break 2
18909  fi
18910done
18911  done
18912IFS=$as_save_IFS
18913
18914  ;;
18915esac
18916fi
18917TIME=$ac_cv_path_TIME
18918if test -n "$TIME"; then
18919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18920$as_echo "$TIME" >&6; }
18921else
18922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18923$as_echo "no" >&6; }
18924fi
18925
18926
18927  test -n "$TIME" && break
18928done
18929
18930    else
18931      # If it succeeded, then it was overridden by the user. We will use it
18932      # for the tool.
18933
18934      # First remove it from the list of overridden variables, so we can test
18935      # for unknown variables in the end.
18936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18937
18938      # Check if the provided tool contains a complete path.
18939      tool_specified="$TIME"
18940      tool_basename="${tool_specified##*/}"
18941      if test "x$tool_basename" = "x$tool_specified"; then
18942        # A command without a complete path is provided, search $PATH.
18943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18944$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18945        # Extract the first word of "$tool_basename", so it can be a program name with args.
18946set dummy $tool_basename; ac_word=$2
18947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18948$as_echo_n "checking for $ac_word... " >&6; }
18949if ${ac_cv_path_TIME+:} false; then :
18950  $as_echo_n "(cached) " >&6
18951else
18952  case $TIME in
18953  [\\/]* | ?:[\\/]*)
18954  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18955  ;;
18956  *)
18957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18958for as_dir in $PATH
18959do
18960  IFS=$as_save_IFS
18961  test -z "$as_dir" && as_dir=.
18962    for ac_exec_ext in '' $ac_executable_extensions; do
18963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18964    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18966    break 2
18967  fi
18968done
18969  done
18970IFS=$as_save_IFS
18971
18972  ;;
18973esac
18974fi
18975TIME=$ac_cv_path_TIME
18976if test -n "$TIME"; then
18977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18978$as_echo "$TIME" >&6; }
18979else
18980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18981$as_echo "no" >&6; }
18982fi
18983
18984
18985        if test "x$TIME" = x; then
18986          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18987        fi
18988      else
18989        # Otherwise we believe it is a complete path. Use it as it is.
18990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18991$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18993$as_echo_n "checking for TIME... " >&6; }
18994        if test ! -x "$tool_specified"; then
18995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18996$as_echo "not found" >&6; }
18997          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18998        fi
18999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19000$as_echo "$tool_specified" >&6; }
19001      fi
19002    fi
19003  fi
19004
19005
19006  # Check if it's GNU time
19007  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19008  if test "x$IS_GNU_TIME" != x; then
19009    IS_GNU_TIME=yes
19010  else
19011    IS_GNU_TIME=no
19012  fi
19013
19014
19015  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19016
19017
19018
19019  # Publish this variable in the help.
19020
19021
19022  if test "x$DSYMUTIL" = x; then
19023    # The variable is not set by user, try to locate tool using the code snippet
19024    for ac_prog in dsymutil
19025do
19026  # Extract the first word of "$ac_prog", so it can be a program name with args.
19027set dummy $ac_prog; ac_word=$2
19028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19029$as_echo_n "checking for $ac_word... " >&6; }
19030if ${ac_cv_path_DSYMUTIL+:} false; then :
19031  $as_echo_n "(cached) " >&6
19032else
19033  case $DSYMUTIL in
19034  [\\/]* | ?:[\\/]*)
19035  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19036  ;;
19037  *)
19038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19039for as_dir in $PATH
19040do
19041  IFS=$as_save_IFS
19042  test -z "$as_dir" && as_dir=.
19043    for ac_exec_ext in '' $ac_executable_extensions; do
19044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19045    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19047    break 2
19048  fi
19049done
19050  done
19051IFS=$as_save_IFS
19052
19053  ;;
19054esac
19055fi
19056DSYMUTIL=$ac_cv_path_DSYMUTIL
19057if test -n "$DSYMUTIL"; then
19058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19059$as_echo "$DSYMUTIL" >&6; }
19060else
19061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19062$as_echo "no" >&6; }
19063fi
19064
19065
19066  test -n "$DSYMUTIL" && break
19067done
19068
19069  else
19070    # The variable is set, but is it from the command line or the environment?
19071
19072    # Try to remove the string !DSYMUTIL! from our list.
19073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19075      # If it failed, the variable was not from the command line. Ignore it,
19076      # but warn the user (except for BASH, which is always set by the calling BASH).
19077      if test "xDSYMUTIL" != xBASH; then
19078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19079$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19080      fi
19081      # Try to locate tool using the code snippet
19082      for ac_prog in dsymutil
19083do
19084  # Extract the first word of "$ac_prog", so it can be a program name with args.
19085set dummy $ac_prog; ac_word=$2
19086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19087$as_echo_n "checking for $ac_word... " >&6; }
19088if ${ac_cv_path_DSYMUTIL+:} false; then :
19089  $as_echo_n "(cached) " >&6
19090else
19091  case $DSYMUTIL in
19092  [\\/]* | ?:[\\/]*)
19093  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19094  ;;
19095  *)
19096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19097for as_dir in $PATH
19098do
19099  IFS=$as_save_IFS
19100  test -z "$as_dir" && as_dir=.
19101    for ac_exec_ext in '' $ac_executable_extensions; do
19102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19103    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19105    break 2
19106  fi
19107done
19108  done
19109IFS=$as_save_IFS
19110
19111  ;;
19112esac
19113fi
19114DSYMUTIL=$ac_cv_path_DSYMUTIL
19115if test -n "$DSYMUTIL"; then
19116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19117$as_echo "$DSYMUTIL" >&6; }
19118else
19119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19120$as_echo "no" >&6; }
19121fi
19122
19123
19124  test -n "$DSYMUTIL" && break
19125done
19126
19127    else
19128      # If it succeeded, then it was overridden by the user. We will use it
19129      # for the tool.
19130
19131      # First remove it from the list of overridden variables, so we can test
19132      # for unknown variables in the end.
19133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19134
19135      # Check if the provided tool contains a complete path.
19136      tool_specified="$DSYMUTIL"
19137      tool_basename="${tool_specified##*/}"
19138      if test "x$tool_basename" = "x$tool_specified"; then
19139        # A command without a complete path is provided, search $PATH.
19140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19141$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19142        # Extract the first word of "$tool_basename", so it can be a program name with args.
19143set dummy $tool_basename; ac_word=$2
19144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19145$as_echo_n "checking for $ac_word... " >&6; }
19146if ${ac_cv_path_DSYMUTIL+:} false; then :
19147  $as_echo_n "(cached) " >&6
19148else
19149  case $DSYMUTIL in
19150  [\\/]* | ?:[\\/]*)
19151  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19152  ;;
19153  *)
19154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19155for as_dir in $PATH
19156do
19157  IFS=$as_save_IFS
19158  test -z "$as_dir" && as_dir=.
19159    for ac_exec_ext in '' $ac_executable_extensions; do
19160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19161    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19163    break 2
19164  fi
19165done
19166  done
19167IFS=$as_save_IFS
19168
19169  ;;
19170esac
19171fi
19172DSYMUTIL=$ac_cv_path_DSYMUTIL
19173if test -n "$DSYMUTIL"; then
19174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19175$as_echo "$DSYMUTIL" >&6; }
19176else
19177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19178$as_echo "no" >&6; }
19179fi
19180
19181
19182        if test "x$DSYMUTIL" = x; then
19183          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19184        fi
19185      else
19186        # Otherwise we believe it is a complete path. Use it as it is.
19187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19188$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19190$as_echo_n "checking for DSYMUTIL... " >&6; }
19191        if test ! -x "$tool_specified"; then
19192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19193$as_echo "not found" >&6; }
19194          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19195        fi
19196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19197$as_echo "$tool_specified" >&6; }
19198      fi
19199    fi
19200  fi
19201
19202
19203
19204  if test "x$DSYMUTIL" = x; then
19205    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19206  fi
19207
19208
19209
19210
19211
19212  # Publish this variable in the help.
19213
19214
19215  if test "x$XATTR" = x; then
19216    # The variable is not set by user, try to locate tool using the code snippet
19217    for ac_prog in xattr
19218do
19219  # Extract the first word of "$ac_prog", so it can be a program name with args.
19220set dummy $ac_prog; ac_word=$2
19221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19222$as_echo_n "checking for $ac_word... " >&6; }
19223if ${ac_cv_path_XATTR+:} false; then :
19224  $as_echo_n "(cached) " >&6
19225else
19226  case $XATTR in
19227  [\\/]* | ?:[\\/]*)
19228  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19229  ;;
19230  *)
19231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19232for as_dir in $PATH
19233do
19234  IFS=$as_save_IFS
19235  test -z "$as_dir" && as_dir=.
19236    for ac_exec_ext in '' $ac_executable_extensions; do
19237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19238    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19240    break 2
19241  fi
19242done
19243  done
19244IFS=$as_save_IFS
19245
19246  ;;
19247esac
19248fi
19249XATTR=$ac_cv_path_XATTR
19250if test -n "$XATTR"; then
19251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19252$as_echo "$XATTR" >&6; }
19253else
19254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19255$as_echo "no" >&6; }
19256fi
19257
19258
19259  test -n "$XATTR" && break
19260done
19261
19262  else
19263    # The variable is set, but is it from the command line or the environment?
19264
19265    # Try to remove the string !XATTR! from our list.
19266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19268      # If it failed, the variable was not from the command line. Ignore it,
19269      # but warn the user (except for BASH, which is always set by the calling BASH).
19270      if test "xXATTR" != xBASH; then
19271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19272$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19273      fi
19274      # Try to locate tool using the code snippet
19275      for ac_prog in xattr
19276do
19277  # Extract the first word of "$ac_prog", so it can be a program name with args.
19278set dummy $ac_prog; ac_word=$2
19279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19280$as_echo_n "checking for $ac_word... " >&6; }
19281if ${ac_cv_path_XATTR+:} false; then :
19282  $as_echo_n "(cached) " >&6
19283else
19284  case $XATTR in
19285  [\\/]* | ?:[\\/]*)
19286  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19287  ;;
19288  *)
19289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19290for as_dir in $PATH
19291do
19292  IFS=$as_save_IFS
19293  test -z "$as_dir" && as_dir=.
19294    for ac_exec_ext in '' $ac_executable_extensions; do
19295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19296    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19298    break 2
19299  fi
19300done
19301  done
19302IFS=$as_save_IFS
19303
19304  ;;
19305esac
19306fi
19307XATTR=$ac_cv_path_XATTR
19308if test -n "$XATTR"; then
19309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19310$as_echo "$XATTR" >&6; }
19311else
19312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19313$as_echo "no" >&6; }
19314fi
19315
19316
19317  test -n "$XATTR" && break
19318done
19319
19320    else
19321      # If it succeeded, then it was overridden by the user. We will use it
19322      # for the tool.
19323
19324      # First remove it from the list of overridden variables, so we can test
19325      # for unknown variables in the end.
19326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19327
19328      # Check if the provided tool contains a complete path.
19329      tool_specified="$XATTR"
19330      tool_basename="${tool_specified##*/}"
19331      if test "x$tool_basename" = "x$tool_specified"; then
19332        # A command without a complete path is provided, search $PATH.
19333        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19334$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19335        # Extract the first word of "$tool_basename", so it can be a program name with args.
19336set dummy $tool_basename; ac_word=$2
19337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19338$as_echo_n "checking for $ac_word... " >&6; }
19339if ${ac_cv_path_XATTR+:} false; then :
19340  $as_echo_n "(cached) " >&6
19341else
19342  case $XATTR in
19343  [\\/]* | ?:[\\/]*)
19344  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19345  ;;
19346  *)
19347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19348for as_dir in $PATH
19349do
19350  IFS=$as_save_IFS
19351  test -z "$as_dir" && as_dir=.
19352    for ac_exec_ext in '' $ac_executable_extensions; do
19353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19354    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19356    break 2
19357  fi
19358done
19359  done
19360IFS=$as_save_IFS
19361
19362  ;;
19363esac
19364fi
19365XATTR=$ac_cv_path_XATTR
19366if test -n "$XATTR"; then
19367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19368$as_echo "$XATTR" >&6; }
19369else
19370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19371$as_echo "no" >&6; }
19372fi
19373
19374
19375        if test "x$XATTR" = x; then
19376          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19377        fi
19378      else
19379        # Otherwise we believe it is a complete path. Use it as it is.
19380        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19381$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19383$as_echo_n "checking for XATTR... " >&6; }
19384        if test ! -x "$tool_specified"; then
19385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19386$as_echo "not found" >&6; }
19387          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19388        fi
19389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19390$as_echo "$tool_specified" >&6; }
19391      fi
19392    fi
19393  fi
19394
19395
19396
19397  if test "x$XATTR" = x; then
19398    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19399  fi
19400
19401
19402
19403
19404  # Publish this variable in the help.
19405
19406
19407  if test "x$CODESIGN" = x; then
19408    # The variable is not set by user, try to locate tool using the code snippet
19409    for ac_prog in codesign
19410do
19411  # Extract the first word of "$ac_prog", so it can be a program name with args.
19412set dummy $ac_prog; ac_word=$2
19413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19414$as_echo_n "checking for $ac_word... " >&6; }
19415if ${ac_cv_path_CODESIGN+:} false; then :
19416  $as_echo_n "(cached) " >&6
19417else
19418  case $CODESIGN in
19419  [\\/]* | ?:[\\/]*)
19420  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19421  ;;
19422  *)
19423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19424for as_dir in $PATH
19425do
19426  IFS=$as_save_IFS
19427  test -z "$as_dir" && as_dir=.
19428    for ac_exec_ext in '' $ac_executable_extensions; do
19429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19430    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19432    break 2
19433  fi
19434done
19435  done
19436IFS=$as_save_IFS
19437
19438  ;;
19439esac
19440fi
19441CODESIGN=$ac_cv_path_CODESIGN
19442if test -n "$CODESIGN"; then
19443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19444$as_echo "$CODESIGN" >&6; }
19445else
19446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19447$as_echo "no" >&6; }
19448fi
19449
19450
19451  test -n "$CODESIGN" && break
19452done
19453
19454  else
19455    # The variable is set, but is it from the command line or the environment?
19456
19457    # Try to remove the string !CODESIGN! from our list.
19458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19460      # If it failed, the variable was not from the command line. Ignore it,
19461      # but warn the user (except for BASH, which is always set by the calling BASH).
19462      if test "xCODESIGN" != xBASH; then
19463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19464$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19465      fi
19466      # Try to locate tool using the code snippet
19467      for ac_prog in codesign
19468do
19469  # Extract the first word of "$ac_prog", so it can be a program name with args.
19470set dummy $ac_prog; ac_word=$2
19471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19472$as_echo_n "checking for $ac_word... " >&6; }
19473if ${ac_cv_path_CODESIGN+:} false; then :
19474  $as_echo_n "(cached) " >&6
19475else
19476  case $CODESIGN in
19477  [\\/]* | ?:[\\/]*)
19478  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19479  ;;
19480  *)
19481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19482for as_dir in $PATH
19483do
19484  IFS=$as_save_IFS
19485  test -z "$as_dir" && as_dir=.
19486    for ac_exec_ext in '' $ac_executable_extensions; do
19487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19488    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19490    break 2
19491  fi
19492done
19493  done
19494IFS=$as_save_IFS
19495
19496  ;;
19497esac
19498fi
19499CODESIGN=$ac_cv_path_CODESIGN
19500if test -n "$CODESIGN"; then
19501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19502$as_echo "$CODESIGN" >&6; }
19503else
19504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19505$as_echo "no" >&6; }
19506fi
19507
19508
19509  test -n "$CODESIGN" && break
19510done
19511
19512    else
19513      # If it succeeded, then it was overridden by the user. We will use it
19514      # for the tool.
19515
19516      # First remove it from the list of overridden variables, so we can test
19517      # for unknown variables in the end.
19518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19519
19520      # Check if the provided tool contains a complete path.
19521      tool_specified="$CODESIGN"
19522      tool_basename="${tool_specified##*/}"
19523      if test "x$tool_basename" = "x$tool_specified"; then
19524        # A command without a complete path is provided, search $PATH.
19525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19526$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19527        # Extract the first word of "$tool_basename", so it can be a program name with args.
19528set dummy $tool_basename; ac_word=$2
19529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19530$as_echo_n "checking for $ac_word... " >&6; }
19531if ${ac_cv_path_CODESIGN+:} false; then :
19532  $as_echo_n "(cached) " >&6
19533else
19534  case $CODESIGN in
19535  [\\/]* | ?:[\\/]*)
19536  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19537  ;;
19538  *)
19539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19540for as_dir in $PATH
19541do
19542  IFS=$as_save_IFS
19543  test -z "$as_dir" && as_dir=.
19544    for ac_exec_ext in '' $ac_executable_extensions; do
19545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19546    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19548    break 2
19549  fi
19550done
19551  done
19552IFS=$as_save_IFS
19553
19554  ;;
19555esac
19556fi
19557CODESIGN=$ac_cv_path_CODESIGN
19558if test -n "$CODESIGN"; then
19559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19560$as_echo "$CODESIGN" >&6; }
19561else
19562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19563$as_echo "no" >&6; }
19564fi
19565
19566
19567        if test "x$CODESIGN" = x; then
19568          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19569        fi
19570      else
19571        # Otherwise we believe it is a complete path. Use it as it is.
19572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19573$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19575$as_echo_n "checking for CODESIGN... " >&6; }
19576        if test ! -x "$tool_specified"; then
19577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19578$as_echo "not found" >&6; }
19579          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19580        fi
19581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19582$as_echo "$tool_specified" >&6; }
19583      fi
19584    fi
19585  fi
19586
19587
19588    if test "x$CODESIGN" != "x"; then
19589      # Verify that the openjdk_codesign certificate is present
19590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19591$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19592      rm -f codesign-testfile
19593      touch codesign-testfile
19594      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19595      rm -f codesign-testfile
19596      if test "x$CODESIGN" = x; then
19597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19598$as_echo "no" >&6; }
19599      else
19600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19601$as_echo "yes" >&6; }
19602      fi
19603    fi
19604  fi
19605
19606
19607  # Test if bash supports pipefail.
19608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19609$as_echo_n "checking if bash supports pipefail... " >&6; }
19610  if ${BASH} -c 'set -o pipefail'; then
19611    BASH_ARGS="$BASH_ARGS -o pipefail"
19612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19613$as_echo "yes" >&6; }
19614  else
19615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19616$as_echo "no" >&6; }
19617  fi
19618
19619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19620$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19621  if ${BASH} -e -c 'true'; then
19622    BASH_ARGS="$BASH_ARGS -e"
19623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19624$as_echo "yes" >&6; }
19625  else
19626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19627$as_echo "no" >&6; }
19628  fi
19629
19630
19631
19632
19633# Check if pkg-config is available.
19634
19635
19636if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19637	if test -n "$ac_tool_prefix"; then
19638  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19639set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19641$as_echo_n "checking for $ac_word... " >&6; }
19642if ${ac_cv_path_PKG_CONFIG+:} false; then :
19643  $as_echo_n "(cached) " >&6
19644else
19645  case $PKG_CONFIG in
19646  [\\/]* | ?:[\\/]*)
19647  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19648  ;;
19649  *)
19650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19651for as_dir in $PATH
19652do
19653  IFS=$as_save_IFS
19654  test -z "$as_dir" && as_dir=.
19655    for ac_exec_ext in '' $ac_executable_extensions; do
19656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19657    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19659    break 2
19660  fi
19661done
19662  done
19663IFS=$as_save_IFS
19664
19665  ;;
19666esac
19667fi
19668PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19669if test -n "$PKG_CONFIG"; then
19670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19671$as_echo "$PKG_CONFIG" >&6; }
19672else
19673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19674$as_echo "no" >&6; }
19675fi
19676
19677
19678fi
19679if test -z "$ac_cv_path_PKG_CONFIG"; then
19680  ac_pt_PKG_CONFIG=$PKG_CONFIG
19681  # Extract the first word of "pkg-config", so it can be a program name with args.
19682set dummy pkg-config; ac_word=$2
19683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19684$as_echo_n "checking for $ac_word... " >&6; }
19685if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19686  $as_echo_n "(cached) " >&6
19687else
19688  case $ac_pt_PKG_CONFIG in
19689  [\\/]* | ?:[\\/]*)
19690  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19691  ;;
19692  *)
19693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19694for as_dir in $PATH
19695do
19696  IFS=$as_save_IFS
19697  test -z "$as_dir" && as_dir=.
19698    for ac_exec_ext in '' $ac_executable_extensions; do
19699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19700    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19702    break 2
19703  fi
19704done
19705  done
19706IFS=$as_save_IFS
19707
19708  ;;
19709esac
19710fi
19711ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19712if test -n "$ac_pt_PKG_CONFIG"; then
19713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19714$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19715else
19716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19717$as_echo "no" >&6; }
19718fi
19719
19720  if test "x$ac_pt_PKG_CONFIG" = x; then
19721    PKG_CONFIG=""
19722  else
19723    case $cross_compiling:$ac_tool_warned in
19724yes:)
19725{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19726$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19727ac_tool_warned=yes ;;
19728esac
19729    PKG_CONFIG=$ac_pt_PKG_CONFIG
19730  fi
19731else
19732  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19733fi
19734
19735fi
19736if test -n "$PKG_CONFIG"; then
19737	_pkg_min_version=0.9.0
19738	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19739$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19740	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19741		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19742$as_echo "yes" >&6; }
19743	else
19744		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19745$as_echo "no" >&6; }
19746		PKG_CONFIG=""
19747	fi
19748
19749fi
19750
19751# After basic tools have been setup, we can check build os specific details.
19752
19753  ###############################################################################
19754
19755  # Note that this is the build platform OS version!
19756
19757  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19758  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19759  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19760  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19761
19762
19763
19764
19765
19766# Setup builddeps, for automatic downloading of tools we need.
19767# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19768# boot-jdk setup, but we need to have basic tools setup first.
19769
19770
19771# Check whether --with-builddeps-conf was given.
19772if test "${with_builddeps_conf+set}" = set; then :
19773  withval=$with_builddeps_conf;
19774fi
19775
19776
19777
19778# Check whether --with-builddeps-server was given.
19779if test "${with_builddeps_server+set}" = set; then :
19780  withval=$with_builddeps_server;
19781fi
19782
19783
19784
19785# Check whether --with-builddeps-dir was given.
19786if test "${with_builddeps_dir+set}" = set; then :
19787  withval=$with_builddeps_dir;
19788else
19789  with_builddeps_dir=/localhome/builddeps
19790fi
19791
19792
19793
19794# Check whether --with-builddeps-group was given.
19795if test "${with_builddeps_group+set}" = set; then :
19796  withval=$with_builddeps_group;
19797fi
19798
19799
19800
19801
19802  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19803    if test "x$with_builddeps_conf" != x; then
19804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19805$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19806      builddepsfile=$with_builddeps_conf
19807      if test -s $builddepsfile; then
19808        . $builddepsfile
19809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19810$as_echo "loaded!" >&6; }
19811      else
19812        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19813      fi
19814    else
19815      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19816$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19817      builddepsfile=`mktemp`
19818      touch $builddepsfile
19819      # Put all found confs into a single file.
19820      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19821      # Source the file to acquire the variables
19822      if test -s $builddepsfile; then
19823        . $builddepsfile
19824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19825$as_echo "found at least one!" >&6; }
19826      else
19827        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19828      fi
19829    fi
19830    # Create build and target names that use _ instead of "-" and ".".
19831    # This is necessary to use them in variable names.
19832    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19833    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19834    # Extract rewrite information for build and target
19835    eval rewritten_build=\${REWRITE_${build_var}}
19836    if test "x$rewritten_build" = x; then
19837      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19838      echo Build stays the same $rewritten_build
19839    else
19840      echo Rewriting build for builddeps into $rewritten_build
19841    fi
19842    eval rewritten_target=\${REWRITE_${target_var}}
19843    if test "x$rewritten_target" = x; then
19844      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19845      echo Target stays the same $rewritten_target
19846    else
19847      echo Rewriting target for builddeps into $rewritten_target
19848    fi
19849    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19850    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19851  fi
19852  for ac_prog in 7z unzip
19853do
19854  # Extract the first word of "$ac_prog", so it can be a program name with args.
19855set dummy $ac_prog; ac_word=$2
19856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19857$as_echo_n "checking for $ac_word... " >&6; }
19858if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19859  $as_echo_n "(cached) " >&6
19860else
19861  if test -n "$BDEPS_UNZIP"; then
19862  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19863else
19864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19865for as_dir in $PATH
19866do
19867  IFS=$as_save_IFS
19868  test -z "$as_dir" && as_dir=.
19869    for ac_exec_ext in '' $ac_executable_extensions; do
19870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19871    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19873    break 2
19874  fi
19875done
19876  done
19877IFS=$as_save_IFS
19878
19879fi
19880fi
19881BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19882if test -n "$BDEPS_UNZIP"; then
19883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19884$as_echo "$BDEPS_UNZIP" >&6; }
19885else
19886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19887$as_echo "no" >&6; }
19888fi
19889
19890
19891  test -n "$BDEPS_UNZIP" && break
19892done
19893
19894  if test "x$BDEPS_UNZIP" = x7z; then
19895    BDEPS_UNZIP="7z x"
19896  fi
19897
19898  for ac_prog in wget lftp ftp
19899do
19900  # Extract the first word of "$ac_prog", so it can be a program name with args.
19901set dummy $ac_prog; ac_word=$2
19902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19903$as_echo_n "checking for $ac_word... " >&6; }
19904if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19905  $as_echo_n "(cached) " >&6
19906else
19907  if test -n "$BDEPS_FTP"; then
19908  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19909else
19910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19911for as_dir in $PATH
19912do
19913  IFS=$as_save_IFS
19914  test -z "$as_dir" && as_dir=.
19915    for ac_exec_ext in '' $ac_executable_extensions; do
19916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19917    ac_cv_prog_BDEPS_FTP="$ac_prog"
19918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19919    break 2
19920  fi
19921done
19922  done
19923IFS=$as_save_IFS
19924
19925fi
19926fi
19927BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19928if test -n "$BDEPS_FTP"; then
19929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19930$as_echo "$BDEPS_FTP" >&6; }
19931else
19932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19933$as_echo "no" >&6; }
19934fi
19935
19936
19937  test -n "$BDEPS_FTP" && break
19938done
19939
19940
19941
19942###############################################################################
19943#
19944# Determine OpenJDK variants, options and version numbers.
19945#
19946###############################################################################
19947
19948# We need build & target for this.
19949
19950
19951  ###############################################################################
19952  #
19953  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19954  # We always build headless support.
19955  #
19956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19957$as_echo_n "checking headful support... " >&6; }
19958  # Check whether --enable-headful was given.
19959if test "${enable_headful+set}" = set; then :
19960  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19961else
19962  SUPPORT_HEADFUL=yes
19963fi
19964
19965
19966  SUPPORT_HEADLESS=yes
19967  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19968
19969  if test "x$SUPPORT_HEADFUL" = xyes; then
19970    # We are building both headful and headless.
19971    headful_msg="include support for both headful and headless"
19972  fi
19973
19974  if test "x$SUPPORT_HEADFUL" = xno; then
19975    # Thus we are building headless only.
19976    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19977    headful_msg="headless only"
19978  fi
19979
19980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19981$as_echo "$headful_msg" >&6; }
19982
19983
19984
19985
19986
19987  # Control wether Hotspot runs Queens test after build.
19988  # Check whether --enable-hotspot-test-in-build was given.
19989if test "${enable_hotspot_test_in_build+set}" = set; then :
19990  enableval=$enable_hotspot_test_in_build;
19991else
19992  enable_hotspot_test_in_build=no
19993fi
19994
19995  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19996    TEST_IN_BUILD=true
19997  else
19998    TEST_IN_BUILD=false
19999  fi
20000
20001
20002  ###############################################################################
20003  #
20004  # Choose cacerts source file
20005  #
20006
20007# Check whether --with-cacerts-file was given.
20008if test "${with_cacerts_file+set}" = set; then :
20009  withval=$with_cacerts_file;
20010fi
20011
20012  if test "x$with_cacerts_file" != x; then
20013    CACERTS_FILE=$with_cacerts_file
20014  fi
20015
20016
20017  ###############################################################################
20018  #
20019  # Enable or disable unlimited crypto
20020  #
20021  # Check whether --enable-unlimited-crypto was given.
20022if test "${enable_unlimited_crypto+set}" = set; then :
20023  enableval=$enable_unlimited_crypto;
20024else
20025  enable_unlimited_crypto=no
20026fi
20027
20028  if test "x$enable_unlimited_crypto" = "xyes"; then
20029    UNLIMITED_CRYPTO=true
20030  else
20031    UNLIMITED_CRYPTO=false
20032  fi
20033
20034
20035  ###############################################################################
20036  #
20037  # Enable or disable the elliptic curve crypto implementation
20038  #
20039
20040
20041  ###############################################################################
20042  #
20043  # --enable-rmiconnector-iiop
20044  #
20045  # Check whether --enable-rmiconnector-iiop was given.
20046if test "${enable_rmiconnector_iiop+set}" = set; then :
20047  enableval=$enable_rmiconnector_iiop;
20048fi
20049
20050  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20051    RMICONNECTOR_IIOP=true
20052  else
20053    RMICONNECTOR_IIOP=false
20054  fi
20055
20056
20057  ###############################################################################
20058  #
20059  # Compress jars
20060  #
20061  COMPRESS_JARS=false
20062
20063
20064
20065
20066  # Source the version numbers
20067  . $AUTOCONF_DIR/version-numbers
20068
20069  # Get the settings from parameters
20070
20071# Check whether --with-milestone was given.
20072if test "${with_milestone+set}" = set; then :
20073  withval=$with_milestone;
20074fi
20075
20076  if test "x$with_milestone" = xyes; then
20077    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20078  elif test "x$with_milestone" != x; then
20079    MILESTONE="$with_milestone"
20080  fi
20081  if test "x$MILESTONE" = x; then
20082    MILESTONE=internal
20083  fi
20084
20085
20086# Check whether --with-update-version was given.
20087if test "${with_update_version+set}" = set; then :
20088  withval=$with_update_version;
20089fi
20090
20091  if test "x$with_update_version" = xyes; then
20092    as_fn_error $? "Update version must have a value" "$LINENO" 5
20093  elif test "x$with_update_version" != x; then
20094    JDK_UPDATE_VERSION="$with_update_version"
20095    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20096    # to a bug in expr (which reduces it to just X). To work around this, we
20097    # always add a 0 to one digit update versions.
20098    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20099      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20100    fi
20101  fi
20102
20103
20104# Check whether --with-user-release-suffix was given.
20105if test "${with_user_release_suffix+set}" = set; then :
20106  withval=$with_user_release_suffix;
20107fi
20108
20109  if test "x$with_user_release_suffix" = xyes; then
20110    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20111  elif test "x$with_user_release_suffix" != x; then
20112    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20113  fi
20114
20115
20116# Check whether --with-build-number was given.
20117if test "${with_build_number+set}" = set; then :
20118  withval=$with_build_number;
20119fi
20120
20121  if test "x$with_build_number" = xyes; then
20122    as_fn_error $? "Build number must have a value" "$LINENO" 5
20123  elif test "x$with_build_number" != x; then
20124    JDK_BUILD_NUMBER="$with_build_number"
20125  fi
20126  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20127  if test "x$JDK_BUILD_NUMBER" = x; then
20128    JDK_BUILD_NUMBER=b00
20129    if test "x$USER_RELEASE_SUFFIX" = x; then
20130      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20131      # Avoid [:alnum:] since it depends on the locale.
20132      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20133      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20134    fi
20135  fi
20136
20137  # Now set the JDK version, milestone, build number etc.
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154# Check whether --with-copyright-year was given.
20155if test "${with_copyright_year+set}" = set; then :
20156  withval=$with_copyright_year;
20157fi
20158
20159  if test "x$with_copyright_year" = xyes; then
20160    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20161  elif test "x$with_copyright_year" != x; then
20162    COPYRIGHT_YEAR="$with_copyright_year"
20163  else
20164    COPYRIGHT_YEAR=`date +'%Y'`
20165  fi
20166
20167
20168  if test "x$JDK_UPDATE_VERSION" != x; then
20169    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20170  else
20171    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20172  fi
20173
20174
20175  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20176
20177
20178
20179###############################################################################
20180#
20181# Setup BootJDK, used to bootstrap the build.
20182#
20183###############################################################################
20184
20185
20186  BOOT_JDK_FOUND=no
20187
20188# Check whether --with-boot-jdk was given.
20189if test "${with_boot_jdk+set}" = set; then :
20190  withval=$with_boot_jdk;
20191fi
20192
20193
20194  # We look for the Boot JDK through various means, going from more certain to
20195  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20196  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20197  # must check if this is indeed valid; otherwise we'll continue looking.
20198
20199  # Test: Is bootjdk explicitely set by command line arguments?
20200
20201  if test "x$BOOT_JDK_FOUND" = xno; then
20202    # Now execute the test
20203
20204  if test "x$with_boot_jdk" != x; then
20205    BOOT_JDK=$with_boot_jdk
20206    BOOT_JDK_FOUND=maybe
20207    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20208$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20209  fi
20210
20211
20212    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20213    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20214      # Do we have a bin/java?
20215      if test ! -x "$BOOT_JDK/bin/java"; then
20216        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20218        BOOT_JDK_FOUND=no
20219      else
20220        # Do we have a bin/javac?
20221        if test ! -x "$BOOT_JDK/bin/javac"; then
20222          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20224          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20225$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20226          BOOT_JDK_FOUND=no
20227        else
20228          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20229          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20230
20231          # Extra M4 quote needed to protect [] in grep expression.
20232          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20233          if test "x$FOUND_CORRECT_VERSION" = x; then
20234            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20236            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20237$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20238            BOOT_JDK_FOUND=no
20239          else
20240            # We're done! :-)
20241            BOOT_JDK_FOUND=yes
20242
20243  # Only process if variable expands to non-empty
20244
20245  if test "x$BOOT_JDK" != x; then
20246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20247
20248  # Input might be given as Windows format, start by converting to
20249  # unix format.
20250  path="$BOOT_JDK"
20251  new_path=`$CYGPATH -u "$path"`
20252
20253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20256  # "foo.exe" is OK but "foo" is an error.
20257  #
20258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20259  # It is also a way to make sure we got the proper file name for the real test later on.
20260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20261  if test "x$test_shortpath" = x; then
20262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20264    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20265  fi
20266
20267  # Call helper function which possibly converts this using DOS-style short mode.
20268  # If so, the updated path is stored in $new_path.
20269
20270  input_path="$new_path"
20271  # Check if we need to convert this using DOS-style short mode. If the path
20272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20273  # take no chances and rewrite it.
20274  # Note: m4 eats our [], so we need to use [ and ] instead.
20275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20276  if test "x$has_forbidden_chars" != x; then
20277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20281      # Going to short mode and back again did indeed matter. Since short mode is
20282      # case insensitive, let's make it lowercase to improve readability.
20283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20284      # Now convert it back to Unix-stile (cygpath)
20285      input_path=`$CYGPATH -u "$shortmode_path"`
20286      new_path="$input_path"
20287    fi
20288  fi
20289
20290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20291  if test "x$test_cygdrive_prefix" = x; then
20292    # As a simple fix, exclude /usr/bin since it's not a real path.
20293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20295      # a path prefixed by /cygdrive for fixpath to work.
20296      new_path="$CYGWIN_ROOT_PATH$input_path"
20297    fi
20298  fi
20299
20300
20301  if test "x$path" != "x$new_path"; then
20302    BOOT_JDK="$new_path"
20303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20305  fi
20306
20307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20308
20309  path="$BOOT_JDK"
20310  has_colon=`$ECHO $path | $GREP ^.:`
20311  new_path="$path"
20312  if test "x$has_colon" = x; then
20313    # Not in mixed or Windows style, start by that.
20314    new_path=`cmd //c echo $path`
20315  fi
20316
20317
20318  input_path="$new_path"
20319  # Check if we need to convert this using DOS-style short mode. If the path
20320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20321  # take no chances and rewrite it.
20322  # Note: m4 eats our [], so we need to use [ and ] instead.
20323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20324  if test "x$has_forbidden_chars" != x; then
20325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20327  fi
20328
20329
20330  windows_path="$new_path"
20331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20332    unix_path=`$CYGPATH -u "$windows_path"`
20333    new_path="$unix_path"
20334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20336    new_path="$unix_path"
20337  fi
20338
20339  if test "x$path" != "x$new_path"; then
20340    BOOT_JDK="$new_path"
20341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20343  fi
20344
20345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20347
20348    else
20349      # We're on a unix platform. Hooray! :)
20350      path="$BOOT_JDK"
20351      has_space=`$ECHO "$path" | $GREP " "`
20352      if test "x$has_space" != x; then
20353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20354$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20356      fi
20357
20358      # Use eval to expand a potential ~
20359      eval path="$path"
20360      if test ! -f "$path" && test ! -d "$path"; then
20361        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20362      fi
20363
20364      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20365    fi
20366  fi
20367
20368            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20369$as_echo_n "checking for Boot JDK... " >&6; }
20370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20371$as_echo "$BOOT_JDK" >&6; }
20372            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20373$as_echo_n "checking Boot JDK version... " >&6; }
20374            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20375            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20376$as_echo "$BOOT_JDK_VERSION" >&6; }
20377          fi # end check jdk version
20378        fi # end check javac
20379      fi # end check java
20380    fi # end check boot jdk found
20381  fi
20382
20383  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20384    # Having specified an argument which is incorrect will produce an instant failure;
20385    # we should not go on looking
20386    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20387  fi
20388
20389  # Test: Is bootjdk available from builddeps?
20390
20391  if test "x$BOOT_JDK_FOUND" = xno; then
20392    # Now execute the test
20393
20394
20395
20396  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20397    # Source the builddeps file again, to make sure it uses the latest variables!
20398    . $builddepsfile
20399    # Look for a target and build machine specific resource!
20400    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20401    if test "x$resource" = x; then
20402      # Ok, lets instead look for a target specific resource
20403      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20404    fi
20405    if test "x$resource" = x; then
20406      # Ok, lets instead look for a build specific resource
20407      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20408    fi
20409    if test "x$resource" = x; then
20410      # Ok, lets instead look for a generic resource
20411      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20412      resource=${builddep_bootjdk}
20413    fi
20414    if test "x$resource" != x; then
20415      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20416$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20417      # If the resource in the builddeps.conf file is an existing directory,
20418      # for example /java/linux/cups
20419      if test -d ${resource}; then
20420        depdir=${resource}
20421      else
20422
20423  # bootjdk is for example mymodule
20424  # $resource is for example libs/general/libmymod_1_2_3.zip
20425  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20426  # $with_builddeps_dir is for example /localhome/builddeps
20427  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20428  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20429  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20430  filename=`basename $resource`
20431  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20432  filebase=${filename%%.*}
20433  extension=${filename#*.}
20434  installdir=$with_builddeps_dir/$filebase
20435  if test ! -f $installdir/$filename.unpacked; then
20436    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20437$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20438    if test ! -d $installdir; then
20439      mkdir -p $installdir
20440    fi
20441    if test ! -d $installdir; then
20442      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20443    fi
20444    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20445    touch $tmpfile
20446    if test ! -f $tmpfile; then
20447      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20448    fi
20449
20450  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20451  # $tmpfile is the local file name for the downloaded file.
20452  VALID_TOOL=no
20453  if test "x$BDEPS_FTP" = xwget; then
20454    VALID_TOOL=yes
20455    wget -O $tmpfile $with_builddeps_server/$resource
20456  fi
20457  if test "x$BDEPS_FTP" = xlftp; then
20458    VALID_TOOL=yes
20459    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20460  fi
20461  if test "x$BDEPS_FTP" = xftp; then
20462    VALID_TOOL=yes
20463    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20464    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20465    FTPUSERPWD=${FTPSERVER%%@*}
20466    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20467      FTPUSER=${userpwd%%:*}
20468      FTPPWD=${userpwd#*@}
20469      FTPSERVER=${FTPSERVER#*@}
20470    else
20471      FTPUSER=ftp
20472      FTPPWD=ftp
20473    fi
20474    # the "pass" command does not work on some
20475    # ftp clients (read ftp.exe) but if it works,
20476    # passive mode is better!
20477    ( \
20478        echo "user $FTPUSER $FTPPWD"        ; \
20479        echo "pass"                         ; \
20480        echo "bin"                          ; \
20481        echo "get $FTPPATH $tmpfile"              ; \
20482    ) | ftp -in $FTPSERVER
20483  fi
20484  if test "x$VALID_TOOL" != xyes; then
20485    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20486  fi
20487
20488    mv $tmpfile $installdir/$filename
20489    if test ! -s $installdir/$filename; then
20490      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20491    fi
20492    case "$extension" in
20493      zip)  echo "Unzipping $installdir/$filename..."
20494        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20495        ;;
20496      tar.gz) echo "Untaring $installdir/$filename..."
20497        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20498        ;;
20499      tgz) echo "Untaring $installdir/$filename..."
20500        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20501        ;;
20502      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20503        ;;
20504    esac
20505  fi
20506  if test -f $installdir/$filename.unpacked; then
20507    depdir=$installdir
20508  fi
20509
20510      fi
20511      # Source the builddeps file again, because in the previous command, the depdir
20512      # was updated to point at the current build dependency install directory.
20513      . $builddepsfile
20514      # Now extract variables from the builddeps.conf files.
20515      theroot=${builddep_bootjdk_ROOT}
20516      thecflags=${builddep_bootjdk_CFLAGS}
20517      thelibs=${builddep_bootjdk_LIBS}
20518      if test "x$depdir" = x; then
20519        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20520      fi
20521      BOOT_JDK=$depdir
20522      if test "x$theroot" != x; then
20523        BOOT_JDK="$theroot"
20524      fi
20525      if test "x$thecflags" != x; then
20526        BOOT_JDK_CFLAGS="$thecflags"
20527      fi
20528      if test "x$thelibs" != x; then
20529        BOOT_JDK_LIBS="$thelibs"
20530      fi
20531      BOOT_JDK_FOUND=maybe
20532      else BOOT_JDK_FOUND=no
20533
20534    fi
20535    else BOOT_JDK_FOUND=no
20536
20537  fi
20538
20539
20540
20541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20543      # Do we have a bin/java?
20544      if test ! -x "$BOOT_JDK/bin/java"; then
20545        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20547        BOOT_JDK_FOUND=no
20548      else
20549        # Do we have a bin/javac?
20550        if test ! -x "$BOOT_JDK/bin/javac"; then
20551          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20553          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20555          BOOT_JDK_FOUND=no
20556        else
20557          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20558          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20559
20560          # Extra M4 quote needed to protect [] in grep expression.
20561          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20562          if test "x$FOUND_CORRECT_VERSION" = x; then
20563            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20565            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20566$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20567            BOOT_JDK_FOUND=no
20568          else
20569            # We're done! :-)
20570            BOOT_JDK_FOUND=yes
20571
20572  # Only process if variable expands to non-empty
20573
20574  if test "x$BOOT_JDK" != x; then
20575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20576
20577  # Input might be given as Windows format, start by converting to
20578  # unix format.
20579  path="$BOOT_JDK"
20580  new_path=`$CYGPATH -u "$path"`
20581
20582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20585  # "foo.exe" is OK but "foo" is an error.
20586  #
20587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20588  # It is also a way to make sure we got the proper file name for the real test later on.
20589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20590  if test "x$test_shortpath" = x; then
20591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20593    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20594  fi
20595
20596  # Call helper function which possibly converts this using DOS-style short mode.
20597  # If so, the updated path is stored in $new_path.
20598
20599  input_path="$new_path"
20600  # Check if we need to convert this using DOS-style short mode. If the path
20601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20602  # take no chances and rewrite it.
20603  # Note: m4 eats our [], so we need to use [ and ] instead.
20604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20605  if test "x$has_forbidden_chars" != x; then
20606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20610      # Going to short mode and back again did indeed matter. Since short mode is
20611      # case insensitive, let's make it lowercase to improve readability.
20612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20613      # Now convert it back to Unix-stile (cygpath)
20614      input_path=`$CYGPATH -u "$shortmode_path"`
20615      new_path="$input_path"
20616    fi
20617  fi
20618
20619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20620  if test "x$test_cygdrive_prefix" = x; then
20621    # As a simple fix, exclude /usr/bin since it's not a real path.
20622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20624      # a path prefixed by /cygdrive for fixpath to work.
20625      new_path="$CYGWIN_ROOT_PATH$input_path"
20626    fi
20627  fi
20628
20629
20630  if test "x$path" != "x$new_path"; then
20631    BOOT_JDK="$new_path"
20632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20634  fi
20635
20636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20637
20638  path="$BOOT_JDK"
20639  has_colon=`$ECHO $path | $GREP ^.:`
20640  new_path="$path"
20641  if test "x$has_colon" = x; then
20642    # Not in mixed or Windows style, start by that.
20643    new_path=`cmd //c echo $path`
20644  fi
20645
20646
20647  input_path="$new_path"
20648  # Check if we need to convert this using DOS-style short mode. If the path
20649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20650  # take no chances and rewrite it.
20651  # Note: m4 eats our [], so we need to use [ and ] instead.
20652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20653  if test "x$has_forbidden_chars" != x; then
20654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20656  fi
20657
20658
20659  windows_path="$new_path"
20660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20661    unix_path=`$CYGPATH -u "$windows_path"`
20662    new_path="$unix_path"
20663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20665    new_path="$unix_path"
20666  fi
20667
20668  if test "x$path" != "x$new_path"; then
20669    BOOT_JDK="$new_path"
20670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20672  fi
20673
20674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20676
20677    else
20678      # We're on a unix platform. Hooray! :)
20679      path="$BOOT_JDK"
20680      has_space=`$ECHO "$path" | $GREP " "`
20681      if test "x$has_space" != x; then
20682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20683$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20685      fi
20686
20687      # Use eval to expand a potential ~
20688      eval path="$path"
20689      if test ! -f "$path" && test ! -d "$path"; then
20690        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20691      fi
20692
20693      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20694    fi
20695  fi
20696
20697            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20698$as_echo_n "checking for Boot JDK... " >&6; }
20699            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20700$as_echo "$BOOT_JDK" >&6; }
20701            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20702$as_echo_n "checking Boot JDK version... " >&6; }
20703            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20704            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20705$as_echo "$BOOT_JDK_VERSION" >&6; }
20706          fi # end check jdk version
20707        fi # end check javac
20708      fi # end check java
20709    fi # end check boot jdk found
20710  fi
20711
20712
20713  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20714
20715  if test "x$BOOT_JDK_FOUND" = xno; then
20716    # Now execute the test
20717
20718  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20719    # First check at user selected default
20720
20721  if test "x$BOOT_JDK_FOUND" = xno; then
20722    # Now execute the test
20723
20724  if test -x /usr/libexec/java_home; then
20725    BOOT_JDK=`/usr/libexec/java_home `
20726    BOOT_JDK_FOUND=maybe
20727    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20728$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20729  fi
20730
20731
20732    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20733    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20734      # Do we have a bin/java?
20735      if test ! -x "$BOOT_JDK/bin/java"; then
20736        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20738        BOOT_JDK_FOUND=no
20739      else
20740        # Do we have a bin/javac?
20741        if test ! -x "$BOOT_JDK/bin/javac"; then
20742          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20744          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20745$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20746          BOOT_JDK_FOUND=no
20747        else
20748          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20749          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20750
20751          # Extra M4 quote needed to protect [] in grep expression.
20752          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20753          if test "x$FOUND_CORRECT_VERSION" = x; then
20754            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20756            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20757$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20758            BOOT_JDK_FOUND=no
20759          else
20760            # We're done! :-)
20761            BOOT_JDK_FOUND=yes
20762
20763  # Only process if variable expands to non-empty
20764
20765  if test "x$BOOT_JDK" != x; then
20766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20767
20768  # Input might be given as Windows format, start by converting to
20769  # unix format.
20770  path="$BOOT_JDK"
20771  new_path=`$CYGPATH -u "$path"`
20772
20773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20776  # "foo.exe" is OK but "foo" is an error.
20777  #
20778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20779  # It is also a way to make sure we got the proper file name for the real test later on.
20780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20781  if test "x$test_shortpath" = x; then
20782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20784    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20785  fi
20786
20787  # Call helper function which possibly converts this using DOS-style short mode.
20788  # If so, the updated path is stored in $new_path.
20789
20790  input_path="$new_path"
20791  # Check if we need to convert this using DOS-style short mode. If the path
20792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20793  # take no chances and rewrite it.
20794  # Note: m4 eats our [], so we need to use [ and ] instead.
20795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20796  if test "x$has_forbidden_chars" != x; then
20797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20801      # Going to short mode and back again did indeed matter. Since short mode is
20802      # case insensitive, let's make it lowercase to improve readability.
20803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20804      # Now convert it back to Unix-stile (cygpath)
20805      input_path=`$CYGPATH -u "$shortmode_path"`
20806      new_path="$input_path"
20807    fi
20808  fi
20809
20810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20811  if test "x$test_cygdrive_prefix" = x; then
20812    # As a simple fix, exclude /usr/bin since it's not a real path.
20813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20815      # a path prefixed by /cygdrive for fixpath to work.
20816      new_path="$CYGWIN_ROOT_PATH$input_path"
20817    fi
20818  fi
20819
20820
20821  if test "x$path" != "x$new_path"; then
20822    BOOT_JDK="$new_path"
20823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20825  fi
20826
20827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20828
20829  path="$BOOT_JDK"
20830  has_colon=`$ECHO $path | $GREP ^.:`
20831  new_path="$path"
20832  if test "x$has_colon" = x; then
20833    # Not in mixed or Windows style, start by that.
20834    new_path=`cmd //c echo $path`
20835  fi
20836
20837
20838  input_path="$new_path"
20839  # Check if we need to convert this using DOS-style short mode. If the path
20840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20841  # take no chances and rewrite it.
20842  # Note: m4 eats our [], so we need to use [ and ] instead.
20843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20844  if test "x$has_forbidden_chars" != x; then
20845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20847  fi
20848
20849
20850  windows_path="$new_path"
20851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20852    unix_path=`$CYGPATH -u "$windows_path"`
20853    new_path="$unix_path"
20854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20856    new_path="$unix_path"
20857  fi
20858
20859  if test "x$path" != "x$new_path"; then
20860    BOOT_JDK="$new_path"
20861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20862$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20863  fi
20864
20865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20867
20868    else
20869      # We're on a unix platform. Hooray! :)
20870      path="$BOOT_JDK"
20871      has_space=`$ECHO "$path" | $GREP " "`
20872      if test "x$has_space" != x; then
20873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20874$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20875        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20876      fi
20877
20878      # Use eval to expand a potential ~
20879      eval path="$path"
20880      if test ! -f "$path" && test ! -d "$path"; then
20881        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20882      fi
20883
20884      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20885    fi
20886  fi
20887
20888            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20889$as_echo_n "checking for Boot JDK... " >&6; }
20890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20891$as_echo "$BOOT_JDK" >&6; }
20892            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20893$as_echo_n "checking Boot JDK version... " >&6; }
20894            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20896$as_echo "$BOOT_JDK_VERSION" >&6; }
20897          fi # end check jdk version
20898        fi # end check javac
20899      fi # end check java
20900    fi # end check boot jdk found
20901  fi
20902
20903    # If that did not work out (e.g. too old), try explicit versions instead
20904
20905  if test "x$BOOT_JDK_FOUND" = xno; then
20906    # Now execute the test
20907
20908  if test -x /usr/libexec/java_home; then
20909    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20910    BOOT_JDK_FOUND=maybe
20911    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20912$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20913  fi
20914
20915
20916    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20917    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20918      # Do we have a bin/java?
20919      if test ! -x "$BOOT_JDK/bin/java"; then
20920        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20922        BOOT_JDK_FOUND=no
20923      else
20924        # Do we have a bin/javac?
20925        if test ! -x "$BOOT_JDK/bin/javac"; then
20926          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20928          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20929$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20930          BOOT_JDK_FOUND=no
20931        else
20932          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20933          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20934
20935          # Extra M4 quote needed to protect [] in grep expression.
20936          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20937          if test "x$FOUND_CORRECT_VERSION" = x; then
20938            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20940            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20941$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20942            BOOT_JDK_FOUND=no
20943          else
20944            # We're done! :-)
20945            BOOT_JDK_FOUND=yes
20946
20947  # Only process if variable expands to non-empty
20948
20949  if test "x$BOOT_JDK" != x; then
20950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20951
20952  # Input might be given as Windows format, start by converting to
20953  # unix format.
20954  path="$BOOT_JDK"
20955  new_path=`$CYGPATH -u "$path"`
20956
20957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20960  # "foo.exe" is OK but "foo" is an error.
20961  #
20962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20963  # It is also a way to make sure we got the proper file name for the real test later on.
20964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20965  if test "x$test_shortpath" = x; then
20966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20968    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20969  fi
20970
20971  # Call helper function which possibly converts this using DOS-style short mode.
20972  # If so, the updated path is stored in $new_path.
20973
20974  input_path="$new_path"
20975  # Check if we need to convert this using DOS-style short mode. If the path
20976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20977  # take no chances and rewrite it.
20978  # Note: m4 eats our [], so we need to use [ and ] instead.
20979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20980  if test "x$has_forbidden_chars" != x; then
20981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20985      # Going to short mode and back again did indeed matter. Since short mode is
20986      # case insensitive, let's make it lowercase to improve readability.
20987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20988      # Now convert it back to Unix-stile (cygpath)
20989      input_path=`$CYGPATH -u "$shortmode_path"`
20990      new_path="$input_path"
20991    fi
20992  fi
20993
20994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20995  if test "x$test_cygdrive_prefix" = x; then
20996    # As a simple fix, exclude /usr/bin since it's not a real path.
20997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20999      # a path prefixed by /cygdrive for fixpath to work.
21000      new_path="$CYGWIN_ROOT_PATH$input_path"
21001    fi
21002  fi
21003
21004
21005  if test "x$path" != "x$new_path"; then
21006    BOOT_JDK="$new_path"
21007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21008$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21009  fi
21010
21011    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21012
21013  path="$BOOT_JDK"
21014  has_colon=`$ECHO $path | $GREP ^.:`
21015  new_path="$path"
21016  if test "x$has_colon" = x; then
21017    # Not in mixed or Windows style, start by that.
21018    new_path=`cmd //c echo $path`
21019  fi
21020
21021
21022  input_path="$new_path"
21023  # Check if we need to convert this using DOS-style short mode. If the path
21024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21025  # take no chances and rewrite it.
21026  # Note: m4 eats our [], so we need to use [ and ] instead.
21027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21028  if test "x$has_forbidden_chars" != x; then
21029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21031  fi
21032
21033
21034  windows_path="$new_path"
21035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21036    unix_path=`$CYGPATH -u "$windows_path"`
21037    new_path="$unix_path"
21038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21040    new_path="$unix_path"
21041  fi
21042
21043  if test "x$path" != "x$new_path"; then
21044    BOOT_JDK="$new_path"
21045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21046$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21047  fi
21048
21049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21051
21052    else
21053      # We're on a unix platform. Hooray! :)
21054      path="$BOOT_JDK"
21055      has_space=`$ECHO "$path" | $GREP " "`
21056      if test "x$has_space" != x; then
21057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21059        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21060      fi
21061
21062      # Use eval to expand a potential ~
21063      eval path="$path"
21064      if test ! -f "$path" && test ! -d "$path"; then
21065        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21066      fi
21067
21068      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21069    fi
21070  fi
21071
21072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21073$as_echo_n "checking for Boot JDK... " >&6; }
21074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21075$as_echo "$BOOT_JDK" >&6; }
21076            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21077$as_echo_n "checking Boot JDK version... " >&6; }
21078            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21080$as_echo "$BOOT_JDK_VERSION" >&6; }
21081          fi # end check jdk version
21082        fi # end check javac
21083      fi # end check java
21084    fi # end check boot jdk found
21085  fi
21086
21087
21088  if test "x$BOOT_JDK_FOUND" = xno; then
21089    # Now execute the test
21090
21091  if test -x /usr/libexec/java_home; then
21092    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21093    BOOT_JDK_FOUND=maybe
21094    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21095$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21096  fi
21097
21098
21099    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21100    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21101      # Do we have a bin/java?
21102      if test ! -x "$BOOT_JDK/bin/java"; then
21103        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21105        BOOT_JDK_FOUND=no
21106      else
21107        # Do we have a bin/javac?
21108        if test ! -x "$BOOT_JDK/bin/javac"; then
21109          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21111          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21112$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21113          BOOT_JDK_FOUND=no
21114        else
21115          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21116          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21117
21118          # Extra M4 quote needed to protect [] in grep expression.
21119          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21120          if test "x$FOUND_CORRECT_VERSION" = x; then
21121            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21123            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21124$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21125            BOOT_JDK_FOUND=no
21126          else
21127            # We're done! :-)
21128            BOOT_JDK_FOUND=yes
21129
21130  # Only process if variable expands to non-empty
21131
21132  if test "x$BOOT_JDK" != x; then
21133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21134
21135  # Input might be given as Windows format, start by converting to
21136  # unix format.
21137  path="$BOOT_JDK"
21138  new_path=`$CYGPATH -u "$path"`
21139
21140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21143  # "foo.exe" is OK but "foo" is an error.
21144  #
21145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21146  # It is also a way to make sure we got the proper file name for the real test later on.
21147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21148  if test "x$test_shortpath" = x; then
21149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21152  fi
21153
21154  # Call helper function which possibly converts this using DOS-style short mode.
21155  # If so, the updated path is stored in $new_path.
21156
21157  input_path="$new_path"
21158  # Check if we need to convert this using DOS-style short mode. If the path
21159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21160  # take no chances and rewrite it.
21161  # Note: m4 eats our [], so we need to use [ and ] instead.
21162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21163  if test "x$has_forbidden_chars" != x; then
21164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21168      # Going to short mode and back again did indeed matter. Since short mode is
21169      # case insensitive, let's make it lowercase to improve readability.
21170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21171      # Now convert it back to Unix-stile (cygpath)
21172      input_path=`$CYGPATH -u "$shortmode_path"`
21173      new_path="$input_path"
21174    fi
21175  fi
21176
21177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21178  if test "x$test_cygdrive_prefix" = x; then
21179    # As a simple fix, exclude /usr/bin since it's not a real path.
21180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21182      # a path prefixed by /cygdrive for fixpath to work.
21183      new_path="$CYGWIN_ROOT_PATH$input_path"
21184    fi
21185  fi
21186
21187
21188  if test "x$path" != "x$new_path"; then
21189    BOOT_JDK="$new_path"
21190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21192  fi
21193
21194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21195
21196  path="$BOOT_JDK"
21197  has_colon=`$ECHO $path | $GREP ^.:`
21198  new_path="$path"
21199  if test "x$has_colon" = x; then
21200    # Not in mixed or Windows style, start by that.
21201    new_path=`cmd //c echo $path`
21202  fi
21203
21204
21205  input_path="$new_path"
21206  # Check if we need to convert this using DOS-style short mode. If the path
21207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21208  # take no chances and rewrite it.
21209  # Note: m4 eats our [], so we need to use [ and ] instead.
21210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21211  if test "x$has_forbidden_chars" != x; then
21212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21214  fi
21215
21216
21217  windows_path="$new_path"
21218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21219    unix_path=`$CYGPATH -u "$windows_path"`
21220    new_path="$unix_path"
21221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21223    new_path="$unix_path"
21224  fi
21225
21226  if test "x$path" != "x$new_path"; then
21227    BOOT_JDK="$new_path"
21228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21230  fi
21231
21232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21234
21235    else
21236      # We're on a unix platform. Hooray! :)
21237      path="$BOOT_JDK"
21238      has_space=`$ECHO "$path" | $GREP " "`
21239      if test "x$has_space" != x; then
21240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21243      fi
21244
21245      # Use eval to expand a potential ~
21246      eval path="$path"
21247      if test ! -f "$path" && test ! -d "$path"; then
21248        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21249      fi
21250
21251      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21252    fi
21253  fi
21254
21255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21256$as_echo_n "checking for Boot JDK... " >&6; }
21257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21258$as_echo "$BOOT_JDK" >&6; }
21259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21260$as_echo_n "checking Boot JDK version... " >&6; }
21261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21263$as_echo "$BOOT_JDK_VERSION" >&6; }
21264          fi # end check jdk version
21265        fi # end check javac
21266      fi # end check java
21267    fi # end check boot jdk found
21268  fi
21269
21270
21271  if test "x$BOOT_JDK_FOUND" = xno; then
21272    # Now execute the test
21273
21274  if test -x /usr/libexec/java_home; then
21275    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21276    BOOT_JDK_FOUND=maybe
21277    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21278$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21279  fi
21280
21281
21282    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21283    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21284      # Do we have a bin/java?
21285      if test ! -x "$BOOT_JDK/bin/java"; then
21286        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21288        BOOT_JDK_FOUND=no
21289      else
21290        # Do we have a bin/javac?
21291        if test ! -x "$BOOT_JDK/bin/javac"; then
21292          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21295$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21296          BOOT_JDK_FOUND=no
21297        else
21298          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21299          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21300
21301          # Extra M4 quote needed to protect [] in grep expression.
21302          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21303          if test "x$FOUND_CORRECT_VERSION" = x; then
21304            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21306            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21307$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21308            BOOT_JDK_FOUND=no
21309          else
21310            # We're done! :-)
21311            BOOT_JDK_FOUND=yes
21312
21313  # Only process if variable expands to non-empty
21314
21315  if test "x$BOOT_JDK" != x; then
21316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21317
21318  # Input might be given as Windows format, start by converting to
21319  # unix format.
21320  path="$BOOT_JDK"
21321  new_path=`$CYGPATH -u "$path"`
21322
21323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21326  # "foo.exe" is OK but "foo" is an error.
21327  #
21328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21329  # It is also a way to make sure we got the proper file name for the real test later on.
21330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21331  if test "x$test_shortpath" = x; then
21332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21334    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21335  fi
21336
21337  # Call helper function which possibly converts this using DOS-style short mode.
21338  # If so, the updated path is stored in $new_path.
21339
21340  input_path="$new_path"
21341  # Check if we need to convert this using DOS-style short mode. If the path
21342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21343  # take no chances and rewrite it.
21344  # Note: m4 eats our [], so we need to use [ and ] instead.
21345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21346  if test "x$has_forbidden_chars" != x; then
21347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21351      # Going to short mode and back again did indeed matter. Since short mode is
21352      # case insensitive, let's make it lowercase to improve readability.
21353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21354      # Now convert it back to Unix-stile (cygpath)
21355      input_path=`$CYGPATH -u "$shortmode_path"`
21356      new_path="$input_path"
21357    fi
21358  fi
21359
21360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21361  if test "x$test_cygdrive_prefix" = x; then
21362    # As a simple fix, exclude /usr/bin since it's not a real path.
21363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21365      # a path prefixed by /cygdrive for fixpath to work.
21366      new_path="$CYGWIN_ROOT_PATH$input_path"
21367    fi
21368  fi
21369
21370
21371  if test "x$path" != "x$new_path"; then
21372    BOOT_JDK="$new_path"
21373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21375  fi
21376
21377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21378
21379  path="$BOOT_JDK"
21380  has_colon=`$ECHO $path | $GREP ^.:`
21381  new_path="$path"
21382  if test "x$has_colon" = x; then
21383    # Not in mixed or Windows style, start by that.
21384    new_path=`cmd //c echo $path`
21385  fi
21386
21387
21388  input_path="$new_path"
21389  # Check if we need to convert this using DOS-style short mode. If the path
21390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21391  # take no chances and rewrite it.
21392  # Note: m4 eats our [], so we need to use [ and ] instead.
21393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21394  if test "x$has_forbidden_chars" != x; then
21395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21397  fi
21398
21399
21400  windows_path="$new_path"
21401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21402    unix_path=`$CYGPATH -u "$windows_path"`
21403    new_path="$unix_path"
21404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21406    new_path="$unix_path"
21407  fi
21408
21409  if test "x$path" != "x$new_path"; then
21410    BOOT_JDK="$new_path"
21411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21413  fi
21414
21415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21417
21418    else
21419      # We're on a unix platform. Hooray! :)
21420      path="$BOOT_JDK"
21421      has_space=`$ECHO "$path" | $GREP " "`
21422      if test "x$has_space" != x; then
21423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21426      fi
21427
21428      # Use eval to expand a potential ~
21429      eval path="$path"
21430      if test ! -f "$path" && test ! -d "$path"; then
21431        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21432      fi
21433
21434      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21435    fi
21436  fi
21437
21438            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21439$as_echo_n "checking for Boot JDK... " >&6; }
21440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21441$as_echo "$BOOT_JDK" >&6; }
21442            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21443$as_echo_n "checking Boot JDK version... " >&6; }
21444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21446$as_echo "$BOOT_JDK_VERSION" >&6; }
21447          fi # end check jdk version
21448        fi # end check javac
21449      fi # end check java
21450    fi # end check boot jdk found
21451  fi
21452
21453  fi
21454
21455
21456    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21457    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21458      # Do we have a bin/java?
21459      if test ! -x "$BOOT_JDK/bin/java"; then
21460        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21462        BOOT_JDK_FOUND=no
21463      else
21464        # Do we have a bin/javac?
21465        if test ! -x "$BOOT_JDK/bin/javac"; then
21466          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21468          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21469$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21470          BOOT_JDK_FOUND=no
21471        else
21472          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21473          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21474
21475          # Extra M4 quote needed to protect [] in grep expression.
21476          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21477          if test "x$FOUND_CORRECT_VERSION" = x; then
21478            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21480            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21481$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21482            BOOT_JDK_FOUND=no
21483          else
21484            # We're done! :-)
21485            BOOT_JDK_FOUND=yes
21486
21487  # Only process if variable expands to non-empty
21488
21489  if test "x$BOOT_JDK" != x; then
21490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21491
21492  # Input might be given as Windows format, start by converting to
21493  # unix format.
21494  path="$BOOT_JDK"
21495  new_path=`$CYGPATH -u "$path"`
21496
21497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21500  # "foo.exe" is OK but "foo" is an error.
21501  #
21502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21503  # It is also a way to make sure we got the proper file name for the real test later on.
21504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21505  if test "x$test_shortpath" = x; then
21506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21507$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21508    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21509  fi
21510
21511  # Call helper function which possibly converts this using DOS-style short mode.
21512  # If so, the updated path is stored in $new_path.
21513
21514  input_path="$new_path"
21515  # Check if we need to convert this using DOS-style short mode. If the path
21516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21517  # take no chances and rewrite it.
21518  # Note: m4 eats our [], so we need to use [ and ] instead.
21519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21520  if test "x$has_forbidden_chars" != x; then
21521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21525      # Going to short mode and back again did indeed matter. Since short mode is
21526      # case insensitive, let's make it lowercase to improve readability.
21527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21528      # Now convert it back to Unix-stile (cygpath)
21529      input_path=`$CYGPATH -u "$shortmode_path"`
21530      new_path="$input_path"
21531    fi
21532  fi
21533
21534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21535  if test "x$test_cygdrive_prefix" = x; then
21536    # As a simple fix, exclude /usr/bin since it's not a real path.
21537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21539      # a path prefixed by /cygdrive for fixpath to work.
21540      new_path="$CYGWIN_ROOT_PATH$input_path"
21541    fi
21542  fi
21543
21544
21545  if test "x$path" != "x$new_path"; then
21546    BOOT_JDK="$new_path"
21547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21548$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21549  fi
21550
21551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21552
21553  path="$BOOT_JDK"
21554  has_colon=`$ECHO $path | $GREP ^.:`
21555  new_path="$path"
21556  if test "x$has_colon" = x; then
21557    # Not in mixed or Windows style, start by that.
21558    new_path=`cmd //c echo $path`
21559  fi
21560
21561
21562  input_path="$new_path"
21563  # Check if we need to convert this using DOS-style short mode. If the path
21564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21565  # take no chances and rewrite it.
21566  # Note: m4 eats our [], so we need to use [ and ] instead.
21567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21568  if test "x$has_forbidden_chars" != x; then
21569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21571  fi
21572
21573
21574  windows_path="$new_path"
21575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21576    unix_path=`$CYGPATH -u "$windows_path"`
21577    new_path="$unix_path"
21578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21580    new_path="$unix_path"
21581  fi
21582
21583  if test "x$path" != "x$new_path"; then
21584    BOOT_JDK="$new_path"
21585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21586$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21587  fi
21588
21589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21591
21592    else
21593      # We're on a unix platform. Hooray! :)
21594      path="$BOOT_JDK"
21595      has_space=`$ECHO "$path" | $GREP " "`
21596      if test "x$has_space" != x; then
21597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21599        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21600      fi
21601
21602      # Use eval to expand a potential ~
21603      eval path="$path"
21604      if test ! -f "$path" && test ! -d "$path"; then
21605        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21606      fi
21607
21608      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21609    fi
21610  fi
21611
21612            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21613$as_echo_n "checking for Boot JDK... " >&6; }
21614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21615$as_echo "$BOOT_JDK" >&6; }
21616            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21617$as_echo_n "checking Boot JDK version... " >&6; }
21618            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21619            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21620$as_echo "$BOOT_JDK_VERSION" >&6; }
21621          fi # end check jdk version
21622        fi # end check javac
21623      fi # end check java
21624    fi # end check boot jdk found
21625  fi
21626
21627
21628  # Test: Is $JAVA_HOME set?
21629
21630  if test "x$BOOT_JDK_FOUND" = xno; then
21631    # Now execute the test
21632
21633  if test "x$JAVA_HOME" != x; then
21634    JAVA_HOME_PROCESSED="$JAVA_HOME"
21635
21636  # Only process if variable expands to non-empty
21637
21638  if test "x$JAVA_HOME_PROCESSED" != x; then
21639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21640
21641  # Input might be given as Windows format, start by converting to
21642  # unix format.
21643  path="$JAVA_HOME_PROCESSED"
21644  new_path=`$CYGPATH -u "$path"`
21645
21646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21649  # "foo.exe" is OK but "foo" is an error.
21650  #
21651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21652  # It is also a way to make sure we got the proper file name for the real test later on.
21653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21654  if test "x$test_shortpath" = x; then
21655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21656$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21657    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21658  fi
21659
21660  # Call helper function which possibly converts this using DOS-style short mode.
21661  # If so, the updated path is stored in $new_path.
21662
21663  input_path="$new_path"
21664  # Check if we need to convert this using DOS-style short mode. If the path
21665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21666  # take no chances and rewrite it.
21667  # Note: m4 eats our [], so we need to use [ and ] instead.
21668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21669  if test "x$has_forbidden_chars" != x; then
21670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21674      # Going to short mode and back again did indeed matter. Since short mode is
21675      # case insensitive, let's make it lowercase to improve readability.
21676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21677      # Now convert it back to Unix-stile (cygpath)
21678      input_path=`$CYGPATH -u "$shortmode_path"`
21679      new_path="$input_path"
21680    fi
21681  fi
21682
21683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21684  if test "x$test_cygdrive_prefix" = x; then
21685    # As a simple fix, exclude /usr/bin since it's not a real path.
21686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21688      # a path prefixed by /cygdrive for fixpath to work.
21689      new_path="$CYGWIN_ROOT_PATH$input_path"
21690    fi
21691  fi
21692
21693
21694  if test "x$path" != "x$new_path"; then
21695    JAVA_HOME_PROCESSED="$new_path"
21696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21697$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21698  fi
21699
21700    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21701
21702  path="$JAVA_HOME_PROCESSED"
21703  has_colon=`$ECHO $path | $GREP ^.:`
21704  new_path="$path"
21705  if test "x$has_colon" = x; then
21706    # Not in mixed or Windows style, start by that.
21707    new_path=`cmd //c echo $path`
21708  fi
21709
21710
21711  input_path="$new_path"
21712  # Check if we need to convert this using DOS-style short mode. If the path
21713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21714  # take no chances and rewrite it.
21715  # Note: m4 eats our [], so we need to use [ and ] instead.
21716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21717  if test "x$has_forbidden_chars" != x; then
21718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21720  fi
21721
21722
21723  windows_path="$new_path"
21724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21725    unix_path=`$CYGPATH -u "$windows_path"`
21726    new_path="$unix_path"
21727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21729    new_path="$unix_path"
21730  fi
21731
21732  if test "x$path" != "x$new_path"; then
21733    JAVA_HOME_PROCESSED="$new_path"
21734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21735$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21736  fi
21737
21738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21740
21741    else
21742      # We're on a unix platform. Hooray! :)
21743      path="$JAVA_HOME_PROCESSED"
21744      has_space=`$ECHO "$path" | $GREP " "`
21745      if test "x$has_space" != x; then
21746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21747$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21748        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21749      fi
21750
21751      # Use eval to expand a potential ~
21752      eval path="$path"
21753      if test ! -f "$path" && test ! -d "$path"; then
21754        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21755      fi
21756
21757      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21758    fi
21759  fi
21760
21761    if test ! -d "$JAVA_HOME_PROCESSED"; then
21762      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21763$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21764    else
21765      # Aha, the user has set a JAVA_HOME
21766      # let us use that as the Boot JDK.
21767      BOOT_JDK="$JAVA_HOME_PROCESSED"
21768      BOOT_JDK_FOUND=maybe
21769      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21770$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21771    fi
21772  fi
21773
21774
21775    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21776    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21777      # Do we have a bin/java?
21778      if test ! -x "$BOOT_JDK/bin/java"; then
21779        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21781        BOOT_JDK_FOUND=no
21782      else
21783        # Do we have a bin/javac?
21784        if test ! -x "$BOOT_JDK/bin/javac"; then
21785          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21787          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21788$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21789          BOOT_JDK_FOUND=no
21790        else
21791          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21792          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21793
21794          # Extra M4 quote needed to protect [] in grep expression.
21795          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21796          if test "x$FOUND_CORRECT_VERSION" = x; then
21797            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21799            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21800$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21801            BOOT_JDK_FOUND=no
21802          else
21803            # We're done! :-)
21804            BOOT_JDK_FOUND=yes
21805
21806  # Only process if variable expands to non-empty
21807
21808  if test "x$BOOT_JDK" != x; then
21809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21810
21811  # Input might be given as Windows format, start by converting to
21812  # unix format.
21813  path="$BOOT_JDK"
21814  new_path=`$CYGPATH -u "$path"`
21815
21816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21819  # "foo.exe" is OK but "foo" is an error.
21820  #
21821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21822  # It is also a way to make sure we got the proper file name for the real test later on.
21823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21824  if test "x$test_shortpath" = x; then
21825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21827    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21828  fi
21829
21830  # Call helper function which possibly converts this using DOS-style short mode.
21831  # If so, the updated path is stored in $new_path.
21832
21833  input_path="$new_path"
21834  # Check if we need to convert this using DOS-style short mode. If the path
21835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21836  # take no chances and rewrite it.
21837  # Note: m4 eats our [], so we need to use [ and ] instead.
21838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21839  if test "x$has_forbidden_chars" != x; then
21840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21844      # Going to short mode and back again did indeed matter. Since short mode is
21845      # case insensitive, let's make it lowercase to improve readability.
21846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21847      # Now convert it back to Unix-stile (cygpath)
21848      input_path=`$CYGPATH -u "$shortmode_path"`
21849      new_path="$input_path"
21850    fi
21851  fi
21852
21853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21854  if test "x$test_cygdrive_prefix" = x; then
21855    # As a simple fix, exclude /usr/bin since it's not a real path.
21856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21858      # a path prefixed by /cygdrive for fixpath to work.
21859      new_path="$CYGWIN_ROOT_PATH$input_path"
21860    fi
21861  fi
21862
21863
21864  if test "x$path" != "x$new_path"; then
21865    BOOT_JDK="$new_path"
21866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21868  fi
21869
21870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21871
21872  path="$BOOT_JDK"
21873  has_colon=`$ECHO $path | $GREP ^.:`
21874  new_path="$path"
21875  if test "x$has_colon" = x; then
21876    # Not in mixed or Windows style, start by that.
21877    new_path=`cmd //c echo $path`
21878  fi
21879
21880
21881  input_path="$new_path"
21882  # Check if we need to convert this using DOS-style short mode. If the path
21883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21884  # take no chances and rewrite it.
21885  # Note: m4 eats our [], so we need to use [ and ] instead.
21886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21887  if test "x$has_forbidden_chars" != x; then
21888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21890  fi
21891
21892
21893  windows_path="$new_path"
21894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21895    unix_path=`$CYGPATH -u "$windows_path"`
21896    new_path="$unix_path"
21897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21899    new_path="$unix_path"
21900  fi
21901
21902  if test "x$path" != "x$new_path"; then
21903    BOOT_JDK="$new_path"
21904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21906  fi
21907
21908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21910
21911    else
21912      # We're on a unix platform. Hooray! :)
21913      path="$BOOT_JDK"
21914      has_space=`$ECHO "$path" | $GREP " "`
21915      if test "x$has_space" != x; then
21916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21918        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21919      fi
21920
21921      # Use eval to expand a potential ~
21922      eval path="$path"
21923      if test ! -f "$path" && test ! -d "$path"; then
21924        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21925      fi
21926
21927      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21928    fi
21929  fi
21930
21931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21932$as_echo_n "checking for Boot JDK... " >&6; }
21933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21934$as_echo "$BOOT_JDK" >&6; }
21935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21936$as_echo_n "checking Boot JDK version... " >&6; }
21937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21939$as_echo "$BOOT_JDK_VERSION" >&6; }
21940          fi # end check jdk version
21941        fi # end check javac
21942      fi # end check java
21943    fi # end check boot jdk found
21944  fi
21945
21946
21947  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21948
21949  if test "x$BOOT_JDK_FOUND" = xno; then
21950    # Now execute the test
21951
21952  # Extract the first word of "javac", so it can be a program name with args.
21953set dummy javac; ac_word=$2
21954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21955$as_echo_n "checking for $ac_word... " >&6; }
21956if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21957  $as_echo_n "(cached) " >&6
21958else
21959  case $JAVAC_CHECK in
21960  [\\/]* | ?:[\\/]*)
21961  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21962  ;;
21963  *)
21964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21965for as_dir in $PATH
21966do
21967  IFS=$as_save_IFS
21968  test -z "$as_dir" && as_dir=.
21969    for ac_exec_ext in '' $ac_executable_extensions; do
21970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21971    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21973    break 2
21974  fi
21975done
21976  done
21977IFS=$as_save_IFS
21978
21979  ;;
21980esac
21981fi
21982JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21983if test -n "$JAVAC_CHECK"; then
21984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21985$as_echo "$JAVAC_CHECK" >&6; }
21986else
21987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21988$as_echo "no" >&6; }
21989fi
21990
21991
21992  # Extract the first word of "java", so it can be a program name with args.
21993set dummy java; ac_word=$2
21994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21995$as_echo_n "checking for $ac_word... " >&6; }
21996if ${ac_cv_path_JAVA_CHECK+:} false; then :
21997  $as_echo_n "(cached) " >&6
21998else
21999  case $JAVA_CHECK in
22000  [\\/]* | ?:[\\/]*)
22001  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22002  ;;
22003  *)
22004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22005for as_dir in $PATH
22006do
22007  IFS=$as_save_IFS
22008  test -z "$as_dir" && as_dir=.
22009    for ac_exec_ext in '' $ac_executable_extensions; do
22010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22011    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22013    break 2
22014  fi
22015done
22016  done
22017IFS=$as_save_IFS
22018
22019  ;;
22020esac
22021fi
22022JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22023if test -n "$JAVA_CHECK"; then
22024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22025$as_echo "$JAVA_CHECK" >&6; }
22026else
22027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22028$as_echo "no" >&6; }
22029fi
22030
22031
22032  BINARY="$JAVAC_CHECK"
22033  if test "x$JAVAC_CHECK" = x; then
22034    BINARY="$JAVA_CHECK"
22035  fi
22036  if test "x$BINARY" != x; then
22037    # So there is a java(c) binary, it might be part of a JDK.
22038    # Lets find the JDK/JRE directory by following symbolic links.
22039    # Linux/GNU systems often have links from /usr/bin/java to
22040    # /etc/alternatives/java to the real JDK binary.
22041
22042  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22043    # Follow a chain of symbolic links. Use readlink
22044    # where it exists, else fall back to horribly
22045    # complicated shell code.
22046    if test "x$READLINK_TESTED" != yes; then
22047      # On MacOSX there is a readlink tool with a different
22048      # purpose than the GNU readlink tool. Check the found readlink.
22049      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22050      if test "x$ISGNU" = x; then
22051        # A readlink that we do not know how to use.
22052        # Are there other non-GNU readlinks out there?
22053        READLINK_TESTED=yes
22054        READLINK=
22055      fi
22056    fi
22057
22058    if test "x$READLINK" != x; then
22059      BINARY=`$READLINK -f $BINARY`
22060    else
22061      # Save the current directory for restoring afterwards
22062      STARTDIR=$PWD
22063      COUNTER=0
22064      sym_link_dir=`$DIRNAME $BINARY`
22065      sym_link_file=`$BASENAME $BINARY`
22066      cd $sym_link_dir
22067      # Use -P flag to resolve symlinks in directories.
22068      cd `$THEPWDCMD -P`
22069      sym_link_dir=`$THEPWDCMD -P`
22070      # Resolve file symlinks
22071      while test $COUNTER -lt 20; do
22072        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22073        if test "x$ISLINK" == x; then
22074          # This is not a symbolic link! We are done!
22075          break
22076        fi
22077        # Again resolve directory symlinks since the target of the just found
22078        # link could be in a different directory
22079        cd `$DIRNAME $ISLINK`
22080        sym_link_dir=`$THEPWDCMD -P`
22081        sym_link_file=`$BASENAME $ISLINK`
22082        let COUNTER=COUNTER+1
22083      done
22084      cd $STARTDIR
22085      BINARY=$sym_link_dir/$sym_link_file
22086    fi
22087  fi
22088
22089    BOOT_JDK=`dirname "$BINARY"`
22090    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22091    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22092      # Looks like we found ourselves an JDK
22093      BOOT_JDK_FOUND=maybe
22094      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22095$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22096    fi
22097  fi
22098
22099
22100    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22101    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22102      # Do we have a bin/java?
22103      if test ! -x "$BOOT_JDK/bin/java"; then
22104        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22106        BOOT_JDK_FOUND=no
22107      else
22108        # Do we have a bin/javac?
22109        if test ! -x "$BOOT_JDK/bin/javac"; then
22110          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22112          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22113$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22114          BOOT_JDK_FOUND=no
22115        else
22116          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22117          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22118
22119          # Extra M4 quote needed to protect [] in grep expression.
22120          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22121          if test "x$FOUND_CORRECT_VERSION" = x; then
22122            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22124            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22125$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22126            BOOT_JDK_FOUND=no
22127          else
22128            # We're done! :-)
22129            BOOT_JDK_FOUND=yes
22130
22131  # Only process if variable expands to non-empty
22132
22133  if test "x$BOOT_JDK" != x; then
22134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22135
22136  # Input might be given as Windows format, start by converting to
22137  # unix format.
22138  path="$BOOT_JDK"
22139  new_path=`$CYGPATH -u "$path"`
22140
22141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22144  # "foo.exe" is OK but "foo" is an error.
22145  #
22146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22147  # It is also a way to make sure we got the proper file name for the real test later on.
22148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22149  if test "x$test_shortpath" = x; then
22150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22152    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22153  fi
22154
22155  # Call helper function which possibly converts this using DOS-style short mode.
22156  # If so, the updated path is stored in $new_path.
22157
22158  input_path="$new_path"
22159  # Check if we need to convert this using DOS-style short mode. If the path
22160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22161  # take no chances and rewrite it.
22162  # Note: m4 eats our [], so we need to use [ and ] instead.
22163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22164  if test "x$has_forbidden_chars" != x; then
22165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22169      # Going to short mode and back again did indeed matter. Since short mode is
22170      # case insensitive, let's make it lowercase to improve readability.
22171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22172      # Now convert it back to Unix-stile (cygpath)
22173      input_path=`$CYGPATH -u "$shortmode_path"`
22174      new_path="$input_path"
22175    fi
22176  fi
22177
22178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22179  if test "x$test_cygdrive_prefix" = x; then
22180    # As a simple fix, exclude /usr/bin since it's not a real path.
22181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22183      # a path prefixed by /cygdrive for fixpath to work.
22184      new_path="$CYGWIN_ROOT_PATH$input_path"
22185    fi
22186  fi
22187
22188
22189  if test "x$path" != "x$new_path"; then
22190    BOOT_JDK="$new_path"
22191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22193  fi
22194
22195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22196
22197  path="$BOOT_JDK"
22198  has_colon=`$ECHO $path | $GREP ^.:`
22199  new_path="$path"
22200  if test "x$has_colon" = x; then
22201    # Not in mixed or Windows style, start by that.
22202    new_path=`cmd //c echo $path`
22203  fi
22204
22205
22206  input_path="$new_path"
22207  # Check if we need to convert this using DOS-style short mode. If the path
22208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22209  # take no chances and rewrite it.
22210  # Note: m4 eats our [], so we need to use [ and ] instead.
22211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22212  if test "x$has_forbidden_chars" != x; then
22213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22215  fi
22216
22217
22218  windows_path="$new_path"
22219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22220    unix_path=`$CYGPATH -u "$windows_path"`
22221    new_path="$unix_path"
22222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22224    new_path="$unix_path"
22225  fi
22226
22227  if test "x$path" != "x$new_path"; then
22228    BOOT_JDK="$new_path"
22229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22231  fi
22232
22233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22235
22236    else
22237      # We're on a unix platform. Hooray! :)
22238      path="$BOOT_JDK"
22239      has_space=`$ECHO "$path" | $GREP " "`
22240      if test "x$has_space" != x; then
22241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22244      fi
22245
22246      # Use eval to expand a potential ~
22247      eval path="$path"
22248      if test ! -f "$path" && test ! -d "$path"; then
22249        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22250      fi
22251
22252      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22253    fi
22254  fi
22255
22256            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22257$as_echo_n "checking for Boot JDK... " >&6; }
22258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22259$as_echo "$BOOT_JDK" >&6; }
22260            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22261$as_echo_n "checking Boot JDK version... " >&6; }
22262            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22264$as_echo "$BOOT_JDK_VERSION" >&6; }
22265          fi # end check jdk version
22266        fi # end check javac
22267      fi # end check java
22268    fi # end check boot jdk found
22269  fi
22270
22271
22272  # Test: Is there a JDK installed in default, well-known locations?
22273
22274  if test "x$BOOT_JDK_FOUND" = xno; then
22275    # Now execute the test
22276
22277  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22278
22279  if test "x$BOOT_JDK_FOUND" = xno; then
22280    # Now execute the test
22281
22282  if test "x$ProgramW6432" != x; then
22283    VIRTUAL_DIR="$ProgramW6432/Java"
22284
22285  windows_path="$VIRTUAL_DIR"
22286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22287    unix_path=`$CYGPATH -u "$windows_path"`
22288    VIRTUAL_DIR="$unix_path"
22289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22291    VIRTUAL_DIR="$unix_path"
22292  fi
22293
22294
22295  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22296  BOOT_JDK_SUFFIX=""
22297  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22298  if test "x$ALL_JDKS_FOUND" != x; then
22299    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22300
22301  if test "x$BOOT_JDK_FOUND" = xno; then
22302    # Now execute the test
22303
22304        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22305        if test -d "$BOOT_JDK"; then
22306          BOOT_JDK_FOUND=maybe
22307          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22308$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22309        fi
22310
22311
22312    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22313    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22314      # Do we have a bin/java?
22315      if test ! -x "$BOOT_JDK/bin/java"; then
22316        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22318        BOOT_JDK_FOUND=no
22319      else
22320        # Do we have a bin/javac?
22321        if test ! -x "$BOOT_JDK/bin/javac"; then
22322          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22324          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22325$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22326          BOOT_JDK_FOUND=no
22327        else
22328          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22329          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22330
22331          # Extra M4 quote needed to protect [] in grep expression.
22332          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22333          if test "x$FOUND_CORRECT_VERSION" = x; then
22334            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22336            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22337$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22338            BOOT_JDK_FOUND=no
22339          else
22340            # We're done! :-)
22341            BOOT_JDK_FOUND=yes
22342
22343  # Only process if variable expands to non-empty
22344
22345  if test "x$BOOT_JDK" != x; then
22346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22347
22348  # Input might be given as Windows format, start by converting to
22349  # unix format.
22350  path="$BOOT_JDK"
22351  new_path=`$CYGPATH -u "$path"`
22352
22353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22356  # "foo.exe" is OK but "foo" is an error.
22357  #
22358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22359  # It is also a way to make sure we got the proper file name for the real test later on.
22360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22361  if test "x$test_shortpath" = x; then
22362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22364    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22365  fi
22366
22367  # Call helper function which possibly converts this using DOS-style short mode.
22368  # If so, the updated path is stored in $new_path.
22369
22370  input_path="$new_path"
22371  # Check if we need to convert this using DOS-style short mode. If the path
22372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22373  # take no chances and rewrite it.
22374  # Note: m4 eats our [], so we need to use [ and ] instead.
22375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22376  if test "x$has_forbidden_chars" != x; then
22377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22381      # Going to short mode and back again did indeed matter. Since short mode is
22382      # case insensitive, let's make it lowercase to improve readability.
22383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22384      # Now convert it back to Unix-stile (cygpath)
22385      input_path=`$CYGPATH -u "$shortmode_path"`
22386      new_path="$input_path"
22387    fi
22388  fi
22389
22390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22391  if test "x$test_cygdrive_prefix" = x; then
22392    # As a simple fix, exclude /usr/bin since it's not a real path.
22393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22395      # a path prefixed by /cygdrive for fixpath to work.
22396      new_path="$CYGWIN_ROOT_PATH$input_path"
22397    fi
22398  fi
22399
22400
22401  if test "x$path" != "x$new_path"; then
22402    BOOT_JDK="$new_path"
22403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22405  fi
22406
22407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22408
22409  path="$BOOT_JDK"
22410  has_colon=`$ECHO $path | $GREP ^.:`
22411  new_path="$path"
22412  if test "x$has_colon" = x; then
22413    # Not in mixed or Windows style, start by that.
22414    new_path=`cmd //c echo $path`
22415  fi
22416
22417
22418  input_path="$new_path"
22419  # Check if we need to convert this using DOS-style short mode. If the path
22420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22421  # take no chances and rewrite it.
22422  # Note: m4 eats our [], so we need to use [ and ] instead.
22423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22424  if test "x$has_forbidden_chars" != x; then
22425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22427  fi
22428
22429
22430  windows_path="$new_path"
22431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22432    unix_path=`$CYGPATH -u "$windows_path"`
22433    new_path="$unix_path"
22434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22436    new_path="$unix_path"
22437  fi
22438
22439  if test "x$path" != "x$new_path"; then
22440    BOOT_JDK="$new_path"
22441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22443  fi
22444
22445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22447
22448    else
22449      # We're on a unix platform. Hooray! :)
22450      path="$BOOT_JDK"
22451      has_space=`$ECHO "$path" | $GREP " "`
22452      if test "x$has_space" != x; then
22453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22456      fi
22457
22458      # Use eval to expand a potential ~
22459      eval path="$path"
22460      if test ! -f "$path" && test ! -d "$path"; then
22461        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22462      fi
22463
22464      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22465    fi
22466  fi
22467
22468            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22469$as_echo_n "checking for Boot JDK... " >&6; }
22470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22471$as_echo "$BOOT_JDK" >&6; }
22472            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22473$as_echo_n "checking Boot JDK version... " >&6; }
22474            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22476$as_echo "$BOOT_JDK_VERSION" >&6; }
22477          fi # end check jdk version
22478        fi # end check javac
22479      fi # end check java
22480    fi # end check boot jdk found
22481  fi
22482
22483    done
22484  fi
22485
22486  fi
22487
22488
22489    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22490    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22491      # Do we have a bin/java?
22492      if test ! -x "$BOOT_JDK/bin/java"; then
22493        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22495        BOOT_JDK_FOUND=no
22496      else
22497        # Do we have a bin/javac?
22498        if test ! -x "$BOOT_JDK/bin/javac"; then
22499          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22501          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22502$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22503          BOOT_JDK_FOUND=no
22504        else
22505          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22506          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22507
22508          # Extra M4 quote needed to protect [] in grep expression.
22509          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22510          if test "x$FOUND_CORRECT_VERSION" = x; then
22511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22513            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22514$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22515            BOOT_JDK_FOUND=no
22516          else
22517            # We're done! :-)
22518            BOOT_JDK_FOUND=yes
22519
22520  # Only process if variable expands to non-empty
22521
22522  if test "x$BOOT_JDK" != x; then
22523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22524
22525  # Input might be given as Windows format, start by converting to
22526  # unix format.
22527  path="$BOOT_JDK"
22528  new_path=`$CYGPATH -u "$path"`
22529
22530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22533  # "foo.exe" is OK but "foo" is an error.
22534  #
22535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22536  # It is also a way to make sure we got the proper file name for the real test later on.
22537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22538  if test "x$test_shortpath" = x; then
22539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22542  fi
22543
22544  # Call helper function which possibly converts this using DOS-style short mode.
22545  # If so, the updated path is stored in $new_path.
22546
22547  input_path="$new_path"
22548  # Check if we need to convert this using DOS-style short mode. If the path
22549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22550  # take no chances and rewrite it.
22551  # Note: m4 eats our [], so we need to use [ and ] instead.
22552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22553  if test "x$has_forbidden_chars" != x; then
22554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22558      # Going to short mode and back again did indeed matter. Since short mode is
22559      # case insensitive, let's make it lowercase to improve readability.
22560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22561      # Now convert it back to Unix-stile (cygpath)
22562      input_path=`$CYGPATH -u "$shortmode_path"`
22563      new_path="$input_path"
22564    fi
22565  fi
22566
22567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22568  if test "x$test_cygdrive_prefix" = x; then
22569    # As a simple fix, exclude /usr/bin since it's not a real path.
22570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22572      # a path prefixed by /cygdrive for fixpath to work.
22573      new_path="$CYGWIN_ROOT_PATH$input_path"
22574    fi
22575  fi
22576
22577
22578  if test "x$path" != "x$new_path"; then
22579    BOOT_JDK="$new_path"
22580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22582  fi
22583
22584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22585
22586  path="$BOOT_JDK"
22587  has_colon=`$ECHO $path | $GREP ^.:`
22588  new_path="$path"
22589  if test "x$has_colon" = x; then
22590    # Not in mixed or Windows style, start by that.
22591    new_path=`cmd //c echo $path`
22592  fi
22593
22594
22595  input_path="$new_path"
22596  # Check if we need to convert this using DOS-style short mode. If the path
22597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22598  # take no chances and rewrite it.
22599  # Note: m4 eats our [], so we need to use [ and ] instead.
22600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22601  if test "x$has_forbidden_chars" != x; then
22602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22604  fi
22605
22606
22607  windows_path="$new_path"
22608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22609    unix_path=`$CYGPATH -u "$windows_path"`
22610    new_path="$unix_path"
22611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22613    new_path="$unix_path"
22614  fi
22615
22616  if test "x$path" != "x$new_path"; then
22617    BOOT_JDK="$new_path"
22618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22620  fi
22621
22622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22624
22625    else
22626      # We're on a unix platform. Hooray! :)
22627      path="$BOOT_JDK"
22628      has_space=`$ECHO "$path" | $GREP " "`
22629      if test "x$has_space" != x; then
22630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22632        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22633      fi
22634
22635      # Use eval to expand a potential ~
22636      eval path="$path"
22637      if test ! -f "$path" && test ! -d "$path"; then
22638        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22639      fi
22640
22641      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22642    fi
22643  fi
22644
22645            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22646$as_echo_n "checking for Boot JDK... " >&6; }
22647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22648$as_echo "$BOOT_JDK" >&6; }
22649            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22650$as_echo_n "checking Boot JDK version... " >&6; }
22651            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22653$as_echo "$BOOT_JDK_VERSION" >&6; }
22654          fi # end check jdk version
22655        fi # end check javac
22656      fi # end check java
22657    fi # end check boot jdk found
22658  fi
22659
22660
22661  if test "x$BOOT_JDK_FOUND" = xno; then
22662    # Now execute the test
22663
22664  if test "x$PROGRAMW6432" != x; then
22665    VIRTUAL_DIR="$PROGRAMW6432/Java"
22666
22667  windows_path="$VIRTUAL_DIR"
22668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22669    unix_path=`$CYGPATH -u "$windows_path"`
22670    VIRTUAL_DIR="$unix_path"
22671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22673    VIRTUAL_DIR="$unix_path"
22674  fi
22675
22676
22677  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22678  BOOT_JDK_SUFFIX=""
22679  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22680  if test "x$ALL_JDKS_FOUND" != x; then
22681    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22682
22683  if test "x$BOOT_JDK_FOUND" = xno; then
22684    # Now execute the test
22685
22686        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22687        if test -d "$BOOT_JDK"; then
22688          BOOT_JDK_FOUND=maybe
22689          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22690$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
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  # Only process if variable expands to non-empty
22726
22727  if test "x$BOOT_JDK" != x; then
22728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22729
22730  # Input might be given as Windows format, start by converting to
22731  # unix format.
22732  path="$BOOT_JDK"
22733  new_path=`$CYGPATH -u "$path"`
22734
22735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22738  # "foo.exe" is OK but "foo" is an error.
22739  #
22740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22741  # It is also a way to make sure we got the proper file name for the real test later on.
22742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22743  if test "x$test_shortpath" = x; then
22744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22746    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22747  fi
22748
22749  # Call helper function which possibly converts this using DOS-style short mode.
22750  # If so, the updated path is stored in $new_path.
22751
22752  input_path="$new_path"
22753  # Check if we need to convert this using DOS-style short mode. If the path
22754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22755  # take no chances and rewrite it.
22756  # Note: m4 eats our [], so we need to use [ and ] instead.
22757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22758  if test "x$has_forbidden_chars" != x; then
22759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22763      # Going to short mode and back again did indeed matter. Since short mode is
22764      # case insensitive, let's make it lowercase to improve readability.
22765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22766      # Now convert it back to Unix-stile (cygpath)
22767      input_path=`$CYGPATH -u "$shortmode_path"`
22768      new_path="$input_path"
22769    fi
22770  fi
22771
22772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22773  if test "x$test_cygdrive_prefix" = x; then
22774    # As a simple fix, exclude /usr/bin since it's not a real path.
22775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22777      # a path prefixed by /cygdrive for fixpath to work.
22778      new_path="$CYGWIN_ROOT_PATH$input_path"
22779    fi
22780  fi
22781
22782
22783  if test "x$path" != "x$new_path"; then
22784    BOOT_JDK="$new_path"
22785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22786$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22787  fi
22788
22789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22790
22791  path="$BOOT_JDK"
22792  has_colon=`$ECHO $path | $GREP ^.:`
22793  new_path="$path"
22794  if test "x$has_colon" = x; then
22795    # Not in mixed or Windows style, start by that.
22796    new_path=`cmd //c echo $path`
22797  fi
22798
22799
22800  input_path="$new_path"
22801  # Check if we need to convert this using DOS-style short mode. If the path
22802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22803  # take no chances and rewrite it.
22804  # Note: m4 eats our [], so we need to use [ and ] instead.
22805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22806  if test "x$has_forbidden_chars" != x; then
22807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22809  fi
22810
22811
22812  windows_path="$new_path"
22813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22814    unix_path=`$CYGPATH -u "$windows_path"`
22815    new_path="$unix_path"
22816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22818    new_path="$unix_path"
22819  fi
22820
22821  if test "x$path" != "x$new_path"; then
22822    BOOT_JDK="$new_path"
22823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22825  fi
22826
22827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22829
22830    else
22831      # We're on a unix platform. Hooray! :)
22832      path="$BOOT_JDK"
22833      has_space=`$ECHO "$path" | $GREP " "`
22834      if test "x$has_space" != x; then
22835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22838      fi
22839
22840      # Use eval to expand a potential ~
22841      eval path="$path"
22842      if test ! -f "$path" && test ! -d "$path"; then
22843        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22844      fi
22845
22846      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22847    fi
22848  fi
22849
22850            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22851$as_echo_n "checking for Boot JDK... " >&6; }
22852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22853$as_echo "$BOOT_JDK" >&6; }
22854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22855$as_echo_n "checking Boot JDK version... " >&6; }
22856            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22858$as_echo "$BOOT_JDK_VERSION" >&6; }
22859          fi # end check jdk version
22860        fi # end check javac
22861      fi # end check java
22862    fi # end check boot jdk found
22863  fi
22864
22865    done
22866  fi
22867
22868  fi
22869
22870
22871    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22872    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22873      # Do we have a bin/java?
22874      if test ! -x "$BOOT_JDK/bin/java"; then
22875        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22877        BOOT_JDK_FOUND=no
22878      else
22879        # Do we have a bin/javac?
22880        if test ! -x "$BOOT_JDK/bin/javac"; then
22881          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22883          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22884$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22885          BOOT_JDK_FOUND=no
22886        else
22887          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22888          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22889
22890          # Extra M4 quote needed to protect [] in grep expression.
22891          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22892          if test "x$FOUND_CORRECT_VERSION" = x; then
22893            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22895            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22896$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22897            BOOT_JDK_FOUND=no
22898          else
22899            # We're done! :-)
22900            BOOT_JDK_FOUND=yes
22901
22902  # Only process if variable expands to non-empty
22903
22904  if test "x$BOOT_JDK" != x; then
22905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22906
22907  # Input might be given as Windows format, start by converting to
22908  # unix format.
22909  path="$BOOT_JDK"
22910  new_path=`$CYGPATH -u "$path"`
22911
22912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22915  # "foo.exe" is OK but "foo" is an error.
22916  #
22917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22918  # It is also a way to make sure we got the proper file name for the real test later on.
22919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22920  if test "x$test_shortpath" = x; then
22921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22923    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22924  fi
22925
22926  # Call helper function which possibly converts this using DOS-style short mode.
22927  # If so, the updated path is stored in $new_path.
22928
22929  input_path="$new_path"
22930  # Check if we need to convert this using DOS-style short mode. If the path
22931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22932  # take no chances and rewrite it.
22933  # Note: m4 eats our [], so we need to use [ and ] instead.
22934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22935  if test "x$has_forbidden_chars" != x; then
22936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22940      # Going to short mode and back again did indeed matter. Since short mode is
22941      # case insensitive, let's make it lowercase to improve readability.
22942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22943      # Now convert it back to Unix-stile (cygpath)
22944      input_path=`$CYGPATH -u "$shortmode_path"`
22945      new_path="$input_path"
22946    fi
22947  fi
22948
22949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22950  if test "x$test_cygdrive_prefix" = x; then
22951    # As a simple fix, exclude /usr/bin since it's not a real path.
22952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22954      # a path prefixed by /cygdrive for fixpath to work.
22955      new_path="$CYGWIN_ROOT_PATH$input_path"
22956    fi
22957  fi
22958
22959
22960  if test "x$path" != "x$new_path"; then
22961    BOOT_JDK="$new_path"
22962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22963$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22964  fi
22965
22966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22967
22968  path="$BOOT_JDK"
22969  has_colon=`$ECHO $path | $GREP ^.:`
22970  new_path="$path"
22971  if test "x$has_colon" = x; then
22972    # Not in mixed or Windows style, start by that.
22973    new_path=`cmd //c echo $path`
22974  fi
22975
22976
22977  input_path="$new_path"
22978  # Check if we need to convert this using DOS-style short mode. If the path
22979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22980  # take no chances and rewrite it.
22981  # Note: m4 eats our [], so we need to use [ and ] instead.
22982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22983  if test "x$has_forbidden_chars" != x; then
22984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22986  fi
22987
22988
22989  windows_path="$new_path"
22990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22991    unix_path=`$CYGPATH -u "$windows_path"`
22992    new_path="$unix_path"
22993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22995    new_path="$unix_path"
22996  fi
22997
22998  if test "x$path" != "x$new_path"; then
22999    BOOT_JDK="$new_path"
23000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23001$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23002  fi
23003
23004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23006
23007    else
23008      # We're on a unix platform. Hooray! :)
23009      path="$BOOT_JDK"
23010      has_space=`$ECHO "$path" | $GREP " "`
23011      if test "x$has_space" != x; then
23012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23013$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23015      fi
23016
23017      # Use eval to expand a potential ~
23018      eval path="$path"
23019      if test ! -f "$path" && test ! -d "$path"; then
23020        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23021      fi
23022
23023      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23024    fi
23025  fi
23026
23027            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23028$as_echo_n "checking for Boot JDK... " >&6; }
23029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23030$as_echo "$BOOT_JDK" >&6; }
23031            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23032$as_echo_n "checking Boot JDK version... " >&6; }
23033            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23035$as_echo "$BOOT_JDK_VERSION" >&6; }
23036          fi # end check jdk version
23037        fi # end check javac
23038      fi # end check java
23039    fi # end check boot jdk found
23040  fi
23041
23042
23043  if test "x$BOOT_JDK_FOUND" = xno; then
23044    # Now execute the test
23045
23046  if test "x$PROGRAMFILES" != x; then
23047    VIRTUAL_DIR="$PROGRAMFILES/Java"
23048
23049  windows_path="$VIRTUAL_DIR"
23050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23051    unix_path=`$CYGPATH -u "$windows_path"`
23052    VIRTUAL_DIR="$unix_path"
23053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23055    VIRTUAL_DIR="$unix_path"
23056  fi
23057
23058
23059  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23060  BOOT_JDK_SUFFIX=""
23061  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23062  if test "x$ALL_JDKS_FOUND" != x; then
23063    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23064
23065  if test "x$BOOT_JDK_FOUND" = xno; then
23066    # Now execute the test
23067
23068        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23069        if test -d "$BOOT_JDK"; then
23070          BOOT_JDK_FOUND=maybe
23071          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23072$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23073        fi
23074
23075
23076    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23077    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23078      # Do we have a bin/java?
23079      if test ! -x "$BOOT_JDK/bin/java"; then
23080        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23082        BOOT_JDK_FOUND=no
23083      else
23084        # Do we have a bin/javac?
23085        if test ! -x "$BOOT_JDK/bin/javac"; then
23086          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23088          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23089$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23090          BOOT_JDK_FOUND=no
23091        else
23092          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23093          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23094
23095          # Extra M4 quote needed to protect [] in grep expression.
23096          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23097          if test "x$FOUND_CORRECT_VERSION" = x; then
23098            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23100            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23101$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23102            BOOT_JDK_FOUND=no
23103          else
23104            # We're done! :-)
23105            BOOT_JDK_FOUND=yes
23106
23107  # Only process if variable expands to non-empty
23108
23109  if test "x$BOOT_JDK" != x; then
23110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23111
23112  # Input might be given as Windows format, start by converting to
23113  # unix format.
23114  path="$BOOT_JDK"
23115  new_path=`$CYGPATH -u "$path"`
23116
23117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23120  # "foo.exe" is OK but "foo" is an error.
23121  #
23122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23123  # It is also a way to make sure we got the proper file name for the real test later on.
23124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23125  if test "x$test_shortpath" = x; then
23126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23128    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23129  fi
23130
23131  # Call helper function which possibly converts this using DOS-style short mode.
23132  # If so, the updated path is stored in $new_path.
23133
23134  input_path="$new_path"
23135  # Check if we need to convert this using DOS-style short mode. If the path
23136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23137  # take no chances and rewrite it.
23138  # Note: m4 eats our [], so we need to use [ and ] instead.
23139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23140  if test "x$has_forbidden_chars" != x; then
23141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23145      # Going to short mode and back again did indeed matter. Since short mode is
23146      # case insensitive, let's make it lowercase to improve readability.
23147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23148      # Now convert it back to Unix-stile (cygpath)
23149      input_path=`$CYGPATH -u "$shortmode_path"`
23150      new_path="$input_path"
23151    fi
23152  fi
23153
23154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23155  if test "x$test_cygdrive_prefix" = x; then
23156    # As a simple fix, exclude /usr/bin since it's not a real path.
23157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23159      # a path prefixed by /cygdrive for fixpath to work.
23160      new_path="$CYGWIN_ROOT_PATH$input_path"
23161    fi
23162  fi
23163
23164
23165  if test "x$path" != "x$new_path"; then
23166    BOOT_JDK="$new_path"
23167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23169  fi
23170
23171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23172
23173  path="$BOOT_JDK"
23174  has_colon=`$ECHO $path | $GREP ^.:`
23175  new_path="$path"
23176  if test "x$has_colon" = x; then
23177    # Not in mixed or Windows style, start by that.
23178    new_path=`cmd //c echo $path`
23179  fi
23180
23181
23182  input_path="$new_path"
23183  # Check if we need to convert this using DOS-style short mode. If the path
23184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23185  # take no chances and rewrite it.
23186  # Note: m4 eats our [], so we need to use [ and ] instead.
23187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23188  if test "x$has_forbidden_chars" != x; then
23189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23191  fi
23192
23193
23194  windows_path="$new_path"
23195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23196    unix_path=`$CYGPATH -u "$windows_path"`
23197    new_path="$unix_path"
23198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23200    new_path="$unix_path"
23201  fi
23202
23203  if test "x$path" != "x$new_path"; then
23204    BOOT_JDK="$new_path"
23205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23207  fi
23208
23209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23211
23212    else
23213      # We're on a unix platform. Hooray! :)
23214      path="$BOOT_JDK"
23215      has_space=`$ECHO "$path" | $GREP " "`
23216      if test "x$has_space" != x; then
23217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23220      fi
23221
23222      # Use eval to expand a potential ~
23223      eval path="$path"
23224      if test ! -f "$path" && test ! -d "$path"; then
23225        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23226      fi
23227
23228      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23229    fi
23230  fi
23231
23232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23233$as_echo_n "checking for Boot JDK... " >&6; }
23234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23235$as_echo "$BOOT_JDK" >&6; }
23236            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23237$as_echo_n "checking Boot JDK version... " >&6; }
23238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23240$as_echo "$BOOT_JDK_VERSION" >&6; }
23241          fi # end check jdk version
23242        fi # end check javac
23243      fi # end check java
23244    fi # end check boot jdk found
23245  fi
23246
23247    done
23248  fi
23249
23250  fi
23251
23252
23253    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23254    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23255      # Do we have a bin/java?
23256      if test ! -x "$BOOT_JDK/bin/java"; then
23257        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23259        BOOT_JDK_FOUND=no
23260      else
23261        # Do we have a bin/javac?
23262        if test ! -x "$BOOT_JDK/bin/javac"; then
23263          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23265          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23266$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23267          BOOT_JDK_FOUND=no
23268        else
23269          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23270          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23271
23272          # Extra M4 quote needed to protect [] in grep expression.
23273          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23274          if test "x$FOUND_CORRECT_VERSION" = x; then
23275            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23277            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23278$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23279            BOOT_JDK_FOUND=no
23280          else
23281            # We're done! :-)
23282            BOOT_JDK_FOUND=yes
23283
23284  # Only process if variable expands to non-empty
23285
23286  if test "x$BOOT_JDK" != x; then
23287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23288
23289  # Input might be given as Windows format, start by converting to
23290  # unix format.
23291  path="$BOOT_JDK"
23292  new_path=`$CYGPATH -u "$path"`
23293
23294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23297  # "foo.exe" is OK but "foo" is an error.
23298  #
23299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23300  # It is also a way to make sure we got the proper file name for the real test later on.
23301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23302  if test "x$test_shortpath" = x; then
23303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23305    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23306  fi
23307
23308  # Call helper function which possibly converts this using DOS-style short mode.
23309  # If so, the updated path is stored in $new_path.
23310
23311  input_path="$new_path"
23312  # Check if we need to convert this using DOS-style short mode. If the path
23313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23314  # take no chances and rewrite it.
23315  # Note: m4 eats our [], so we need to use [ and ] instead.
23316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23317  if test "x$has_forbidden_chars" != x; then
23318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23322      # Going to short mode and back again did indeed matter. Since short mode is
23323      # case insensitive, let's make it lowercase to improve readability.
23324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23325      # Now convert it back to Unix-stile (cygpath)
23326      input_path=`$CYGPATH -u "$shortmode_path"`
23327      new_path="$input_path"
23328    fi
23329  fi
23330
23331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23332  if test "x$test_cygdrive_prefix" = x; then
23333    # As a simple fix, exclude /usr/bin since it's not a real path.
23334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23336      # a path prefixed by /cygdrive for fixpath to work.
23337      new_path="$CYGWIN_ROOT_PATH$input_path"
23338    fi
23339  fi
23340
23341
23342  if test "x$path" != "x$new_path"; then
23343    BOOT_JDK="$new_path"
23344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23346  fi
23347
23348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23349
23350  path="$BOOT_JDK"
23351  has_colon=`$ECHO $path | $GREP ^.:`
23352  new_path="$path"
23353  if test "x$has_colon" = x; then
23354    # Not in mixed or Windows style, start by that.
23355    new_path=`cmd //c echo $path`
23356  fi
23357
23358
23359  input_path="$new_path"
23360  # Check if we need to convert this using DOS-style short mode. If the path
23361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23362  # take no chances and rewrite it.
23363  # Note: m4 eats our [], so we need to use [ and ] instead.
23364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23365  if test "x$has_forbidden_chars" != x; then
23366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23368  fi
23369
23370
23371  windows_path="$new_path"
23372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23373    unix_path=`$CYGPATH -u "$windows_path"`
23374    new_path="$unix_path"
23375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23377    new_path="$unix_path"
23378  fi
23379
23380  if test "x$path" != "x$new_path"; then
23381    BOOT_JDK="$new_path"
23382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23384  fi
23385
23386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23388
23389    else
23390      # We're on a unix platform. Hooray! :)
23391      path="$BOOT_JDK"
23392      has_space=`$ECHO "$path" | $GREP " "`
23393      if test "x$has_space" != x; then
23394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23397      fi
23398
23399      # Use eval to expand a potential ~
23400      eval path="$path"
23401      if test ! -f "$path" && test ! -d "$path"; then
23402        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23403      fi
23404
23405      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23406    fi
23407  fi
23408
23409            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23410$as_echo_n "checking for Boot JDK... " >&6; }
23411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23412$as_echo "$BOOT_JDK" >&6; }
23413            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23414$as_echo_n "checking Boot JDK version... " >&6; }
23415            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23417$as_echo "$BOOT_JDK_VERSION" >&6; }
23418          fi # end check jdk version
23419        fi # end check javac
23420      fi # end check java
23421    fi # end check boot jdk found
23422  fi
23423
23424
23425  if test "x$BOOT_JDK_FOUND" = xno; then
23426    # Now execute the test
23427
23428  if test "x$ProgramFiles" != x; then
23429    VIRTUAL_DIR="$ProgramFiles/Java"
23430
23431  windows_path="$VIRTUAL_DIR"
23432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23433    unix_path=`$CYGPATH -u "$windows_path"`
23434    VIRTUAL_DIR="$unix_path"
23435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23437    VIRTUAL_DIR="$unix_path"
23438  fi
23439
23440
23441  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23442  BOOT_JDK_SUFFIX=""
23443  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23444  if test "x$ALL_JDKS_FOUND" != x; then
23445    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23446
23447  if test "x$BOOT_JDK_FOUND" = xno; then
23448    # Now execute the test
23449
23450        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23451        if test -d "$BOOT_JDK"; then
23452          BOOT_JDK_FOUND=maybe
23453          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23454$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23455        fi
23456
23457
23458    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23459    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23460      # Do we have a bin/java?
23461      if test ! -x "$BOOT_JDK/bin/java"; then
23462        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23464        BOOT_JDK_FOUND=no
23465      else
23466        # Do we have a bin/javac?
23467        if test ! -x "$BOOT_JDK/bin/javac"; then
23468          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23470          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23471$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23472          BOOT_JDK_FOUND=no
23473        else
23474          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23475          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23476
23477          # Extra M4 quote needed to protect [] in grep expression.
23478          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23479          if test "x$FOUND_CORRECT_VERSION" = x; then
23480            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23482            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23483$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23484            BOOT_JDK_FOUND=no
23485          else
23486            # We're done! :-)
23487            BOOT_JDK_FOUND=yes
23488
23489  # Only process if variable expands to non-empty
23490
23491  if test "x$BOOT_JDK" != x; then
23492    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23493
23494  # Input might be given as Windows format, start by converting to
23495  # unix format.
23496  path="$BOOT_JDK"
23497  new_path=`$CYGPATH -u "$path"`
23498
23499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23502  # "foo.exe" is OK but "foo" is an error.
23503  #
23504  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23505  # It is also a way to make sure we got the proper file name for the real test later on.
23506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23507  if test "x$test_shortpath" = x; then
23508    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23510    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23511  fi
23512
23513  # Call helper function which possibly converts this using DOS-style short mode.
23514  # If so, the updated path is stored in $new_path.
23515
23516  input_path="$new_path"
23517  # Check if we need to convert this using DOS-style short mode. If the path
23518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23519  # take no chances and rewrite it.
23520  # Note: m4 eats our [], so we need to use [ and ] instead.
23521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23522  if test "x$has_forbidden_chars" != x; then
23523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23524    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23525    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23526    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23527      # Going to short mode and back again did indeed matter. Since short mode is
23528      # case insensitive, let's make it lowercase to improve readability.
23529      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23530      # Now convert it back to Unix-stile (cygpath)
23531      input_path=`$CYGPATH -u "$shortmode_path"`
23532      new_path="$input_path"
23533    fi
23534  fi
23535
23536  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23537  if test "x$test_cygdrive_prefix" = x; then
23538    # As a simple fix, exclude /usr/bin since it's not a real path.
23539    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23540      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23541      # a path prefixed by /cygdrive for fixpath to work.
23542      new_path="$CYGWIN_ROOT_PATH$input_path"
23543    fi
23544  fi
23545
23546
23547  if test "x$path" != "x$new_path"; then
23548    BOOT_JDK="$new_path"
23549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23550$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23551  fi
23552
23553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23554
23555  path="$BOOT_JDK"
23556  has_colon=`$ECHO $path | $GREP ^.:`
23557  new_path="$path"
23558  if test "x$has_colon" = x; then
23559    # Not in mixed or Windows style, start by that.
23560    new_path=`cmd //c echo $path`
23561  fi
23562
23563
23564  input_path="$new_path"
23565  # Check if we need to convert this using DOS-style short mode. If the path
23566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23567  # take no chances and rewrite it.
23568  # Note: m4 eats our [], so we need to use [ and ] instead.
23569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23570  if test "x$has_forbidden_chars" != x; then
23571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23572    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23573  fi
23574
23575
23576  windows_path="$new_path"
23577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23578    unix_path=`$CYGPATH -u "$windows_path"`
23579    new_path="$unix_path"
23580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23582    new_path="$unix_path"
23583  fi
23584
23585  if test "x$path" != "x$new_path"; then
23586    BOOT_JDK="$new_path"
23587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23589  fi
23590
23591  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23592  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23593
23594    else
23595      # We're on a unix platform. Hooray! :)
23596      path="$BOOT_JDK"
23597      has_space=`$ECHO "$path" | $GREP " "`
23598      if test "x$has_space" != x; then
23599        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23600$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23601        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23602      fi
23603
23604      # Use eval to expand a potential ~
23605      eval path="$path"
23606      if test ! -f "$path" && test ! -d "$path"; then
23607        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23608      fi
23609
23610      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23611    fi
23612  fi
23613
23614            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23615$as_echo_n "checking for Boot JDK... " >&6; }
23616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23617$as_echo "$BOOT_JDK" >&6; }
23618            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23619$as_echo_n "checking Boot JDK version... " >&6; }
23620            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23622$as_echo "$BOOT_JDK_VERSION" >&6; }
23623          fi # end check jdk version
23624        fi # end check javac
23625      fi # end check java
23626    fi # end check boot jdk found
23627  fi
23628
23629    done
23630  fi
23631
23632  fi
23633
23634
23635    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23636    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23637      # Do we have a bin/java?
23638      if test ! -x "$BOOT_JDK/bin/java"; then
23639        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23641        BOOT_JDK_FOUND=no
23642      else
23643        # Do we have a bin/javac?
23644        if test ! -x "$BOOT_JDK/bin/javac"; then
23645          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23647          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23648$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23649          BOOT_JDK_FOUND=no
23650        else
23651          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23652          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23653
23654          # Extra M4 quote needed to protect [] in grep expression.
23655          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23656          if test "x$FOUND_CORRECT_VERSION" = x; then
23657            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23659            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23660$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23661            BOOT_JDK_FOUND=no
23662          else
23663            # We're done! :-)
23664            BOOT_JDK_FOUND=yes
23665
23666  # Only process if variable expands to non-empty
23667
23668  if test "x$BOOT_JDK" != x; then
23669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23670
23671  # Input might be given as Windows format, start by converting to
23672  # unix format.
23673  path="$BOOT_JDK"
23674  new_path=`$CYGPATH -u "$path"`
23675
23676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23679  # "foo.exe" is OK but "foo" is an error.
23680  #
23681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23682  # It is also a way to make sure we got the proper file name for the real test later on.
23683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23684  if test "x$test_shortpath" = x; then
23685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23687    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23688  fi
23689
23690  # Call helper function which possibly converts this using DOS-style short mode.
23691  # If so, the updated path is stored in $new_path.
23692
23693  input_path="$new_path"
23694  # Check if we need to convert this using DOS-style short mode. If the path
23695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23696  # take no chances and rewrite it.
23697  # Note: m4 eats our [], so we need to use [ and ] instead.
23698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23699  if test "x$has_forbidden_chars" != x; then
23700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23704      # Going to short mode and back again did indeed matter. Since short mode is
23705      # case insensitive, let's make it lowercase to improve readability.
23706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23707      # Now convert it back to Unix-stile (cygpath)
23708      input_path=`$CYGPATH -u "$shortmode_path"`
23709      new_path="$input_path"
23710    fi
23711  fi
23712
23713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23714  if test "x$test_cygdrive_prefix" = x; then
23715    # As a simple fix, exclude /usr/bin since it's not a real path.
23716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23718      # a path prefixed by /cygdrive for fixpath to work.
23719      new_path="$CYGWIN_ROOT_PATH$input_path"
23720    fi
23721  fi
23722
23723
23724  if test "x$path" != "x$new_path"; then
23725    BOOT_JDK="$new_path"
23726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23728  fi
23729
23730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23731
23732  path="$BOOT_JDK"
23733  has_colon=`$ECHO $path | $GREP ^.:`
23734  new_path="$path"
23735  if test "x$has_colon" = x; then
23736    # Not in mixed or Windows style, start by that.
23737    new_path=`cmd //c echo $path`
23738  fi
23739
23740
23741  input_path="$new_path"
23742  # Check if we need to convert this using DOS-style short mode. If the path
23743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23744  # take no chances and rewrite it.
23745  # Note: m4 eats our [], so we need to use [ and ] instead.
23746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23747  if test "x$has_forbidden_chars" != x; then
23748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23750  fi
23751
23752
23753  windows_path="$new_path"
23754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23755    unix_path=`$CYGPATH -u "$windows_path"`
23756    new_path="$unix_path"
23757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23759    new_path="$unix_path"
23760  fi
23761
23762  if test "x$path" != "x$new_path"; then
23763    BOOT_JDK="$new_path"
23764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23766  fi
23767
23768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23770
23771    else
23772      # We're on a unix platform. Hooray! :)
23773      path="$BOOT_JDK"
23774      has_space=`$ECHO "$path" | $GREP " "`
23775      if test "x$has_space" != x; then
23776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23778        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23779      fi
23780
23781      # Use eval to expand a potential ~
23782      eval path="$path"
23783      if test ! -f "$path" && test ! -d "$path"; then
23784        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23785      fi
23786
23787      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23788    fi
23789  fi
23790
23791            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23792$as_echo_n "checking for Boot JDK... " >&6; }
23793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23794$as_echo "$BOOT_JDK" >&6; }
23795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23796$as_echo_n "checking Boot JDK version... " >&6; }
23797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23799$as_echo "$BOOT_JDK_VERSION" >&6; }
23800          fi # end check jdk version
23801        fi # end check javac
23802      fi # end check java
23803    fi # end check boot jdk found
23804  fi
23805
23806
23807  if test "x$BOOT_JDK_FOUND" = xno; then
23808    # Now execute the test
23809
23810  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23811  BOOT_JDK_SUFFIX=""
23812  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23813  if test "x$ALL_JDKS_FOUND" != x; then
23814    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23815
23816  if test "x$BOOT_JDK_FOUND" = xno; then
23817    # Now execute the test
23818
23819        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23820        if test -d "$BOOT_JDK"; then
23821          BOOT_JDK_FOUND=maybe
23822          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23823$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23824        fi
23825
23826
23827    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23828    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23829      # Do we have a bin/java?
23830      if test ! -x "$BOOT_JDK/bin/java"; then
23831        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23833        BOOT_JDK_FOUND=no
23834      else
23835        # Do we have a bin/javac?
23836        if test ! -x "$BOOT_JDK/bin/javac"; then
23837          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23839          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23840$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23841          BOOT_JDK_FOUND=no
23842        else
23843          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23844          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23845
23846          # Extra M4 quote needed to protect [] in grep expression.
23847          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23848          if test "x$FOUND_CORRECT_VERSION" = x; then
23849            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23851            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23852$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23853            BOOT_JDK_FOUND=no
23854          else
23855            # We're done! :-)
23856            BOOT_JDK_FOUND=yes
23857
23858  # Only process if variable expands to non-empty
23859
23860  if test "x$BOOT_JDK" != x; then
23861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23862
23863  # Input might be given as Windows format, start by converting to
23864  # unix format.
23865  path="$BOOT_JDK"
23866  new_path=`$CYGPATH -u "$path"`
23867
23868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23871  # "foo.exe" is OK but "foo" is an error.
23872  #
23873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23874  # It is also a way to make sure we got the proper file name for the real test later on.
23875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23876  if test "x$test_shortpath" = x; then
23877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23879    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23880  fi
23881
23882  # Call helper function which possibly converts this using DOS-style short mode.
23883  # If so, the updated path is stored in $new_path.
23884
23885  input_path="$new_path"
23886  # Check if we need to convert this using DOS-style short mode. If the path
23887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23888  # take no chances and rewrite it.
23889  # Note: m4 eats our [], so we need to use [ and ] instead.
23890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23891  if test "x$has_forbidden_chars" != x; then
23892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23896      # Going to short mode and back again did indeed matter. Since short mode is
23897      # case insensitive, let's make it lowercase to improve readability.
23898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23899      # Now convert it back to Unix-stile (cygpath)
23900      input_path=`$CYGPATH -u "$shortmode_path"`
23901      new_path="$input_path"
23902    fi
23903  fi
23904
23905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23906  if test "x$test_cygdrive_prefix" = x; then
23907    # As a simple fix, exclude /usr/bin since it's not a real path.
23908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23910      # a path prefixed by /cygdrive for fixpath to work.
23911      new_path="$CYGWIN_ROOT_PATH$input_path"
23912    fi
23913  fi
23914
23915
23916  if test "x$path" != "x$new_path"; then
23917    BOOT_JDK="$new_path"
23918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23920  fi
23921
23922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23923
23924  path="$BOOT_JDK"
23925  has_colon=`$ECHO $path | $GREP ^.:`
23926  new_path="$path"
23927  if test "x$has_colon" = x; then
23928    # Not in mixed or Windows style, start by that.
23929    new_path=`cmd //c echo $path`
23930  fi
23931
23932
23933  input_path="$new_path"
23934  # Check if we need to convert this using DOS-style short mode. If the path
23935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23936  # take no chances and rewrite it.
23937  # Note: m4 eats our [], so we need to use [ and ] instead.
23938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23939  if test "x$has_forbidden_chars" != x; then
23940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23942  fi
23943
23944
23945  windows_path="$new_path"
23946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23947    unix_path=`$CYGPATH -u "$windows_path"`
23948    new_path="$unix_path"
23949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23951    new_path="$unix_path"
23952  fi
23953
23954  if test "x$path" != "x$new_path"; then
23955    BOOT_JDK="$new_path"
23956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23958  fi
23959
23960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23962
23963    else
23964      # We're on a unix platform. Hooray! :)
23965      path="$BOOT_JDK"
23966      has_space=`$ECHO "$path" | $GREP " "`
23967      if test "x$has_space" != x; then
23968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23971      fi
23972
23973      # Use eval to expand a potential ~
23974      eval path="$path"
23975      if test ! -f "$path" && test ! -d "$path"; then
23976        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23977      fi
23978
23979      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23980    fi
23981  fi
23982
23983            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23984$as_echo_n "checking for Boot JDK... " >&6; }
23985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23986$as_echo "$BOOT_JDK" >&6; }
23987            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23988$as_echo_n "checking Boot JDK version... " >&6; }
23989            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23991$as_echo "$BOOT_JDK_VERSION" >&6; }
23992          fi # end check jdk version
23993        fi # end check javac
23994      fi # end check java
23995    fi # end check boot jdk found
23996  fi
23997
23998    done
23999  fi
24000
24001
24002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24004      # Do we have a bin/java?
24005      if test ! -x "$BOOT_JDK/bin/java"; then
24006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24008        BOOT_JDK_FOUND=no
24009      else
24010        # Do we have a bin/javac?
24011        if test ! -x "$BOOT_JDK/bin/javac"; then
24012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24016          BOOT_JDK_FOUND=no
24017        else
24018          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24019          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24020
24021          # Extra M4 quote needed to protect [] in grep expression.
24022          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24023          if test "x$FOUND_CORRECT_VERSION" = x; then
24024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24026            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24027$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24028            BOOT_JDK_FOUND=no
24029          else
24030            # We're done! :-)
24031            BOOT_JDK_FOUND=yes
24032
24033  # Only process if variable expands to non-empty
24034
24035  if test "x$BOOT_JDK" != x; then
24036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24037
24038  # Input might be given as Windows format, start by converting to
24039  # unix format.
24040  path="$BOOT_JDK"
24041  new_path=`$CYGPATH -u "$path"`
24042
24043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24046  # "foo.exe" is OK but "foo" is an error.
24047  #
24048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24049  # It is also a way to make sure we got the proper file name for the real test later on.
24050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24051  if test "x$test_shortpath" = x; then
24052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24054    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24055  fi
24056
24057  # Call helper function which possibly converts this using DOS-style short mode.
24058  # If so, the updated path is stored in $new_path.
24059
24060  input_path="$new_path"
24061  # Check if we need to convert this using DOS-style short mode. If the path
24062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24063  # take no chances and rewrite it.
24064  # Note: m4 eats our [], so we need to use [ and ] instead.
24065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24066  if test "x$has_forbidden_chars" != x; then
24067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24071      # Going to short mode and back again did indeed matter. Since short mode is
24072      # case insensitive, let's make it lowercase to improve readability.
24073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24074      # Now convert it back to Unix-stile (cygpath)
24075      input_path=`$CYGPATH -u "$shortmode_path"`
24076      new_path="$input_path"
24077    fi
24078  fi
24079
24080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24081  if test "x$test_cygdrive_prefix" = x; then
24082    # As a simple fix, exclude /usr/bin since it's not a real path.
24083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24085      # a path prefixed by /cygdrive for fixpath to work.
24086      new_path="$CYGWIN_ROOT_PATH$input_path"
24087    fi
24088  fi
24089
24090
24091  if test "x$path" != "x$new_path"; then
24092    BOOT_JDK="$new_path"
24093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24095  fi
24096
24097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24098
24099  path="$BOOT_JDK"
24100  has_colon=`$ECHO $path | $GREP ^.:`
24101  new_path="$path"
24102  if test "x$has_colon" = x; then
24103    # Not in mixed or Windows style, start by that.
24104    new_path=`cmd //c echo $path`
24105  fi
24106
24107
24108  input_path="$new_path"
24109  # Check if we need to convert this using DOS-style short mode. If the path
24110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24111  # take no chances and rewrite it.
24112  # Note: m4 eats our [], so we need to use [ and ] instead.
24113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24114  if test "x$has_forbidden_chars" != x; then
24115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24117  fi
24118
24119
24120  windows_path="$new_path"
24121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24122    unix_path=`$CYGPATH -u "$windows_path"`
24123    new_path="$unix_path"
24124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24126    new_path="$unix_path"
24127  fi
24128
24129  if test "x$path" != "x$new_path"; then
24130    BOOT_JDK="$new_path"
24131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24133  fi
24134
24135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24137
24138    else
24139      # We're on a unix platform. Hooray! :)
24140      path="$BOOT_JDK"
24141      has_space=`$ECHO "$path" | $GREP " "`
24142      if test "x$has_space" != x; then
24143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24146      fi
24147
24148      # Use eval to expand a potential ~
24149      eval path="$path"
24150      if test ! -f "$path" && test ! -d "$path"; then
24151        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24152      fi
24153
24154      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24155    fi
24156  fi
24157
24158            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24159$as_echo_n "checking for Boot JDK... " >&6; }
24160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24161$as_echo "$BOOT_JDK" >&6; }
24162            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24163$as_echo_n "checking Boot JDK version... " >&6; }
24164            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24166$as_echo "$BOOT_JDK_VERSION" >&6; }
24167          fi # end check jdk version
24168        fi # end check javac
24169      fi # end check java
24170    fi # end check boot jdk found
24171  fi
24172
24173  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24174
24175  if test "x$BOOT_JDK_FOUND" = xno; then
24176    # Now execute the test
24177
24178  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24179  BOOT_JDK_SUFFIX="/Contents/Home"
24180  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24181  if test "x$ALL_JDKS_FOUND" != x; then
24182    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24183
24184  if test "x$BOOT_JDK_FOUND" = xno; then
24185    # Now execute the test
24186
24187        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24188        if test -d "$BOOT_JDK"; then
24189          BOOT_JDK_FOUND=maybe
24190          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24191$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24192        fi
24193
24194
24195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24197      # Do we have a bin/java?
24198      if test ! -x "$BOOT_JDK/bin/java"; then
24199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24201        BOOT_JDK_FOUND=no
24202      else
24203        # Do we have a bin/javac?
24204        if test ! -x "$BOOT_JDK/bin/javac"; then
24205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24209          BOOT_JDK_FOUND=no
24210        else
24211          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24212          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24213
24214          # Extra M4 quote needed to protect [] in grep expression.
24215          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24216          if test "x$FOUND_CORRECT_VERSION" = x; then
24217            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24219            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24220$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24221            BOOT_JDK_FOUND=no
24222          else
24223            # We're done! :-)
24224            BOOT_JDK_FOUND=yes
24225
24226  # Only process if variable expands to non-empty
24227
24228  if test "x$BOOT_JDK" != x; then
24229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24230
24231  # Input might be given as Windows format, start by converting to
24232  # unix format.
24233  path="$BOOT_JDK"
24234  new_path=`$CYGPATH -u "$path"`
24235
24236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24239  # "foo.exe" is OK but "foo" is an error.
24240  #
24241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24242  # It is also a way to make sure we got the proper file name for the real test later on.
24243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24244  if test "x$test_shortpath" = x; then
24245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24247    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24248  fi
24249
24250  # Call helper function which possibly converts this using DOS-style short mode.
24251  # If so, the updated path is stored in $new_path.
24252
24253  input_path="$new_path"
24254  # Check if we need to convert this using DOS-style short mode. If the path
24255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24256  # take no chances and rewrite it.
24257  # Note: m4 eats our [], so we need to use [ and ] instead.
24258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24259  if test "x$has_forbidden_chars" != x; then
24260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24264      # Going to short mode and back again did indeed matter. Since short mode is
24265      # case insensitive, let's make it lowercase to improve readability.
24266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24267      # Now convert it back to Unix-stile (cygpath)
24268      input_path=`$CYGPATH -u "$shortmode_path"`
24269      new_path="$input_path"
24270    fi
24271  fi
24272
24273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24274  if test "x$test_cygdrive_prefix" = x; then
24275    # As a simple fix, exclude /usr/bin since it's not a real path.
24276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24278      # a path prefixed by /cygdrive for fixpath to work.
24279      new_path="$CYGWIN_ROOT_PATH$input_path"
24280    fi
24281  fi
24282
24283
24284  if test "x$path" != "x$new_path"; then
24285    BOOT_JDK="$new_path"
24286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24288  fi
24289
24290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24291
24292  path="$BOOT_JDK"
24293  has_colon=`$ECHO $path | $GREP ^.:`
24294  new_path="$path"
24295  if test "x$has_colon" = x; then
24296    # Not in mixed or Windows style, start by that.
24297    new_path=`cmd //c echo $path`
24298  fi
24299
24300
24301  input_path="$new_path"
24302  # Check if we need to convert this using DOS-style short mode. If the path
24303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24304  # take no chances and rewrite it.
24305  # Note: m4 eats our [], so we need to use [ and ] instead.
24306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24307  if test "x$has_forbidden_chars" != x; then
24308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24310  fi
24311
24312
24313  windows_path="$new_path"
24314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24315    unix_path=`$CYGPATH -u "$windows_path"`
24316    new_path="$unix_path"
24317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24319    new_path="$unix_path"
24320  fi
24321
24322  if test "x$path" != "x$new_path"; then
24323    BOOT_JDK="$new_path"
24324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24326  fi
24327
24328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24330
24331    else
24332      # We're on a unix platform. Hooray! :)
24333      path="$BOOT_JDK"
24334      has_space=`$ECHO "$path" | $GREP " "`
24335      if test "x$has_space" != x; then
24336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24339      fi
24340
24341      # Use eval to expand a potential ~
24342      eval path="$path"
24343      if test ! -f "$path" && test ! -d "$path"; then
24344        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24345      fi
24346
24347      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24348    fi
24349  fi
24350
24351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24352$as_echo_n "checking for Boot JDK... " >&6; }
24353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24354$as_echo "$BOOT_JDK" >&6; }
24355            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24356$as_echo_n "checking Boot JDK version... " >&6; }
24357            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24359$as_echo "$BOOT_JDK_VERSION" >&6; }
24360          fi # end check jdk version
24361        fi # end check javac
24362      fi # end check java
24363    fi # end check boot jdk found
24364  fi
24365
24366    done
24367  fi
24368
24369
24370    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24371    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24372      # Do we have a bin/java?
24373      if test ! -x "$BOOT_JDK/bin/java"; then
24374        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24376        BOOT_JDK_FOUND=no
24377      else
24378        # Do we have a bin/javac?
24379        if test ! -x "$BOOT_JDK/bin/javac"; then
24380          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24382          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24383$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24384          BOOT_JDK_FOUND=no
24385        else
24386          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24387          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24388
24389          # Extra M4 quote needed to protect [] in grep expression.
24390          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24391          if test "x$FOUND_CORRECT_VERSION" = x; then
24392            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24394            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24395$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24396            BOOT_JDK_FOUND=no
24397          else
24398            # We're done! :-)
24399            BOOT_JDK_FOUND=yes
24400
24401  # Only process if variable expands to non-empty
24402
24403  if test "x$BOOT_JDK" != x; then
24404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24405
24406  # Input might be given as Windows format, start by converting to
24407  # unix format.
24408  path="$BOOT_JDK"
24409  new_path=`$CYGPATH -u "$path"`
24410
24411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24414  # "foo.exe" is OK but "foo" is an error.
24415  #
24416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24417  # It is also a way to make sure we got the proper file name for the real test later on.
24418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24419  if test "x$test_shortpath" = x; then
24420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24421$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24422    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24423  fi
24424
24425  # Call helper function which possibly converts this using DOS-style short mode.
24426  # If so, the updated path is stored in $new_path.
24427
24428  input_path="$new_path"
24429  # Check if we need to convert this using DOS-style short mode. If the path
24430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24431  # take no chances and rewrite it.
24432  # Note: m4 eats our [], so we need to use [ and ] instead.
24433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24434  if test "x$has_forbidden_chars" != x; then
24435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24439      # Going to short mode and back again did indeed matter. Since short mode is
24440      # case insensitive, let's make it lowercase to improve readability.
24441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24442      # Now convert it back to Unix-stile (cygpath)
24443      input_path=`$CYGPATH -u "$shortmode_path"`
24444      new_path="$input_path"
24445    fi
24446  fi
24447
24448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24449  if test "x$test_cygdrive_prefix" = x; then
24450    # As a simple fix, exclude /usr/bin since it's not a real path.
24451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24453      # a path prefixed by /cygdrive for fixpath to work.
24454      new_path="$CYGWIN_ROOT_PATH$input_path"
24455    fi
24456  fi
24457
24458
24459  if test "x$path" != "x$new_path"; then
24460    BOOT_JDK="$new_path"
24461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24462$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24463  fi
24464
24465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24466
24467  path="$BOOT_JDK"
24468  has_colon=`$ECHO $path | $GREP ^.:`
24469  new_path="$path"
24470  if test "x$has_colon" = x; then
24471    # Not in mixed or Windows style, start by that.
24472    new_path=`cmd //c echo $path`
24473  fi
24474
24475
24476  input_path="$new_path"
24477  # Check if we need to convert this using DOS-style short mode. If the path
24478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24479  # take no chances and rewrite it.
24480  # Note: m4 eats our [], so we need to use [ and ] instead.
24481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24482  if test "x$has_forbidden_chars" != x; then
24483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24485  fi
24486
24487
24488  windows_path="$new_path"
24489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24490    unix_path=`$CYGPATH -u "$windows_path"`
24491    new_path="$unix_path"
24492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24494    new_path="$unix_path"
24495  fi
24496
24497  if test "x$path" != "x$new_path"; then
24498    BOOT_JDK="$new_path"
24499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24500$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24501  fi
24502
24503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24505
24506    else
24507      # We're on a unix platform. Hooray! :)
24508      path="$BOOT_JDK"
24509      has_space=`$ECHO "$path" | $GREP " "`
24510      if test "x$has_space" != x; then
24511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24512$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24514      fi
24515
24516      # Use eval to expand a potential ~
24517      eval path="$path"
24518      if test ! -f "$path" && test ! -d "$path"; then
24519        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24520      fi
24521
24522      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24523    fi
24524  fi
24525
24526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24527$as_echo_n "checking for Boot JDK... " >&6; }
24528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24529$as_echo "$BOOT_JDK" >&6; }
24530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24531$as_echo_n "checking Boot JDK version... " >&6; }
24532            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24534$as_echo "$BOOT_JDK_VERSION" >&6; }
24535          fi # end check jdk version
24536        fi # end check javac
24537      fi # end check java
24538    fi # end check boot jdk found
24539  fi
24540
24541
24542  if test "x$BOOT_JDK_FOUND" = xno; then
24543    # Now execute the test
24544
24545  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24546  BOOT_JDK_SUFFIX="/Contents/Home"
24547  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24548  if test "x$ALL_JDKS_FOUND" != x; then
24549    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24550
24551  if test "x$BOOT_JDK_FOUND" = xno; then
24552    # Now execute the test
24553
24554        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24555        if test -d "$BOOT_JDK"; then
24556          BOOT_JDK_FOUND=maybe
24557          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24558$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24559        fi
24560
24561
24562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24564      # Do we have a bin/java?
24565      if test ! -x "$BOOT_JDK/bin/java"; then
24566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24568        BOOT_JDK_FOUND=no
24569      else
24570        # Do we have a bin/javac?
24571        if test ! -x "$BOOT_JDK/bin/javac"; then
24572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24576          BOOT_JDK_FOUND=no
24577        else
24578          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24579          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24580
24581          # Extra M4 quote needed to protect [] in grep expression.
24582          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24583          if test "x$FOUND_CORRECT_VERSION" = x; then
24584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24586            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24587$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24588            BOOT_JDK_FOUND=no
24589          else
24590            # We're done! :-)
24591            BOOT_JDK_FOUND=yes
24592
24593  # Only process if variable expands to non-empty
24594
24595  if test "x$BOOT_JDK" != x; then
24596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24597
24598  # Input might be given as Windows format, start by converting to
24599  # unix format.
24600  path="$BOOT_JDK"
24601  new_path=`$CYGPATH -u "$path"`
24602
24603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24606  # "foo.exe" is OK but "foo" is an error.
24607  #
24608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24609  # It is also a way to make sure we got the proper file name for the real test later on.
24610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24611  if test "x$test_shortpath" = x; then
24612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24615  fi
24616
24617  # Call helper function which possibly converts this using DOS-style short mode.
24618  # If so, the updated path is stored in $new_path.
24619
24620  input_path="$new_path"
24621  # Check if we need to convert this using DOS-style short mode. If the path
24622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24623  # take no chances and rewrite it.
24624  # Note: m4 eats our [], so we need to use [ and ] instead.
24625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24626  if test "x$has_forbidden_chars" != x; then
24627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24631      # Going to short mode and back again did indeed matter. Since short mode is
24632      # case insensitive, let's make it lowercase to improve readability.
24633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24634      # Now convert it back to Unix-stile (cygpath)
24635      input_path=`$CYGPATH -u "$shortmode_path"`
24636      new_path="$input_path"
24637    fi
24638  fi
24639
24640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24641  if test "x$test_cygdrive_prefix" = x; then
24642    # As a simple fix, exclude /usr/bin since it's not a real path.
24643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24645      # a path prefixed by /cygdrive for fixpath to work.
24646      new_path="$CYGWIN_ROOT_PATH$input_path"
24647    fi
24648  fi
24649
24650
24651  if test "x$path" != "x$new_path"; then
24652    BOOT_JDK="$new_path"
24653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24655  fi
24656
24657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24658
24659  path="$BOOT_JDK"
24660  has_colon=`$ECHO $path | $GREP ^.:`
24661  new_path="$path"
24662  if test "x$has_colon" = x; then
24663    # Not in mixed or Windows style, start by that.
24664    new_path=`cmd //c echo $path`
24665  fi
24666
24667
24668  input_path="$new_path"
24669  # Check if we need to convert this using DOS-style short mode. If the path
24670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24671  # take no chances and rewrite it.
24672  # Note: m4 eats our [], so we need to use [ and ] instead.
24673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24674  if test "x$has_forbidden_chars" != x; then
24675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24677  fi
24678
24679
24680  windows_path="$new_path"
24681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24682    unix_path=`$CYGPATH -u "$windows_path"`
24683    new_path="$unix_path"
24684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24686    new_path="$unix_path"
24687  fi
24688
24689  if test "x$path" != "x$new_path"; then
24690    BOOT_JDK="$new_path"
24691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24693  fi
24694
24695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24697
24698    else
24699      # We're on a unix platform. Hooray! :)
24700      path="$BOOT_JDK"
24701      has_space=`$ECHO "$path" | $GREP " "`
24702      if test "x$has_space" != x; then
24703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24706      fi
24707
24708      # Use eval to expand a potential ~
24709      eval path="$path"
24710      if test ! -f "$path" && test ! -d "$path"; then
24711        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24712      fi
24713
24714      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24715    fi
24716  fi
24717
24718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24719$as_echo_n "checking for Boot JDK... " >&6; }
24720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24721$as_echo "$BOOT_JDK" >&6; }
24722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24723$as_echo_n "checking Boot JDK version... " >&6; }
24724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24726$as_echo "$BOOT_JDK_VERSION" >&6; }
24727          fi # end check jdk version
24728        fi # end check javac
24729      fi # end check java
24730    fi # end check boot jdk found
24731  fi
24732
24733    done
24734  fi
24735
24736
24737    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24738    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24739      # Do we have a bin/java?
24740      if test ! -x "$BOOT_JDK/bin/java"; then
24741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24743        BOOT_JDK_FOUND=no
24744      else
24745        # Do we have a bin/javac?
24746        if test ! -x "$BOOT_JDK/bin/javac"; then
24747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24749          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24750$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24751          BOOT_JDK_FOUND=no
24752        else
24753          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24754          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24755
24756          # Extra M4 quote needed to protect [] in grep expression.
24757          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24758          if test "x$FOUND_CORRECT_VERSION" = x; then
24759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24761            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24762$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24763            BOOT_JDK_FOUND=no
24764          else
24765            # We're done! :-)
24766            BOOT_JDK_FOUND=yes
24767
24768  # Only process if variable expands to non-empty
24769
24770  if test "x$BOOT_JDK" != x; then
24771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24772
24773  # Input might be given as Windows format, start by converting to
24774  # unix format.
24775  path="$BOOT_JDK"
24776  new_path=`$CYGPATH -u "$path"`
24777
24778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24781  # "foo.exe" is OK but "foo" is an error.
24782  #
24783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24784  # It is also a way to make sure we got the proper file name for the real test later on.
24785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24786  if test "x$test_shortpath" = x; then
24787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24788$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24789    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24790  fi
24791
24792  # Call helper function which possibly converts this using DOS-style short mode.
24793  # If so, the updated path is stored in $new_path.
24794
24795  input_path="$new_path"
24796  # Check if we need to convert this using DOS-style short mode. If the path
24797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24798  # take no chances and rewrite it.
24799  # Note: m4 eats our [], so we need to use [ and ] instead.
24800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24801  if test "x$has_forbidden_chars" != x; then
24802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24806      # Going to short mode and back again did indeed matter. Since short mode is
24807      # case insensitive, let's make it lowercase to improve readability.
24808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24809      # Now convert it back to Unix-stile (cygpath)
24810      input_path=`$CYGPATH -u "$shortmode_path"`
24811      new_path="$input_path"
24812    fi
24813  fi
24814
24815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24816  if test "x$test_cygdrive_prefix" = x; then
24817    # As a simple fix, exclude /usr/bin since it's not a real path.
24818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24820      # a path prefixed by /cygdrive for fixpath to work.
24821      new_path="$CYGWIN_ROOT_PATH$input_path"
24822    fi
24823  fi
24824
24825
24826  if test "x$path" != "x$new_path"; then
24827    BOOT_JDK="$new_path"
24828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24830  fi
24831
24832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24833
24834  path="$BOOT_JDK"
24835  has_colon=`$ECHO $path | $GREP ^.:`
24836  new_path="$path"
24837  if test "x$has_colon" = x; then
24838    # Not in mixed or Windows style, start by that.
24839    new_path=`cmd //c echo $path`
24840  fi
24841
24842
24843  input_path="$new_path"
24844  # Check if we need to convert this using DOS-style short mode. If the path
24845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24846  # take no chances and rewrite it.
24847  # Note: m4 eats our [], so we need to use [ and ] instead.
24848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24849  if test "x$has_forbidden_chars" != x; then
24850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24852  fi
24853
24854
24855  windows_path="$new_path"
24856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24857    unix_path=`$CYGPATH -u "$windows_path"`
24858    new_path="$unix_path"
24859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24861    new_path="$unix_path"
24862  fi
24863
24864  if test "x$path" != "x$new_path"; then
24865    BOOT_JDK="$new_path"
24866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24868  fi
24869
24870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24872
24873    else
24874      # We're on a unix platform. Hooray! :)
24875      path="$BOOT_JDK"
24876      has_space=`$ECHO "$path" | $GREP " "`
24877      if test "x$has_space" != x; then
24878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24881      fi
24882
24883      # Use eval to expand a potential ~
24884      eval path="$path"
24885      if test ! -f "$path" && test ! -d "$path"; then
24886        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24887      fi
24888
24889      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24890    fi
24891  fi
24892
24893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24894$as_echo_n "checking for Boot JDK... " >&6; }
24895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24896$as_echo "$BOOT_JDK" >&6; }
24897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24898$as_echo_n "checking Boot JDK version... " >&6; }
24899            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24901$as_echo "$BOOT_JDK_VERSION" >&6; }
24902          fi # end check jdk version
24903        fi # end check javac
24904      fi # end check java
24905    fi # end check boot jdk found
24906  fi
24907
24908  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24909
24910  if test "x$BOOT_JDK_FOUND" = xno; then
24911    # Now execute the test
24912
24913  BOOT_JDK_PREFIX="/usr/lib/jvm"
24914  BOOT_JDK_SUFFIX=""
24915  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24916  if test "x$ALL_JDKS_FOUND" != x; then
24917    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24918
24919  if test "x$BOOT_JDK_FOUND" = xno; then
24920    # Now execute the test
24921
24922        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24923        if test -d "$BOOT_JDK"; then
24924          BOOT_JDK_FOUND=maybe
24925          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24926$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24927        fi
24928
24929
24930    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24931    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24932      # Do we have a bin/java?
24933      if test ! -x "$BOOT_JDK/bin/java"; then
24934        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24936        BOOT_JDK_FOUND=no
24937      else
24938        # Do we have a bin/javac?
24939        if test ! -x "$BOOT_JDK/bin/javac"; then
24940          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24942          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24943$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24944          BOOT_JDK_FOUND=no
24945        else
24946          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24947          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24948
24949          # Extra M4 quote needed to protect [] in grep expression.
24950          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24951          if test "x$FOUND_CORRECT_VERSION" = x; then
24952            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24954            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24955$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24956            BOOT_JDK_FOUND=no
24957          else
24958            # We're done! :-)
24959            BOOT_JDK_FOUND=yes
24960
24961  # Only process if variable expands to non-empty
24962
24963  if test "x$BOOT_JDK" != x; then
24964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24965
24966  # Input might be given as Windows format, start by converting to
24967  # unix format.
24968  path="$BOOT_JDK"
24969  new_path=`$CYGPATH -u "$path"`
24970
24971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24974  # "foo.exe" is OK but "foo" is an error.
24975  #
24976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24977  # It is also a way to make sure we got the proper file name for the real test later on.
24978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24979  if test "x$test_shortpath" = x; then
24980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24982    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24983  fi
24984
24985  # Call helper function which possibly converts this using DOS-style short mode.
24986  # If so, the updated path is stored in $new_path.
24987
24988  input_path="$new_path"
24989  # Check if we need to convert this using DOS-style short mode. If the path
24990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24991  # take no chances and rewrite it.
24992  # Note: m4 eats our [], so we need to use [ and ] instead.
24993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24994  if test "x$has_forbidden_chars" != x; then
24995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24999      # Going to short mode and back again did indeed matter. Since short mode is
25000      # case insensitive, let's make it lowercase to improve readability.
25001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25002      # Now convert it back to Unix-stile (cygpath)
25003      input_path=`$CYGPATH -u "$shortmode_path"`
25004      new_path="$input_path"
25005    fi
25006  fi
25007
25008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25009  if test "x$test_cygdrive_prefix" = x; then
25010    # As a simple fix, exclude /usr/bin since it's not a real path.
25011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25013      # a path prefixed by /cygdrive for fixpath to work.
25014      new_path="$CYGWIN_ROOT_PATH$input_path"
25015    fi
25016  fi
25017
25018
25019  if test "x$path" != "x$new_path"; then
25020    BOOT_JDK="$new_path"
25021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25023  fi
25024
25025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25026
25027  path="$BOOT_JDK"
25028  has_colon=`$ECHO $path | $GREP ^.:`
25029  new_path="$path"
25030  if test "x$has_colon" = x; then
25031    # Not in mixed or Windows style, start by that.
25032    new_path=`cmd //c echo $path`
25033  fi
25034
25035
25036  input_path="$new_path"
25037  # Check if we need to convert this using DOS-style short mode. If the path
25038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25039  # take no chances and rewrite it.
25040  # Note: m4 eats our [], so we need to use [ and ] instead.
25041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25042  if test "x$has_forbidden_chars" != x; then
25043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25045  fi
25046
25047
25048  windows_path="$new_path"
25049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25050    unix_path=`$CYGPATH -u "$windows_path"`
25051    new_path="$unix_path"
25052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25054    new_path="$unix_path"
25055  fi
25056
25057  if test "x$path" != "x$new_path"; then
25058    BOOT_JDK="$new_path"
25059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25061  fi
25062
25063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25065
25066    else
25067      # We're on a unix platform. Hooray! :)
25068      path="$BOOT_JDK"
25069      has_space=`$ECHO "$path" | $GREP " "`
25070      if test "x$has_space" != x; then
25071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25074      fi
25075
25076      # Use eval to expand a potential ~
25077      eval path="$path"
25078      if test ! -f "$path" && test ! -d "$path"; then
25079        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25080      fi
25081
25082      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25083    fi
25084  fi
25085
25086            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25087$as_echo_n "checking for Boot JDK... " >&6; }
25088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25089$as_echo "$BOOT_JDK" >&6; }
25090            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25091$as_echo_n "checking Boot JDK version... " >&6; }
25092            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25094$as_echo "$BOOT_JDK_VERSION" >&6; }
25095          fi # end check jdk version
25096        fi # end check javac
25097      fi # end check java
25098    fi # end check boot jdk found
25099  fi
25100
25101    done
25102  fi
25103
25104
25105    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25106    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25107      # Do we have a bin/java?
25108      if test ! -x "$BOOT_JDK/bin/java"; then
25109        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25111        BOOT_JDK_FOUND=no
25112      else
25113        # Do we have a bin/javac?
25114        if test ! -x "$BOOT_JDK/bin/javac"; then
25115          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25117          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25118$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25119          BOOT_JDK_FOUND=no
25120        else
25121          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25122          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25123
25124          # Extra M4 quote needed to protect [] in grep expression.
25125          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25126          if test "x$FOUND_CORRECT_VERSION" = x; then
25127            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25129            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25130$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25131            BOOT_JDK_FOUND=no
25132          else
25133            # We're done! :-)
25134            BOOT_JDK_FOUND=yes
25135
25136  # Only process if variable expands to non-empty
25137
25138  if test "x$BOOT_JDK" != x; then
25139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25140
25141  # Input might be given as Windows format, start by converting to
25142  # unix format.
25143  path="$BOOT_JDK"
25144  new_path=`$CYGPATH -u "$path"`
25145
25146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25149  # "foo.exe" is OK but "foo" is an error.
25150  #
25151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25152  # It is also a way to make sure we got the proper file name for the real test later on.
25153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25154  if test "x$test_shortpath" = x; then
25155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25157    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25158  fi
25159
25160  # Call helper function which possibly converts this using DOS-style short mode.
25161  # If so, the updated path is stored in $new_path.
25162
25163  input_path="$new_path"
25164  # Check if we need to convert this using DOS-style short mode. If the path
25165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25166  # take no chances and rewrite it.
25167  # Note: m4 eats our [], so we need to use [ and ] instead.
25168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25169  if test "x$has_forbidden_chars" != x; then
25170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25174      # Going to short mode and back again did indeed matter. Since short mode is
25175      # case insensitive, let's make it lowercase to improve readability.
25176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25177      # Now convert it back to Unix-stile (cygpath)
25178      input_path=`$CYGPATH -u "$shortmode_path"`
25179      new_path="$input_path"
25180    fi
25181  fi
25182
25183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25184  if test "x$test_cygdrive_prefix" = x; then
25185    # As a simple fix, exclude /usr/bin since it's not a real path.
25186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25188      # a path prefixed by /cygdrive for fixpath to work.
25189      new_path="$CYGWIN_ROOT_PATH$input_path"
25190    fi
25191  fi
25192
25193
25194  if test "x$path" != "x$new_path"; then
25195    BOOT_JDK="$new_path"
25196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25198  fi
25199
25200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25201
25202  path="$BOOT_JDK"
25203  has_colon=`$ECHO $path | $GREP ^.:`
25204  new_path="$path"
25205  if test "x$has_colon" = x; then
25206    # Not in mixed or Windows style, start by that.
25207    new_path=`cmd //c echo $path`
25208  fi
25209
25210
25211  input_path="$new_path"
25212  # Check if we need to convert this using DOS-style short mode. If the path
25213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25214  # take no chances and rewrite it.
25215  # Note: m4 eats our [], so we need to use [ and ] instead.
25216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25217  if test "x$has_forbidden_chars" != x; then
25218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25220  fi
25221
25222
25223  windows_path="$new_path"
25224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25225    unix_path=`$CYGPATH -u "$windows_path"`
25226    new_path="$unix_path"
25227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25229    new_path="$unix_path"
25230  fi
25231
25232  if test "x$path" != "x$new_path"; then
25233    BOOT_JDK="$new_path"
25234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25236  fi
25237
25238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25240
25241    else
25242      # We're on a unix platform. Hooray! :)
25243      path="$BOOT_JDK"
25244      has_space=`$ECHO "$path" | $GREP " "`
25245      if test "x$has_space" != x; then
25246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25248        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25249      fi
25250
25251      # Use eval to expand a potential ~
25252      eval path="$path"
25253      if test ! -f "$path" && test ! -d "$path"; then
25254        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25255      fi
25256
25257      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25258    fi
25259  fi
25260
25261            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25262$as_echo_n "checking for Boot JDK... " >&6; }
25263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25264$as_echo "$BOOT_JDK" >&6; }
25265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25266$as_echo_n "checking Boot JDK version... " >&6; }
25267            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25269$as_echo "$BOOT_JDK_VERSION" >&6; }
25270          fi # end check jdk version
25271        fi # end check javac
25272      fi # end check java
25273    fi # end check boot jdk found
25274  fi
25275
25276  fi
25277
25278
25279    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25280    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25281      # Do we have a bin/java?
25282      if test ! -x "$BOOT_JDK/bin/java"; then
25283        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25285        BOOT_JDK_FOUND=no
25286      else
25287        # Do we have a bin/javac?
25288        if test ! -x "$BOOT_JDK/bin/javac"; then
25289          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25291          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25292$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25293          BOOT_JDK_FOUND=no
25294        else
25295          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25296          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25297
25298          # Extra M4 quote needed to protect [] in grep expression.
25299          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25300          if test "x$FOUND_CORRECT_VERSION" = x; then
25301            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25303            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25304$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25305            BOOT_JDK_FOUND=no
25306          else
25307            # We're done! :-)
25308            BOOT_JDK_FOUND=yes
25309
25310  # Only process if variable expands to non-empty
25311
25312  if test "x$BOOT_JDK" != x; then
25313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25314
25315  # Input might be given as Windows format, start by converting to
25316  # unix format.
25317  path="$BOOT_JDK"
25318  new_path=`$CYGPATH -u "$path"`
25319
25320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25323  # "foo.exe" is OK but "foo" is an error.
25324  #
25325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25326  # It is also a way to make sure we got the proper file name for the real test later on.
25327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25328  if test "x$test_shortpath" = x; then
25329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25330$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25331    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25332  fi
25333
25334  # Call helper function which possibly converts this using DOS-style short mode.
25335  # If so, the updated path is stored in $new_path.
25336
25337  input_path="$new_path"
25338  # Check if we need to convert this using DOS-style short mode. If the path
25339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25340  # take no chances and rewrite it.
25341  # Note: m4 eats our [], so we need to use [ and ] instead.
25342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25343  if test "x$has_forbidden_chars" != x; then
25344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25348      # Going to short mode and back again did indeed matter. Since short mode is
25349      # case insensitive, let's make it lowercase to improve readability.
25350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25351      # Now convert it back to Unix-stile (cygpath)
25352      input_path=`$CYGPATH -u "$shortmode_path"`
25353      new_path="$input_path"
25354    fi
25355  fi
25356
25357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25358  if test "x$test_cygdrive_prefix" = x; then
25359    # As a simple fix, exclude /usr/bin since it's not a real path.
25360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25362      # a path prefixed by /cygdrive for fixpath to work.
25363      new_path="$CYGWIN_ROOT_PATH$input_path"
25364    fi
25365  fi
25366
25367
25368  if test "x$path" != "x$new_path"; then
25369    BOOT_JDK="$new_path"
25370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25371$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25372  fi
25373
25374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25375
25376  path="$BOOT_JDK"
25377  has_colon=`$ECHO $path | $GREP ^.:`
25378  new_path="$path"
25379  if test "x$has_colon" = x; then
25380    # Not in mixed or Windows style, start by that.
25381    new_path=`cmd //c echo $path`
25382  fi
25383
25384
25385  input_path="$new_path"
25386  # Check if we need to convert this using DOS-style short mode. If the path
25387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25388  # take no chances and rewrite it.
25389  # Note: m4 eats our [], so we need to use [ and ] instead.
25390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25391  if test "x$has_forbidden_chars" != x; then
25392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25394  fi
25395
25396
25397  windows_path="$new_path"
25398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25399    unix_path=`$CYGPATH -u "$windows_path"`
25400    new_path="$unix_path"
25401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25403    new_path="$unix_path"
25404  fi
25405
25406  if test "x$path" != "x$new_path"; then
25407    BOOT_JDK="$new_path"
25408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25410  fi
25411
25412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25414
25415    else
25416      # We're on a unix platform. Hooray! :)
25417      path="$BOOT_JDK"
25418      has_space=`$ECHO "$path" | $GREP " "`
25419      if test "x$has_space" != x; then
25420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25421$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25423      fi
25424
25425      # Use eval to expand a potential ~
25426      eval path="$path"
25427      if test ! -f "$path" && test ! -d "$path"; then
25428        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25429      fi
25430
25431      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25432    fi
25433  fi
25434
25435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25436$as_echo_n "checking for Boot JDK... " >&6; }
25437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25438$as_echo "$BOOT_JDK" >&6; }
25439            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25440$as_echo_n "checking Boot JDK version... " >&6; }
25441            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25443$as_echo "$BOOT_JDK_VERSION" >&6; }
25444          fi # end check jdk version
25445        fi # end check javac
25446      fi # end check java
25447    fi # end check boot jdk found
25448  fi
25449
25450
25451  # If we haven't found anything yet, we've truly lost. Give up.
25452  if test "x$BOOT_JDK_FOUND" = xno; then
25453
25454  # Print a helpful message on how to acquire the necessary build dependency.
25455  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25456  MISSING_DEPENDENCY=openjdk
25457
25458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459    cygwin_help $MISSING_DEPENDENCY
25460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25461    msys_help $MISSING_DEPENDENCY
25462  else
25463    PKGHANDLER_COMMAND=
25464
25465    case $PKGHANDLER in
25466      apt-get)
25467        apt_help     $MISSING_DEPENDENCY ;;
25468      yum)
25469        yum_help     $MISSING_DEPENDENCY ;;
25470      port)
25471        port_help    $MISSING_DEPENDENCY ;;
25472      pkgutil)
25473        pkgutil_help $MISSING_DEPENDENCY ;;
25474      pkgadd)
25475        pkgadd_help  $MISSING_DEPENDENCY ;;
25476    esac
25477
25478    if test "x$PKGHANDLER_COMMAND" != x; then
25479      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25480    fi
25481  fi
25482
25483    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25484$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25485    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25486$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25487    as_fn_error $? "Cannot continue" "$LINENO" 5
25488  fi
25489
25490
25491
25492  # Setup tools from the Boot JDK.
25493
25494  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25495
25496  # Publish this variable in the help.
25497
25498
25499  if test "x$JAVA" = x; then
25500    # The variable is not set by user, try to locate tool using the code snippet
25501
25502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25503$as_echo_n "checking for java in Boot JDK... " >&6; }
25504      JAVA=$BOOT_JDK/bin/java
25505      if test ! -x $JAVA; then
25506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25507$as_echo "not found" >&6; }
25508        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25509$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25510        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25511      fi
25512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25513$as_echo "ok" >&6; }
25514
25515
25516  else
25517    # The variable is set, but is it from the command line or the environment?
25518
25519    # Try to remove the string !JAVA! from our list.
25520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25522      # If it failed, the variable was not from the command line. Ignore it,
25523      # but warn the user (except for BASH, which is always set by the calling BASH).
25524      if test "xJAVA" != xBASH; then
25525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25526$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25527      fi
25528      # Try to locate tool using the code snippet
25529
25530      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25531$as_echo_n "checking for java in Boot JDK... " >&6; }
25532      JAVA=$BOOT_JDK/bin/java
25533      if test ! -x $JAVA; then
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25535$as_echo "not found" >&6; }
25536        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25537$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25538        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25539      fi
25540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25541$as_echo "ok" >&6; }
25542
25543
25544    else
25545      # If it succeeded, then it was overridden by the user. We will use it
25546      # for the tool.
25547
25548      # First remove it from the list of overridden variables, so we can test
25549      # for unknown variables in the end.
25550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25551
25552      # Check if the provided tool contains a complete path.
25553      tool_specified="$JAVA"
25554      tool_basename="${tool_specified##*/}"
25555      if test "x$tool_basename" = "x$tool_specified"; then
25556        # A command without a complete path is provided, search $PATH.
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25558$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25559        # Extract the first word of "$tool_basename", so it can be a program name with args.
25560set dummy $tool_basename; ac_word=$2
25561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25562$as_echo_n "checking for $ac_word... " >&6; }
25563if ${ac_cv_path_JAVA+:} false; then :
25564  $as_echo_n "(cached) " >&6
25565else
25566  case $JAVA in
25567  [\\/]* | ?:[\\/]*)
25568  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25569  ;;
25570  *)
25571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25572for as_dir in $PATH
25573do
25574  IFS=$as_save_IFS
25575  test -z "$as_dir" && as_dir=.
25576    for ac_exec_ext in '' $ac_executable_extensions; do
25577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25578    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25580    break 2
25581  fi
25582done
25583  done
25584IFS=$as_save_IFS
25585
25586  ;;
25587esac
25588fi
25589JAVA=$ac_cv_path_JAVA
25590if test -n "$JAVA"; then
25591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25592$as_echo "$JAVA" >&6; }
25593else
25594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25595$as_echo "no" >&6; }
25596fi
25597
25598
25599        if test "x$JAVA" = x; then
25600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25601        fi
25602      else
25603        # Otherwise we believe it is a complete path. Use it as it is.
25604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25605$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25607$as_echo_n "checking for JAVA... " >&6; }
25608        if test ! -x "$tool_specified"; then
25609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25610$as_echo "not found" >&6; }
25611          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25612        fi
25613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25614$as_echo "$tool_specified" >&6; }
25615      fi
25616    fi
25617  fi
25618
25619
25620
25621  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25622
25623  # Publish this variable in the help.
25624
25625
25626  if test "x$JAVAC" = x; then
25627    # The variable is not set by user, try to locate tool using the code snippet
25628
25629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25630$as_echo_n "checking for javac in Boot JDK... " >&6; }
25631      JAVAC=$BOOT_JDK/bin/javac
25632      if test ! -x $JAVAC; then
25633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25634$as_echo "not found" >&6; }
25635        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25636$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25637        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25638      fi
25639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25640$as_echo "ok" >&6; }
25641
25642
25643  else
25644    # The variable is set, but is it from the command line or the environment?
25645
25646    # Try to remove the string !JAVAC! from our list.
25647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25649      # If it failed, the variable was not from the command line. Ignore it,
25650      # but warn the user (except for BASH, which is always set by the calling BASH).
25651      if test "xJAVAC" != xBASH; then
25652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25653$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25654      fi
25655      # Try to locate tool using the code snippet
25656
25657      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25658$as_echo_n "checking for javac in Boot JDK... " >&6; }
25659      JAVAC=$BOOT_JDK/bin/javac
25660      if test ! -x $JAVAC; then
25661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25662$as_echo "not found" >&6; }
25663        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25664$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25665        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25666      fi
25667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25668$as_echo "ok" >&6; }
25669
25670
25671    else
25672      # If it succeeded, then it was overridden by the user. We will use it
25673      # for the tool.
25674
25675      # First remove it from the list of overridden variables, so we can test
25676      # for unknown variables in the end.
25677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25678
25679      # Check if the provided tool contains a complete path.
25680      tool_specified="$JAVAC"
25681      tool_basename="${tool_specified##*/}"
25682      if test "x$tool_basename" = "x$tool_specified"; then
25683        # A command without a complete path is provided, search $PATH.
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25685$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25686        # Extract the first word of "$tool_basename", so it can be a program name with args.
25687set dummy $tool_basename; ac_word=$2
25688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25689$as_echo_n "checking for $ac_word... " >&6; }
25690if ${ac_cv_path_JAVAC+:} false; then :
25691  $as_echo_n "(cached) " >&6
25692else
25693  case $JAVAC in
25694  [\\/]* | ?:[\\/]*)
25695  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25696  ;;
25697  *)
25698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25699for as_dir in $PATH
25700do
25701  IFS=$as_save_IFS
25702  test -z "$as_dir" && as_dir=.
25703    for ac_exec_ext in '' $ac_executable_extensions; do
25704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25705    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25707    break 2
25708  fi
25709done
25710  done
25711IFS=$as_save_IFS
25712
25713  ;;
25714esac
25715fi
25716JAVAC=$ac_cv_path_JAVAC
25717if test -n "$JAVAC"; then
25718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25719$as_echo "$JAVAC" >&6; }
25720else
25721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25722$as_echo "no" >&6; }
25723fi
25724
25725
25726        if test "x$JAVAC" = x; then
25727          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25728        fi
25729      else
25730        # Otherwise we believe it is a complete path. Use it as it is.
25731        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25732$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25734$as_echo_n "checking for JAVAC... " >&6; }
25735        if test ! -x "$tool_specified"; then
25736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25737$as_echo "not found" >&6; }
25738          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25739        fi
25740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25741$as_echo "$tool_specified" >&6; }
25742      fi
25743    fi
25744  fi
25745
25746
25747
25748  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25749
25750  # Publish this variable in the help.
25751
25752
25753  if test "x$JAVAH" = x; then
25754    # The variable is not set by user, try to locate tool using the code snippet
25755
25756      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25757$as_echo_n "checking for javah in Boot JDK... " >&6; }
25758      JAVAH=$BOOT_JDK/bin/javah
25759      if test ! -x $JAVAH; then
25760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25761$as_echo "not found" >&6; }
25762        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25763$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25764        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25765      fi
25766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25767$as_echo "ok" >&6; }
25768
25769
25770  else
25771    # The variable is set, but is it from the command line or the environment?
25772
25773    # Try to remove the string !JAVAH! from our list.
25774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25776      # If it failed, the variable was not from the command line. Ignore it,
25777      # but warn the user (except for BASH, which is always set by the calling BASH).
25778      if test "xJAVAH" != xBASH; then
25779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25780$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25781      fi
25782      # Try to locate tool using the code snippet
25783
25784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25785$as_echo_n "checking for javah in Boot JDK... " >&6; }
25786      JAVAH=$BOOT_JDK/bin/javah
25787      if test ! -x $JAVAH; then
25788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25789$as_echo "not found" >&6; }
25790        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25791$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25792        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25793      fi
25794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25795$as_echo "ok" >&6; }
25796
25797
25798    else
25799      # If it succeeded, then it was overridden by the user. We will use it
25800      # for the tool.
25801
25802      # First remove it from the list of overridden variables, so we can test
25803      # for unknown variables in the end.
25804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25805
25806      # Check if the provided tool contains a complete path.
25807      tool_specified="$JAVAH"
25808      tool_basename="${tool_specified##*/}"
25809      if test "x$tool_basename" = "x$tool_specified"; then
25810        # A command without a complete path is provided, search $PATH.
25811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25812$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25813        # Extract the first word of "$tool_basename", so it can be a program name with args.
25814set dummy $tool_basename; ac_word=$2
25815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25816$as_echo_n "checking for $ac_word... " >&6; }
25817if ${ac_cv_path_JAVAH+:} false; then :
25818  $as_echo_n "(cached) " >&6
25819else
25820  case $JAVAH in
25821  [\\/]* | ?:[\\/]*)
25822  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25823  ;;
25824  *)
25825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25826for as_dir in $PATH
25827do
25828  IFS=$as_save_IFS
25829  test -z "$as_dir" && as_dir=.
25830    for ac_exec_ext in '' $ac_executable_extensions; do
25831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25832    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25834    break 2
25835  fi
25836done
25837  done
25838IFS=$as_save_IFS
25839
25840  ;;
25841esac
25842fi
25843JAVAH=$ac_cv_path_JAVAH
25844if test -n "$JAVAH"; then
25845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25846$as_echo "$JAVAH" >&6; }
25847else
25848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25849$as_echo "no" >&6; }
25850fi
25851
25852
25853        if test "x$JAVAH" = x; then
25854          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25855        fi
25856      else
25857        # Otherwise we believe it is a complete path. Use it as it is.
25858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25859$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25861$as_echo_n "checking for JAVAH... " >&6; }
25862        if test ! -x "$tool_specified"; then
25863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25864$as_echo "not found" >&6; }
25865          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25866        fi
25867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25868$as_echo "$tool_specified" >&6; }
25869      fi
25870    fi
25871  fi
25872
25873
25874
25875  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25876
25877  # Publish this variable in the help.
25878
25879
25880  if test "x$JAR" = x; then
25881    # The variable is not set by user, try to locate tool using the code snippet
25882
25883      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25884$as_echo_n "checking for jar in Boot JDK... " >&6; }
25885      JAR=$BOOT_JDK/bin/jar
25886      if test ! -x $JAR; then
25887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25888$as_echo "not found" >&6; }
25889        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25890$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25891        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25892      fi
25893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25894$as_echo "ok" >&6; }
25895
25896
25897  else
25898    # The variable is set, but is it from the command line or the environment?
25899
25900    # Try to remove the string !JAR! from our list.
25901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25903      # If it failed, the variable was not from the command line. Ignore it,
25904      # but warn the user (except for BASH, which is always set by the calling BASH).
25905      if test "xJAR" != xBASH; then
25906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25907$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25908      fi
25909      # Try to locate tool using the code snippet
25910
25911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25912$as_echo_n "checking for jar in Boot JDK... " >&6; }
25913      JAR=$BOOT_JDK/bin/jar
25914      if test ! -x $JAR; then
25915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25916$as_echo "not found" >&6; }
25917        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25918$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25919        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25920      fi
25921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25922$as_echo "ok" >&6; }
25923
25924
25925    else
25926      # If it succeeded, then it was overridden by the user. We will use it
25927      # for the tool.
25928
25929      # First remove it from the list of overridden variables, so we can test
25930      # for unknown variables in the end.
25931      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25932
25933      # Check if the provided tool contains a complete path.
25934      tool_specified="$JAR"
25935      tool_basename="${tool_specified##*/}"
25936      if test "x$tool_basename" = "x$tool_specified"; then
25937        # A command without a complete path is provided, search $PATH.
25938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25939$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25940        # Extract the first word of "$tool_basename", so it can be a program name with args.
25941set dummy $tool_basename; ac_word=$2
25942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25943$as_echo_n "checking for $ac_word... " >&6; }
25944if ${ac_cv_path_JAR+:} false; then :
25945  $as_echo_n "(cached) " >&6
25946else
25947  case $JAR in
25948  [\\/]* | ?:[\\/]*)
25949  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25950  ;;
25951  *)
25952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25953for as_dir in $PATH
25954do
25955  IFS=$as_save_IFS
25956  test -z "$as_dir" && as_dir=.
25957    for ac_exec_ext in '' $ac_executable_extensions; do
25958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25959    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25961    break 2
25962  fi
25963done
25964  done
25965IFS=$as_save_IFS
25966
25967  ;;
25968esac
25969fi
25970JAR=$ac_cv_path_JAR
25971if test -n "$JAR"; then
25972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25973$as_echo "$JAR" >&6; }
25974else
25975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25976$as_echo "no" >&6; }
25977fi
25978
25979
25980        if test "x$JAR" = x; then
25981          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25982        fi
25983      else
25984        # Otherwise we believe it is a complete path. Use it as it is.
25985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25986$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25988$as_echo_n "checking for JAR... " >&6; }
25989        if test ! -x "$tool_specified"; then
25990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25991$as_echo "not found" >&6; }
25992          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25993        fi
25994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25995$as_echo "$tool_specified" >&6; }
25996      fi
25997    fi
25998  fi
25999
26000
26001
26002  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26003
26004  # Publish this variable in the help.
26005
26006
26007  if test "x$NATIVE2ASCII" = x; then
26008    # The variable is not set by user, try to locate tool using the code snippet
26009
26010      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26011$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26012      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26013      if test ! -x $NATIVE2ASCII; then
26014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26015$as_echo "not found" >&6; }
26016        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26017$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26018        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26019      fi
26020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26021$as_echo "ok" >&6; }
26022
26023
26024  else
26025    # The variable is set, but is it from the command line or the environment?
26026
26027    # Try to remove the string !NATIVE2ASCII! from our list.
26028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26030      # If it failed, the variable was not from the command line. Ignore it,
26031      # but warn the user (except for BASH, which is always set by the calling BASH).
26032      if test "xNATIVE2ASCII" != xBASH; then
26033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26034$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26035      fi
26036      # Try to locate tool using the code snippet
26037
26038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26039$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26040      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26041      if test ! -x $NATIVE2ASCII; then
26042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26043$as_echo "not found" >&6; }
26044        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26045$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26046        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26047      fi
26048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26049$as_echo "ok" >&6; }
26050
26051
26052    else
26053      # If it succeeded, then it was overridden by the user. We will use it
26054      # for the tool.
26055
26056      # First remove it from the list of overridden variables, so we can test
26057      # for unknown variables in the end.
26058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26059
26060      # Check if the provided tool contains a complete path.
26061      tool_specified="$NATIVE2ASCII"
26062      tool_basename="${tool_specified##*/}"
26063      if test "x$tool_basename" = "x$tool_specified"; then
26064        # A command without a complete path is provided, search $PATH.
26065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26066$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26067        # Extract the first word of "$tool_basename", so it can be a program name with args.
26068set dummy $tool_basename; ac_word=$2
26069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26070$as_echo_n "checking for $ac_word... " >&6; }
26071if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26072  $as_echo_n "(cached) " >&6
26073else
26074  case $NATIVE2ASCII in
26075  [\\/]* | ?:[\\/]*)
26076  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26077  ;;
26078  *)
26079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26080for as_dir in $PATH
26081do
26082  IFS=$as_save_IFS
26083  test -z "$as_dir" && as_dir=.
26084    for ac_exec_ext in '' $ac_executable_extensions; do
26085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26086    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26088    break 2
26089  fi
26090done
26091  done
26092IFS=$as_save_IFS
26093
26094  ;;
26095esac
26096fi
26097NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26098if test -n "$NATIVE2ASCII"; then
26099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26100$as_echo "$NATIVE2ASCII" >&6; }
26101else
26102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26103$as_echo "no" >&6; }
26104fi
26105
26106
26107        if test "x$NATIVE2ASCII" = x; then
26108          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26109        fi
26110      else
26111        # Otherwise we believe it is a complete path. Use it as it is.
26112        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26113$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26115$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26116        if test ! -x "$tool_specified"; then
26117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26118$as_echo "not found" >&6; }
26119          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26120        fi
26121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26122$as_echo "$tool_specified" >&6; }
26123      fi
26124    fi
26125  fi
26126
26127
26128
26129  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26130
26131  # Publish this variable in the help.
26132
26133
26134  if test "x$JARSIGNER" = x; then
26135    # The variable is not set by user, try to locate tool using the code snippet
26136
26137      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26138$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26139      JARSIGNER=$BOOT_JDK/bin/jarsigner
26140      if test ! -x $JARSIGNER; then
26141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26142$as_echo "not found" >&6; }
26143        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26144$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26145        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26146      fi
26147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26148$as_echo "ok" >&6; }
26149
26150
26151  else
26152    # The variable is set, but is it from the command line or the environment?
26153
26154    # Try to remove the string !JARSIGNER! from our list.
26155    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26156    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26157      # If it failed, the variable was not from the command line. Ignore it,
26158      # but warn the user (except for BASH, which is always set by the calling BASH).
26159      if test "xJARSIGNER" != xBASH; then
26160        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26161$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26162      fi
26163      # Try to locate tool using the code snippet
26164
26165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26166$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26167      JARSIGNER=$BOOT_JDK/bin/jarsigner
26168      if test ! -x $JARSIGNER; then
26169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26170$as_echo "not found" >&6; }
26171        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26172$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26173        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26174      fi
26175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26176$as_echo "ok" >&6; }
26177
26178
26179    else
26180      # If it succeeded, then it was overridden by the user. We will use it
26181      # for the tool.
26182
26183      # First remove it from the list of overridden variables, so we can test
26184      # for unknown variables in the end.
26185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26186
26187      # Check if the provided tool contains a complete path.
26188      tool_specified="$JARSIGNER"
26189      tool_basename="${tool_specified##*/}"
26190      if test "x$tool_basename" = "x$tool_specified"; then
26191        # A command without a complete path is provided, search $PATH.
26192        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26193$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26194        # Extract the first word of "$tool_basename", so it can be a program name with args.
26195set dummy $tool_basename; ac_word=$2
26196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26197$as_echo_n "checking for $ac_word... " >&6; }
26198if ${ac_cv_path_JARSIGNER+:} false; then :
26199  $as_echo_n "(cached) " >&6
26200else
26201  case $JARSIGNER in
26202  [\\/]* | ?:[\\/]*)
26203  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26204  ;;
26205  *)
26206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26207for as_dir in $PATH
26208do
26209  IFS=$as_save_IFS
26210  test -z "$as_dir" && as_dir=.
26211    for ac_exec_ext in '' $ac_executable_extensions; do
26212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26213    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26215    break 2
26216  fi
26217done
26218  done
26219IFS=$as_save_IFS
26220
26221  ;;
26222esac
26223fi
26224JARSIGNER=$ac_cv_path_JARSIGNER
26225if test -n "$JARSIGNER"; then
26226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26227$as_echo "$JARSIGNER" >&6; }
26228else
26229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26230$as_echo "no" >&6; }
26231fi
26232
26233
26234        if test "x$JARSIGNER" = x; then
26235          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26236        fi
26237      else
26238        # Otherwise we believe it is a complete path. Use it as it is.
26239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26240$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26242$as_echo_n "checking for JARSIGNER... " >&6; }
26243        if test ! -x "$tool_specified"; then
26244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26245$as_echo "not found" >&6; }
26246          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26247        fi
26248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26249$as_echo "$tool_specified" >&6; }
26250      fi
26251    fi
26252  fi
26253
26254
26255
26256  # Finally, set some other options...
26257
26258  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26259  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26260
26261
26262
26263
26264###############################################################################
26265#
26266# Configure the sources to use. We can add or override individual directories.
26267#
26268###############################################################################
26269
26270
26271  # Where are the sources. Any of these can be overridden
26272  # using --with-override-corba and the likes.
26273  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26274  CORBA_TOPDIR="$SRC_ROOT/corba"
26275  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26276  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26277  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26278  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26279  JDK_TOPDIR="$SRC_ROOT/jdk"
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290  ###############################################################################
26291  #
26292  # Pickup additional source for a component from outside of the source root
26293  # or override source for a component.
26294  #
26295
26296# Check whether --with-add-source-root was given.
26297if test "${with_add_source_root+set}" = set; then :
26298  withval=$with_add_source_root;
26299fi
26300
26301
26302
26303# Check whether --with-override-source-root was given.
26304if test "${with_override_source_root+set}" = set; then :
26305  withval=$with_override_source_root;
26306fi
26307
26308
26309
26310# Check whether --with-adds-and-overrides was given.
26311if test "${with_adds_and_overrides+set}" = set; then :
26312  withval=$with_adds_and_overrides;
26313fi
26314
26315
26316  if test "x$with_adds_and_overrides" != x; then
26317    with_add_source_root="$with_adds_and_overrides/adds"
26318    with_override_source_root="$with_adds_and_overrides/overrides"
26319  fi
26320
26321  if test "x$with_add_source_root" != x; then
26322    if ! test -d $with_add_source_root; then
26323      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26324    fi
26325    CURDIR="$PWD"
26326    cd "$with_add_source_root"
26327    ADD_SRC_ROOT="`pwd`"
26328    cd "$CURDIR"
26329    # Verify that the addon source root does not have any root makefiles.
26330    # If it does, then it is usually an error, prevent this.
26331    if test -f $with_add_source_root/langtools/make/Makefile; then
26332      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
26333    fi
26334    if test -f $with_add_source_root/corba/make/Makefile; then
26335      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
26336    fi
26337    if test -f $with_add_source_root/jaxp/make/Makefile; then
26338      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
26339    fi
26340    if test -f $with_add_source_root/jaxws/make/Makefile; then
26341      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
26342    fi
26343    if test -f $with_add_source_root/hotspot/make/Makefile; then
26344      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
26345    fi
26346    if test -f $with_add_source_root/nashorn/make/Makefile; then
26347      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
26348    fi
26349    if test -f $with_add_source_root/jdk/make/Makefile; then
26350      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
26351    fi
26352  fi
26353
26354
26355  if test "x$with_override_source_root" != x; then
26356    if ! test -d $with_override_source_root; then
26357      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26358    fi
26359    CURDIR="$PWD"
26360    cd "$with_override_source_root"
26361    OVERRIDE_SRC_ROOT="`pwd`"
26362    cd "$CURDIR"
26363    if test -f $with_override_source_root/langtools/make/Makefile; then
26364      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
26365    fi
26366    if test -f $with_override_source_root/corba/make/Makefile; then
26367      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
26368    fi
26369    if test -f $with_override_source_root/jaxp/make/Makefile; then
26370      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
26371    fi
26372    if test -f $with_override_source_root/jaxws/make/Makefile; then
26373      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
26374    fi
26375    if test -f $with_override_source_root/hotspot/make/Makefile; then
26376      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
26377    fi
26378    if test -f $with_override_source_root/nashorn/make/Makefile; then
26379      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
26380    fi
26381    if test -f $with_override_source_root/jdk/make/Makefile; then
26382      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
26383    fi
26384  fi
26385
26386
26387  ###############################################################################
26388  #
26389  # Override a repo completely, this is used for example when you have 3 small
26390  # development sandboxes of the langtools sources and want to avoid having 3 full
26391  # OpenJDK sources checked out on disk.
26392  #
26393  # Assuming that the 3 langtools sandboxes are located here:
26394  # /home/fredrik/sandbox1/langtools
26395  # /home/fredrik/sandbox2/langtools
26396  # /home/fredrik/sandbox3/langtools
26397  #
26398  # From the source root you create build subdirs manually:
26399  #     mkdir -p build1 build2 build3
26400  # in each build directory run:
26401  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26402  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26403  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26404  #
26405
26406
26407# Check whether --with-override-langtools was given.
26408if test "${with_override_langtools+set}" = set; then :
26409  withval=$with_override_langtools;
26410fi
26411
26412
26413
26414# Check whether --with-override-corba was given.
26415if test "${with_override_corba+set}" = set; then :
26416  withval=$with_override_corba;
26417fi
26418
26419
26420
26421# Check whether --with-override-jaxp was given.
26422if test "${with_override_jaxp+set}" = set; then :
26423  withval=$with_override_jaxp;
26424fi
26425
26426
26427
26428# Check whether --with-override-jaxws was given.
26429if test "${with_override_jaxws+set}" = set; then :
26430  withval=$with_override_jaxws;
26431fi
26432
26433
26434
26435# Check whether --with-override-hotspot was given.
26436if test "${with_override_hotspot+set}" = set; then :
26437  withval=$with_override_hotspot;
26438fi
26439
26440
26441
26442# Check whether --with-override-nashorn was given.
26443if test "${with_override_nashorn+set}" = set; then :
26444  withval=$with_override_nashorn;
26445fi
26446
26447
26448
26449# Check whether --with-override-jdk was given.
26450if test "${with_override_jdk+set}" = set; then :
26451  withval=$with_override_jdk;
26452fi
26453
26454
26455  if test "x$with_override_langtools" != x; then
26456    CURDIR="$PWD"
26457    cd "$with_override_langtools"
26458    LANGTOOLS_TOPDIR="`pwd`"
26459    cd "$CURDIR"
26460    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26461      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26462    fi
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26464$as_echo_n "checking if langtools should be overridden... " >&6; }
26465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26466$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26467  fi
26468  if test "x$with_override_corba" != x; then
26469    CURDIR="$PWD"
26470    cd "$with_override_corba"
26471    CORBA_TOPDIR="`pwd`"
26472    cd "$CURDIR"
26473    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26474      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26475    fi
26476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26477$as_echo_n "checking if corba should be overridden... " >&6; }
26478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26479$as_echo "yes with $CORBA_TOPDIR" >&6; }
26480  fi
26481  if test "x$with_override_jaxp" != x; then
26482    CURDIR="$PWD"
26483    cd "$with_override_jaxp"
26484    JAXP_TOPDIR="`pwd`"
26485    cd "$CURDIR"
26486    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26487      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26488    fi
26489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26490$as_echo_n "checking if jaxp should be overridden... " >&6; }
26491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26492$as_echo "yes with $JAXP_TOPDIR" >&6; }
26493  fi
26494  if test "x$with_override_jaxws" != x; then
26495    CURDIR="$PWD"
26496    cd "$with_override_jaxws"
26497    JAXWS_TOPDIR="`pwd`"
26498    cd "$CURDIR"
26499    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26500      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26501    fi
26502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26503$as_echo_n "checking if jaxws should be overridden... " >&6; }
26504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26505$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26506  fi
26507  if test "x$with_override_hotspot" != x; then
26508    CURDIR="$PWD"
26509    cd "$with_override_hotspot"
26510    HOTSPOT_TOPDIR="`pwd`"
26511    cd "$CURDIR"
26512    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26513      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26514    fi
26515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26516$as_echo_n "checking if hotspot should be overridden... " >&6; }
26517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26518$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26519  fi
26520  if test "x$with_override_nashorn" != x; then
26521    CURDIR="$PWD"
26522    cd "$with_override_nashorn"
26523    NASHORN_TOPDIR="`pwd`"
26524    cd "$CURDIR"
26525    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26526      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26527    fi
26528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26529$as_echo_n "checking if nashorn should be overridden... " >&6; }
26530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26531$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26532  fi
26533  if test "x$with_override_jdk" != x; then
26534    CURDIR="$PWD"
26535    cd "$with_override_jdk"
26536    JDK_TOPDIR="`pwd`"
26537    cd "$CURDIR"
26538    if ! test -f $JDK_TOPDIR/make/Makefile; then
26539      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26540    fi
26541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26542$as_echo_n "checking if JDK should be overridden... " >&6; }
26543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26544$as_echo "yes with $JDK_TOPDIR" >&6; }
26545  fi
26546
26547
26548  BUILD_OUTPUT="$OUTPUT_ROOT"
26549
26550
26551  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26552  BUILD_HOTSPOT=true
26553
26554
26555
26556# Check whether --with-import-hotspot was given.
26557if test "${with_import_hotspot+set}" = set; then :
26558  withval=$with_import_hotspot;
26559fi
26560
26561  if test "x$with_import_hotspot" != x; then
26562    CURDIR="$PWD"
26563    cd "$with_import_hotspot"
26564    HOTSPOT_DIST="`pwd`"
26565    cd "$CURDIR"
26566    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26567      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26568    fi
26569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26570$as_echo_n "checking if hotspot should be imported... " >&6; }
26571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26572$as_echo "yes from $HOTSPOT_DIST" >&6; }
26573    BUILD_HOTSPOT=false
26574  fi
26575
26576  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26577
26578
26579###############################################################################
26580#
26581# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26582# native code.
26583#
26584###############################################################################
26585
26586# First determine the toolchain type (compiler family)
26587
26588
26589# Check whether --with-toolchain-type was given.
26590if test "${with_toolchain_type+set}" = set; then :
26591  withval=$with_toolchain_type;
26592fi
26593
26594
26595  # Use indirect variable referencing
26596  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26597  VALID_TOOLCHAINS=${!toolchain_var_name}
26598
26599  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26600    if test -n "$XCODEBUILD"; then
26601      # On Mac OS X, default toolchain to clang after Xcode 5
26602      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26603      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26604      if test $? -ne 0; then
26605        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26606      fi
26607      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26608          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26609          $CUT -f 1 -d .`
26610      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26611$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26612      if test $XCODE_MAJOR_VERSION -ge 5; then
26613          DEFAULT_TOOLCHAIN="clang"
26614      else
26615          DEFAULT_TOOLCHAIN="gcc"
26616      fi
26617    else
26618      # If Xcode is not installed, but the command line tools are
26619      # then we can't run xcodebuild. On these systems we should
26620      # default to clang
26621      DEFAULT_TOOLCHAIN="clang"
26622    fi
26623  else
26624    # First toolchain type in the list is the default
26625    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26626  fi
26627
26628  if test "x$with_toolchain_type" = xlist; then
26629    # List all toolchains
26630    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26631$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26632    for toolchain in $VALID_TOOLCHAINS; do
26633      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26634      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26635      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26636    done
26637
26638    exit 0
26639  elif test "x$with_toolchain_type" != x; then
26640    # User override; check that it is valid
26641    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26642      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26643$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26644      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26645$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26646      as_fn_error $? "Cannot continue." "$LINENO" 5
26647    fi
26648    TOOLCHAIN_TYPE=$with_toolchain_type
26649  else
26650    # No flag given, use default
26651    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26652  fi
26653
26654
26655  TOOLCHAIN_CC_BINARY_clang="clang"
26656  TOOLCHAIN_CC_BINARY_gcc="gcc"
26657  TOOLCHAIN_CC_BINARY_microsoft="cl"
26658  TOOLCHAIN_CC_BINARY_solstudio="cc"
26659  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26660
26661  TOOLCHAIN_CXX_BINARY_clang="clang++"
26662  TOOLCHAIN_CXX_BINARY_gcc="g++"
26663  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26664  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26665  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26666
26667  # Use indirect variable referencing
26668  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26669  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26670  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26671  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26672  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26673  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26674
26675
26676  # Define filename patterns
26677  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26678    LIBRARY_PREFIX=
26679    SHARED_LIBRARY_SUFFIX='.dll'
26680    STATIC_LIBRARY_SUFFIX='.lib'
26681    SHARED_LIBRARY='$1.dll'
26682    STATIC_LIBRARY='$1.lib'
26683    OBJ_SUFFIX='.obj'
26684    EXE_SUFFIX='.exe'
26685  else
26686    LIBRARY_PREFIX=lib
26687    SHARED_LIBRARY_SUFFIX='.so'
26688    STATIC_LIBRARY_SUFFIX='.a'
26689    SHARED_LIBRARY='lib$1.so'
26690    STATIC_LIBRARY='lib$1.a'
26691    OBJ_SUFFIX='.o'
26692    EXE_SUFFIX=''
26693    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26694      SHARED_LIBRARY='lib$1.dylib'
26695      SHARED_LIBRARY_SUFFIX='.dylib'
26696    fi
26697  fi
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26709    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26710$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26711  else
26712    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26713$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26714  fi
26715
26716
26717# Then detect the actual binaries needed
26718
26719  # FIXME: Is this needed?
26720  ac_ext=cpp
26721ac_cpp='$CXXCPP $CPPFLAGS'
26722ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26723ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26724ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26725
26726
26727  # Store the CFLAGS etc passed to the configure script.
26728  ORG_CFLAGS="$CFLAGS"
26729  ORG_CXXFLAGS="$CXXFLAGS"
26730
26731  # On Windows, we need to detect the visual studio installation first.
26732  # This will change the PATH, but we need to keep that new PATH even
26733  # after toolchain detection is done, since the compiler (on x86) uses
26734  # it for DLL resolution in runtime.
26735  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26736
26737  # Store path to cygwin link.exe to help excluding it when searching for
26738  # VS linker. This must be done before changing the PATH when looking for VS.
26739  # Extract the first word of "link", so it can be a program name with args.
26740set dummy link; ac_word=$2
26741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26742$as_echo_n "checking for $ac_word... " >&6; }
26743if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26744  $as_echo_n "(cached) " >&6
26745else
26746  case $CYGWIN_LINK in
26747  [\\/]* | ?:[\\/]*)
26748  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26749  ;;
26750  *)
26751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26752for as_dir in $PATH
26753do
26754  IFS=$as_save_IFS
26755  test -z "$as_dir" && as_dir=.
26756    for ac_exec_ext in '' $ac_executable_extensions; do
26757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26758    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26760    break 2
26761  fi
26762done
26763  done
26764IFS=$as_save_IFS
26765
26766  ;;
26767esac
26768fi
26769CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26770if test -n "$CYGWIN_LINK"; then
26771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26772$as_echo "$CYGWIN_LINK" >&6; }
26773else
26774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26775$as_echo "no" >&6; }
26776fi
26777
26778
26779  if test "x$CYGWIN_LINK" != x; then
26780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26781$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26782    "$CYGWIN_LINK" --version > /dev/null
26783    if test $? -eq 0 ; then
26784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26785$as_echo "yes" >&6; }
26786    else
26787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26788$as_echo "no" >&6; }
26789      # This might be the VS linker. Don't exclude it later on.
26790      CYGWIN_LINK=""
26791    fi
26792  fi
26793
26794  # First-hand choice is to locate and run the vsvars bat file.
26795
26796
26797# Check whether --with-toolchain-version was given.
26798if test "${with_toolchain_version+set}" = set; then :
26799  withval=$with_toolchain_version;
26800fi
26801
26802
26803  if test "x$with_toolchain_version" = xlist; then
26804    # List all toolchains
26805    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26806$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26807    for version in $VALID_VS_VERSIONS; do
26808      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26809      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26810    done
26811
26812    exit 0
26813  elif test "x$with_toolchain_version" != x; then
26814    # User override; check that it is valid
26815    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26816      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26817$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26818      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26819$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26820      as_fn_error $? "Cannot continue." "$LINENO" 5
26821    fi
26822    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26823  else
26824    # No flag given, use default
26825    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26826  fi
26827
26828  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26829
26830  VS_VERSION="$VS_VERSION"
26831  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26832  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26833  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26834  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26835
26836  # When using --with-tools-dir, assume it points to the correct and default
26837  # version of Visual Studio or that --with-toolchain-version was also set.
26838  if test "x$with_tools_dir" != x; then
26839
26840  if test "x$VS_ENV_CMD" = x; then
26841    VS_VERSION="${VS_VERSION}"
26842    VS_BASE="$with_tools_dir/../.."
26843    METHOD="--with-tools-dir"
26844
26845    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26846      VCVARSFILE="vc/bin/vcvars32.bat"
26847    else
26848      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26849    fi
26850
26851
26852  windows_path="$VS_BASE"
26853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26854    unix_path=`$CYGPATH -u "$windows_path"`
26855    VS_BASE="$unix_path"
26856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26858    VS_BASE="$unix_path"
26859  fi
26860
26861    if test -d "$VS_BASE"; then
26862      if test -f "$VS_BASE/$VCVARSFILE"; then
26863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26864$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26865        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26866        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26867        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26868        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26869      else
26870        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26871$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26872        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26873$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26874      fi
26875    fi
26876  fi
26877
26878
26879  if test "x$VS_ENV_CMD" = x; then
26880    VS_VERSION="${VS_VERSION}"
26881    VS_BASE="$with_tools_dir/../../.."
26882    METHOD="--with-tools-dir"
26883
26884    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26885      VCVARSFILE="vc/bin/vcvars32.bat"
26886    else
26887      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26888    fi
26889
26890
26891  windows_path="$VS_BASE"
26892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26893    unix_path=`$CYGPATH -u "$windows_path"`
26894    VS_BASE="$unix_path"
26895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26897    VS_BASE="$unix_path"
26898  fi
26899
26900    if test -d "$VS_BASE"; then
26901      if test -f "$VS_BASE/$VCVARSFILE"; then
26902        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26903$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26904        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26905        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26906        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26907        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26908      else
26909        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26910$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26911        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26912$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26913      fi
26914    fi
26915  fi
26916
26917    if test "x$VS_ENV_CMD" = x; then
26918      # Having specified an argument which is incorrect will produce an instant failure;
26919      # we should not go on looking
26920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26921$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26922      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26923$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26924      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26925$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26926      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26927    fi
26928  fi
26929
26930  VS_ENV_CMD=""
26931  VS_ENV_ARGS=""
26932
26933  if test "x$VS_COMNTOOLS" != x; then
26934
26935  if test "x$VS_ENV_CMD" = x; then
26936    VS_VERSION="${VS_VERSION}"
26937    VS_BASE="$VS_COMNTOOLS/../.."
26938    METHOD="$VS_COMNTOOLS_VAR variable"
26939
26940    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26941      VCVARSFILE="vc/bin/vcvars32.bat"
26942    else
26943      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26944    fi
26945
26946
26947  windows_path="$VS_BASE"
26948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26949    unix_path=`$CYGPATH -u "$windows_path"`
26950    VS_BASE="$unix_path"
26951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26953    VS_BASE="$unix_path"
26954  fi
26955
26956    if test -d "$VS_BASE"; then
26957      if test -f "$VS_BASE/$VCVARSFILE"; then
26958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26959$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26960        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26961        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26962        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26963        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26964      else
26965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26966$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26967        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26968$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26969      fi
26970    fi
26971  fi
26972
26973  fi
26974  if test "x$PROGRAMFILES" != x; then
26975
26976  if test "x$VS_ENV_CMD" = x; then
26977    VS_VERSION="${VS_VERSION}"
26978    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26979    METHOD="well-known name"
26980
26981    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26982      VCVARSFILE="vc/bin/vcvars32.bat"
26983    else
26984      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26985    fi
26986
26987
26988  windows_path="$VS_BASE"
26989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26990    unix_path=`$CYGPATH -u "$windows_path"`
26991    VS_BASE="$unix_path"
26992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26994    VS_BASE="$unix_path"
26995  fi
26996
26997    if test -d "$VS_BASE"; then
26998      if test -f "$VS_BASE/$VCVARSFILE"; then
26999        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27000$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27001        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27002        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27003        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27004        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27005      else
27006        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27007$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27008        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27009$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27010      fi
27011    fi
27012  fi
27013
27014  fi
27015  # Work around the insanely named ProgramFiles(x86) env variable
27016  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27017  if test "x$PROGRAMFILES_X86" != x; then
27018
27019  if test "x$VS_ENV_CMD" = x; then
27020    VS_VERSION="${VS_VERSION}"
27021    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27022    METHOD="well-known name"
27023
27024    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27025      VCVARSFILE="vc/bin/vcvars32.bat"
27026    else
27027      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27028    fi
27029
27030
27031  windows_path="$VS_BASE"
27032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27033    unix_path=`$CYGPATH -u "$windows_path"`
27034    VS_BASE="$unix_path"
27035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27037    VS_BASE="$unix_path"
27038  fi
27039
27040    if test -d "$VS_BASE"; then
27041      if test -f "$VS_BASE/$VCVARSFILE"; then
27042        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27043$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27044        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27045        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27046        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27047        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27048      else
27049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27050$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27051        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27052$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27053      fi
27054    fi
27055  fi
27056
27057  fi
27058
27059  if test "x$VS_ENV_CMD" = x; then
27060    VS_VERSION="${VS_VERSION}"
27061    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27062    METHOD="well-known name"
27063
27064    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27065      VCVARSFILE="vc/bin/vcvars32.bat"
27066    else
27067      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27068    fi
27069
27070
27071  windows_path="$VS_BASE"
27072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073    unix_path=`$CYGPATH -u "$windows_path"`
27074    VS_BASE="$unix_path"
27075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27077    VS_BASE="$unix_path"
27078  fi
27079
27080    if test -d "$VS_BASE"; then
27081      if test -f "$VS_BASE/$VCVARSFILE"; then
27082        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27083$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27084        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27085        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27086        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27087        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27088      else
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27090$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27091        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27092$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27093      fi
27094    fi
27095  fi
27096
27097
27098  if test "x$VS_ENV_CMD" = x; then
27099    VS_VERSION="${VS_VERSION}"
27100    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27101    METHOD="well-known name"
27102
27103    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27104      VCVARSFILE="vc/bin/vcvars32.bat"
27105    else
27106      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27107    fi
27108
27109
27110  windows_path="$VS_BASE"
27111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27112    unix_path=`$CYGPATH -u "$windows_path"`
27113    VS_BASE="$unix_path"
27114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27116    VS_BASE="$unix_path"
27117  fi
27118
27119    if test -d "$VS_BASE"; then
27120      if test -f "$VS_BASE/$VCVARSFILE"; then
27121        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27122$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27123        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27124        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27125        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27126        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27127      else
27128        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27129$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27130        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27131$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27132      fi
27133    fi
27134  fi
27135
27136
27137  if test "x$SDK_INSTALL_DIR" != x; then
27138    if test "x$ProgramW6432" != x; then
27139
27140  if test "x$VS_ENV_CMD" = x; then
27141    VS_VERSION="${VS_VERSION}"
27142    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27143    METHOD="well-known name"
27144
27145  windows_path="$WIN_SDK_BASE"
27146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27147    unix_path=`$CYGPATH -u "$windows_path"`
27148    WIN_SDK_BASE="$unix_path"
27149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27151    WIN_SDK_BASE="$unix_path"
27152  fi
27153
27154    if test -d "$WIN_SDK_BASE"; then
27155      # There have been cases of partial or broken SDK installations. A missing
27156      # lib dir is not going to work.
27157      if test ! -d "$WIN_SDK_BASE/lib"; then
27158        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27159$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27160        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27161$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27162      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27163        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27164$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27165        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27166        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27167          VS_ENV_ARGS="/x86"
27168        else
27169          VS_ENV_ARGS="/x64"
27170        fi
27171        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27172        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27173        # TODO: improve detection for other versions of SDK
27174        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27175      else
27176        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27177$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27178        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27179$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27180      fi
27181    fi
27182  fi
27183
27184    fi
27185    if test "x$PROGRAMW6432" != x; then
27186
27187  if test "x$VS_ENV_CMD" = x; then
27188    VS_VERSION="${VS_VERSION}"
27189    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27190    METHOD="well-known name"
27191
27192  windows_path="$WIN_SDK_BASE"
27193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27194    unix_path=`$CYGPATH -u "$windows_path"`
27195    WIN_SDK_BASE="$unix_path"
27196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27198    WIN_SDK_BASE="$unix_path"
27199  fi
27200
27201    if test -d "$WIN_SDK_BASE"; then
27202      # There have been cases of partial or broken SDK installations. A missing
27203      # lib dir is not going to work.
27204      if test ! -d "$WIN_SDK_BASE/lib"; then
27205        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27206$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27207        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27208$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27209      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27210        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27211$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27212        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27213        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27214          VS_ENV_ARGS="/x86"
27215        else
27216          VS_ENV_ARGS="/x64"
27217        fi
27218        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27219        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27220        # TODO: improve detection for other versions of SDK
27221        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27222      else
27223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27224$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27225        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27226$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27227      fi
27228    fi
27229  fi
27230
27231    fi
27232    if test "x$PROGRAMFILES" != x; then
27233
27234  if test "x$VS_ENV_CMD" = x; then
27235    VS_VERSION="${VS_VERSION}"
27236    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27237    METHOD="well-known name"
27238
27239  windows_path="$WIN_SDK_BASE"
27240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27241    unix_path=`$CYGPATH -u "$windows_path"`
27242    WIN_SDK_BASE="$unix_path"
27243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27245    WIN_SDK_BASE="$unix_path"
27246  fi
27247
27248    if test -d "$WIN_SDK_BASE"; then
27249      # There have been cases of partial or broken SDK installations. A missing
27250      # lib dir is not going to work.
27251      if test ! -d "$WIN_SDK_BASE/lib"; then
27252        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27253$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27254        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27255$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27256      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27257        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27258$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27259        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27260        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27261          VS_ENV_ARGS="/x86"
27262        else
27263          VS_ENV_ARGS="/x64"
27264        fi
27265        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27266        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27267        # TODO: improve detection for other versions of SDK
27268        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27269      else
27270        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27271$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27272        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27273$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27274      fi
27275    fi
27276  fi
27277
27278    fi
27279
27280  if test "x$VS_ENV_CMD" = x; then
27281    VS_VERSION="${VS_VERSION}"
27282    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27283    METHOD="well-known name"
27284
27285  windows_path="$WIN_SDK_BASE"
27286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27287    unix_path=`$CYGPATH -u "$windows_path"`
27288    WIN_SDK_BASE="$unix_path"
27289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27291    WIN_SDK_BASE="$unix_path"
27292  fi
27293
27294    if test -d "$WIN_SDK_BASE"; then
27295      # There have been cases of partial or broken SDK installations. A missing
27296      # lib dir is not going to work.
27297      if test ! -d "$WIN_SDK_BASE/lib"; then
27298        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27299$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27300        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27301$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27302      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27303        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27304$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27305        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27306        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27307          VS_ENV_ARGS="/x86"
27308        else
27309          VS_ENV_ARGS="/x64"
27310        fi
27311        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27312        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27313        # TODO: improve detection for other versions of SDK
27314        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27315      else
27316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27317$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27318        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27319$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27320      fi
27321    fi
27322  fi
27323
27324
27325  if test "x$VS_ENV_CMD" = x; then
27326    VS_VERSION="${VS_VERSION}"
27327    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27328    METHOD="well-known name"
27329
27330  windows_path="$WIN_SDK_BASE"
27331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27332    unix_path=`$CYGPATH -u "$windows_path"`
27333    WIN_SDK_BASE="$unix_path"
27334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27336    WIN_SDK_BASE="$unix_path"
27337  fi
27338
27339    if test -d "$WIN_SDK_BASE"; then
27340      # There have been cases of partial or broken SDK installations. A missing
27341      # lib dir is not going to work.
27342      if test ! -d "$WIN_SDK_BASE/lib"; then
27343        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27344$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27345        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27346$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27347      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27348        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27349$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27350        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27351        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27352          VS_ENV_ARGS="/x86"
27353        else
27354          VS_ENV_ARGS="/x64"
27355        fi
27356        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27357        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27358        # TODO: improve detection for other versions of SDK
27359        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27360      else
27361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27362$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27363        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27364$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27365      fi
27366    fi
27367  fi
27368
27369  fi
27370
27371    if test "x$VS_ENV_CMD" != x; then
27372      TOOLCHAIN_VERSION=$VS_VERSION
27373      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27374      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27375      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27376      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27377      # The rest of the variables are already evaled while probing
27378      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27379$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27380      break
27381    fi
27382  done
27383
27384
27385  if test "x$VS_ENV_CMD" != x; then
27386    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27387
27388  # Only process if variable expands to non-empty
27389
27390  if test "x$VS_ENV_CMD" != x; then
27391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27392
27393  # First separate the path from the arguments. This will split at the first
27394  # space.
27395  complete="$VS_ENV_CMD"
27396  path="${complete%% *}"
27397  tmp="$complete EOL"
27398  arguments="${tmp#* }"
27399
27400  # Input might be given as Windows format, start by converting to
27401  # unix format.
27402  new_path=`$CYGPATH -u "$path"`
27403
27404  # Now try to locate executable using which
27405  new_path=`$WHICH "$new_path" 2> /dev/null`
27406  # bat and cmd files are not always considered executable in cygwin causing which
27407  # to not find them
27408  if test "x$new_path" = x \
27409      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27410      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27411    new_path=`$CYGPATH -u "$path"`
27412  fi
27413  if test "x$new_path" = x; then
27414    # Oops. Which didn't find the executable.
27415    # The splitting of arguments from the executable at a space might have been incorrect,
27416    # since paths with space are more likely in Windows. Give it another try with the whole
27417    # argument.
27418    path="$complete"
27419    arguments="EOL"
27420    new_path=`$CYGPATH -u "$path"`
27421    new_path=`$WHICH "$new_path" 2> /dev/null`
27422    # bat and cmd files are not always considered executable in cygwin causing which
27423    # to not find them
27424    if test "x$new_path" = x \
27425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27427      new_path=`$CYGPATH -u "$path"`
27428    fi
27429    if test "x$new_path" = x; then
27430      # It's still not found. Now this is an unrecoverable error.
27431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27432$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27433      has_space=`$ECHO "$complete" | $GREP " "`
27434      if test "x$has_space" != x; then
27435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27437      fi
27438      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27439    fi
27440  fi
27441
27442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27445  # "foo.exe" is OK but "foo" is an error.
27446  #
27447  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27448  # It is also a way to make sure we got the proper file name for the real test later on.
27449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27450  if test "x$test_shortpath" = x; then
27451    # Short path failed, file does not exist as specified.
27452    # Try adding .exe or .cmd
27453    if test -f "${new_path}.exe"; then
27454      input_to_shortpath="${new_path}.exe"
27455    elif test -f "${new_path}.cmd"; then
27456      input_to_shortpath="${new_path}.cmd"
27457    else
27458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27459$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27460      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27461$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27462      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27463    fi
27464  else
27465    input_to_shortpath="$new_path"
27466  fi
27467
27468  # Call helper function which possibly converts this using DOS-style short mode.
27469  # If so, the updated path is stored in $new_path.
27470  new_path="$input_to_shortpath"
27471
27472  input_path="$input_to_shortpath"
27473  # Check if we need to convert this using DOS-style short mode. If the path
27474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27475  # take no chances and rewrite it.
27476  # Note: m4 eats our [], so we need to use [ and ] instead.
27477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27478  if test "x$has_forbidden_chars" != x; then
27479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27483      # Going to short mode and back again did indeed matter. Since short mode is
27484      # case insensitive, let's make it lowercase to improve readability.
27485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27486      # Now convert it back to Unix-stile (cygpath)
27487      input_path=`$CYGPATH -u "$shortmode_path"`
27488      new_path="$input_path"
27489    fi
27490  fi
27491
27492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27493  if test "x$test_cygdrive_prefix" = x; then
27494    # As a simple fix, exclude /usr/bin since it's not a real path.
27495    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27497      # a path prefixed by /cygdrive for fixpath to work.
27498      new_path="$CYGWIN_ROOT_PATH$input_path"
27499    fi
27500  fi
27501
27502  # remove trailing .exe if any
27503  new_path="${new_path/%.exe/}"
27504
27505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506
27507  # First separate the path from the arguments. This will split at the first
27508  # space.
27509  complete="$VS_ENV_CMD"
27510  path="${complete%% *}"
27511  tmp="$complete EOL"
27512  arguments="${tmp#* }"
27513
27514  # Input might be given as Windows format, start by converting to
27515  # unix format.
27516  new_path="$path"
27517
27518  windows_path="$new_path"
27519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27520    unix_path=`$CYGPATH -u "$windows_path"`
27521    new_path="$unix_path"
27522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27524    new_path="$unix_path"
27525  fi
27526
27527
27528  # Now try to locate executable using which
27529  new_path=`$WHICH "$new_path" 2> /dev/null`
27530
27531  if test "x$new_path" = x; then
27532    # Oops. Which didn't find the executable.
27533    # The splitting of arguments from the executable at a space might have been incorrect,
27534    # since paths with space are more likely in Windows. Give it another try with the whole
27535    # argument.
27536    path="$complete"
27537    arguments="EOL"
27538    new_path="$path"
27539
27540  windows_path="$new_path"
27541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27542    unix_path=`$CYGPATH -u "$windows_path"`
27543    new_path="$unix_path"
27544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27546    new_path="$unix_path"
27547  fi
27548
27549
27550    new_path=`$WHICH "$new_path" 2> /dev/null`
27551    # bat and cmd files are not always considered executable in MSYS causing which
27552    # to not find them
27553    if test "x$new_path" = x \
27554        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27555        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27556      new_path="$path"
27557
27558  windows_path="$new_path"
27559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27560    unix_path=`$CYGPATH -u "$windows_path"`
27561    new_path="$unix_path"
27562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27564    new_path="$unix_path"
27565  fi
27566
27567    fi
27568
27569    if test "x$new_path" = x; then
27570      # It's still not found. Now this is an unrecoverable error.
27571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27572$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27573      has_space=`$ECHO "$complete" | $GREP " "`
27574      if test "x$has_space" != x; then
27575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27577      fi
27578      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27579    fi
27580  fi
27581
27582  # Now new_path has a complete unix path to the binary
27583  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27584    # Keep paths in /bin as-is, but remove trailing .exe if any
27585    new_path="${new_path/%.exe/}"
27586    # Do not save /bin paths to all_fixpath_prefixes!
27587  else
27588    # Not in mixed or Windows style, start by that.
27589    new_path=`cmd //c echo $new_path`
27590
27591  input_path="$new_path"
27592  # Check if we need to convert this using DOS-style short mode. If the path
27593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27594  # take no chances and rewrite it.
27595  # Note: m4 eats our [], so we need to use [ and ] instead.
27596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27597  if test "x$has_forbidden_chars" != x; then
27598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27600  fi
27601
27602    # Output is in $new_path
27603
27604  windows_path="$new_path"
27605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27606    unix_path=`$CYGPATH -u "$windows_path"`
27607    new_path="$unix_path"
27608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27610    new_path="$unix_path"
27611  fi
27612
27613    # remove trailing .exe if any
27614    new_path="${new_path/%.exe/}"
27615
27616    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27617    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27618  fi
27619
27620    else
27621      # We're on a unix platform. Hooray! :)
27622      # First separate the path from the arguments. This will split at the first
27623      # space.
27624      complete="$VS_ENV_CMD"
27625      path="${complete%% *}"
27626      tmp="$complete EOL"
27627      arguments="${tmp#* }"
27628
27629      # Cannot rely on the command "which" here since it doesn't always work.
27630      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27631      if test -z "$is_absolute_path"; then
27632        # Path to executable is not absolute. Find it.
27633        IFS_save="$IFS"
27634        IFS=:
27635        for p in $PATH; do
27636          if test -f "$p/$path" && test -x "$p/$path"; then
27637            new_path="$p/$path"
27638            break
27639          fi
27640        done
27641        IFS="$IFS_save"
27642      else
27643        # This is an absolute path, we can use it without further modifications.
27644        new_path="$path"
27645      fi
27646
27647      if test "x$new_path" = x; then
27648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27649$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27650        has_space=`$ECHO "$complete" | $GREP " "`
27651        if test "x$has_space" != x; then
27652          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27653$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27654        fi
27655        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27656      fi
27657    fi
27658
27659    # Now join together the path and the arguments once again
27660    if test "x$arguments" != xEOL; then
27661      new_complete="$new_path ${arguments% *}"
27662    else
27663      new_complete="$new_path"
27664    fi
27665
27666    if test "x$complete" != "x$new_complete"; then
27667      VS_ENV_CMD="$new_complete"
27668      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27669$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27670    fi
27671  fi
27672
27673
27674    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27675    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27676$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27677
27678    # We need to create a couple of temporary files.
27679    VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27680    $MKDIR -p $VS_ENV_TMP_DIR
27681
27682    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27683    # Instead create a shell script which will set the relevant variables when run.
27684    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27685
27686  unix_path="$WINPATH_VS_ENV_CMD"
27687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27688    windows_path=`$CYGPATH -m "$unix_path"`
27689    WINPATH_VS_ENV_CMD="$windows_path"
27690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27691    windows_path=`cmd //c echo $unix_path`
27692    WINPATH_VS_ENV_CMD="$windows_path"
27693  fi
27694
27695    WINPATH_BASH="$BASH"
27696
27697  unix_path="$WINPATH_BASH"
27698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27699    windows_path=`$CYGPATH -m "$unix_path"`
27700    WINPATH_BASH="$windows_path"
27701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27702    windows_path=`cmd //c echo $unix_path`
27703    WINPATH_BASH="$windows_path"
27704  fi
27705
27706
27707    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27708    # script (executable by bash) that will setup the important variables.
27709    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27710    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27711    # This will end up something like:
27712    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27713    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27714    # These will end up something like:
27715    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27716    # The trailing space for everyone except PATH is no typo, but is needed due
27717    # to trailing \ in the Windows paths. These will be stripped later.
27718    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27719    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27720    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27721    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27722    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27723    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27724
27725    # Now execute the newly created bat file.
27726    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27727    # Change directory so we don't need to mess with Windows paths in redirects.
27728    cd $VS_ENV_TMP_DIR
27729    cmd /c extract-vs-env.bat | $CAT
27730    cd $CURDIR
27731
27732    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27733      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27734$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27735      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27736$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27737      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27738$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27739      as_fn_error $? "Cannot continue" "$LINENO" 5
27740    fi
27741
27742    # Now set all paths and other env variables. This will allow the rest of
27743    # the configure script to find and run the compiler in the proper way.
27744    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27745$as_echo "$as_me: Setting extracted environment variables" >&6;}
27746    . $VS_ENV_TMP_DIR/set-vs-env.sh
27747    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27748    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27749  else
27750    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27751    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27752$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27753  fi
27754
27755  # At this point, we should have correct variables in the environment, or we can't continue.
27756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27757$as_echo_n "checking for Visual Studio variables... " >&6; }
27758
27759  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27760    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27762$as_echo "present but broken" >&6; }
27763      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27764    else
27765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27766$as_echo "ok" >&6; }
27767      # Remove any trailing "\" ";" and " " from the variables.
27768      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27769      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27770      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27771      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27772      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27773      # Remove any paths containing # (typically F#) as that messes up make. This
27774      # is needed if visual studio was installed with F# support.
27775      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27776
27777
27778
27779
27780
27781      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27782      OLDIFS="$IFS"
27783      IFS=";"
27784      for i in $VS_INCLUDE; do
27785        ipath=$i
27786        # Only process non-empty elements
27787        if test "x$ipath" != x; then
27788          IFS="$OLDIFS"
27789          # Check that directory exists before calling fixup_path
27790          testpath=$ipath
27791
27792  windows_path="$testpath"
27793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27794    unix_path=`$CYGPATH -u "$windows_path"`
27795    testpath="$unix_path"
27796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27798    testpath="$unix_path"
27799  fi
27800
27801          if test -d "$testpath"; then
27802
27803  # Only process if variable expands to non-empty
27804
27805  if test "x$ipath" != x; then
27806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27807
27808  # Input might be given as Windows format, start by converting to
27809  # unix format.
27810  path="$ipath"
27811  new_path=`$CYGPATH -u "$path"`
27812
27813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27816  # "foo.exe" is OK but "foo" is an error.
27817  #
27818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27819  # It is also a way to make sure we got the proper file name for the real test later on.
27820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27821  if test "x$test_shortpath" = x; then
27822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27823$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27824    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27825  fi
27826
27827  # Call helper function which possibly converts this using DOS-style short mode.
27828  # If so, the updated path is stored in $new_path.
27829
27830  input_path="$new_path"
27831  # Check if we need to convert this using DOS-style short mode. If the path
27832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27833  # take no chances and rewrite it.
27834  # Note: m4 eats our [], so we need to use [ and ] instead.
27835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27836  if test "x$has_forbidden_chars" != x; then
27837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27841      # Going to short mode and back again did indeed matter. Since short mode is
27842      # case insensitive, let's make it lowercase to improve readability.
27843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27844      # Now convert it back to Unix-stile (cygpath)
27845      input_path=`$CYGPATH -u "$shortmode_path"`
27846      new_path="$input_path"
27847    fi
27848  fi
27849
27850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27851  if test "x$test_cygdrive_prefix" = x; then
27852    # As a simple fix, exclude /usr/bin since it's not a real path.
27853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27855      # a path prefixed by /cygdrive for fixpath to work.
27856      new_path="$CYGWIN_ROOT_PATH$input_path"
27857    fi
27858  fi
27859
27860
27861  if test "x$path" != "x$new_path"; then
27862    ipath="$new_path"
27863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27864$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27865  fi
27866
27867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27868
27869  path="$ipath"
27870  has_colon=`$ECHO $path | $GREP ^.:`
27871  new_path="$path"
27872  if test "x$has_colon" = x; then
27873    # Not in mixed or Windows style, start by that.
27874    new_path=`cmd //c echo $path`
27875  fi
27876
27877
27878  input_path="$new_path"
27879  # Check if we need to convert this using DOS-style short mode. If the path
27880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27881  # take no chances and rewrite it.
27882  # Note: m4 eats our [], so we need to use [ and ] instead.
27883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27884  if test "x$has_forbidden_chars" != x; then
27885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27887  fi
27888
27889
27890  windows_path="$new_path"
27891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27892    unix_path=`$CYGPATH -u "$windows_path"`
27893    new_path="$unix_path"
27894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27896    new_path="$unix_path"
27897  fi
27898
27899  if test "x$path" != "x$new_path"; then
27900    ipath="$new_path"
27901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27902$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27903  fi
27904
27905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27907
27908    else
27909      # We're on a unix platform. Hooray! :)
27910      path="$ipath"
27911      has_space=`$ECHO "$path" | $GREP " "`
27912      if test "x$has_space" != x; then
27913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27914$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27916      fi
27917
27918      # Use eval to expand a potential ~
27919      eval path="$path"
27920      if test ! -f "$path" && test ! -d "$path"; then
27921        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27922      fi
27923
27924      ipath="`cd "$path"; $THEPWDCMD -L`"
27925    fi
27926  fi
27927
27928            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27929          fi
27930          IFS=";"
27931        fi
27932      done
27933      # Convert VS_LIB into SYSROOT_LDFLAGS
27934      for i in $VS_LIB; do
27935        libpath=$i
27936        # Only process non-empty elements
27937        if test "x$libpath" != x; then
27938          IFS="$OLDIFS"
27939          # Check that directory exists before calling fixup_path
27940          testpath=$libpath
27941
27942  windows_path="$testpath"
27943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27944    unix_path=`$CYGPATH -u "$windows_path"`
27945    testpath="$unix_path"
27946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27948    testpath="$unix_path"
27949  fi
27950
27951          if test -d "$testpath"; then
27952
27953  # Only process if variable expands to non-empty
27954
27955  if test "x$libpath" != x; then
27956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27957
27958  # Input might be given as Windows format, start by converting to
27959  # unix format.
27960  path="$libpath"
27961  new_path=`$CYGPATH -u "$path"`
27962
27963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27966  # "foo.exe" is OK but "foo" is an error.
27967  #
27968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27969  # It is also a way to make sure we got the proper file name for the real test later on.
27970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27971  if test "x$test_shortpath" = x; then
27972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27973$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27974    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27975  fi
27976
27977  # Call helper function which possibly converts this using DOS-style short mode.
27978  # If so, the updated path is stored in $new_path.
27979
27980  input_path="$new_path"
27981  # Check if we need to convert this using DOS-style short mode. If the path
27982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27983  # take no chances and rewrite it.
27984  # Note: m4 eats our [], so we need to use [ and ] instead.
27985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27986  if test "x$has_forbidden_chars" != x; then
27987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27991      # Going to short mode and back again did indeed matter. Since short mode is
27992      # case insensitive, let's make it lowercase to improve readability.
27993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27994      # Now convert it back to Unix-stile (cygpath)
27995      input_path=`$CYGPATH -u "$shortmode_path"`
27996      new_path="$input_path"
27997    fi
27998  fi
27999
28000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28001  if test "x$test_cygdrive_prefix" = x; then
28002    # As a simple fix, exclude /usr/bin since it's not a real path.
28003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28005      # a path prefixed by /cygdrive for fixpath to work.
28006      new_path="$CYGWIN_ROOT_PATH$input_path"
28007    fi
28008  fi
28009
28010
28011  if test "x$path" != "x$new_path"; then
28012    libpath="$new_path"
28013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28014$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28015  fi
28016
28017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28018
28019  path="$libpath"
28020  has_colon=`$ECHO $path | $GREP ^.:`
28021  new_path="$path"
28022  if test "x$has_colon" = x; then
28023    # Not in mixed or Windows style, start by that.
28024    new_path=`cmd //c echo $path`
28025  fi
28026
28027
28028  input_path="$new_path"
28029  # Check if we need to convert this using DOS-style short mode. If the path
28030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28031  # take no chances and rewrite it.
28032  # Note: m4 eats our [], so we need to use [ and ] instead.
28033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28034  if test "x$has_forbidden_chars" != x; then
28035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28037  fi
28038
28039
28040  windows_path="$new_path"
28041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28042    unix_path=`$CYGPATH -u "$windows_path"`
28043    new_path="$unix_path"
28044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28046    new_path="$unix_path"
28047  fi
28048
28049  if test "x$path" != "x$new_path"; then
28050    libpath="$new_path"
28051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28052$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28053  fi
28054
28055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28057
28058    else
28059      # We're on a unix platform. Hooray! :)
28060      path="$libpath"
28061      has_space=`$ECHO "$path" | $GREP " "`
28062      if test "x$has_space" != x; then
28063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28064$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28066      fi
28067
28068      # Use eval to expand a potential ~
28069      eval path="$path"
28070      if test ! -f "$path" && test ! -d "$path"; then
28071        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28072      fi
28073
28074      libpath="`cd "$path"; $THEPWDCMD -L`"
28075    fi
28076  fi
28077
28078            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28079          fi
28080          IFS=";"
28081        fi
28082      done
28083      IFS="$OLDIFS"
28084    fi
28085  else
28086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28087$as_echo "not found" >&6; }
28088
28089    if test "x$VS_ENV_CMD" = x; then
28090      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28091$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28092      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28093$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28094    else
28095      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28096$as_echo "$as_me: Running the extraction script failed." >&6;}
28097    fi
28098    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28099$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28100    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28101$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28102    as_fn_error $? "Cannot continue" "$LINENO" 5
28103  fi
28104
28105    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28106    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28107    PATH="$VS_PATH"
28108    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28109    export INCLUDE="$VS_INCLUDE"
28110    export LIB="$VS_LIB"
28111  fi
28112
28113  # autoconf magic only relies on PATH, so update it if tools dir is specified
28114  OLD_PATH="$PATH"
28115
28116  # For solaris we really need solaris tools, and not the GNU equivalent.
28117  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28118  # so add that to path before starting to probe.
28119  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
28120  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28121    PATH="/usr/ccs/bin:$PATH"
28122  fi
28123
28124  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28125  # override all other locations.
28126  if test "x$TOOLCHAIN_PATH" != x; then
28127    PATH=$TOOLCHAIN_PATH:$PATH
28128  fi
28129
28130
28131  #
28132  # Setup the compilers (CC and CXX)
28133  #
28134
28135  COMPILER_NAME=C
28136  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28137
28138  if test "x$CC" != x; then
28139    # User has supplied compiler name already, always let that override.
28140    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28141$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28142    if test "x`basename $CC`" = "x$CC"; then
28143      # A command without a complete path is provided, search $PATH.
28144
28145      for ac_prog in $CC
28146do
28147  # Extract the first word of "$ac_prog", so it can be a program name with args.
28148set dummy $ac_prog; ac_word=$2
28149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28150$as_echo_n "checking for $ac_word... " >&6; }
28151if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28152  $as_echo_n "(cached) " >&6
28153else
28154  case $POTENTIAL_CC in
28155  [\\/]* | ?:[\\/]*)
28156  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28157  ;;
28158  *)
28159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28160for as_dir in $PATH
28161do
28162  IFS=$as_save_IFS
28163  test -z "$as_dir" && as_dir=.
28164    for ac_exec_ext in '' $ac_executable_extensions; do
28165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28166    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28168    break 2
28169  fi
28170done
28171  done
28172IFS=$as_save_IFS
28173
28174  ;;
28175esac
28176fi
28177POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28178if test -n "$POTENTIAL_CC"; then
28179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28180$as_echo "$POTENTIAL_CC" >&6; }
28181else
28182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28183$as_echo "no" >&6; }
28184fi
28185
28186
28187  test -n "$POTENTIAL_CC" && break
28188done
28189
28190      if test "x$POTENTIAL_CC" != x; then
28191        CC=$POTENTIAL_CC
28192      else
28193        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28194      fi
28195    else
28196      # Otherwise it might already be a complete path
28197      if test ! -x "$CC"; then
28198        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28199      fi
28200    fi
28201  else
28202    # No user supplied value. Locate compiler ourselves.
28203
28204    # If we are cross compiling, assume cross compilation tools follows the
28205    # cross compilation standard where they are prefixed with the autoconf
28206    # standard name for the target. For example the binary
28207    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28208    # If we are not cross compiling, then the default compiler name will be
28209    # used.
28210
28211    CC=
28212    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28213    # before checking the rest of the PATH.
28214    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28215    # step, this should not be necessary.
28216    if test -n "$TOOLCHAIN_PATH"; then
28217      PATH_save="$PATH"
28218      PATH="$TOOLCHAIN_PATH"
28219      for ac_prog in $SEARCH_LIST
28220do
28221  # Extract the first word of "$ac_prog", so it can be a program name with args.
28222set dummy $ac_prog; ac_word=$2
28223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28224$as_echo_n "checking for $ac_word... " >&6; }
28225if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28226  $as_echo_n "(cached) " >&6
28227else
28228  case $TOOLCHAIN_PATH_CC in
28229  [\\/]* | ?:[\\/]*)
28230  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28231  ;;
28232  *)
28233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28234for as_dir in $PATH
28235do
28236  IFS=$as_save_IFS
28237  test -z "$as_dir" && as_dir=.
28238    for ac_exec_ext in '' $ac_executable_extensions; do
28239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28240    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28242    break 2
28243  fi
28244done
28245  done
28246IFS=$as_save_IFS
28247
28248  ;;
28249esac
28250fi
28251TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28252if test -n "$TOOLCHAIN_PATH_CC"; then
28253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28254$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28255else
28256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28257$as_echo "no" >&6; }
28258fi
28259
28260
28261  test -n "$TOOLCHAIN_PATH_CC" && break
28262done
28263
28264      CC=$TOOLCHAIN_PATH_CC
28265      PATH="$PATH_save"
28266    fi
28267
28268    # AC_PATH_PROGS can't be run multiple times with the same variable,
28269    # so create a new name for this run.
28270    if test "x$CC" = x; then
28271      for ac_prog in $SEARCH_LIST
28272do
28273  # Extract the first word of "$ac_prog", so it can be a program name with args.
28274set dummy $ac_prog; ac_word=$2
28275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28276$as_echo_n "checking for $ac_word... " >&6; }
28277if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28278  $as_echo_n "(cached) " >&6
28279else
28280  case $POTENTIAL_CC in
28281  [\\/]* | ?:[\\/]*)
28282  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28283  ;;
28284  *)
28285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28286for as_dir in $PATH
28287do
28288  IFS=$as_save_IFS
28289  test -z "$as_dir" && as_dir=.
28290    for ac_exec_ext in '' $ac_executable_extensions; do
28291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28292    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28294    break 2
28295  fi
28296done
28297  done
28298IFS=$as_save_IFS
28299
28300  ;;
28301esac
28302fi
28303POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28304if test -n "$POTENTIAL_CC"; then
28305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28306$as_echo "$POTENTIAL_CC" >&6; }
28307else
28308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28309$as_echo "no" >&6; }
28310fi
28311
28312
28313  test -n "$POTENTIAL_CC" && break
28314done
28315
28316      CC=$POTENTIAL_CC
28317    fi
28318
28319    if test "x$CC" = x; then
28320
28321  # Print a helpful message on how to acquire the necessary build dependency.
28322  # devkit is the help tag: freetype, cups, pulse, alsa etc
28323  MISSING_DEPENDENCY=devkit
28324
28325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28326    cygwin_help $MISSING_DEPENDENCY
28327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28328    msys_help $MISSING_DEPENDENCY
28329  else
28330    PKGHANDLER_COMMAND=
28331
28332    case $PKGHANDLER in
28333      apt-get)
28334        apt_help     $MISSING_DEPENDENCY ;;
28335      yum)
28336        yum_help     $MISSING_DEPENDENCY ;;
28337      port)
28338        port_help    $MISSING_DEPENDENCY ;;
28339      pkgutil)
28340        pkgutil_help $MISSING_DEPENDENCY ;;
28341      pkgadd)
28342        pkgadd_help  $MISSING_DEPENDENCY ;;
28343    esac
28344
28345    if test "x$PKGHANDLER_COMMAND" != x; then
28346      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28347    fi
28348  fi
28349
28350      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28351    fi
28352  fi
28353
28354  # Now we have a compiler binary in CC. Make sure it's okay.
28355
28356  # Only process if variable expands to non-empty
28357
28358  if test "x$CC" != x; then
28359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28360
28361  # First separate the path from the arguments. This will split at the first
28362  # space.
28363  complete="$CC"
28364  path="${complete%% *}"
28365  tmp="$complete EOL"
28366  arguments="${tmp#* }"
28367
28368  # Input might be given as Windows format, start by converting to
28369  # unix format.
28370  new_path=`$CYGPATH -u "$path"`
28371
28372  # Now try to locate executable using which
28373  new_path=`$WHICH "$new_path" 2> /dev/null`
28374  # bat and cmd files are not always considered executable in cygwin causing which
28375  # to not find them
28376  if test "x$new_path" = x \
28377      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28378      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28379    new_path=`$CYGPATH -u "$path"`
28380  fi
28381  if test "x$new_path" = x; then
28382    # Oops. Which didn't find the executable.
28383    # The splitting of arguments from the executable at a space might have been incorrect,
28384    # since paths with space are more likely in Windows. Give it another try with the whole
28385    # argument.
28386    path="$complete"
28387    arguments="EOL"
28388    new_path=`$CYGPATH -u "$path"`
28389    new_path=`$WHICH "$new_path" 2> /dev/null`
28390    # bat and cmd files are not always considered executable in cygwin causing which
28391    # to not find them
28392    if test "x$new_path" = x \
28393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28395      new_path=`$CYGPATH -u "$path"`
28396    fi
28397    if test "x$new_path" = x; then
28398      # It's still not found. Now this is an unrecoverable error.
28399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28400$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28401      has_space=`$ECHO "$complete" | $GREP " "`
28402      if test "x$has_space" != x; then
28403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28405      fi
28406      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28407    fi
28408  fi
28409
28410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28413  # "foo.exe" is OK but "foo" is an error.
28414  #
28415  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28416  # It is also a way to make sure we got the proper file name for the real test later on.
28417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28418  if test "x$test_shortpath" = x; then
28419    # Short path failed, file does not exist as specified.
28420    # Try adding .exe or .cmd
28421    if test -f "${new_path}.exe"; then
28422      input_to_shortpath="${new_path}.exe"
28423    elif test -f "${new_path}.cmd"; then
28424      input_to_shortpath="${new_path}.cmd"
28425    else
28426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28427$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28428      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28429$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28430      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28431    fi
28432  else
28433    input_to_shortpath="$new_path"
28434  fi
28435
28436  # Call helper function which possibly converts this using DOS-style short mode.
28437  # If so, the updated path is stored in $new_path.
28438  new_path="$input_to_shortpath"
28439
28440  input_path="$input_to_shortpath"
28441  # Check if we need to convert this using DOS-style short mode. If the path
28442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28443  # take no chances and rewrite it.
28444  # Note: m4 eats our [], so we need to use [ and ] instead.
28445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28446  if test "x$has_forbidden_chars" != x; then
28447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28451      # Going to short mode and back again did indeed matter. Since short mode is
28452      # case insensitive, let's make it lowercase to improve readability.
28453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28454      # Now convert it back to Unix-stile (cygpath)
28455      input_path=`$CYGPATH -u "$shortmode_path"`
28456      new_path="$input_path"
28457    fi
28458  fi
28459
28460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28461  if test "x$test_cygdrive_prefix" = x; then
28462    # As a simple fix, exclude /usr/bin since it's not a real path.
28463    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28465      # a path prefixed by /cygdrive for fixpath to work.
28466      new_path="$CYGWIN_ROOT_PATH$input_path"
28467    fi
28468  fi
28469
28470  # remove trailing .exe if any
28471  new_path="${new_path/%.exe/}"
28472
28473    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28474
28475  # First separate the path from the arguments. This will split at the first
28476  # space.
28477  complete="$CC"
28478  path="${complete%% *}"
28479  tmp="$complete EOL"
28480  arguments="${tmp#* }"
28481
28482  # Input might be given as Windows format, start by converting to
28483  # unix format.
28484  new_path="$path"
28485
28486  windows_path="$new_path"
28487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28488    unix_path=`$CYGPATH -u "$windows_path"`
28489    new_path="$unix_path"
28490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28492    new_path="$unix_path"
28493  fi
28494
28495
28496  # Now try to locate executable using which
28497  new_path=`$WHICH "$new_path" 2> /dev/null`
28498
28499  if test "x$new_path" = x; then
28500    # Oops. Which didn't find the executable.
28501    # The splitting of arguments from the executable at a space might have been incorrect,
28502    # since paths with space are more likely in Windows. Give it another try with the whole
28503    # argument.
28504    path="$complete"
28505    arguments="EOL"
28506    new_path="$path"
28507
28508  windows_path="$new_path"
28509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28510    unix_path=`$CYGPATH -u "$windows_path"`
28511    new_path="$unix_path"
28512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28514    new_path="$unix_path"
28515  fi
28516
28517
28518    new_path=`$WHICH "$new_path" 2> /dev/null`
28519    # bat and cmd files are not always considered executable in MSYS causing which
28520    # to not find them
28521    if test "x$new_path" = x \
28522        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28523        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28524      new_path="$path"
28525
28526  windows_path="$new_path"
28527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28528    unix_path=`$CYGPATH -u "$windows_path"`
28529    new_path="$unix_path"
28530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28532    new_path="$unix_path"
28533  fi
28534
28535    fi
28536
28537    if test "x$new_path" = x; then
28538      # It's still not found. Now this is an unrecoverable error.
28539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28540$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28541      has_space=`$ECHO "$complete" | $GREP " "`
28542      if test "x$has_space" != x; then
28543        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28544$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28545      fi
28546      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28547    fi
28548  fi
28549
28550  # Now new_path has a complete unix path to the binary
28551  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28552    # Keep paths in /bin as-is, but remove trailing .exe if any
28553    new_path="${new_path/%.exe/}"
28554    # Do not save /bin paths to all_fixpath_prefixes!
28555  else
28556    # Not in mixed or Windows style, start by that.
28557    new_path=`cmd //c echo $new_path`
28558
28559  input_path="$new_path"
28560  # Check if we need to convert this using DOS-style short mode. If the path
28561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28562  # take no chances and rewrite it.
28563  # Note: m4 eats our [], so we need to use [ and ] instead.
28564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28565  if test "x$has_forbidden_chars" != x; then
28566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28568  fi
28569
28570    # Output is in $new_path
28571
28572  windows_path="$new_path"
28573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28574    unix_path=`$CYGPATH -u "$windows_path"`
28575    new_path="$unix_path"
28576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28578    new_path="$unix_path"
28579  fi
28580
28581    # remove trailing .exe if any
28582    new_path="${new_path/%.exe/}"
28583
28584    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28585    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28586  fi
28587
28588    else
28589      # We're on a unix platform. Hooray! :)
28590      # First separate the path from the arguments. This will split at the first
28591      # space.
28592      complete="$CC"
28593      path="${complete%% *}"
28594      tmp="$complete EOL"
28595      arguments="${tmp#* }"
28596
28597      # Cannot rely on the command "which" here since it doesn't always work.
28598      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28599      if test -z "$is_absolute_path"; then
28600        # Path to executable is not absolute. Find it.
28601        IFS_save="$IFS"
28602        IFS=:
28603        for p in $PATH; do
28604          if test -f "$p/$path" && test -x "$p/$path"; then
28605            new_path="$p/$path"
28606            break
28607          fi
28608        done
28609        IFS="$IFS_save"
28610      else
28611        # This is an absolute path, we can use it without further modifications.
28612        new_path="$path"
28613      fi
28614
28615      if test "x$new_path" = x; then
28616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28617$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28618        has_space=`$ECHO "$complete" | $GREP " "`
28619        if test "x$has_space" != x; then
28620          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28621$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28622        fi
28623        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28624      fi
28625    fi
28626
28627    # Now join together the path and the arguments once again
28628    if test "x$arguments" != xEOL; then
28629      new_complete="$new_path ${arguments% *}"
28630    else
28631      new_complete="$new_path"
28632    fi
28633
28634    if test "x$complete" != "x$new_complete"; then
28635      CC="$new_complete"
28636      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28637$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28638    fi
28639  fi
28640
28641  TEST_COMPILER="$CC"
28642  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28643  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28644  if test "x$OPENJDK_BUILD_OS" != xaix; then
28645    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28647$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28648
28649  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28650    # Follow a chain of symbolic links. Use readlink
28651    # where it exists, else fall back to horribly
28652    # complicated shell code.
28653    if test "x$READLINK_TESTED" != yes; then
28654      # On MacOSX there is a readlink tool with a different
28655      # purpose than the GNU readlink tool. Check the found readlink.
28656      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28657      if test "x$ISGNU" = x; then
28658        # A readlink that we do not know how to use.
28659        # Are there other non-GNU readlinks out there?
28660        READLINK_TESTED=yes
28661        READLINK=
28662      fi
28663    fi
28664
28665    if test "x$READLINK" != x; then
28666      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28667    else
28668      # Save the current directory for restoring afterwards
28669      STARTDIR=$PWD
28670      COUNTER=0
28671      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28672      sym_link_file=`$BASENAME $TEST_COMPILER`
28673      cd $sym_link_dir
28674      # Use -P flag to resolve symlinks in directories.
28675      cd `$THEPWDCMD -P`
28676      sym_link_dir=`$THEPWDCMD -P`
28677      # Resolve file symlinks
28678      while test $COUNTER -lt 20; do
28679        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28680        if test "x$ISLINK" == x; then
28681          # This is not a symbolic link! We are done!
28682          break
28683        fi
28684        # Again resolve directory symlinks since the target of the just found
28685        # link could be in a different directory
28686        cd `$DIRNAME $ISLINK`
28687        sym_link_dir=`$THEPWDCMD -P`
28688        sym_link_file=`$BASENAME $ISLINK`
28689        let COUNTER=COUNTER+1
28690      done
28691      cd $STARTDIR
28692      TEST_COMPILER=$sym_link_dir/$sym_link_file
28693    fi
28694  fi
28695
28696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28697$as_echo "$TEST_COMPILER" >&6; }
28698  fi
28699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28700$as_echo_n "checking if CC is disguised ccache... " >&6; }
28701
28702  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28703  if test "x$COMPILER_BASENAME" = "xccache"; then
28704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28705$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28706    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28707    # We want to control ccache invocation ourselves, so ignore this cc and try
28708    # searching again.
28709
28710    # Remove the path to the fake ccache cc from the PATH
28711    RETRY_COMPILER_SAVED_PATH="$PATH"
28712    COMPILER_DIRNAME=`$DIRNAME $CC`
28713    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28714
28715    # Try again looking for our compiler
28716    if test -n "$ac_tool_prefix"; then
28717  for ac_prog in $TOOLCHAIN_CC_BINARY
28718  do
28719    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28720set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28722$as_echo_n "checking for $ac_word... " >&6; }
28723if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28724  $as_echo_n "(cached) " >&6
28725else
28726  if test -n "$PROPER_COMPILER_CC"; then
28727  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28728else
28729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28730for as_dir in $PATH
28731do
28732  IFS=$as_save_IFS
28733  test -z "$as_dir" && as_dir=.
28734    for ac_exec_ext in '' $ac_executable_extensions; do
28735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28736    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28738    break 2
28739  fi
28740done
28741  done
28742IFS=$as_save_IFS
28743
28744fi
28745fi
28746PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28747if test -n "$PROPER_COMPILER_CC"; then
28748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28749$as_echo "$PROPER_COMPILER_CC" >&6; }
28750else
28751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28752$as_echo "no" >&6; }
28753fi
28754
28755
28756    test -n "$PROPER_COMPILER_CC" && break
28757  done
28758fi
28759if test -z "$PROPER_COMPILER_CC"; then
28760  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28761  for ac_prog in $TOOLCHAIN_CC_BINARY
28762do
28763  # Extract the first word of "$ac_prog", so it can be a program name with args.
28764set dummy $ac_prog; ac_word=$2
28765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28766$as_echo_n "checking for $ac_word... " >&6; }
28767if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28768  $as_echo_n "(cached) " >&6
28769else
28770  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28771  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28772else
28773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28774for as_dir in $PATH
28775do
28776  IFS=$as_save_IFS
28777  test -z "$as_dir" && as_dir=.
28778    for ac_exec_ext in '' $ac_executable_extensions; do
28779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28780    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28782    break 2
28783  fi
28784done
28785  done
28786IFS=$as_save_IFS
28787
28788fi
28789fi
28790ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28791if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28793$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28794else
28795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28796$as_echo "no" >&6; }
28797fi
28798
28799
28800  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28801done
28802
28803  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28804    PROPER_COMPILER_CC=""
28805  else
28806    case $cross_compiling:$ac_tool_warned in
28807yes:)
28808{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28809$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28810ac_tool_warned=yes ;;
28811esac
28812    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28813  fi
28814fi
28815
28816
28817  # Only process if variable expands to non-empty
28818
28819  if test "x$PROPER_COMPILER_CC" != x; then
28820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28821
28822  # First separate the path from the arguments. This will split at the first
28823  # space.
28824  complete="$PROPER_COMPILER_CC"
28825  path="${complete%% *}"
28826  tmp="$complete EOL"
28827  arguments="${tmp#* }"
28828
28829  # Input might be given as Windows format, start by converting to
28830  # unix format.
28831  new_path=`$CYGPATH -u "$path"`
28832
28833  # Now try to locate executable using which
28834  new_path=`$WHICH "$new_path" 2> /dev/null`
28835  # bat and cmd files are not always considered executable in cygwin causing which
28836  # to not find them
28837  if test "x$new_path" = x \
28838      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28839      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28840    new_path=`$CYGPATH -u "$path"`
28841  fi
28842  if test "x$new_path" = x; then
28843    # Oops. Which didn't find the executable.
28844    # The splitting of arguments from the executable at a space might have been incorrect,
28845    # since paths with space are more likely in Windows. Give it another try with the whole
28846    # argument.
28847    path="$complete"
28848    arguments="EOL"
28849    new_path=`$CYGPATH -u "$path"`
28850    new_path=`$WHICH "$new_path" 2> /dev/null`
28851    # bat and cmd files are not always considered executable in cygwin causing which
28852    # to not find them
28853    if test "x$new_path" = x \
28854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28856      new_path=`$CYGPATH -u "$path"`
28857    fi
28858    if test "x$new_path" = x; then
28859      # It's still not found. Now this is an unrecoverable error.
28860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28861$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28862      has_space=`$ECHO "$complete" | $GREP " "`
28863      if test "x$has_space" != x; then
28864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28866      fi
28867      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28868    fi
28869  fi
28870
28871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28874  # "foo.exe" is OK but "foo" is an error.
28875  #
28876  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28877  # It is also a way to make sure we got the proper file name for the real test later on.
28878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28879  if test "x$test_shortpath" = x; then
28880    # Short path failed, file does not exist as specified.
28881    # Try adding .exe or .cmd
28882    if test -f "${new_path}.exe"; then
28883      input_to_shortpath="${new_path}.exe"
28884    elif test -f "${new_path}.cmd"; then
28885      input_to_shortpath="${new_path}.cmd"
28886    else
28887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28888$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28891      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28892    fi
28893  else
28894    input_to_shortpath="$new_path"
28895  fi
28896
28897  # Call helper function which possibly converts this using DOS-style short mode.
28898  # If so, the updated path is stored in $new_path.
28899  new_path="$input_to_shortpath"
28900
28901  input_path="$input_to_shortpath"
28902  # Check if we need to convert this using DOS-style short mode. If the path
28903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28904  # take no chances and rewrite it.
28905  # Note: m4 eats our [], so we need to use [ and ] instead.
28906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28907  if test "x$has_forbidden_chars" != x; then
28908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28912      # Going to short mode and back again did indeed matter. Since short mode is
28913      # case insensitive, let's make it lowercase to improve readability.
28914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28915      # Now convert it back to Unix-stile (cygpath)
28916      input_path=`$CYGPATH -u "$shortmode_path"`
28917      new_path="$input_path"
28918    fi
28919  fi
28920
28921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28922  if test "x$test_cygdrive_prefix" = x; then
28923    # As a simple fix, exclude /usr/bin since it's not a real path.
28924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28926      # a path prefixed by /cygdrive for fixpath to work.
28927      new_path="$CYGWIN_ROOT_PATH$input_path"
28928    fi
28929  fi
28930
28931  # remove trailing .exe if any
28932  new_path="${new_path/%.exe/}"
28933
28934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28935
28936  # First separate the path from the arguments. This will split at the first
28937  # space.
28938  complete="$PROPER_COMPILER_CC"
28939  path="${complete%% *}"
28940  tmp="$complete EOL"
28941  arguments="${tmp#* }"
28942
28943  # Input might be given as Windows format, start by converting to
28944  # unix format.
28945  new_path="$path"
28946
28947  windows_path="$new_path"
28948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28949    unix_path=`$CYGPATH -u "$windows_path"`
28950    new_path="$unix_path"
28951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28953    new_path="$unix_path"
28954  fi
28955
28956
28957  # Now try to locate executable using which
28958  new_path=`$WHICH "$new_path" 2> /dev/null`
28959
28960  if test "x$new_path" = x; then
28961    # Oops. Which didn't find the executable.
28962    # The splitting of arguments from the executable at a space might have been incorrect,
28963    # since paths with space are more likely in Windows. Give it another try with the whole
28964    # argument.
28965    path="$complete"
28966    arguments="EOL"
28967    new_path="$path"
28968
28969  windows_path="$new_path"
28970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28971    unix_path=`$CYGPATH -u "$windows_path"`
28972    new_path="$unix_path"
28973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28975    new_path="$unix_path"
28976  fi
28977
28978
28979    new_path=`$WHICH "$new_path" 2> /dev/null`
28980    # bat and cmd files are not always considered executable in MSYS causing which
28981    # to not find them
28982    if test "x$new_path" = x \
28983        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28984        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28985      new_path="$path"
28986
28987  windows_path="$new_path"
28988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28989    unix_path=`$CYGPATH -u "$windows_path"`
28990    new_path="$unix_path"
28991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28993    new_path="$unix_path"
28994  fi
28995
28996    fi
28997
28998    if test "x$new_path" = x; then
28999      # It's still not found. Now this is an unrecoverable error.
29000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29001$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29002      has_space=`$ECHO "$complete" | $GREP " "`
29003      if test "x$has_space" != x; then
29004        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29005$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29006      fi
29007      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29008    fi
29009  fi
29010
29011  # Now new_path has a complete unix path to the binary
29012  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29013    # Keep paths in /bin as-is, but remove trailing .exe if any
29014    new_path="${new_path/%.exe/}"
29015    # Do not save /bin paths to all_fixpath_prefixes!
29016  else
29017    # Not in mixed or Windows style, start by that.
29018    new_path=`cmd //c echo $new_path`
29019
29020  input_path="$new_path"
29021  # Check if we need to convert this using DOS-style short mode. If the path
29022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29023  # take no chances and rewrite it.
29024  # Note: m4 eats our [], so we need to use [ and ] instead.
29025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29026  if test "x$has_forbidden_chars" != x; then
29027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29029  fi
29030
29031    # Output is in $new_path
29032
29033  windows_path="$new_path"
29034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29035    unix_path=`$CYGPATH -u "$windows_path"`
29036    new_path="$unix_path"
29037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29039    new_path="$unix_path"
29040  fi
29041
29042    # remove trailing .exe if any
29043    new_path="${new_path/%.exe/}"
29044
29045    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29046    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29047  fi
29048
29049    else
29050      # We're on a unix platform. Hooray! :)
29051      # First separate the path from the arguments. This will split at the first
29052      # space.
29053      complete="$PROPER_COMPILER_CC"
29054      path="${complete%% *}"
29055      tmp="$complete EOL"
29056      arguments="${tmp#* }"
29057
29058      # Cannot rely on the command "which" here since it doesn't always work.
29059      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29060      if test -z "$is_absolute_path"; then
29061        # Path to executable is not absolute. Find it.
29062        IFS_save="$IFS"
29063        IFS=:
29064        for p in $PATH; do
29065          if test -f "$p/$path" && test -x "$p/$path"; then
29066            new_path="$p/$path"
29067            break
29068          fi
29069        done
29070        IFS="$IFS_save"
29071      else
29072        # This is an absolute path, we can use it without further modifications.
29073        new_path="$path"
29074      fi
29075
29076      if test "x$new_path" = x; then
29077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29078$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29079        has_space=`$ECHO "$complete" | $GREP " "`
29080        if test "x$has_space" != x; then
29081          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29082$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29083        fi
29084        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29085      fi
29086    fi
29087
29088    # Now join together the path and the arguments once again
29089    if test "x$arguments" != xEOL; then
29090      new_complete="$new_path ${arguments% *}"
29091    else
29092      new_complete="$new_path"
29093    fi
29094
29095    if test "x$complete" != "x$new_complete"; then
29096      PROPER_COMPILER_CC="$new_complete"
29097      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29098$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29099    fi
29100  fi
29101
29102    PATH="$RETRY_COMPILER_SAVED_PATH"
29103
29104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29105$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29106
29107  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29108    # Follow a chain of symbolic links. Use readlink
29109    # where it exists, else fall back to horribly
29110    # complicated shell code.
29111    if test "x$READLINK_TESTED" != yes; then
29112      # On MacOSX there is a readlink tool with a different
29113      # purpose than the GNU readlink tool. Check the found readlink.
29114      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29115      if test "x$ISGNU" = x; then
29116        # A readlink that we do not know how to use.
29117        # Are there other non-GNU readlinks out there?
29118        READLINK_TESTED=yes
29119        READLINK=
29120      fi
29121    fi
29122
29123    if test "x$READLINK" != x; then
29124      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29125    else
29126      # Save the current directory for restoring afterwards
29127      STARTDIR=$PWD
29128      COUNTER=0
29129      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29130      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29131      cd $sym_link_dir
29132      # Use -P flag to resolve symlinks in directories.
29133      cd `$THEPWDCMD -P`
29134      sym_link_dir=`$THEPWDCMD -P`
29135      # Resolve file symlinks
29136      while test $COUNTER -lt 20; do
29137        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29138        if test "x$ISLINK" == x; then
29139          # This is not a symbolic link! We are done!
29140          break
29141        fi
29142        # Again resolve directory symlinks since the target of the just found
29143        # link could be in a different directory
29144        cd `$DIRNAME $ISLINK`
29145        sym_link_dir=`$THEPWDCMD -P`
29146        sym_link_file=`$BASENAME $ISLINK`
29147        let COUNTER=COUNTER+1
29148      done
29149      cd $STARTDIR
29150      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29151    fi
29152  fi
29153
29154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29155$as_echo "$PROPER_COMPILER_CC" >&6; }
29156    CC="$PROPER_COMPILER_CC"
29157  else
29158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29159$as_echo "no, keeping CC" >&6; }
29160  fi
29161
29162
29163  COMPILER=$CC
29164  COMPILER_NAME=$COMPILER_NAME
29165
29166  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29167    # cc -V output typically looks like
29168    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29169    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29170    # Check that this is likely to be the Solaris Studio cc.
29171    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29172    if test $? -ne 0; then
29173      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29174      { $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
29175$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29176      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29177$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29178      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29179$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29180      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29181    fi
29182    # Remove usage instructions (if present), and
29183    # collapse compiler output into a single line
29184    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29185        $SED -e 's/ *[Uu]sage:.*//'`
29186    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29187        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29188  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29189    # xlc -qversion output typically looks like
29190    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29191    #     Version: 11.01.0000.0015
29192    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29193    # Check that this is likely to be the IBM XL C compiler.
29194    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29195    if test $? -ne 0; then
29196      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29197      { $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
29198$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29199      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29200$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29201      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29202$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29203      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29204    fi
29205    # Collapse compiler output into a single line
29206    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29207    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29208        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29209  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29210    # There is no specific version flag, but all output starts with a version string.
29211    # First line typically looks something like:
29212    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29213    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29214    # Check that this is likely to be Microsoft CL.EXE.
29215    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29216    if test $? -ne 0; then
29217      { $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
29218$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29219      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29220$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29221      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29222    fi
29223    # Collapse compiler output into a single line
29224    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29225    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29226        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29227  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29228    # gcc --version output typically looks like
29229    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29230    #     Copyright (C) 2013 Free Software Foundation, Inc.
29231    #     This is free software; see the source for copying conditions.  There is NO
29232    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29233    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29234    # Check that this is likely to be GCC.
29235    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29236    if test $? -ne 0; then
29237      { $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
29238$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29239      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29240$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29241      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29242    fi
29243    # Remove Copyright and legalese from version string, and
29244    # collapse into a single line
29245    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29246        $SED -e 's/ *Copyright .*//'`
29247    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29248        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29249  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29250    # clang --version output typically looks like
29251    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29252    #    clang version 3.3 (tags/RELEASE_33/final)
29253    # or
29254    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29255    #    Target: x86_64-pc-linux-gnu
29256    #    Thread model: posix
29257    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29258    # Check that this is likely to be clang
29259    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29260    if test $? -ne 0; then
29261      { $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
29262$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29263      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29264$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29265      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29266    fi
29267    # Collapse compiler output into a single line
29268    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29269    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29270        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29271  else
29272      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29273  fi
29274  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29275  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29276  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29277  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29278
29279  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29280$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29281
29282
29283  # Now that we have resolved CC ourself, let autoconf have its go at it
29284  ac_ext=c
29285ac_cpp='$CPP $CPPFLAGS'
29286ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29287ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29288ac_compiler_gnu=$ac_cv_c_compiler_gnu
29289if test -n "$ac_tool_prefix"; then
29290  for ac_prog in $CC
29291  do
29292    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29293set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29295$as_echo_n "checking for $ac_word... " >&6; }
29296if ${ac_cv_prog_CC+:} false; then :
29297  $as_echo_n "(cached) " >&6
29298else
29299  if test -n "$CC"; then
29300  ac_cv_prog_CC="$CC" # Let the user override the test.
29301else
29302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29303for as_dir in $PATH
29304do
29305  IFS=$as_save_IFS
29306  test -z "$as_dir" && as_dir=.
29307    for ac_exec_ext in '' $ac_executable_extensions; do
29308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29309    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29311    break 2
29312  fi
29313done
29314  done
29315IFS=$as_save_IFS
29316
29317fi
29318fi
29319CC=$ac_cv_prog_CC
29320if test -n "$CC"; then
29321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29322$as_echo "$CC" >&6; }
29323else
29324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29325$as_echo "no" >&6; }
29326fi
29327
29328
29329    test -n "$CC" && break
29330  done
29331fi
29332if test -z "$CC"; then
29333  ac_ct_CC=$CC
29334  for ac_prog in $CC
29335do
29336  # Extract the first word of "$ac_prog", so it can be a program name with args.
29337set dummy $ac_prog; ac_word=$2
29338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29339$as_echo_n "checking for $ac_word... " >&6; }
29340if ${ac_cv_prog_ac_ct_CC+:} false; then :
29341  $as_echo_n "(cached) " >&6
29342else
29343  if test -n "$ac_ct_CC"; then
29344  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29345else
29346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29347for as_dir in $PATH
29348do
29349  IFS=$as_save_IFS
29350  test -z "$as_dir" && as_dir=.
29351    for ac_exec_ext in '' $ac_executable_extensions; do
29352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29353    ac_cv_prog_ac_ct_CC="$ac_prog"
29354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29355    break 2
29356  fi
29357done
29358  done
29359IFS=$as_save_IFS
29360
29361fi
29362fi
29363ac_ct_CC=$ac_cv_prog_ac_ct_CC
29364if test -n "$ac_ct_CC"; then
29365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29366$as_echo "$ac_ct_CC" >&6; }
29367else
29368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29369$as_echo "no" >&6; }
29370fi
29371
29372
29373  test -n "$ac_ct_CC" && break
29374done
29375
29376  if test "x$ac_ct_CC" = x; then
29377    CC=""
29378  else
29379    case $cross_compiling:$ac_tool_warned in
29380yes:)
29381{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29382$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29383ac_tool_warned=yes ;;
29384esac
29385    CC=$ac_ct_CC
29386  fi
29387fi
29388
29389
29390test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29392as_fn_error $? "no acceptable C compiler found in \$PATH
29393See \`config.log' for more details" "$LINENO" 5; }
29394
29395# Provide some information about the compiler.
29396$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29397set X $ac_compile
29398ac_compiler=$2
29399for ac_option in --version -v -V -qversion; do
29400  { { ac_try="$ac_compiler $ac_option >&5"
29401case "(($ac_try" in
29402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29403  *) ac_try_echo=$ac_try;;
29404esac
29405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29406$as_echo "$ac_try_echo"; } >&5
29407  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29408  ac_status=$?
29409  if test -s conftest.err; then
29410    sed '10a\
29411... rest of stderr output deleted ...
29412         10q' conftest.err >conftest.er1
29413    cat conftest.er1 >&5
29414  fi
29415  rm -f conftest.er1 conftest.err
29416  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29417  test $ac_status = 0; }
29418done
29419
29420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29421/* end confdefs.h.  */
29422
29423int
29424main ()
29425{
29426
29427  ;
29428  return 0;
29429}
29430_ACEOF
29431ac_clean_files_save=$ac_clean_files
29432ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29433# Try to create an executable without -o first, disregard a.out.
29434# It will help us diagnose broken compilers, and finding out an intuition
29435# of exeext.
29436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29437$as_echo_n "checking whether the C compiler works... " >&6; }
29438ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29439
29440# The possible output files:
29441ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29442
29443ac_rmfiles=
29444for ac_file in $ac_files
29445do
29446  case $ac_file in
29447    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29448    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29449  esac
29450done
29451rm -f $ac_rmfiles
29452
29453if { { ac_try="$ac_link_default"
29454case "(($ac_try" in
29455  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29456  *) ac_try_echo=$ac_try;;
29457esac
29458eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29459$as_echo "$ac_try_echo"; } >&5
29460  (eval "$ac_link_default") 2>&5
29461  ac_status=$?
29462  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29463  test $ac_status = 0; }; then :
29464  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29465# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29466# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29467# so that the user can short-circuit this test for compilers unknown to
29468# Autoconf.
29469for ac_file in $ac_files ''
29470do
29471  test -f "$ac_file" || continue
29472  case $ac_file in
29473    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29474	;;
29475    [ab].out )
29476	# We found the default executable, but exeext='' is most
29477	# certainly right.
29478	break;;
29479    *.* )
29480	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29481	then :; else
29482	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29483	fi
29484	# We set ac_cv_exeext here because the later test for it is not
29485	# safe: cross compilers may not add the suffix if given an `-o'
29486	# argument, so we may need to know it at that point already.
29487	# Even if this section looks crufty: it has the advantage of
29488	# actually working.
29489	break;;
29490    * )
29491	break;;
29492  esac
29493done
29494test "$ac_cv_exeext" = no && ac_cv_exeext=
29495
29496else
29497  ac_file=''
29498fi
29499if test -z "$ac_file"; then :
29500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29501$as_echo "no" >&6; }
29502$as_echo "$as_me: failed program was:" >&5
29503sed 's/^/| /' conftest.$ac_ext >&5
29504
29505{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29507as_fn_error 77 "C compiler cannot create executables
29508See \`config.log' for more details" "$LINENO" 5; }
29509else
29510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29511$as_echo "yes" >&6; }
29512fi
29513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29514$as_echo_n "checking for C compiler default output file name... " >&6; }
29515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29516$as_echo "$ac_file" >&6; }
29517ac_exeext=$ac_cv_exeext
29518
29519rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29520ac_clean_files=$ac_clean_files_save
29521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29522$as_echo_n "checking for suffix of executables... " >&6; }
29523if { { ac_try="$ac_link"
29524case "(($ac_try" in
29525  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29526  *) ac_try_echo=$ac_try;;
29527esac
29528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29529$as_echo "$ac_try_echo"; } >&5
29530  (eval "$ac_link") 2>&5
29531  ac_status=$?
29532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29533  test $ac_status = 0; }; then :
29534  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29535# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29536# work properly (i.e., refer to `conftest.exe'), while it won't with
29537# `rm'.
29538for ac_file in conftest.exe conftest conftest.*; do
29539  test -f "$ac_file" || continue
29540  case $ac_file in
29541    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29542    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29543	  break;;
29544    * ) break;;
29545  esac
29546done
29547else
29548  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29550as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29551See \`config.log' for more details" "$LINENO" 5; }
29552fi
29553rm -f conftest conftest$ac_cv_exeext
29554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29555$as_echo "$ac_cv_exeext" >&6; }
29556
29557rm -f conftest.$ac_ext
29558EXEEXT=$ac_cv_exeext
29559ac_exeext=$EXEEXT
29560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29561/* end confdefs.h.  */
29562#include <stdio.h>
29563int
29564main ()
29565{
29566FILE *f = fopen ("conftest.out", "w");
29567 return ferror (f) || fclose (f) != 0;
29568
29569  ;
29570  return 0;
29571}
29572_ACEOF
29573ac_clean_files="$ac_clean_files conftest.out"
29574# Check that the compiler produces executables we can run.  If not, either
29575# the compiler is broken, or we cross compile.
29576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29577$as_echo_n "checking whether we are cross compiling... " >&6; }
29578if test "$cross_compiling" != yes; then
29579  { { ac_try="$ac_link"
29580case "(($ac_try" in
29581  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29582  *) ac_try_echo=$ac_try;;
29583esac
29584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29585$as_echo "$ac_try_echo"; } >&5
29586  (eval "$ac_link") 2>&5
29587  ac_status=$?
29588  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29589  test $ac_status = 0; }
29590  if { ac_try='./conftest$ac_cv_exeext'
29591  { { case "(($ac_try" in
29592  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29593  *) ac_try_echo=$ac_try;;
29594esac
29595eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29596$as_echo "$ac_try_echo"; } >&5
29597  (eval "$ac_try") 2>&5
29598  ac_status=$?
29599  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29600  test $ac_status = 0; }; }; then
29601    cross_compiling=no
29602  else
29603    if test "$cross_compiling" = maybe; then
29604	cross_compiling=yes
29605    else
29606	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29608as_fn_error $? "cannot run C compiled programs.
29609If you meant to cross compile, use \`--host'.
29610See \`config.log' for more details" "$LINENO" 5; }
29611    fi
29612  fi
29613fi
29614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29615$as_echo "$cross_compiling" >&6; }
29616
29617rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29618ac_clean_files=$ac_clean_files_save
29619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29620$as_echo_n "checking for suffix of object files... " >&6; }
29621if ${ac_cv_objext+:} false; then :
29622  $as_echo_n "(cached) " >&6
29623else
29624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29625/* end confdefs.h.  */
29626
29627int
29628main ()
29629{
29630
29631  ;
29632  return 0;
29633}
29634_ACEOF
29635rm -f conftest.o conftest.obj
29636if { { ac_try="$ac_compile"
29637case "(($ac_try" in
29638  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29639  *) ac_try_echo=$ac_try;;
29640esac
29641eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29642$as_echo "$ac_try_echo"; } >&5
29643  (eval "$ac_compile") 2>&5
29644  ac_status=$?
29645  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29646  test $ac_status = 0; }; then :
29647  for ac_file in conftest.o conftest.obj conftest.*; do
29648  test -f "$ac_file" || continue;
29649  case $ac_file in
29650    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29651    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29652       break;;
29653  esac
29654done
29655else
29656  $as_echo "$as_me: failed program was:" >&5
29657sed 's/^/| /' conftest.$ac_ext >&5
29658
29659{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29661as_fn_error $? "cannot compute suffix of object files: cannot compile
29662See \`config.log' for more details" "$LINENO" 5; }
29663fi
29664rm -f conftest.$ac_cv_objext conftest.$ac_ext
29665fi
29666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29667$as_echo "$ac_cv_objext" >&6; }
29668OBJEXT=$ac_cv_objext
29669ac_objext=$OBJEXT
29670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29671$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29672if ${ac_cv_c_compiler_gnu+:} false; then :
29673  $as_echo_n "(cached) " >&6
29674else
29675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29676/* end confdefs.h.  */
29677
29678int
29679main ()
29680{
29681#ifndef __GNUC__
29682       choke me
29683#endif
29684
29685  ;
29686  return 0;
29687}
29688_ACEOF
29689if ac_fn_c_try_compile "$LINENO"; then :
29690  ac_compiler_gnu=yes
29691else
29692  ac_compiler_gnu=no
29693fi
29694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29695ac_cv_c_compiler_gnu=$ac_compiler_gnu
29696
29697fi
29698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29699$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29700if test $ac_compiler_gnu = yes; then
29701  GCC=yes
29702else
29703  GCC=
29704fi
29705ac_test_CFLAGS=${CFLAGS+set}
29706ac_save_CFLAGS=$CFLAGS
29707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29708$as_echo_n "checking whether $CC accepts -g... " >&6; }
29709if ${ac_cv_prog_cc_g+:} false; then :
29710  $as_echo_n "(cached) " >&6
29711else
29712  ac_save_c_werror_flag=$ac_c_werror_flag
29713   ac_c_werror_flag=yes
29714   ac_cv_prog_cc_g=no
29715   CFLAGS="-g"
29716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29717/* end confdefs.h.  */
29718
29719int
29720main ()
29721{
29722
29723  ;
29724  return 0;
29725}
29726_ACEOF
29727if ac_fn_c_try_compile "$LINENO"; then :
29728  ac_cv_prog_cc_g=yes
29729else
29730  CFLAGS=""
29731      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29732/* end confdefs.h.  */
29733
29734int
29735main ()
29736{
29737
29738  ;
29739  return 0;
29740}
29741_ACEOF
29742if ac_fn_c_try_compile "$LINENO"; then :
29743
29744else
29745  ac_c_werror_flag=$ac_save_c_werror_flag
29746	 CFLAGS="-g"
29747	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29748/* end confdefs.h.  */
29749
29750int
29751main ()
29752{
29753
29754  ;
29755  return 0;
29756}
29757_ACEOF
29758if ac_fn_c_try_compile "$LINENO"; then :
29759  ac_cv_prog_cc_g=yes
29760fi
29761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29762fi
29763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29764fi
29765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29766   ac_c_werror_flag=$ac_save_c_werror_flag
29767fi
29768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29769$as_echo "$ac_cv_prog_cc_g" >&6; }
29770if test "$ac_test_CFLAGS" = set; then
29771  CFLAGS=$ac_save_CFLAGS
29772elif test $ac_cv_prog_cc_g = yes; then
29773  if test "$GCC" = yes; then
29774    CFLAGS="-g -O2"
29775  else
29776    CFLAGS="-g"
29777  fi
29778else
29779  if test "$GCC" = yes; then
29780    CFLAGS="-O2"
29781  else
29782    CFLAGS=
29783  fi
29784fi
29785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29786$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29787if ${ac_cv_prog_cc_c89+:} false; then :
29788  $as_echo_n "(cached) " >&6
29789else
29790  ac_cv_prog_cc_c89=no
29791ac_save_CC=$CC
29792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29793/* end confdefs.h.  */
29794#include <stdarg.h>
29795#include <stdio.h>
29796struct stat;
29797/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29798struct buf { int x; };
29799FILE * (*rcsopen) (struct buf *, struct stat *, int);
29800static char *e (p, i)
29801     char **p;
29802     int i;
29803{
29804  return p[i];
29805}
29806static char *f (char * (*g) (char **, int), char **p, ...)
29807{
29808  char *s;
29809  va_list v;
29810  va_start (v,p);
29811  s = g (p, va_arg (v,int));
29812  va_end (v);
29813  return s;
29814}
29815
29816/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29817   function prototypes and stuff, but not '\xHH' hex character constants.
29818   These don't provoke an error unfortunately, instead are silently treated
29819   as 'x'.  The following induces an error, until -std is added to get
29820   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29821   array size at least.  It's necessary to write '\x00'==0 to get something
29822   that's true only with -std.  */
29823int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29824
29825/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29826   inside strings and character constants.  */
29827#define FOO(x) 'x'
29828int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29829
29830int test (int i, double x);
29831struct s1 {int (*f) (int a);};
29832struct s2 {int (*f) (double a);};
29833int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29834int argc;
29835char **argv;
29836int
29837main ()
29838{
29839return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29840  ;
29841  return 0;
29842}
29843_ACEOF
29844for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29845	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29846do
29847  CC="$ac_save_CC $ac_arg"
29848  if ac_fn_c_try_compile "$LINENO"; then :
29849  ac_cv_prog_cc_c89=$ac_arg
29850fi
29851rm -f core conftest.err conftest.$ac_objext
29852  test "x$ac_cv_prog_cc_c89" != "xno" && break
29853done
29854rm -f conftest.$ac_ext
29855CC=$ac_save_CC
29856
29857fi
29858# AC_CACHE_VAL
29859case "x$ac_cv_prog_cc_c89" in
29860  x)
29861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29862$as_echo "none needed" >&6; } ;;
29863  xno)
29864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29865$as_echo "unsupported" >&6; } ;;
29866  *)
29867    CC="$CC $ac_cv_prog_cc_c89"
29868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29869$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29870esac
29871if test "x$ac_cv_prog_cc_c89" != xno; then :
29872
29873fi
29874
29875ac_ext=cpp
29876ac_cpp='$CXXCPP $CPPFLAGS'
29877ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29878ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29879ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29880
29881
29882
29883  COMPILER_NAME=C++
29884  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29885
29886  if test "x$CXX" != x; then
29887    # User has supplied compiler name already, always let that override.
29888    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29889$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29890    if test "x`basename $CXX`" = "x$CXX"; then
29891      # A command without a complete path is provided, search $PATH.
29892
29893      for ac_prog in $CXX
29894do
29895  # Extract the first word of "$ac_prog", so it can be a program name with args.
29896set dummy $ac_prog; ac_word=$2
29897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29898$as_echo_n "checking for $ac_word... " >&6; }
29899if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29900  $as_echo_n "(cached) " >&6
29901else
29902  case $POTENTIAL_CXX in
29903  [\\/]* | ?:[\\/]*)
29904  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29905  ;;
29906  *)
29907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29908for as_dir in $PATH
29909do
29910  IFS=$as_save_IFS
29911  test -z "$as_dir" && as_dir=.
29912    for ac_exec_ext in '' $ac_executable_extensions; do
29913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29914    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29916    break 2
29917  fi
29918done
29919  done
29920IFS=$as_save_IFS
29921
29922  ;;
29923esac
29924fi
29925POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29926if test -n "$POTENTIAL_CXX"; then
29927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29928$as_echo "$POTENTIAL_CXX" >&6; }
29929else
29930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29931$as_echo "no" >&6; }
29932fi
29933
29934
29935  test -n "$POTENTIAL_CXX" && break
29936done
29937
29938      if test "x$POTENTIAL_CXX" != x; then
29939        CXX=$POTENTIAL_CXX
29940      else
29941        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29942      fi
29943    else
29944      # Otherwise it might already be a complete path
29945      if test ! -x "$CXX"; then
29946        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29947      fi
29948    fi
29949  else
29950    # No user supplied value. Locate compiler ourselves.
29951
29952    # If we are cross compiling, assume cross compilation tools follows the
29953    # cross compilation standard where they are prefixed with the autoconf
29954    # standard name for the target. For example the binary
29955    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29956    # If we are not cross compiling, then the default compiler name will be
29957    # used.
29958
29959    CXX=
29960    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29961    # before checking the rest of the PATH.
29962    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29963    # step, this should not be necessary.
29964    if test -n "$TOOLCHAIN_PATH"; then
29965      PATH_save="$PATH"
29966      PATH="$TOOLCHAIN_PATH"
29967      for ac_prog in $SEARCH_LIST
29968do
29969  # Extract the first word of "$ac_prog", so it can be a program name with args.
29970set dummy $ac_prog; ac_word=$2
29971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29972$as_echo_n "checking for $ac_word... " >&6; }
29973if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29974  $as_echo_n "(cached) " >&6
29975else
29976  case $TOOLCHAIN_PATH_CXX in
29977  [\\/]* | ?:[\\/]*)
29978  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29979  ;;
29980  *)
29981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29982for as_dir in $PATH
29983do
29984  IFS=$as_save_IFS
29985  test -z "$as_dir" && as_dir=.
29986    for ac_exec_ext in '' $ac_executable_extensions; do
29987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29988    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29990    break 2
29991  fi
29992done
29993  done
29994IFS=$as_save_IFS
29995
29996  ;;
29997esac
29998fi
29999TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30000if test -n "$TOOLCHAIN_PATH_CXX"; then
30001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30002$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30003else
30004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30005$as_echo "no" >&6; }
30006fi
30007
30008
30009  test -n "$TOOLCHAIN_PATH_CXX" && break
30010done
30011
30012      CXX=$TOOLCHAIN_PATH_CXX
30013      PATH="$PATH_save"
30014    fi
30015
30016    # AC_PATH_PROGS can't be run multiple times with the same variable,
30017    # so create a new name for this run.
30018    if test "x$CXX" = x; then
30019      for ac_prog in $SEARCH_LIST
30020do
30021  # Extract the first word of "$ac_prog", so it can be a program name with args.
30022set dummy $ac_prog; ac_word=$2
30023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30024$as_echo_n "checking for $ac_word... " >&6; }
30025if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30026  $as_echo_n "(cached) " >&6
30027else
30028  case $POTENTIAL_CXX in
30029  [\\/]* | ?:[\\/]*)
30030  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30031  ;;
30032  *)
30033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30034for as_dir in $PATH
30035do
30036  IFS=$as_save_IFS
30037  test -z "$as_dir" && as_dir=.
30038    for ac_exec_ext in '' $ac_executable_extensions; do
30039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30040    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30042    break 2
30043  fi
30044done
30045  done
30046IFS=$as_save_IFS
30047
30048  ;;
30049esac
30050fi
30051POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30052if test -n "$POTENTIAL_CXX"; then
30053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30054$as_echo "$POTENTIAL_CXX" >&6; }
30055else
30056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30057$as_echo "no" >&6; }
30058fi
30059
30060
30061  test -n "$POTENTIAL_CXX" && break
30062done
30063
30064      CXX=$POTENTIAL_CXX
30065    fi
30066
30067    if test "x$CXX" = x; then
30068
30069  # Print a helpful message on how to acquire the necessary build dependency.
30070  # devkit is the help tag: freetype, cups, pulse, alsa etc
30071  MISSING_DEPENDENCY=devkit
30072
30073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30074    cygwin_help $MISSING_DEPENDENCY
30075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30076    msys_help $MISSING_DEPENDENCY
30077  else
30078    PKGHANDLER_COMMAND=
30079
30080    case $PKGHANDLER in
30081      apt-get)
30082        apt_help     $MISSING_DEPENDENCY ;;
30083      yum)
30084        yum_help     $MISSING_DEPENDENCY ;;
30085      port)
30086        port_help    $MISSING_DEPENDENCY ;;
30087      pkgutil)
30088        pkgutil_help $MISSING_DEPENDENCY ;;
30089      pkgadd)
30090        pkgadd_help  $MISSING_DEPENDENCY ;;
30091    esac
30092
30093    if test "x$PKGHANDLER_COMMAND" != x; then
30094      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30095    fi
30096  fi
30097
30098      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30099    fi
30100  fi
30101
30102  # Now we have a compiler binary in CXX. Make sure it's okay.
30103
30104  # Only process if variable expands to non-empty
30105
30106  if test "x$CXX" != x; then
30107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30108
30109  # First separate the path from the arguments. This will split at the first
30110  # space.
30111  complete="$CXX"
30112  path="${complete%% *}"
30113  tmp="$complete EOL"
30114  arguments="${tmp#* }"
30115
30116  # Input might be given as Windows format, start by converting to
30117  # unix format.
30118  new_path=`$CYGPATH -u "$path"`
30119
30120  # Now try to locate executable using which
30121  new_path=`$WHICH "$new_path" 2> /dev/null`
30122  # bat and cmd files are not always considered executable in cygwin causing which
30123  # to not find them
30124  if test "x$new_path" = x \
30125      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30126      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30127    new_path=`$CYGPATH -u "$path"`
30128  fi
30129  if test "x$new_path" = x; then
30130    # Oops. Which didn't find the executable.
30131    # The splitting of arguments from the executable at a space might have been incorrect,
30132    # since paths with space are more likely in Windows. Give it another try with the whole
30133    # argument.
30134    path="$complete"
30135    arguments="EOL"
30136    new_path=`$CYGPATH -u "$path"`
30137    new_path=`$WHICH "$new_path" 2> /dev/null`
30138    # bat and cmd files are not always considered executable in cygwin causing which
30139    # to not find them
30140    if test "x$new_path" = x \
30141        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30142        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30143      new_path=`$CYGPATH -u "$path"`
30144    fi
30145    if test "x$new_path" = x; then
30146      # It's still not found. Now this is an unrecoverable error.
30147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30148$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30149      has_space=`$ECHO "$complete" | $GREP " "`
30150      if test "x$has_space" != x; then
30151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30153      fi
30154      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30155    fi
30156  fi
30157
30158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30161  # "foo.exe" is OK but "foo" is an error.
30162  #
30163  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30164  # It is also a way to make sure we got the proper file name for the real test later on.
30165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30166  if test "x$test_shortpath" = x; then
30167    # Short path failed, file does not exist as specified.
30168    # Try adding .exe or .cmd
30169    if test -f "${new_path}.exe"; then
30170      input_to_shortpath="${new_path}.exe"
30171    elif test -f "${new_path}.cmd"; then
30172      input_to_shortpath="${new_path}.cmd"
30173    else
30174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30175$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30176      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30177$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30178      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30179    fi
30180  else
30181    input_to_shortpath="$new_path"
30182  fi
30183
30184  # Call helper function which possibly converts this using DOS-style short mode.
30185  # If so, the updated path is stored in $new_path.
30186  new_path="$input_to_shortpath"
30187
30188  input_path="$input_to_shortpath"
30189  # Check if we need to convert this using DOS-style short mode. If the path
30190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30191  # take no chances and rewrite it.
30192  # Note: m4 eats our [], so we need to use [ and ] instead.
30193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30194  if test "x$has_forbidden_chars" != x; then
30195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30199      # Going to short mode and back again did indeed matter. Since short mode is
30200      # case insensitive, let's make it lowercase to improve readability.
30201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30202      # Now convert it back to Unix-stile (cygpath)
30203      input_path=`$CYGPATH -u "$shortmode_path"`
30204      new_path="$input_path"
30205    fi
30206  fi
30207
30208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30209  if test "x$test_cygdrive_prefix" = x; then
30210    # As a simple fix, exclude /usr/bin since it's not a real path.
30211    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30213      # a path prefixed by /cygdrive for fixpath to work.
30214      new_path="$CYGWIN_ROOT_PATH$input_path"
30215    fi
30216  fi
30217
30218  # remove trailing .exe if any
30219  new_path="${new_path/%.exe/}"
30220
30221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30222
30223  # First separate the path from the arguments. This will split at the first
30224  # space.
30225  complete="$CXX"
30226  path="${complete%% *}"
30227  tmp="$complete EOL"
30228  arguments="${tmp#* }"
30229
30230  # Input might be given as Windows format, start by converting to
30231  # unix format.
30232  new_path="$path"
30233
30234  windows_path="$new_path"
30235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30236    unix_path=`$CYGPATH -u "$windows_path"`
30237    new_path="$unix_path"
30238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30240    new_path="$unix_path"
30241  fi
30242
30243
30244  # Now try to locate executable using which
30245  new_path=`$WHICH "$new_path" 2> /dev/null`
30246
30247  if test "x$new_path" = x; then
30248    # Oops. Which didn't find the executable.
30249    # The splitting of arguments from the executable at a space might have been incorrect,
30250    # since paths with space are more likely in Windows. Give it another try with the whole
30251    # argument.
30252    path="$complete"
30253    arguments="EOL"
30254    new_path="$path"
30255
30256  windows_path="$new_path"
30257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30258    unix_path=`$CYGPATH -u "$windows_path"`
30259    new_path="$unix_path"
30260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30262    new_path="$unix_path"
30263  fi
30264
30265
30266    new_path=`$WHICH "$new_path" 2> /dev/null`
30267    # bat and cmd files are not always considered executable in MSYS causing which
30268    # to not find them
30269    if test "x$new_path" = x \
30270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30272      new_path="$path"
30273
30274  windows_path="$new_path"
30275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30276    unix_path=`$CYGPATH -u "$windows_path"`
30277    new_path="$unix_path"
30278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30280    new_path="$unix_path"
30281  fi
30282
30283    fi
30284
30285    if test "x$new_path" = x; then
30286      # It's still not found. Now this is an unrecoverable error.
30287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30288$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30289      has_space=`$ECHO "$complete" | $GREP " "`
30290      if test "x$has_space" != x; then
30291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30293      fi
30294      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30295    fi
30296  fi
30297
30298  # Now new_path has a complete unix path to the binary
30299  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30300    # Keep paths in /bin as-is, but remove trailing .exe if any
30301    new_path="${new_path/%.exe/}"
30302    # Do not save /bin paths to all_fixpath_prefixes!
30303  else
30304    # Not in mixed or Windows style, start by that.
30305    new_path=`cmd //c echo $new_path`
30306
30307  input_path="$new_path"
30308  # Check if we need to convert this using DOS-style short mode. If the path
30309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30310  # take no chances and rewrite it.
30311  # Note: m4 eats our [], so we need to use [ and ] instead.
30312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30313  if test "x$has_forbidden_chars" != x; then
30314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30316  fi
30317
30318    # Output is in $new_path
30319
30320  windows_path="$new_path"
30321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30322    unix_path=`$CYGPATH -u "$windows_path"`
30323    new_path="$unix_path"
30324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30326    new_path="$unix_path"
30327  fi
30328
30329    # remove trailing .exe if any
30330    new_path="${new_path/%.exe/}"
30331
30332    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30333    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30334  fi
30335
30336    else
30337      # We're on a unix platform. Hooray! :)
30338      # First separate the path from the arguments. This will split at the first
30339      # space.
30340      complete="$CXX"
30341      path="${complete%% *}"
30342      tmp="$complete EOL"
30343      arguments="${tmp#* }"
30344
30345      # Cannot rely on the command "which" here since it doesn't always work.
30346      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30347      if test -z "$is_absolute_path"; then
30348        # Path to executable is not absolute. Find it.
30349        IFS_save="$IFS"
30350        IFS=:
30351        for p in $PATH; do
30352          if test -f "$p/$path" && test -x "$p/$path"; then
30353            new_path="$p/$path"
30354            break
30355          fi
30356        done
30357        IFS="$IFS_save"
30358      else
30359        # This is an absolute path, we can use it without further modifications.
30360        new_path="$path"
30361      fi
30362
30363      if test "x$new_path" = x; then
30364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30365$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30366        has_space=`$ECHO "$complete" | $GREP " "`
30367        if test "x$has_space" != x; then
30368          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30369$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30370        fi
30371        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30372      fi
30373    fi
30374
30375    # Now join together the path and the arguments once again
30376    if test "x$arguments" != xEOL; then
30377      new_complete="$new_path ${arguments% *}"
30378    else
30379      new_complete="$new_path"
30380    fi
30381
30382    if test "x$complete" != "x$new_complete"; then
30383      CXX="$new_complete"
30384      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30385$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30386    fi
30387  fi
30388
30389  TEST_COMPILER="$CXX"
30390  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30391  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30392  if test "x$OPENJDK_BUILD_OS" != xaix; then
30393    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30395$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30396
30397  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30398    # Follow a chain of symbolic links. Use readlink
30399    # where it exists, else fall back to horribly
30400    # complicated shell code.
30401    if test "x$READLINK_TESTED" != yes; then
30402      # On MacOSX there is a readlink tool with a different
30403      # purpose than the GNU readlink tool. Check the found readlink.
30404      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30405      if test "x$ISGNU" = x; then
30406        # A readlink that we do not know how to use.
30407        # Are there other non-GNU readlinks out there?
30408        READLINK_TESTED=yes
30409        READLINK=
30410      fi
30411    fi
30412
30413    if test "x$READLINK" != x; then
30414      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30415    else
30416      # Save the current directory for restoring afterwards
30417      STARTDIR=$PWD
30418      COUNTER=0
30419      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30420      sym_link_file=`$BASENAME $TEST_COMPILER`
30421      cd $sym_link_dir
30422      # Use -P flag to resolve symlinks in directories.
30423      cd `$THEPWDCMD -P`
30424      sym_link_dir=`$THEPWDCMD -P`
30425      # Resolve file symlinks
30426      while test $COUNTER -lt 20; do
30427        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30428        if test "x$ISLINK" == x; then
30429          # This is not a symbolic link! We are done!
30430          break
30431        fi
30432        # Again resolve directory symlinks since the target of the just found
30433        # link could be in a different directory
30434        cd `$DIRNAME $ISLINK`
30435        sym_link_dir=`$THEPWDCMD -P`
30436        sym_link_file=`$BASENAME $ISLINK`
30437        let COUNTER=COUNTER+1
30438      done
30439      cd $STARTDIR
30440      TEST_COMPILER=$sym_link_dir/$sym_link_file
30441    fi
30442  fi
30443
30444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30445$as_echo "$TEST_COMPILER" >&6; }
30446  fi
30447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30448$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30449
30450  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30451  if test "x$COMPILER_BASENAME" = "xccache"; then
30452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30453$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30454    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30455    # We want to control ccache invocation ourselves, so ignore this cc and try
30456    # searching again.
30457
30458    # Remove the path to the fake ccache cc from the PATH
30459    RETRY_COMPILER_SAVED_PATH="$PATH"
30460    COMPILER_DIRNAME=`$DIRNAME $CXX`
30461    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30462
30463    # Try again looking for our compiler
30464    if test -n "$ac_tool_prefix"; then
30465  for ac_prog in $TOOLCHAIN_CXX_BINARY
30466  do
30467    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30468set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30470$as_echo_n "checking for $ac_word... " >&6; }
30471if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30472  $as_echo_n "(cached) " >&6
30473else
30474  if test -n "$PROPER_COMPILER_CXX"; then
30475  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30476else
30477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30478for as_dir in $PATH
30479do
30480  IFS=$as_save_IFS
30481  test -z "$as_dir" && as_dir=.
30482    for ac_exec_ext in '' $ac_executable_extensions; do
30483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30484    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30486    break 2
30487  fi
30488done
30489  done
30490IFS=$as_save_IFS
30491
30492fi
30493fi
30494PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30495if test -n "$PROPER_COMPILER_CXX"; then
30496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30497$as_echo "$PROPER_COMPILER_CXX" >&6; }
30498else
30499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30500$as_echo "no" >&6; }
30501fi
30502
30503
30504    test -n "$PROPER_COMPILER_CXX" && break
30505  done
30506fi
30507if test -z "$PROPER_COMPILER_CXX"; then
30508  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30509  for ac_prog in $TOOLCHAIN_CXX_BINARY
30510do
30511  # Extract the first word of "$ac_prog", so it can be a program name with args.
30512set dummy $ac_prog; ac_word=$2
30513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30514$as_echo_n "checking for $ac_word... " >&6; }
30515if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30516  $as_echo_n "(cached) " >&6
30517else
30518  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30519  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30520else
30521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30522for as_dir in $PATH
30523do
30524  IFS=$as_save_IFS
30525  test -z "$as_dir" && as_dir=.
30526    for ac_exec_ext in '' $ac_executable_extensions; do
30527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30528    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30530    break 2
30531  fi
30532done
30533  done
30534IFS=$as_save_IFS
30535
30536fi
30537fi
30538ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30539if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30541$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30542else
30543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30544$as_echo "no" >&6; }
30545fi
30546
30547
30548  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30549done
30550
30551  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30552    PROPER_COMPILER_CXX=""
30553  else
30554    case $cross_compiling:$ac_tool_warned in
30555yes:)
30556{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30557$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30558ac_tool_warned=yes ;;
30559esac
30560    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30561  fi
30562fi
30563
30564
30565  # Only process if variable expands to non-empty
30566
30567  if test "x$PROPER_COMPILER_CXX" != x; then
30568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30569
30570  # First separate the path from the arguments. This will split at the first
30571  # space.
30572  complete="$PROPER_COMPILER_CXX"
30573  path="${complete%% *}"
30574  tmp="$complete EOL"
30575  arguments="${tmp#* }"
30576
30577  # Input might be given as Windows format, start by converting to
30578  # unix format.
30579  new_path=`$CYGPATH -u "$path"`
30580
30581  # Now try to locate executable using which
30582  new_path=`$WHICH "$new_path" 2> /dev/null`
30583  # bat and cmd files are not always considered executable in cygwin causing which
30584  # to not find them
30585  if test "x$new_path" = x \
30586      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30587      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30588    new_path=`$CYGPATH -u "$path"`
30589  fi
30590  if test "x$new_path" = x; then
30591    # Oops. Which didn't find the executable.
30592    # The splitting of arguments from the executable at a space might have been incorrect,
30593    # since paths with space are more likely in Windows. Give it another try with the whole
30594    # argument.
30595    path="$complete"
30596    arguments="EOL"
30597    new_path=`$CYGPATH -u "$path"`
30598    new_path=`$WHICH "$new_path" 2> /dev/null`
30599    # bat and cmd files are not always considered executable in cygwin causing which
30600    # to not find them
30601    if test "x$new_path" = x \
30602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30604      new_path=`$CYGPATH -u "$path"`
30605    fi
30606    if test "x$new_path" = x; then
30607      # It's still not found. Now this is an unrecoverable error.
30608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30609$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30610      has_space=`$ECHO "$complete" | $GREP " "`
30611      if test "x$has_space" != x; then
30612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30614      fi
30615      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30616    fi
30617  fi
30618
30619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30622  # "foo.exe" is OK but "foo" is an error.
30623  #
30624  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30625  # It is also a way to make sure we got the proper file name for the real test later on.
30626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30627  if test "x$test_shortpath" = x; then
30628    # Short path failed, file does not exist as specified.
30629    # Try adding .exe or .cmd
30630    if test -f "${new_path}.exe"; then
30631      input_to_shortpath="${new_path}.exe"
30632    elif test -f "${new_path}.cmd"; then
30633      input_to_shortpath="${new_path}.cmd"
30634    else
30635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30636$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30637      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30638$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30639      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30640    fi
30641  else
30642    input_to_shortpath="$new_path"
30643  fi
30644
30645  # Call helper function which possibly converts this using DOS-style short mode.
30646  # If so, the updated path is stored in $new_path.
30647  new_path="$input_to_shortpath"
30648
30649  input_path="$input_to_shortpath"
30650  # Check if we need to convert this using DOS-style short mode. If the path
30651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30652  # take no chances and rewrite it.
30653  # Note: m4 eats our [], so we need to use [ and ] instead.
30654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30655  if test "x$has_forbidden_chars" != x; then
30656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30660      # Going to short mode and back again did indeed matter. Since short mode is
30661      # case insensitive, let's make it lowercase to improve readability.
30662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30663      # Now convert it back to Unix-stile (cygpath)
30664      input_path=`$CYGPATH -u "$shortmode_path"`
30665      new_path="$input_path"
30666    fi
30667  fi
30668
30669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30670  if test "x$test_cygdrive_prefix" = x; then
30671    # As a simple fix, exclude /usr/bin since it's not a real path.
30672    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30674      # a path prefixed by /cygdrive for fixpath to work.
30675      new_path="$CYGWIN_ROOT_PATH$input_path"
30676    fi
30677  fi
30678
30679  # remove trailing .exe if any
30680  new_path="${new_path/%.exe/}"
30681
30682    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30683
30684  # First separate the path from the arguments. This will split at the first
30685  # space.
30686  complete="$PROPER_COMPILER_CXX"
30687  path="${complete%% *}"
30688  tmp="$complete EOL"
30689  arguments="${tmp#* }"
30690
30691  # Input might be given as Windows format, start by converting to
30692  # unix format.
30693  new_path="$path"
30694
30695  windows_path="$new_path"
30696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30697    unix_path=`$CYGPATH -u "$windows_path"`
30698    new_path="$unix_path"
30699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30701    new_path="$unix_path"
30702  fi
30703
30704
30705  # Now try to locate executable using which
30706  new_path=`$WHICH "$new_path" 2> /dev/null`
30707
30708  if test "x$new_path" = x; then
30709    # Oops. Which didn't find the executable.
30710    # The splitting of arguments from the executable at a space might have been incorrect,
30711    # since paths with space are more likely in Windows. Give it another try with the whole
30712    # argument.
30713    path="$complete"
30714    arguments="EOL"
30715    new_path="$path"
30716
30717  windows_path="$new_path"
30718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30719    unix_path=`$CYGPATH -u "$windows_path"`
30720    new_path="$unix_path"
30721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30723    new_path="$unix_path"
30724  fi
30725
30726
30727    new_path=`$WHICH "$new_path" 2> /dev/null`
30728    # bat and cmd files are not always considered executable in MSYS causing which
30729    # to not find them
30730    if test "x$new_path" = x \
30731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30733      new_path="$path"
30734
30735  windows_path="$new_path"
30736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30737    unix_path=`$CYGPATH -u "$windows_path"`
30738    new_path="$unix_path"
30739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30741    new_path="$unix_path"
30742  fi
30743
30744    fi
30745
30746    if test "x$new_path" = x; then
30747      # It's still not found. Now this is an unrecoverable error.
30748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30749$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30750      has_space=`$ECHO "$complete" | $GREP " "`
30751      if test "x$has_space" != x; then
30752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30754      fi
30755      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30756    fi
30757  fi
30758
30759  # Now new_path has a complete unix path to the binary
30760  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30761    # Keep paths in /bin as-is, but remove trailing .exe if any
30762    new_path="${new_path/%.exe/}"
30763    # Do not save /bin paths to all_fixpath_prefixes!
30764  else
30765    # Not in mixed or Windows style, start by that.
30766    new_path=`cmd //c echo $new_path`
30767
30768  input_path="$new_path"
30769  # Check if we need to convert this using DOS-style short mode. If the path
30770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30771  # take no chances and rewrite it.
30772  # Note: m4 eats our [], so we need to use [ and ] instead.
30773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30774  if test "x$has_forbidden_chars" != x; then
30775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30777  fi
30778
30779    # Output is in $new_path
30780
30781  windows_path="$new_path"
30782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30783    unix_path=`$CYGPATH -u "$windows_path"`
30784    new_path="$unix_path"
30785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30787    new_path="$unix_path"
30788  fi
30789
30790    # remove trailing .exe if any
30791    new_path="${new_path/%.exe/}"
30792
30793    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30794    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30795  fi
30796
30797    else
30798      # We're on a unix platform. Hooray! :)
30799      # First separate the path from the arguments. This will split at the first
30800      # space.
30801      complete="$PROPER_COMPILER_CXX"
30802      path="${complete%% *}"
30803      tmp="$complete EOL"
30804      arguments="${tmp#* }"
30805
30806      # Cannot rely on the command "which" here since it doesn't always work.
30807      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30808      if test -z "$is_absolute_path"; then
30809        # Path to executable is not absolute. Find it.
30810        IFS_save="$IFS"
30811        IFS=:
30812        for p in $PATH; do
30813          if test -f "$p/$path" && test -x "$p/$path"; then
30814            new_path="$p/$path"
30815            break
30816          fi
30817        done
30818        IFS="$IFS_save"
30819      else
30820        # This is an absolute path, we can use it without further modifications.
30821        new_path="$path"
30822      fi
30823
30824      if test "x$new_path" = x; then
30825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30826$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30827        has_space=`$ECHO "$complete" | $GREP " "`
30828        if test "x$has_space" != x; then
30829          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30830$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30831        fi
30832        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30833      fi
30834    fi
30835
30836    # Now join together the path and the arguments once again
30837    if test "x$arguments" != xEOL; then
30838      new_complete="$new_path ${arguments% *}"
30839    else
30840      new_complete="$new_path"
30841    fi
30842
30843    if test "x$complete" != "x$new_complete"; then
30844      PROPER_COMPILER_CXX="$new_complete"
30845      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30846$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30847    fi
30848  fi
30849
30850    PATH="$RETRY_COMPILER_SAVED_PATH"
30851
30852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30853$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30854
30855  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30856    # Follow a chain of symbolic links. Use readlink
30857    # where it exists, else fall back to horribly
30858    # complicated shell code.
30859    if test "x$READLINK_TESTED" != yes; then
30860      # On MacOSX there is a readlink tool with a different
30861      # purpose than the GNU readlink tool. Check the found readlink.
30862      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30863      if test "x$ISGNU" = x; then
30864        # A readlink that we do not know how to use.
30865        # Are there other non-GNU readlinks out there?
30866        READLINK_TESTED=yes
30867        READLINK=
30868      fi
30869    fi
30870
30871    if test "x$READLINK" != x; then
30872      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30873    else
30874      # Save the current directory for restoring afterwards
30875      STARTDIR=$PWD
30876      COUNTER=0
30877      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30878      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30879      cd $sym_link_dir
30880      # Use -P flag to resolve symlinks in directories.
30881      cd `$THEPWDCMD -P`
30882      sym_link_dir=`$THEPWDCMD -P`
30883      # Resolve file symlinks
30884      while test $COUNTER -lt 20; do
30885        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30886        if test "x$ISLINK" == x; then
30887          # This is not a symbolic link! We are done!
30888          break
30889        fi
30890        # Again resolve directory symlinks since the target of the just found
30891        # link could be in a different directory
30892        cd `$DIRNAME $ISLINK`
30893        sym_link_dir=`$THEPWDCMD -P`
30894        sym_link_file=`$BASENAME $ISLINK`
30895        let COUNTER=COUNTER+1
30896      done
30897      cd $STARTDIR
30898      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30899    fi
30900  fi
30901
30902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30903$as_echo "$PROPER_COMPILER_CXX" >&6; }
30904    CXX="$PROPER_COMPILER_CXX"
30905  else
30906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30907$as_echo "no, keeping CXX" >&6; }
30908  fi
30909
30910
30911  COMPILER=$CXX
30912  COMPILER_NAME=$COMPILER_NAME
30913
30914  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30915    # cc -V output typically looks like
30916    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30917    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30918    # Check that this is likely to be the Solaris Studio cc.
30919    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30920    if test $? -ne 0; then
30921      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30922      { $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
30923$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30924      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30925$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30926      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30927$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30928      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30929    fi
30930    # Remove usage instructions (if present), and
30931    # collapse compiler output into a single line
30932    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30933        $SED -e 's/ *[Uu]sage:.*//'`
30934    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30935        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30936  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30937    # xlc -qversion output typically looks like
30938    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30939    #     Version: 11.01.0000.0015
30940    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30941    # Check that this is likely to be the IBM XL C compiler.
30942    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30943    if test $? -ne 0; then
30944      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30945      { $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
30946$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30947      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30948$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30949      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30950$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30951      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30952    fi
30953    # Collapse compiler output into a single line
30954    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30955    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30956        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30957  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30958    # There is no specific version flag, but all output starts with a version string.
30959    # First line typically looks something like:
30960    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30961    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30962    # Check that this is likely to be Microsoft CL.EXE.
30963    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30964    if test $? -ne 0; then
30965      { $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
30966$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30967      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30968$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30969      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30970    fi
30971    # Collapse compiler output into a single line
30972    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30973    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30974        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30975  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30976    # gcc --version output typically looks like
30977    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30978    #     Copyright (C) 2013 Free Software Foundation, Inc.
30979    #     This is free software; see the source for copying conditions.  There is NO
30980    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30981    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30982    # Check that this is likely to be GCC.
30983    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30984    if test $? -ne 0; then
30985      { $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
30986$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30987      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30988$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30989      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30990    fi
30991    # Remove Copyright and legalese from version string, and
30992    # collapse into a single line
30993    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30994        $SED -e 's/ *Copyright .*//'`
30995    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30996        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30997  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30998    # clang --version output typically looks like
30999    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31000    #    clang version 3.3 (tags/RELEASE_33/final)
31001    # or
31002    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31003    #    Target: x86_64-pc-linux-gnu
31004    #    Thread model: posix
31005    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31006    # Check that this is likely to be clang
31007    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31008    if test $? -ne 0; then
31009      { $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
31010$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31011      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31012$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31013      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31014    fi
31015    # Collapse compiler output into a single line
31016    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31017    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31018        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31019  else
31020      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31021  fi
31022  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31023  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31024  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31025  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31026
31027  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31028$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31029
31030
31031  # Now that we have resolved CXX ourself, let autoconf have its go at it
31032  ac_ext=cpp
31033ac_cpp='$CXXCPP $CPPFLAGS'
31034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31037if test -z "$CXX"; then
31038  if test -n "$CCC"; then
31039    CXX=$CCC
31040  else
31041    if test -n "$ac_tool_prefix"; then
31042  for ac_prog in $CXX
31043  do
31044    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31047$as_echo_n "checking for $ac_word... " >&6; }
31048if ${ac_cv_prog_CXX+:} false; then :
31049  $as_echo_n "(cached) " >&6
31050else
31051  if test -n "$CXX"; then
31052  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31053else
31054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31055for as_dir in $PATH
31056do
31057  IFS=$as_save_IFS
31058  test -z "$as_dir" && as_dir=.
31059    for ac_exec_ext in '' $ac_executable_extensions; do
31060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31061    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31063    break 2
31064  fi
31065done
31066  done
31067IFS=$as_save_IFS
31068
31069fi
31070fi
31071CXX=$ac_cv_prog_CXX
31072if test -n "$CXX"; then
31073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31074$as_echo "$CXX" >&6; }
31075else
31076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31077$as_echo "no" >&6; }
31078fi
31079
31080
31081    test -n "$CXX" && break
31082  done
31083fi
31084if test -z "$CXX"; then
31085  ac_ct_CXX=$CXX
31086  for ac_prog in $CXX
31087do
31088  # Extract the first word of "$ac_prog", so it can be a program name with args.
31089set dummy $ac_prog; ac_word=$2
31090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31091$as_echo_n "checking for $ac_word... " >&6; }
31092if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31093  $as_echo_n "(cached) " >&6
31094else
31095  if test -n "$ac_ct_CXX"; then
31096  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31097else
31098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31099for as_dir in $PATH
31100do
31101  IFS=$as_save_IFS
31102  test -z "$as_dir" && as_dir=.
31103    for ac_exec_ext in '' $ac_executable_extensions; do
31104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31105    ac_cv_prog_ac_ct_CXX="$ac_prog"
31106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31107    break 2
31108  fi
31109done
31110  done
31111IFS=$as_save_IFS
31112
31113fi
31114fi
31115ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31116if test -n "$ac_ct_CXX"; then
31117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31118$as_echo "$ac_ct_CXX" >&6; }
31119else
31120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31121$as_echo "no" >&6; }
31122fi
31123
31124
31125  test -n "$ac_ct_CXX" && break
31126done
31127
31128  if test "x$ac_ct_CXX" = x; then
31129    CXX="g++"
31130  else
31131    case $cross_compiling:$ac_tool_warned in
31132yes:)
31133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31135ac_tool_warned=yes ;;
31136esac
31137    CXX=$ac_ct_CXX
31138  fi
31139fi
31140
31141  fi
31142fi
31143# Provide some information about the compiler.
31144$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31145set X $ac_compile
31146ac_compiler=$2
31147for ac_option in --version -v -V -qversion; do
31148  { { ac_try="$ac_compiler $ac_option >&5"
31149case "(($ac_try" in
31150  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31151  *) ac_try_echo=$ac_try;;
31152esac
31153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31154$as_echo "$ac_try_echo"; } >&5
31155  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31156  ac_status=$?
31157  if test -s conftest.err; then
31158    sed '10a\
31159... rest of stderr output deleted ...
31160         10q' conftest.err >conftest.er1
31161    cat conftest.er1 >&5
31162  fi
31163  rm -f conftest.er1 conftest.err
31164  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31165  test $ac_status = 0; }
31166done
31167
31168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31169$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31170if ${ac_cv_cxx_compiler_gnu+:} false; then :
31171  $as_echo_n "(cached) " >&6
31172else
31173  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31174/* end confdefs.h.  */
31175
31176int
31177main ()
31178{
31179#ifndef __GNUC__
31180       choke me
31181#endif
31182
31183  ;
31184  return 0;
31185}
31186_ACEOF
31187if ac_fn_cxx_try_compile "$LINENO"; then :
31188  ac_compiler_gnu=yes
31189else
31190  ac_compiler_gnu=no
31191fi
31192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31193ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31194
31195fi
31196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31197$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31198if test $ac_compiler_gnu = yes; then
31199  GXX=yes
31200else
31201  GXX=
31202fi
31203ac_test_CXXFLAGS=${CXXFLAGS+set}
31204ac_save_CXXFLAGS=$CXXFLAGS
31205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31206$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31207if ${ac_cv_prog_cxx_g+:} false; then :
31208  $as_echo_n "(cached) " >&6
31209else
31210  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31211   ac_cxx_werror_flag=yes
31212   ac_cv_prog_cxx_g=no
31213   CXXFLAGS="-g"
31214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31215/* end confdefs.h.  */
31216
31217int
31218main ()
31219{
31220
31221  ;
31222  return 0;
31223}
31224_ACEOF
31225if ac_fn_cxx_try_compile "$LINENO"; then :
31226  ac_cv_prog_cxx_g=yes
31227else
31228  CXXFLAGS=""
31229      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31230/* end confdefs.h.  */
31231
31232int
31233main ()
31234{
31235
31236  ;
31237  return 0;
31238}
31239_ACEOF
31240if ac_fn_cxx_try_compile "$LINENO"; then :
31241
31242else
31243  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31244	 CXXFLAGS="-g"
31245	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31246/* end confdefs.h.  */
31247
31248int
31249main ()
31250{
31251
31252  ;
31253  return 0;
31254}
31255_ACEOF
31256if ac_fn_cxx_try_compile "$LINENO"; then :
31257  ac_cv_prog_cxx_g=yes
31258fi
31259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31260fi
31261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31262fi
31263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31264   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31265fi
31266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31267$as_echo "$ac_cv_prog_cxx_g" >&6; }
31268if test "$ac_test_CXXFLAGS" = set; then
31269  CXXFLAGS=$ac_save_CXXFLAGS
31270elif test $ac_cv_prog_cxx_g = yes; then
31271  if test "$GXX" = yes; then
31272    CXXFLAGS="-g -O2"
31273  else
31274    CXXFLAGS="-g"
31275  fi
31276else
31277  if test "$GXX" = yes; then
31278    CXXFLAGS="-O2"
31279  else
31280    CXXFLAGS=
31281  fi
31282fi
31283ac_ext=cpp
31284ac_cpp='$CXXCPP $CPPFLAGS'
31285ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31286ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31287ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31288
31289
31290  #
31291  # Setup the preprocessor (CPP and CXXCPP)
31292  #
31293  ac_ext=c
31294ac_cpp='$CPP $CPPFLAGS'
31295ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31296ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31297ac_compiler_gnu=$ac_cv_c_compiler_gnu
31298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31299$as_echo_n "checking how to run the C preprocessor... " >&6; }
31300# On Suns, sometimes $CPP names a directory.
31301if test -n "$CPP" && test -d "$CPP"; then
31302  CPP=
31303fi
31304if test -z "$CPP"; then
31305  if ${ac_cv_prog_CPP+:} false; then :
31306  $as_echo_n "(cached) " >&6
31307else
31308      # Double quotes because CPP needs to be expanded
31309    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31310    do
31311      ac_preproc_ok=false
31312for ac_c_preproc_warn_flag in '' yes
31313do
31314  # Use a header file that comes with gcc, so configuring glibc
31315  # with a fresh cross-compiler works.
31316  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31317  # <limits.h> exists even on freestanding compilers.
31318  # On the NeXT, cc -E runs the code through the compiler's parser,
31319  # not just through cpp. "Syntax error" is here to catch this case.
31320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31321/* end confdefs.h.  */
31322#ifdef __STDC__
31323# include <limits.h>
31324#else
31325# include <assert.h>
31326#endif
31327		     Syntax error
31328_ACEOF
31329if ac_fn_c_try_cpp "$LINENO"; then :
31330
31331else
31332  # Broken: fails on valid input.
31333continue
31334fi
31335rm -f conftest.err conftest.i conftest.$ac_ext
31336
31337  # OK, works on sane cases.  Now check whether nonexistent headers
31338  # can be detected and how.
31339  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31340/* end confdefs.h.  */
31341#include <ac_nonexistent.h>
31342_ACEOF
31343if ac_fn_c_try_cpp "$LINENO"; then :
31344  # Broken: success on invalid input.
31345continue
31346else
31347  # Passes both tests.
31348ac_preproc_ok=:
31349break
31350fi
31351rm -f conftest.err conftest.i conftest.$ac_ext
31352
31353done
31354# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31355rm -f conftest.i conftest.err conftest.$ac_ext
31356if $ac_preproc_ok; then :
31357  break
31358fi
31359
31360    done
31361    ac_cv_prog_CPP=$CPP
31362
31363fi
31364  CPP=$ac_cv_prog_CPP
31365else
31366  ac_cv_prog_CPP=$CPP
31367fi
31368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31369$as_echo "$CPP" >&6; }
31370ac_preproc_ok=false
31371for ac_c_preproc_warn_flag in '' yes
31372do
31373  # Use a header file that comes with gcc, so configuring glibc
31374  # with a fresh cross-compiler works.
31375  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31376  # <limits.h> exists even on freestanding compilers.
31377  # On the NeXT, cc -E runs the code through the compiler's parser,
31378  # not just through cpp. "Syntax error" is here to catch this case.
31379  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31380/* end confdefs.h.  */
31381#ifdef __STDC__
31382# include <limits.h>
31383#else
31384# include <assert.h>
31385#endif
31386		     Syntax error
31387_ACEOF
31388if ac_fn_c_try_cpp "$LINENO"; then :
31389
31390else
31391  # Broken: fails on valid input.
31392continue
31393fi
31394rm -f conftest.err conftest.i conftest.$ac_ext
31395
31396  # OK, works on sane cases.  Now check whether nonexistent headers
31397  # can be detected and how.
31398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31399/* end confdefs.h.  */
31400#include <ac_nonexistent.h>
31401_ACEOF
31402if ac_fn_c_try_cpp "$LINENO"; then :
31403  # Broken: success on invalid input.
31404continue
31405else
31406  # Passes both tests.
31407ac_preproc_ok=:
31408break
31409fi
31410rm -f conftest.err conftest.i conftest.$ac_ext
31411
31412done
31413# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31414rm -f conftest.i conftest.err conftest.$ac_ext
31415if $ac_preproc_ok; then :
31416
31417else
31418  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31420as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31421See \`config.log' for more details" "$LINENO" 5; }
31422fi
31423
31424ac_ext=cpp
31425ac_cpp='$CXXCPP $CPPFLAGS'
31426ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31427ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31428ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31429
31430
31431  # Only process if variable expands to non-empty
31432
31433  if test "x$CPP" != x; then
31434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31435
31436  # First separate the path from the arguments. This will split at the first
31437  # space.
31438  complete="$CPP"
31439  path="${complete%% *}"
31440  tmp="$complete EOL"
31441  arguments="${tmp#* }"
31442
31443  # Input might be given as Windows format, start by converting to
31444  # unix format.
31445  new_path=`$CYGPATH -u "$path"`
31446
31447  # Now try to locate executable using which
31448  new_path=`$WHICH "$new_path" 2> /dev/null`
31449  # bat and cmd files are not always considered executable in cygwin causing which
31450  # to not find them
31451  if test "x$new_path" = x \
31452      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31453      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31454    new_path=`$CYGPATH -u "$path"`
31455  fi
31456  if test "x$new_path" = x; then
31457    # Oops. Which didn't find the executable.
31458    # The splitting of arguments from the executable at a space might have been incorrect,
31459    # since paths with space are more likely in Windows. Give it another try with the whole
31460    # argument.
31461    path="$complete"
31462    arguments="EOL"
31463    new_path=`$CYGPATH -u "$path"`
31464    new_path=`$WHICH "$new_path" 2> /dev/null`
31465    # bat and cmd files are not always considered executable in cygwin causing which
31466    # to not find them
31467    if test "x$new_path" = x \
31468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31470      new_path=`$CYGPATH -u "$path"`
31471    fi
31472    if test "x$new_path" = x; then
31473      # It's still not found. Now this is an unrecoverable error.
31474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31475$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31476      has_space=`$ECHO "$complete" | $GREP " "`
31477      if test "x$has_space" != x; then
31478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31480      fi
31481      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31482    fi
31483  fi
31484
31485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31488  # "foo.exe" is OK but "foo" is an error.
31489  #
31490  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31491  # It is also a way to make sure we got the proper file name for the real test later on.
31492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31493  if test "x$test_shortpath" = x; then
31494    # Short path failed, file does not exist as specified.
31495    # Try adding .exe or .cmd
31496    if test -f "${new_path}.exe"; then
31497      input_to_shortpath="${new_path}.exe"
31498    elif test -f "${new_path}.cmd"; then
31499      input_to_shortpath="${new_path}.cmd"
31500    else
31501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31502$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31503      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31504$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31505      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31506    fi
31507  else
31508    input_to_shortpath="$new_path"
31509  fi
31510
31511  # Call helper function which possibly converts this using DOS-style short mode.
31512  # If so, the updated path is stored in $new_path.
31513  new_path="$input_to_shortpath"
31514
31515  input_path="$input_to_shortpath"
31516  # Check if we need to convert this using DOS-style short mode. If the path
31517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31518  # take no chances and rewrite it.
31519  # Note: m4 eats our [], so we need to use [ and ] instead.
31520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31521  if test "x$has_forbidden_chars" != x; then
31522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31526      # Going to short mode and back again did indeed matter. Since short mode is
31527      # case insensitive, let's make it lowercase to improve readability.
31528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31529      # Now convert it back to Unix-stile (cygpath)
31530      input_path=`$CYGPATH -u "$shortmode_path"`
31531      new_path="$input_path"
31532    fi
31533  fi
31534
31535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31536  if test "x$test_cygdrive_prefix" = x; then
31537    # As a simple fix, exclude /usr/bin since it's not a real path.
31538    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31540      # a path prefixed by /cygdrive for fixpath to work.
31541      new_path="$CYGWIN_ROOT_PATH$input_path"
31542    fi
31543  fi
31544
31545  # remove trailing .exe if any
31546  new_path="${new_path/%.exe/}"
31547
31548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31549
31550  # First separate the path from the arguments. This will split at the first
31551  # space.
31552  complete="$CPP"
31553  path="${complete%% *}"
31554  tmp="$complete EOL"
31555  arguments="${tmp#* }"
31556
31557  # Input might be given as Windows format, start by converting to
31558  # unix format.
31559  new_path="$path"
31560
31561  windows_path="$new_path"
31562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31563    unix_path=`$CYGPATH -u "$windows_path"`
31564    new_path="$unix_path"
31565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31567    new_path="$unix_path"
31568  fi
31569
31570
31571  # Now try to locate executable using which
31572  new_path=`$WHICH "$new_path" 2> /dev/null`
31573
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="$path"
31582
31583  windows_path="$new_path"
31584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31585    unix_path=`$CYGPATH -u "$windows_path"`
31586    new_path="$unix_path"
31587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31589    new_path="$unix_path"
31590  fi
31591
31592
31593    new_path=`$WHICH "$new_path" 2> /dev/null`
31594    # bat and cmd files are not always considered executable in MSYS causing which
31595    # to not find them
31596    if test "x$new_path" = x \
31597        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31598        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31599      new_path="$path"
31600
31601  windows_path="$new_path"
31602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31603    unix_path=`$CYGPATH -u "$windows_path"`
31604    new_path="$unix_path"
31605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31607    new_path="$unix_path"
31608  fi
31609
31610    fi
31611
31612    if test "x$new_path" = x; then
31613      # It's still not found. Now this is an unrecoverable error.
31614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31615$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31616      has_space=`$ECHO "$complete" | $GREP " "`
31617      if test "x$has_space" != x; then
31618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31620      fi
31621      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31622    fi
31623  fi
31624
31625  # Now new_path has a complete unix path to the binary
31626  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31627    # Keep paths in /bin as-is, but remove trailing .exe if any
31628    new_path="${new_path/%.exe/}"
31629    # Do not save /bin paths to all_fixpath_prefixes!
31630  else
31631    # Not in mixed or Windows style, start by that.
31632    new_path=`cmd //c echo $new_path`
31633
31634  input_path="$new_path"
31635  # Check if we need to convert this using DOS-style short mode. If the path
31636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31637  # take no chances and rewrite it.
31638  # Note: m4 eats our [], so we need to use [ and ] instead.
31639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31640  if test "x$has_forbidden_chars" != x; then
31641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31643  fi
31644
31645    # Output is in $new_path
31646
31647  windows_path="$new_path"
31648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31649    unix_path=`$CYGPATH -u "$windows_path"`
31650    new_path="$unix_path"
31651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31653    new_path="$unix_path"
31654  fi
31655
31656    # remove trailing .exe if any
31657    new_path="${new_path/%.exe/}"
31658
31659    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31660    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31661  fi
31662
31663    else
31664      # We're on a unix platform. Hooray! :)
31665      # First separate the path from the arguments. This will split at the first
31666      # space.
31667      complete="$CPP"
31668      path="${complete%% *}"
31669      tmp="$complete EOL"
31670      arguments="${tmp#* }"
31671
31672      # Cannot rely on the command "which" here since it doesn't always work.
31673      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31674      if test -z "$is_absolute_path"; then
31675        # Path to executable is not absolute. Find it.
31676        IFS_save="$IFS"
31677        IFS=:
31678        for p in $PATH; do
31679          if test -f "$p/$path" && test -x "$p/$path"; then
31680            new_path="$p/$path"
31681            break
31682          fi
31683        done
31684        IFS="$IFS_save"
31685      else
31686        # This is an absolute path, we can use it without further modifications.
31687        new_path="$path"
31688      fi
31689
31690      if test "x$new_path" = x; then
31691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31692$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31693        has_space=`$ECHO "$complete" | $GREP " "`
31694        if test "x$has_space" != x; then
31695          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31696$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31697        fi
31698        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31699      fi
31700    fi
31701
31702    # Now join together the path and the arguments once again
31703    if test "x$arguments" != xEOL; then
31704      new_complete="$new_path ${arguments% *}"
31705    else
31706      new_complete="$new_path"
31707    fi
31708
31709    if test "x$complete" != "x$new_complete"; then
31710      CPP="$new_complete"
31711      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31712$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31713    fi
31714  fi
31715
31716  ac_ext=cpp
31717ac_cpp='$CXXCPP $CPPFLAGS'
31718ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31719ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31720ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31722$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31723if test -z "$CXXCPP"; then
31724  if ${ac_cv_prog_CXXCPP+:} false; then :
31725  $as_echo_n "(cached) " >&6
31726else
31727      # Double quotes because CXXCPP needs to be expanded
31728    for CXXCPP in "$CXX -E" "/lib/cpp"
31729    do
31730      ac_preproc_ok=false
31731for ac_cxx_preproc_warn_flag in '' yes
31732do
31733  # Use a header file that comes with gcc, so configuring glibc
31734  # with a fresh cross-compiler works.
31735  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31736  # <limits.h> exists even on freestanding compilers.
31737  # On the NeXT, cc -E runs the code through the compiler's parser,
31738  # not just through cpp. "Syntax error" is here to catch this case.
31739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31740/* end confdefs.h.  */
31741#ifdef __STDC__
31742# include <limits.h>
31743#else
31744# include <assert.h>
31745#endif
31746		     Syntax error
31747_ACEOF
31748if ac_fn_cxx_try_cpp "$LINENO"; then :
31749
31750else
31751  # Broken: fails on valid input.
31752continue
31753fi
31754rm -f conftest.err conftest.i conftest.$ac_ext
31755
31756  # OK, works on sane cases.  Now check whether nonexistent headers
31757  # can be detected and how.
31758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31759/* end confdefs.h.  */
31760#include <ac_nonexistent.h>
31761_ACEOF
31762if ac_fn_cxx_try_cpp "$LINENO"; then :
31763  # Broken: success on invalid input.
31764continue
31765else
31766  # Passes both tests.
31767ac_preproc_ok=:
31768break
31769fi
31770rm -f conftest.err conftest.i conftest.$ac_ext
31771
31772done
31773# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31774rm -f conftest.i conftest.err conftest.$ac_ext
31775if $ac_preproc_ok; then :
31776  break
31777fi
31778
31779    done
31780    ac_cv_prog_CXXCPP=$CXXCPP
31781
31782fi
31783  CXXCPP=$ac_cv_prog_CXXCPP
31784else
31785  ac_cv_prog_CXXCPP=$CXXCPP
31786fi
31787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31788$as_echo "$CXXCPP" >&6; }
31789ac_preproc_ok=false
31790for ac_cxx_preproc_warn_flag in '' yes
31791do
31792  # Use a header file that comes with gcc, so configuring glibc
31793  # with a fresh cross-compiler works.
31794  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31795  # <limits.h> exists even on freestanding compilers.
31796  # On the NeXT, cc -E runs the code through the compiler's parser,
31797  # not just through cpp. "Syntax error" is here to catch this case.
31798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31799/* end confdefs.h.  */
31800#ifdef __STDC__
31801# include <limits.h>
31802#else
31803# include <assert.h>
31804#endif
31805		     Syntax error
31806_ACEOF
31807if ac_fn_cxx_try_cpp "$LINENO"; then :
31808
31809else
31810  # Broken: fails on valid input.
31811continue
31812fi
31813rm -f conftest.err conftest.i conftest.$ac_ext
31814
31815  # OK, works on sane cases.  Now check whether nonexistent headers
31816  # can be detected and how.
31817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31818/* end confdefs.h.  */
31819#include <ac_nonexistent.h>
31820_ACEOF
31821if ac_fn_cxx_try_cpp "$LINENO"; then :
31822  # Broken: success on invalid input.
31823continue
31824else
31825  # Passes both tests.
31826ac_preproc_ok=:
31827break
31828fi
31829rm -f conftest.err conftest.i conftest.$ac_ext
31830
31831done
31832# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31833rm -f conftest.i conftest.err conftest.$ac_ext
31834if $ac_preproc_ok; then :
31835
31836else
31837  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31839as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31840See \`config.log' for more details" "$LINENO" 5; }
31841fi
31842
31843ac_ext=cpp
31844ac_cpp='$CXXCPP $CPPFLAGS'
31845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31848
31849
31850  # Only process if variable expands to non-empty
31851
31852  if test "x$CXXCPP" != x; then
31853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31854
31855  # First separate the path from the arguments. This will split at the first
31856  # space.
31857  complete="$CXXCPP"
31858  path="${complete%% *}"
31859  tmp="$complete EOL"
31860  arguments="${tmp#* }"
31861
31862  # Input might be given as Windows format, start by converting to
31863  # unix format.
31864  new_path=`$CYGPATH -u "$path"`
31865
31866  # Now try to locate executable using which
31867  new_path=`$WHICH "$new_path" 2> /dev/null`
31868  # bat and cmd files are not always considered executable in cygwin causing which
31869  # to not find them
31870  if test "x$new_path" = x \
31871      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31872      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31873    new_path=`$CYGPATH -u "$path"`
31874  fi
31875  if test "x$new_path" = x; then
31876    # Oops. Which didn't find the executable.
31877    # The splitting of arguments from the executable at a space might have been incorrect,
31878    # since paths with space are more likely in Windows. Give it another try with the whole
31879    # argument.
31880    path="$complete"
31881    arguments="EOL"
31882    new_path=`$CYGPATH -u "$path"`
31883    new_path=`$WHICH "$new_path" 2> /dev/null`
31884    # bat and cmd files are not always considered executable in cygwin causing which
31885    # to not find them
31886    if test "x$new_path" = x \
31887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31889      new_path=`$CYGPATH -u "$path"`
31890    fi
31891    if test "x$new_path" = x; then
31892      # It's still not found. Now this is an unrecoverable error.
31893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31894$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31895      has_space=`$ECHO "$complete" | $GREP " "`
31896      if test "x$has_space" != x; then
31897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31899      fi
31900      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31901    fi
31902  fi
31903
31904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31907  # "foo.exe" is OK but "foo" is an error.
31908  #
31909  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31910  # It is also a way to make sure we got the proper file name for the real test later on.
31911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31912  if test "x$test_shortpath" = x; then
31913    # Short path failed, file does not exist as specified.
31914    # Try adding .exe or .cmd
31915    if test -f "${new_path}.exe"; then
31916      input_to_shortpath="${new_path}.exe"
31917    elif test -f "${new_path}.cmd"; then
31918      input_to_shortpath="${new_path}.cmd"
31919    else
31920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31921$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31922      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31923$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31924      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31925    fi
31926  else
31927    input_to_shortpath="$new_path"
31928  fi
31929
31930  # Call helper function which possibly converts this using DOS-style short mode.
31931  # If so, the updated path is stored in $new_path.
31932  new_path="$input_to_shortpath"
31933
31934  input_path="$input_to_shortpath"
31935  # Check if we need to convert this using DOS-style short mode. If the path
31936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31937  # take no chances and rewrite it.
31938  # Note: m4 eats our [], so we need to use [ and ] instead.
31939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31940  if test "x$has_forbidden_chars" != x; then
31941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31945      # Going to short mode and back again did indeed matter. Since short mode is
31946      # case insensitive, let's make it lowercase to improve readability.
31947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31948      # Now convert it back to Unix-stile (cygpath)
31949      input_path=`$CYGPATH -u "$shortmode_path"`
31950      new_path="$input_path"
31951    fi
31952  fi
31953
31954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31955  if test "x$test_cygdrive_prefix" = x; then
31956    # As a simple fix, exclude /usr/bin since it's not a real path.
31957    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31959      # a path prefixed by /cygdrive for fixpath to work.
31960      new_path="$CYGWIN_ROOT_PATH$input_path"
31961    fi
31962  fi
31963
31964  # remove trailing .exe if any
31965  new_path="${new_path/%.exe/}"
31966
31967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31968
31969  # First separate the path from the arguments. This will split at the first
31970  # space.
31971  complete="$CXXCPP"
31972  path="${complete%% *}"
31973  tmp="$complete EOL"
31974  arguments="${tmp#* }"
31975
31976  # Input might be given as Windows format, start by converting to
31977  # unix format.
31978  new_path="$path"
31979
31980  windows_path="$new_path"
31981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31982    unix_path=`$CYGPATH -u "$windows_path"`
31983    new_path="$unix_path"
31984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31986    new_path="$unix_path"
31987  fi
31988
31989
31990  # Now try to locate executable using which
31991  new_path=`$WHICH "$new_path" 2> /dev/null`
31992
31993  if test "x$new_path" = x; then
31994    # Oops. Which didn't find the executable.
31995    # The splitting of arguments from the executable at a space might have been incorrect,
31996    # since paths with space are more likely in Windows. Give it another try with the whole
31997    # argument.
31998    path="$complete"
31999    arguments="EOL"
32000    new_path="$path"
32001
32002  windows_path="$new_path"
32003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32004    unix_path=`$CYGPATH -u "$windows_path"`
32005    new_path="$unix_path"
32006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32008    new_path="$unix_path"
32009  fi
32010
32011
32012    new_path=`$WHICH "$new_path" 2> /dev/null`
32013    # bat and cmd files are not always considered executable in MSYS causing which
32014    # to not find them
32015    if test "x$new_path" = x \
32016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32018      new_path="$path"
32019
32020  windows_path="$new_path"
32021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32022    unix_path=`$CYGPATH -u "$windows_path"`
32023    new_path="$unix_path"
32024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32026    new_path="$unix_path"
32027  fi
32028
32029    fi
32030
32031    if test "x$new_path" = x; then
32032      # It's still not found. Now this is an unrecoverable error.
32033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32034$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32035      has_space=`$ECHO "$complete" | $GREP " "`
32036      if test "x$has_space" != x; then
32037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32039      fi
32040      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32041    fi
32042  fi
32043
32044  # Now new_path has a complete unix path to the binary
32045  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32046    # Keep paths in /bin as-is, but remove trailing .exe if any
32047    new_path="${new_path/%.exe/}"
32048    # Do not save /bin paths to all_fixpath_prefixes!
32049  else
32050    # Not in mixed or Windows style, start by that.
32051    new_path=`cmd //c echo $new_path`
32052
32053  input_path="$new_path"
32054  # Check if we need to convert this using DOS-style short mode. If the path
32055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32056  # take no chances and rewrite it.
32057  # Note: m4 eats our [], so we need to use [ and ] instead.
32058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32059  if test "x$has_forbidden_chars" != x; then
32060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32062  fi
32063
32064    # Output is in $new_path
32065
32066  windows_path="$new_path"
32067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32068    unix_path=`$CYGPATH -u "$windows_path"`
32069    new_path="$unix_path"
32070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32072    new_path="$unix_path"
32073  fi
32074
32075    # remove trailing .exe if any
32076    new_path="${new_path/%.exe/}"
32077
32078    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32079    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32080  fi
32081
32082    else
32083      # We're on a unix platform. Hooray! :)
32084      # First separate the path from the arguments. This will split at the first
32085      # space.
32086      complete="$CXXCPP"
32087      path="${complete%% *}"
32088      tmp="$complete EOL"
32089      arguments="${tmp#* }"
32090
32091      # Cannot rely on the command "which" here since it doesn't always work.
32092      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32093      if test -z "$is_absolute_path"; then
32094        # Path to executable is not absolute. Find it.
32095        IFS_save="$IFS"
32096        IFS=:
32097        for p in $PATH; do
32098          if test -f "$p/$path" && test -x "$p/$path"; then
32099            new_path="$p/$path"
32100            break
32101          fi
32102        done
32103        IFS="$IFS_save"
32104      else
32105        # This is an absolute path, we can use it without further modifications.
32106        new_path="$path"
32107      fi
32108
32109      if test "x$new_path" = x; then
32110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32111$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32112        has_space=`$ECHO "$complete" | $GREP " "`
32113        if test "x$has_space" != x; then
32114          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32116        fi
32117        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32118      fi
32119    fi
32120
32121    # Now join together the path and the arguments once again
32122    if test "x$arguments" != xEOL; then
32123      new_complete="$new_path ${arguments% *}"
32124    else
32125      new_complete="$new_path"
32126    fi
32127
32128    if test "x$complete" != "x$new_complete"; then
32129      CXXCPP="$new_complete"
32130      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32131$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32132    fi
32133  fi
32134
32135
32136  #
32137  # Setup the linker (LD)
32138  #
32139  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32140    # In the Microsoft toolchain we have a separate LD command "link".
32141    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32142    # a cygwin program for something completely different.
32143    # Extract the first word of "link", so it can be a program name with args.
32144set dummy link; ac_word=$2
32145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32146$as_echo_n "checking for $ac_word... " >&6; }
32147if ${ac_cv_prog_LD+:} false; then :
32148  $as_echo_n "(cached) " >&6
32149else
32150  if test -n "$LD"; then
32151  ac_cv_prog_LD="$LD" # Let the user override the test.
32152else
32153  ac_prog_rejected=no
32154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32155for as_dir in $PATH
32156do
32157  IFS=$as_save_IFS
32158  test -z "$as_dir" && as_dir=.
32159    for ac_exec_ext in '' $ac_executable_extensions; do
32160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32161    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32162       ac_prog_rejected=yes
32163       continue
32164     fi
32165    ac_cv_prog_LD="link"
32166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32167    break 2
32168  fi
32169done
32170  done
32171IFS=$as_save_IFS
32172
32173if test $ac_prog_rejected = yes; then
32174  # We found a bogon in the path, so make sure we never use it.
32175  set dummy $ac_cv_prog_LD
32176  shift
32177  if test $# != 0; then
32178    # We chose a different compiler from the bogus one.
32179    # However, it has the same basename, so the bogon will be chosen
32180    # first if we set LD to just the basename; use the full file name.
32181    shift
32182    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32183  fi
32184fi
32185fi
32186fi
32187LD=$ac_cv_prog_LD
32188if test -n "$LD"; then
32189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32190$as_echo "$LD" >&6; }
32191else
32192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32193$as_echo "no" >&6; }
32194fi
32195
32196
32197
32198  # Only process if variable expands to non-empty
32199
32200  if test "x$LD" != x; then
32201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32202
32203  # First separate the path from the arguments. This will split at the first
32204  # space.
32205  complete="$LD"
32206  path="${complete%% *}"
32207  tmp="$complete EOL"
32208  arguments="${tmp#* }"
32209
32210  # Input might be given as Windows format, start by converting to
32211  # unix format.
32212  new_path=`$CYGPATH -u "$path"`
32213
32214  # Now try to locate executable using which
32215  new_path=`$WHICH "$new_path" 2> /dev/null`
32216  # bat and cmd files are not always considered executable in cygwin causing which
32217  # to not find them
32218  if test "x$new_path" = x \
32219      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32220      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32221    new_path=`$CYGPATH -u "$path"`
32222  fi
32223  if test "x$new_path" = x; then
32224    # Oops. Which didn't find the executable.
32225    # The splitting of arguments from the executable at a space might have been incorrect,
32226    # since paths with space are more likely in Windows. Give it another try with the whole
32227    # argument.
32228    path="$complete"
32229    arguments="EOL"
32230    new_path=`$CYGPATH -u "$path"`
32231    new_path=`$WHICH "$new_path" 2> /dev/null`
32232    # bat and cmd files are not always considered executable in cygwin causing which
32233    # to not find them
32234    if test "x$new_path" = x \
32235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32237      new_path=`$CYGPATH -u "$path"`
32238    fi
32239    if test "x$new_path" = x; then
32240      # It's still not found. Now this is an unrecoverable error.
32241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32242$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32243      has_space=`$ECHO "$complete" | $GREP " "`
32244      if test "x$has_space" != x; then
32245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32247      fi
32248      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32249    fi
32250  fi
32251
32252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32255  # "foo.exe" is OK but "foo" is an error.
32256  #
32257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32258  # It is also a way to make sure we got the proper file name for the real test later on.
32259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32260  if test "x$test_shortpath" = x; then
32261    # Short path failed, file does not exist as specified.
32262    # Try adding .exe or .cmd
32263    if test -f "${new_path}.exe"; then
32264      input_to_shortpath="${new_path}.exe"
32265    elif test -f "${new_path}.cmd"; then
32266      input_to_shortpath="${new_path}.cmd"
32267    else
32268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32269$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32272      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32273    fi
32274  else
32275    input_to_shortpath="$new_path"
32276  fi
32277
32278  # Call helper function which possibly converts this using DOS-style short mode.
32279  # If so, the updated path is stored in $new_path.
32280  new_path="$input_to_shortpath"
32281
32282  input_path="$input_to_shortpath"
32283  # Check if we need to convert this using DOS-style short mode. If the path
32284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32285  # take no chances and rewrite it.
32286  # Note: m4 eats our [], so we need to use [ and ] instead.
32287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32288  if test "x$has_forbidden_chars" != x; then
32289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32293      # Going to short mode and back again did indeed matter. Since short mode is
32294      # case insensitive, let's make it lowercase to improve readability.
32295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32296      # Now convert it back to Unix-stile (cygpath)
32297      input_path=`$CYGPATH -u "$shortmode_path"`
32298      new_path="$input_path"
32299    fi
32300  fi
32301
32302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32303  if test "x$test_cygdrive_prefix" = x; then
32304    # As a simple fix, exclude /usr/bin since it's not a real path.
32305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32307      # a path prefixed by /cygdrive for fixpath to work.
32308      new_path="$CYGWIN_ROOT_PATH$input_path"
32309    fi
32310  fi
32311
32312  # remove trailing .exe if any
32313  new_path="${new_path/%.exe/}"
32314
32315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32316
32317  # First separate the path from the arguments. This will split at the first
32318  # space.
32319  complete="$LD"
32320  path="${complete%% *}"
32321  tmp="$complete EOL"
32322  arguments="${tmp#* }"
32323
32324  # Input might be given as Windows format, start by converting to
32325  # unix format.
32326  new_path="$path"
32327
32328  windows_path="$new_path"
32329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32330    unix_path=`$CYGPATH -u "$windows_path"`
32331    new_path="$unix_path"
32332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32334    new_path="$unix_path"
32335  fi
32336
32337
32338  # Now try to locate executable using which
32339  new_path=`$WHICH "$new_path" 2> /dev/null`
32340
32341  if test "x$new_path" = x; then
32342    # Oops. Which didn't find the executable.
32343    # The splitting of arguments from the executable at a space might have been incorrect,
32344    # since paths with space are more likely in Windows. Give it another try with the whole
32345    # argument.
32346    path="$complete"
32347    arguments="EOL"
32348    new_path="$path"
32349
32350  windows_path="$new_path"
32351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32352    unix_path=`$CYGPATH -u "$windows_path"`
32353    new_path="$unix_path"
32354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32356    new_path="$unix_path"
32357  fi
32358
32359
32360    new_path=`$WHICH "$new_path" 2> /dev/null`
32361    # bat and cmd files are not always considered executable in MSYS causing which
32362    # to not find them
32363    if test "x$new_path" = x \
32364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32366      new_path="$path"
32367
32368  windows_path="$new_path"
32369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32370    unix_path=`$CYGPATH -u "$windows_path"`
32371    new_path="$unix_path"
32372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32374    new_path="$unix_path"
32375  fi
32376
32377    fi
32378
32379    if test "x$new_path" = x; then
32380      # It's still not found. Now this is an unrecoverable error.
32381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32382$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32383      has_space=`$ECHO "$complete" | $GREP " "`
32384      if test "x$has_space" != x; then
32385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32387      fi
32388      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32389    fi
32390  fi
32391
32392  # Now new_path has a complete unix path to the binary
32393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32394    # Keep paths in /bin as-is, but remove trailing .exe if any
32395    new_path="${new_path/%.exe/}"
32396    # Do not save /bin paths to all_fixpath_prefixes!
32397  else
32398    # Not in mixed or Windows style, start by that.
32399    new_path=`cmd //c echo $new_path`
32400
32401  input_path="$new_path"
32402  # Check if we need to convert this using DOS-style short mode. If the path
32403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32404  # take no chances and rewrite it.
32405  # Note: m4 eats our [], so we need to use [ and ] instead.
32406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32407  if test "x$has_forbidden_chars" != x; then
32408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32410  fi
32411
32412    # Output is in $new_path
32413
32414  windows_path="$new_path"
32415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32416    unix_path=`$CYGPATH -u "$windows_path"`
32417    new_path="$unix_path"
32418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32420    new_path="$unix_path"
32421  fi
32422
32423    # remove trailing .exe if any
32424    new_path="${new_path/%.exe/}"
32425
32426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32428  fi
32429
32430    else
32431      # We're on a unix platform. Hooray! :)
32432      # First separate the path from the arguments. This will split at the first
32433      # space.
32434      complete="$LD"
32435      path="${complete%% *}"
32436      tmp="$complete EOL"
32437      arguments="${tmp#* }"
32438
32439      # Cannot rely on the command "which" here since it doesn't always work.
32440      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32441      if test -z "$is_absolute_path"; then
32442        # Path to executable is not absolute. Find it.
32443        IFS_save="$IFS"
32444        IFS=:
32445        for p in $PATH; do
32446          if test -f "$p/$path" && test -x "$p/$path"; then
32447            new_path="$p/$path"
32448            break
32449          fi
32450        done
32451        IFS="$IFS_save"
32452      else
32453        # This is an absolute path, we can use it without further modifications.
32454        new_path="$path"
32455      fi
32456
32457      if test "x$new_path" = x; then
32458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32459$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32460        has_space=`$ECHO "$complete" | $GREP " "`
32461        if test "x$has_space" != x; then
32462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32464        fi
32465        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32466      fi
32467    fi
32468
32469    # Now join together the path and the arguments once again
32470    if test "x$arguments" != xEOL; then
32471      new_complete="$new_path ${arguments% *}"
32472    else
32473      new_complete="$new_path"
32474    fi
32475
32476    if test "x$complete" != "x$new_complete"; then
32477      LD="$new_complete"
32478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32479$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32480    fi
32481  fi
32482
32483    # Verify that we indeed succeeded with this trick.
32484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32485$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32486    "$LD" --version > /dev/null
32487    if test $? -eq 0 ; then
32488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32489$as_echo "no" >&6; }
32490      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32491    else
32492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32493$as_echo "yes" >&6; }
32494    fi
32495    LDCXX="$LD"
32496  else
32497    # All other toolchains use the compiler to link.
32498    LD="$CC"
32499    LDCXX="$CXX"
32500  fi
32501
32502  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32503
32504
32505  #
32506  # Setup the assembler (AS)
32507  #
32508  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32509    # FIXME: should this really be solaris, or solstudio?
32510
32511
32512  # Publish this variable in the help.
32513
32514
32515  if test "x$AS" = x; then
32516    # The variable is not set by user, try to locate tool using the code snippet
32517    for ac_prog in as
32518do
32519  # Extract the first word of "$ac_prog", so it can be a program name with args.
32520set dummy $ac_prog; ac_word=$2
32521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32522$as_echo_n "checking for $ac_word... " >&6; }
32523if ${ac_cv_path_AS+:} false; then :
32524  $as_echo_n "(cached) " >&6
32525else
32526  case $AS in
32527  [\\/]* | ?:[\\/]*)
32528  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32529  ;;
32530  *)
32531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32532for as_dir in $PATH
32533do
32534  IFS=$as_save_IFS
32535  test -z "$as_dir" && as_dir=.
32536    for ac_exec_ext in '' $ac_executable_extensions; do
32537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32538    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32540    break 2
32541  fi
32542done
32543  done
32544IFS=$as_save_IFS
32545
32546  ;;
32547esac
32548fi
32549AS=$ac_cv_path_AS
32550if test -n "$AS"; then
32551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32552$as_echo "$AS" >&6; }
32553else
32554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32555$as_echo "no" >&6; }
32556fi
32557
32558
32559  test -n "$AS" && break
32560done
32561
32562  else
32563    # The variable is set, but is it from the command line or the environment?
32564
32565    # Try to remove the string !AS! from our list.
32566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32568      # If it failed, the variable was not from the command line. Ignore it,
32569      # but warn the user (except for BASH, which is always set by the calling BASH).
32570      if test "xAS" != xBASH; then
32571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32572$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32573      fi
32574      # Try to locate tool using the code snippet
32575      for ac_prog in as
32576do
32577  # Extract the first word of "$ac_prog", so it can be a program name with args.
32578set dummy $ac_prog; ac_word=$2
32579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32580$as_echo_n "checking for $ac_word... " >&6; }
32581if ${ac_cv_path_AS+:} false; then :
32582  $as_echo_n "(cached) " >&6
32583else
32584  case $AS in
32585  [\\/]* | ?:[\\/]*)
32586  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32587  ;;
32588  *)
32589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32590for as_dir in $PATH
32591do
32592  IFS=$as_save_IFS
32593  test -z "$as_dir" && as_dir=.
32594    for ac_exec_ext in '' $ac_executable_extensions; do
32595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32596    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32598    break 2
32599  fi
32600done
32601  done
32602IFS=$as_save_IFS
32603
32604  ;;
32605esac
32606fi
32607AS=$ac_cv_path_AS
32608if test -n "$AS"; then
32609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32610$as_echo "$AS" >&6; }
32611else
32612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32613$as_echo "no" >&6; }
32614fi
32615
32616
32617  test -n "$AS" && break
32618done
32619
32620    else
32621      # If it succeeded, then it was overridden by the user. We will use it
32622      # for the tool.
32623
32624      # First remove it from the list of overridden variables, so we can test
32625      # for unknown variables in the end.
32626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32627
32628      # Check if the provided tool contains a complete path.
32629      tool_specified="$AS"
32630      tool_basename="${tool_specified##*/}"
32631      if test "x$tool_basename" = "x$tool_specified"; then
32632        # A command without a complete path is provided, search $PATH.
32633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32634$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32635        # Extract the first word of "$tool_basename", so it can be a program name with args.
32636set dummy $tool_basename; ac_word=$2
32637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32638$as_echo_n "checking for $ac_word... " >&6; }
32639if ${ac_cv_path_AS+:} false; then :
32640  $as_echo_n "(cached) " >&6
32641else
32642  case $AS in
32643  [\\/]* | ?:[\\/]*)
32644  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32645  ;;
32646  *)
32647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32648for as_dir in $PATH
32649do
32650  IFS=$as_save_IFS
32651  test -z "$as_dir" && as_dir=.
32652    for ac_exec_ext in '' $ac_executable_extensions; do
32653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32654    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32656    break 2
32657  fi
32658done
32659  done
32660IFS=$as_save_IFS
32661
32662  ;;
32663esac
32664fi
32665AS=$ac_cv_path_AS
32666if test -n "$AS"; then
32667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32668$as_echo "$AS" >&6; }
32669else
32670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32671$as_echo "no" >&6; }
32672fi
32673
32674
32675        if test "x$AS" = x; then
32676          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32677        fi
32678      else
32679        # Otherwise we believe it is a complete path. Use it as it is.
32680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32681$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32683$as_echo_n "checking for AS... " >&6; }
32684        if test ! -x "$tool_specified"; then
32685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32686$as_echo "not found" >&6; }
32687          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32688        fi
32689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32690$as_echo "$tool_specified" >&6; }
32691      fi
32692    fi
32693  fi
32694
32695
32696
32697  # Only process if variable expands to non-empty
32698
32699  if test "x$AS" != x; then
32700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32701
32702  # First separate the path from the arguments. This will split at the first
32703  # space.
32704  complete="$AS"
32705  path="${complete%% *}"
32706  tmp="$complete EOL"
32707  arguments="${tmp#* }"
32708
32709  # Input might be given as Windows format, start by converting to
32710  # unix format.
32711  new_path=`$CYGPATH -u "$path"`
32712
32713  # Now try to locate executable using which
32714  new_path=`$WHICH "$new_path" 2> /dev/null`
32715  # bat and cmd files are not always considered executable in cygwin causing which
32716  # to not find them
32717  if test "x$new_path" = x \
32718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32720    new_path=`$CYGPATH -u "$path"`
32721  fi
32722  if test "x$new_path" = x; then
32723    # Oops. Which didn't find the executable.
32724    # The splitting of arguments from the executable at a space might have been incorrect,
32725    # since paths with space are more likely in Windows. Give it another try with the whole
32726    # argument.
32727    path="$complete"
32728    arguments="EOL"
32729    new_path=`$CYGPATH -u "$path"`
32730    new_path=`$WHICH "$new_path" 2> /dev/null`
32731    # bat and cmd files are not always considered executable in cygwin causing which
32732    # to not find them
32733    if test "x$new_path" = x \
32734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32736      new_path=`$CYGPATH -u "$path"`
32737    fi
32738    if test "x$new_path" = x; then
32739      # It's still not found. Now this is an unrecoverable error.
32740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32741$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32742      has_space=`$ECHO "$complete" | $GREP " "`
32743      if test "x$has_space" != x; then
32744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32746      fi
32747      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32748    fi
32749  fi
32750
32751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32754  # "foo.exe" is OK but "foo" is an error.
32755  #
32756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32757  # It is also a way to make sure we got the proper file name for the real test later on.
32758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32759  if test "x$test_shortpath" = x; then
32760    # Short path failed, file does not exist as specified.
32761    # Try adding .exe or .cmd
32762    if test -f "${new_path}.exe"; then
32763      input_to_shortpath="${new_path}.exe"
32764    elif test -f "${new_path}.cmd"; then
32765      input_to_shortpath="${new_path}.cmd"
32766    else
32767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32768$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32771      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32772    fi
32773  else
32774    input_to_shortpath="$new_path"
32775  fi
32776
32777  # Call helper function which possibly converts this using DOS-style short mode.
32778  # If so, the updated path is stored in $new_path.
32779  new_path="$input_to_shortpath"
32780
32781  input_path="$input_to_shortpath"
32782  # Check if we need to convert this using DOS-style short mode. If the path
32783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32784  # take no chances and rewrite it.
32785  # Note: m4 eats our [], so we need to use [ and ] instead.
32786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32787  if test "x$has_forbidden_chars" != x; then
32788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32792      # Going to short mode and back again did indeed matter. Since short mode is
32793      # case insensitive, let's make it lowercase to improve readability.
32794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32795      # Now convert it back to Unix-stile (cygpath)
32796      input_path=`$CYGPATH -u "$shortmode_path"`
32797      new_path="$input_path"
32798    fi
32799  fi
32800
32801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32802  if test "x$test_cygdrive_prefix" = x; then
32803    # As a simple fix, exclude /usr/bin since it's not a real path.
32804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32806      # a path prefixed by /cygdrive for fixpath to work.
32807      new_path="$CYGWIN_ROOT_PATH$input_path"
32808    fi
32809  fi
32810
32811  # remove trailing .exe if any
32812  new_path="${new_path/%.exe/}"
32813
32814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32815
32816  # First separate the path from the arguments. This will split at the first
32817  # space.
32818  complete="$AS"
32819  path="${complete%% *}"
32820  tmp="$complete EOL"
32821  arguments="${tmp#* }"
32822
32823  # Input might be given as Windows format, start by converting to
32824  # unix format.
32825  new_path="$path"
32826
32827  windows_path="$new_path"
32828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32829    unix_path=`$CYGPATH -u "$windows_path"`
32830    new_path="$unix_path"
32831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32833    new_path="$unix_path"
32834  fi
32835
32836
32837  # Now try to locate executable using which
32838  new_path=`$WHICH "$new_path" 2> /dev/null`
32839
32840  if test "x$new_path" = x; then
32841    # Oops. Which didn't find the executable.
32842    # The splitting of arguments from the executable at a space might have been incorrect,
32843    # since paths with space are more likely in Windows. Give it another try with the whole
32844    # argument.
32845    path="$complete"
32846    arguments="EOL"
32847    new_path="$path"
32848
32849  windows_path="$new_path"
32850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32851    unix_path=`$CYGPATH -u "$windows_path"`
32852    new_path="$unix_path"
32853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32855    new_path="$unix_path"
32856  fi
32857
32858
32859    new_path=`$WHICH "$new_path" 2> /dev/null`
32860    # bat and cmd files are not always considered executable in MSYS causing which
32861    # to not find them
32862    if test "x$new_path" = x \
32863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32865      new_path="$path"
32866
32867  windows_path="$new_path"
32868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32869    unix_path=`$CYGPATH -u "$windows_path"`
32870    new_path="$unix_path"
32871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32873    new_path="$unix_path"
32874  fi
32875
32876    fi
32877
32878    if test "x$new_path" = x; then
32879      # It's still not found. Now this is an unrecoverable error.
32880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32881$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32882      has_space=`$ECHO "$complete" | $GREP " "`
32883      if test "x$has_space" != x; then
32884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32886      fi
32887      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32888    fi
32889  fi
32890
32891  # Now new_path has a complete unix path to the binary
32892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32893    # Keep paths in /bin as-is, but remove trailing .exe if any
32894    new_path="${new_path/%.exe/}"
32895    # Do not save /bin paths to all_fixpath_prefixes!
32896  else
32897    # Not in mixed or Windows style, start by that.
32898    new_path=`cmd //c echo $new_path`
32899
32900  input_path="$new_path"
32901  # Check if we need to convert this using DOS-style short mode. If the path
32902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32903  # take no chances and rewrite it.
32904  # Note: m4 eats our [], so we need to use [ and ] instead.
32905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32906  if test "x$has_forbidden_chars" != x; then
32907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32909  fi
32910
32911    # Output is in $new_path
32912
32913  windows_path="$new_path"
32914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32915    unix_path=`$CYGPATH -u "$windows_path"`
32916    new_path="$unix_path"
32917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32919    new_path="$unix_path"
32920  fi
32921
32922    # remove trailing .exe if any
32923    new_path="${new_path/%.exe/}"
32924
32925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32927  fi
32928
32929    else
32930      # We're on a unix platform. Hooray! :)
32931      # First separate the path from the arguments. This will split at the first
32932      # space.
32933      complete="$AS"
32934      path="${complete%% *}"
32935      tmp="$complete EOL"
32936      arguments="${tmp#* }"
32937
32938      # Cannot rely on the command "which" here since it doesn't always work.
32939      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32940      if test -z "$is_absolute_path"; then
32941        # Path to executable is not absolute. Find it.
32942        IFS_save="$IFS"
32943        IFS=:
32944        for p in $PATH; do
32945          if test -f "$p/$path" && test -x "$p/$path"; then
32946            new_path="$p/$path"
32947            break
32948          fi
32949        done
32950        IFS="$IFS_save"
32951      else
32952        # This is an absolute path, we can use it without further modifications.
32953        new_path="$path"
32954      fi
32955
32956      if test "x$new_path" = x; then
32957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32958$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32959        has_space=`$ECHO "$complete" | $GREP " "`
32960        if test "x$has_space" != x; then
32961          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32963        fi
32964        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32965      fi
32966    fi
32967
32968    # Now join together the path and the arguments once again
32969    if test "x$arguments" != xEOL; then
32970      new_complete="$new_path ${arguments% *}"
32971    else
32972      new_complete="$new_path"
32973    fi
32974
32975    if test "x$complete" != "x$new_complete"; then
32976      AS="$new_complete"
32977      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32978$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32979    fi
32980  fi
32981
32982  else
32983    # FIXME: is this correct for microsoft?
32984    AS="$CC -c"
32985  fi
32986
32987
32988  #
32989  # Setup the archiver (AR)
32990  #
32991  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32992    # The corresponding ar tool is lib.exe (used to create static libraries)
32993    # Extract the first word of "lib", so it can be a program name with args.
32994set dummy lib; ac_word=$2
32995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32996$as_echo_n "checking for $ac_word... " >&6; }
32997if ${ac_cv_prog_AR+:} false; then :
32998  $as_echo_n "(cached) " >&6
32999else
33000  if test -n "$AR"; then
33001  ac_cv_prog_AR="$AR" # Let the user override the test.
33002else
33003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33004for as_dir in $PATH
33005do
33006  IFS=$as_save_IFS
33007  test -z "$as_dir" && as_dir=.
33008    for ac_exec_ext in '' $ac_executable_extensions; do
33009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33010    ac_cv_prog_AR="lib"
33011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33012    break 2
33013  fi
33014done
33015  done
33016IFS=$as_save_IFS
33017
33018fi
33019fi
33020AR=$ac_cv_prog_AR
33021if test -n "$AR"; then
33022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33023$as_echo "$AR" >&6; }
33024else
33025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33026$as_echo "no" >&6; }
33027fi
33028
33029
33030  else
33031
33032
33033  # Publish this variable in the help.
33034
33035
33036  if test "x$AR" = x; then
33037    # The variable is not set by user, try to locate tool using the code snippet
33038    if test -n "$ac_tool_prefix"; then
33039  for ac_prog in ar
33040  do
33041    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33042set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33044$as_echo_n "checking for $ac_word... " >&6; }
33045if ${ac_cv_prog_AR+:} false; then :
33046  $as_echo_n "(cached) " >&6
33047else
33048  if test -n "$AR"; then
33049  ac_cv_prog_AR="$AR" # Let the user override the test.
33050else
33051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33052for as_dir in $PATH
33053do
33054  IFS=$as_save_IFS
33055  test -z "$as_dir" && as_dir=.
33056    for ac_exec_ext in '' $ac_executable_extensions; do
33057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33058    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33060    break 2
33061  fi
33062done
33063  done
33064IFS=$as_save_IFS
33065
33066fi
33067fi
33068AR=$ac_cv_prog_AR
33069if test -n "$AR"; then
33070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33071$as_echo "$AR" >&6; }
33072else
33073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33074$as_echo "no" >&6; }
33075fi
33076
33077
33078    test -n "$AR" && break
33079  done
33080fi
33081if test -z "$AR"; then
33082  ac_ct_AR=$AR
33083  for ac_prog in ar
33084do
33085  # Extract the first word of "$ac_prog", so it can be a program name with args.
33086set dummy $ac_prog; ac_word=$2
33087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33088$as_echo_n "checking for $ac_word... " >&6; }
33089if ${ac_cv_prog_ac_ct_AR+:} false; then :
33090  $as_echo_n "(cached) " >&6
33091else
33092  if test -n "$ac_ct_AR"; then
33093  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33094else
33095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33096for as_dir in $PATH
33097do
33098  IFS=$as_save_IFS
33099  test -z "$as_dir" && as_dir=.
33100    for ac_exec_ext in '' $ac_executable_extensions; do
33101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33102    ac_cv_prog_ac_ct_AR="$ac_prog"
33103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33104    break 2
33105  fi
33106done
33107  done
33108IFS=$as_save_IFS
33109
33110fi
33111fi
33112ac_ct_AR=$ac_cv_prog_ac_ct_AR
33113if test -n "$ac_ct_AR"; then
33114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33115$as_echo "$ac_ct_AR" >&6; }
33116else
33117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33118$as_echo "no" >&6; }
33119fi
33120
33121
33122  test -n "$ac_ct_AR" && break
33123done
33124
33125  if test "x$ac_ct_AR" = x; then
33126    AR=""
33127  else
33128    case $cross_compiling:$ac_tool_warned in
33129yes:)
33130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33132ac_tool_warned=yes ;;
33133esac
33134    AR=$ac_ct_AR
33135  fi
33136fi
33137
33138  else
33139    # The variable is set, but is it from the command line or the environment?
33140
33141    # Try to remove the string !AR! from our list.
33142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33144      # If it failed, the variable was not from the command line. Ignore it,
33145      # but warn the user (except for BASH, which is always set by the calling BASH).
33146      if test "xAR" != xBASH; then
33147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33148$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33149      fi
33150      # Try to locate tool using the code snippet
33151      if test -n "$ac_tool_prefix"; then
33152  for ac_prog in ar
33153  do
33154    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33155set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33157$as_echo_n "checking for $ac_word... " >&6; }
33158if ${ac_cv_prog_AR+:} false; then :
33159  $as_echo_n "(cached) " >&6
33160else
33161  if test -n "$AR"; then
33162  ac_cv_prog_AR="$AR" # Let the user override the test.
33163else
33164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33165for as_dir in $PATH
33166do
33167  IFS=$as_save_IFS
33168  test -z "$as_dir" && as_dir=.
33169    for ac_exec_ext in '' $ac_executable_extensions; do
33170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33171    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33173    break 2
33174  fi
33175done
33176  done
33177IFS=$as_save_IFS
33178
33179fi
33180fi
33181AR=$ac_cv_prog_AR
33182if test -n "$AR"; then
33183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33184$as_echo "$AR" >&6; }
33185else
33186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33187$as_echo "no" >&6; }
33188fi
33189
33190
33191    test -n "$AR" && break
33192  done
33193fi
33194if test -z "$AR"; then
33195  ac_ct_AR=$AR
33196  for ac_prog in ar
33197do
33198  # Extract the first word of "$ac_prog", so it can be a program name with args.
33199set dummy $ac_prog; ac_word=$2
33200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33201$as_echo_n "checking for $ac_word... " >&6; }
33202if ${ac_cv_prog_ac_ct_AR+:} false; then :
33203  $as_echo_n "(cached) " >&6
33204else
33205  if test -n "$ac_ct_AR"; then
33206  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33207else
33208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33209for as_dir in $PATH
33210do
33211  IFS=$as_save_IFS
33212  test -z "$as_dir" && as_dir=.
33213    for ac_exec_ext in '' $ac_executable_extensions; do
33214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33215    ac_cv_prog_ac_ct_AR="$ac_prog"
33216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33217    break 2
33218  fi
33219done
33220  done
33221IFS=$as_save_IFS
33222
33223fi
33224fi
33225ac_ct_AR=$ac_cv_prog_ac_ct_AR
33226if test -n "$ac_ct_AR"; then
33227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33228$as_echo "$ac_ct_AR" >&6; }
33229else
33230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33231$as_echo "no" >&6; }
33232fi
33233
33234
33235  test -n "$ac_ct_AR" && break
33236done
33237
33238  if test "x$ac_ct_AR" = x; then
33239    AR=""
33240  else
33241    case $cross_compiling:$ac_tool_warned in
33242yes:)
33243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33245ac_tool_warned=yes ;;
33246esac
33247    AR=$ac_ct_AR
33248  fi
33249fi
33250
33251    else
33252      # If it succeeded, then it was overridden by the user. We will use it
33253      # for the tool.
33254
33255      # First remove it from the list of overridden variables, so we can test
33256      # for unknown variables in the end.
33257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33258
33259      # Check if the provided tool contains a complete path.
33260      tool_specified="$AR"
33261      tool_basename="${tool_specified##*/}"
33262      if test "x$tool_basename" = "x$tool_specified"; then
33263        # A command without a complete path is provided, search $PATH.
33264        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33265$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33266        # Extract the first word of "$tool_basename", so it can be a program name with args.
33267set dummy $tool_basename; ac_word=$2
33268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33269$as_echo_n "checking for $ac_word... " >&6; }
33270if ${ac_cv_path_AR+:} false; then :
33271  $as_echo_n "(cached) " >&6
33272else
33273  case $AR in
33274  [\\/]* | ?:[\\/]*)
33275  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33276  ;;
33277  *)
33278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33279for as_dir in $PATH
33280do
33281  IFS=$as_save_IFS
33282  test -z "$as_dir" && as_dir=.
33283    for ac_exec_ext in '' $ac_executable_extensions; do
33284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33285    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33287    break 2
33288  fi
33289done
33290  done
33291IFS=$as_save_IFS
33292
33293  ;;
33294esac
33295fi
33296AR=$ac_cv_path_AR
33297if test -n "$AR"; then
33298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33299$as_echo "$AR" >&6; }
33300else
33301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33302$as_echo "no" >&6; }
33303fi
33304
33305
33306        if test "x$AR" = x; then
33307          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33308        fi
33309      else
33310        # Otherwise we believe it is a complete path. Use it as it is.
33311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33312$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33314$as_echo_n "checking for AR... " >&6; }
33315        if test ! -x "$tool_specified"; then
33316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33317$as_echo "not found" >&6; }
33318          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33319        fi
33320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33321$as_echo "$tool_specified" >&6; }
33322      fi
33323    fi
33324  fi
33325
33326
33327  fi
33328
33329  # Only process if variable expands to non-empty
33330
33331  if test "x$AR" != x; then
33332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33333
33334  # First separate the path from the arguments. This will split at the first
33335  # space.
33336  complete="$AR"
33337  path="${complete%% *}"
33338  tmp="$complete EOL"
33339  arguments="${tmp#* }"
33340
33341  # Input might be given as Windows format, start by converting to
33342  # unix format.
33343  new_path=`$CYGPATH -u "$path"`
33344
33345  # Now try to locate executable using which
33346  new_path=`$WHICH "$new_path" 2> /dev/null`
33347  # bat and cmd files are not always considered executable in cygwin causing which
33348  # to not find them
33349  if test "x$new_path" = x \
33350      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33351      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33352    new_path=`$CYGPATH -u "$path"`
33353  fi
33354  if test "x$new_path" = x; then
33355    # Oops. Which didn't find the executable.
33356    # The splitting of arguments from the executable at a space might have been incorrect,
33357    # since paths with space are more likely in Windows. Give it another try with the whole
33358    # argument.
33359    path="$complete"
33360    arguments="EOL"
33361    new_path=`$CYGPATH -u "$path"`
33362    new_path=`$WHICH "$new_path" 2> /dev/null`
33363    # bat and cmd files are not always considered executable in cygwin causing which
33364    # to not find them
33365    if test "x$new_path" = x \
33366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33368      new_path=`$CYGPATH -u "$path"`
33369    fi
33370    if test "x$new_path" = x; then
33371      # It's still not found. Now this is an unrecoverable error.
33372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33373$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33374      has_space=`$ECHO "$complete" | $GREP " "`
33375      if test "x$has_space" != x; then
33376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33378      fi
33379      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33380    fi
33381  fi
33382
33383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33386  # "foo.exe" is OK but "foo" is an error.
33387  #
33388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33389  # It is also a way to make sure we got the proper file name for the real test later on.
33390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33391  if test "x$test_shortpath" = x; then
33392    # Short path failed, file does not exist as specified.
33393    # Try adding .exe or .cmd
33394    if test -f "${new_path}.exe"; then
33395      input_to_shortpath="${new_path}.exe"
33396    elif test -f "${new_path}.cmd"; then
33397      input_to_shortpath="${new_path}.cmd"
33398    else
33399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33400$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33403      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33404    fi
33405  else
33406    input_to_shortpath="$new_path"
33407  fi
33408
33409  # Call helper function which possibly converts this using DOS-style short mode.
33410  # If so, the updated path is stored in $new_path.
33411  new_path="$input_to_shortpath"
33412
33413  input_path="$input_to_shortpath"
33414  # Check if we need to convert this using DOS-style short mode. If the path
33415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33416  # take no chances and rewrite it.
33417  # Note: m4 eats our [], so we need to use [ and ] instead.
33418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33419  if test "x$has_forbidden_chars" != x; then
33420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33424      # Going to short mode and back again did indeed matter. Since short mode is
33425      # case insensitive, let's make it lowercase to improve readability.
33426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33427      # Now convert it back to Unix-stile (cygpath)
33428      input_path=`$CYGPATH -u "$shortmode_path"`
33429      new_path="$input_path"
33430    fi
33431  fi
33432
33433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33434  if test "x$test_cygdrive_prefix" = x; then
33435    # As a simple fix, exclude /usr/bin since it's not a real path.
33436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33438      # a path prefixed by /cygdrive for fixpath to work.
33439      new_path="$CYGWIN_ROOT_PATH$input_path"
33440    fi
33441  fi
33442
33443  # remove trailing .exe if any
33444  new_path="${new_path/%.exe/}"
33445
33446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33447
33448  # First separate the path from the arguments. This will split at the first
33449  # space.
33450  complete="$AR"
33451  path="${complete%% *}"
33452  tmp="$complete EOL"
33453  arguments="${tmp#* }"
33454
33455  # Input might be given as Windows format, start by converting to
33456  # unix format.
33457  new_path="$path"
33458
33459  windows_path="$new_path"
33460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33461    unix_path=`$CYGPATH -u "$windows_path"`
33462    new_path="$unix_path"
33463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33465    new_path="$unix_path"
33466  fi
33467
33468
33469  # Now try to locate executable using which
33470  new_path=`$WHICH "$new_path" 2> /dev/null`
33471
33472  if test "x$new_path" = x; then
33473    # Oops. Which didn't find the executable.
33474    # The splitting of arguments from the executable at a space might have been incorrect,
33475    # since paths with space are more likely in Windows. Give it another try with the whole
33476    # argument.
33477    path="$complete"
33478    arguments="EOL"
33479    new_path="$path"
33480
33481  windows_path="$new_path"
33482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33483    unix_path=`$CYGPATH -u "$windows_path"`
33484    new_path="$unix_path"
33485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33487    new_path="$unix_path"
33488  fi
33489
33490
33491    new_path=`$WHICH "$new_path" 2> /dev/null`
33492    # bat and cmd files are not always considered executable in MSYS causing which
33493    # to not find them
33494    if test "x$new_path" = x \
33495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33497      new_path="$path"
33498
33499  windows_path="$new_path"
33500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33501    unix_path=`$CYGPATH -u "$windows_path"`
33502    new_path="$unix_path"
33503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33505    new_path="$unix_path"
33506  fi
33507
33508    fi
33509
33510    if test "x$new_path" = x; then
33511      # It's still not found. Now this is an unrecoverable error.
33512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33513$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33514      has_space=`$ECHO "$complete" | $GREP " "`
33515      if test "x$has_space" != x; then
33516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33518      fi
33519      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33520    fi
33521  fi
33522
33523  # Now new_path has a complete unix path to the binary
33524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33525    # Keep paths in /bin as-is, but remove trailing .exe if any
33526    new_path="${new_path/%.exe/}"
33527    # Do not save /bin paths to all_fixpath_prefixes!
33528  else
33529    # Not in mixed or Windows style, start by that.
33530    new_path=`cmd //c echo $new_path`
33531
33532  input_path="$new_path"
33533  # Check if we need to convert this using DOS-style short mode. If the path
33534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33535  # take no chances and rewrite it.
33536  # Note: m4 eats our [], so we need to use [ and ] instead.
33537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33538  if test "x$has_forbidden_chars" != x; then
33539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33541  fi
33542
33543    # Output is in $new_path
33544
33545  windows_path="$new_path"
33546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33547    unix_path=`$CYGPATH -u "$windows_path"`
33548    new_path="$unix_path"
33549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33551    new_path="$unix_path"
33552  fi
33553
33554    # remove trailing .exe if any
33555    new_path="${new_path/%.exe/}"
33556
33557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33559  fi
33560
33561    else
33562      # We're on a unix platform. Hooray! :)
33563      # First separate the path from the arguments. This will split at the first
33564      # space.
33565      complete="$AR"
33566      path="${complete%% *}"
33567      tmp="$complete EOL"
33568      arguments="${tmp#* }"
33569
33570      # Cannot rely on the command "which" here since it doesn't always work.
33571      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33572      if test -z "$is_absolute_path"; then
33573        # Path to executable is not absolute. Find it.
33574        IFS_save="$IFS"
33575        IFS=:
33576        for p in $PATH; do
33577          if test -f "$p/$path" && test -x "$p/$path"; then
33578            new_path="$p/$path"
33579            break
33580          fi
33581        done
33582        IFS="$IFS_save"
33583      else
33584        # This is an absolute path, we can use it without further modifications.
33585        new_path="$path"
33586      fi
33587
33588      if test "x$new_path" = x; then
33589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33590$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33591        has_space=`$ECHO "$complete" | $GREP " "`
33592        if test "x$has_space" != x; then
33593          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33595        fi
33596        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33597      fi
33598    fi
33599
33600    # Now join together the path and the arguments once again
33601    if test "x$arguments" != xEOL; then
33602      new_complete="$new_path ${arguments% *}"
33603    else
33604      new_complete="$new_path"
33605    fi
33606
33607    if test "x$complete" != "x$new_complete"; then
33608      AR="$new_complete"
33609      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33610$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33611    fi
33612  fi
33613
33614
33615
33616  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33617
33618
33619  # Publish this variable in the help.
33620
33621
33622  if test "x$LIPO" = x; then
33623    # The variable is not set by user, try to locate tool using the code snippet
33624    for ac_prog in lipo
33625do
33626  # Extract the first word of "$ac_prog", so it can be a program name with args.
33627set dummy $ac_prog; ac_word=$2
33628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33629$as_echo_n "checking for $ac_word... " >&6; }
33630if ${ac_cv_path_LIPO+:} false; then :
33631  $as_echo_n "(cached) " >&6
33632else
33633  case $LIPO in
33634  [\\/]* | ?:[\\/]*)
33635  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33636  ;;
33637  *)
33638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33639for as_dir in $PATH
33640do
33641  IFS=$as_save_IFS
33642  test -z "$as_dir" && as_dir=.
33643    for ac_exec_ext in '' $ac_executable_extensions; do
33644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33645    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33647    break 2
33648  fi
33649done
33650  done
33651IFS=$as_save_IFS
33652
33653  ;;
33654esac
33655fi
33656LIPO=$ac_cv_path_LIPO
33657if test -n "$LIPO"; then
33658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33659$as_echo "$LIPO" >&6; }
33660else
33661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33662$as_echo "no" >&6; }
33663fi
33664
33665
33666  test -n "$LIPO" && break
33667done
33668
33669  else
33670    # The variable is set, but is it from the command line or the environment?
33671
33672    # Try to remove the string !LIPO! from our list.
33673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33675      # If it failed, the variable was not from the command line. Ignore it,
33676      # but warn the user (except for BASH, which is always set by the calling BASH).
33677      if test "xLIPO" != xBASH; then
33678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33679$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33680      fi
33681      # Try to locate tool using the code snippet
33682      for ac_prog in lipo
33683do
33684  # Extract the first word of "$ac_prog", so it can be a program name with args.
33685set dummy $ac_prog; ac_word=$2
33686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33687$as_echo_n "checking for $ac_word... " >&6; }
33688if ${ac_cv_path_LIPO+:} false; then :
33689  $as_echo_n "(cached) " >&6
33690else
33691  case $LIPO in
33692  [\\/]* | ?:[\\/]*)
33693  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33694  ;;
33695  *)
33696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33697for as_dir in $PATH
33698do
33699  IFS=$as_save_IFS
33700  test -z "$as_dir" && as_dir=.
33701    for ac_exec_ext in '' $ac_executable_extensions; do
33702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33703    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33705    break 2
33706  fi
33707done
33708  done
33709IFS=$as_save_IFS
33710
33711  ;;
33712esac
33713fi
33714LIPO=$ac_cv_path_LIPO
33715if test -n "$LIPO"; then
33716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33717$as_echo "$LIPO" >&6; }
33718else
33719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33720$as_echo "no" >&6; }
33721fi
33722
33723
33724  test -n "$LIPO" && break
33725done
33726
33727    else
33728      # If it succeeded, then it was overridden by the user. We will use it
33729      # for the tool.
33730
33731      # First remove it from the list of overridden variables, so we can test
33732      # for unknown variables in the end.
33733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33734
33735      # Check if the provided tool contains a complete path.
33736      tool_specified="$LIPO"
33737      tool_basename="${tool_specified##*/}"
33738      if test "x$tool_basename" = "x$tool_specified"; then
33739        # A command without a complete path is provided, search $PATH.
33740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33741$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33742        # Extract the first word of "$tool_basename", so it can be a program name with args.
33743set dummy $tool_basename; ac_word=$2
33744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33745$as_echo_n "checking for $ac_word... " >&6; }
33746if ${ac_cv_path_LIPO+:} false; then :
33747  $as_echo_n "(cached) " >&6
33748else
33749  case $LIPO in
33750  [\\/]* | ?:[\\/]*)
33751  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33752  ;;
33753  *)
33754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33755for as_dir in $PATH
33756do
33757  IFS=$as_save_IFS
33758  test -z "$as_dir" && as_dir=.
33759    for ac_exec_ext in '' $ac_executable_extensions; do
33760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33761    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33763    break 2
33764  fi
33765done
33766  done
33767IFS=$as_save_IFS
33768
33769  ;;
33770esac
33771fi
33772LIPO=$ac_cv_path_LIPO
33773if test -n "$LIPO"; then
33774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33775$as_echo "$LIPO" >&6; }
33776else
33777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33778$as_echo "no" >&6; }
33779fi
33780
33781
33782        if test "x$LIPO" = x; then
33783          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33784        fi
33785      else
33786        # Otherwise we believe it is a complete path. Use it as it is.
33787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33788$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33790$as_echo_n "checking for LIPO... " >&6; }
33791        if test ! -x "$tool_specified"; then
33792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33793$as_echo "not found" >&6; }
33794          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33795        fi
33796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33797$as_echo "$tool_specified" >&6; }
33798      fi
33799    fi
33800  fi
33801
33802
33803
33804  # Only process if variable expands to non-empty
33805
33806  if test "x$LIPO" != x; then
33807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33808
33809  # First separate the path from the arguments. This will split at the first
33810  # space.
33811  complete="$LIPO"
33812  path="${complete%% *}"
33813  tmp="$complete EOL"
33814  arguments="${tmp#* }"
33815
33816  # Input might be given as Windows format, start by converting to
33817  # unix format.
33818  new_path=`$CYGPATH -u "$path"`
33819
33820  # Now try to locate executable using which
33821  new_path=`$WHICH "$new_path" 2> /dev/null`
33822  # bat and cmd files are not always considered executable in cygwin causing which
33823  # to not find them
33824  if test "x$new_path" = x \
33825      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33826      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33827    new_path=`$CYGPATH -u "$path"`
33828  fi
33829  if test "x$new_path" = x; then
33830    # Oops. Which didn't find the executable.
33831    # The splitting of arguments from the executable at a space might have been incorrect,
33832    # since paths with space are more likely in Windows. Give it another try with the whole
33833    # argument.
33834    path="$complete"
33835    arguments="EOL"
33836    new_path=`$CYGPATH -u "$path"`
33837    new_path=`$WHICH "$new_path" 2> /dev/null`
33838    # bat and cmd files are not always considered executable in cygwin causing which
33839    # to not find them
33840    if test "x$new_path" = x \
33841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33843      new_path=`$CYGPATH -u "$path"`
33844    fi
33845    if test "x$new_path" = x; then
33846      # It's still not found. Now this is an unrecoverable error.
33847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33848$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33849      has_space=`$ECHO "$complete" | $GREP " "`
33850      if test "x$has_space" != x; then
33851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33853      fi
33854      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33855    fi
33856  fi
33857
33858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33861  # "foo.exe" is OK but "foo" is an error.
33862  #
33863  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33864  # It is also a way to make sure we got the proper file name for the real test later on.
33865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33866  if test "x$test_shortpath" = x; then
33867    # Short path failed, file does not exist as specified.
33868    # Try adding .exe or .cmd
33869    if test -f "${new_path}.exe"; then
33870      input_to_shortpath="${new_path}.exe"
33871    elif test -f "${new_path}.cmd"; then
33872      input_to_shortpath="${new_path}.cmd"
33873    else
33874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33875$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33876      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33877$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33878      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33879    fi
33880  else
33881    input_to_shortpath="$new_path"
33882  fi
33883
33884  # Call helper function which possibly converts this using DOS-style short mode.
33885  # If so, the updated path is stored in $new_path.
33886  new_path="$input_to_shortpath"
33887
33888  input_path="$input_to_shortpath"
33889  # Check if we need to convert this using DOS-style short mode. If the path
33890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33891  # take no chances and rewrite it.
33892  # Note: m4 eats our [], so we need to use [ and ] instead.
33893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33894  if test "x$has_forbidden_chars" != x; then
33895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33899      # Going to short mode and back again did indeed matter. Since short mode is
33900      # case insensitive, let's make it lowercase to improve readability.
33901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33902      # Now convert it back to Unix-stile (cygpath)
33903      input_path=`$CYGPATH -u "$shortmode_path"`
33904      new_path="$input_path"
33905    fi
33906  fi
33907
33908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33909  if test "x$test_cygdrive_prefix" = x; then
33910    # As a simple fix, exclude /usr/bin since it's not a real path.
33911    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33913      # a path prefixed by /cygdrive for fixpath to work.
33914      new_path="$CYGWIN_ROOT_PATH$input_path"
33915    fi
33916  fi
33917
33918  # remove trailing .exe if any
33919  new_path="${new_path/%.exe/}"
33920
33921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33922
33923  # First separate the path from the arguments. This will split at the first
33924  # space.
33925  complete="$LIPO"
33926  path="${complete%% *}"
33927  tmp="$complete EOL"
33928  arguments="${tmp#* }"
33929
33930  # Input might be given as Windows format, start by converting to
33931  # unix format.
33932  new_path="$path"
33933
33934  windows_path="$new_path"
33935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33936    unix_path=`$CYGPATH -u "$windows_path"`
33937    new_path="$unix_path"
33938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33940    new_path="$unix_path"
33941  fi
33942
33943
33944  # Now try to locate executable using which
33945  new_path=`$WHICH "$new_path" 2> /dev/null`
33946
33947  if test "x$new_path" = x; then
33948    # Oops. Which didn't find the executable.
33949    # The splitting of arguments from the executable at a space might have been incorrect,
33950    # since paths with space are more likely in Windows. Give it another try with the whole
33951    # argument.
33952    path="$complete"
33953    arguments="EOL"
33954    new_path="$path"
33955
33956  windows_path="$new_path"
33957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33958    unix_path=`$CYGPATH -u "$windows_path"`
33959    new_path="$unix_path"
33960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33962    new_path="$unix_path"
33963  fi
33964
33965
33966    new_path=`$WHICH "$new_path" 2> /dev/null`
33967    # bat and cmd files are not always considered executable in MSYS causing which
33968    # to not find them
33969    if test "x$new_path" = x \
33970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33972      new_path="$path"
33973
33974  windows_path="$new_path"
33975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33976    unix_path=`$CYGPATH -u "$windows_path"`
33977    new_path="$unix_path"
33978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33980    new_path="$unix_path"
33981  fi
33982
33983    fi
33984
33985    if test "x$new_path" = x; then
33986      # It's still not found. Now this is an unrecoverable error.
33987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33988$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33989      has_space=`$ECHO "$complete" | $GREP " "`
33990      if test "x$has_space" != x; then
33991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33993      fi
33994      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33995    fi
33996  fi
33997
33998  # Now new_path has a complete unix path to the binary
33999  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34000    # Keep paths in /bin as-is, but remove trailing .exe if any
34001    new_path="${new_path/%.exe/}"
34002    # Do not save /bin paths to all_fixpath_prefixes!
34003  else
34004    # Not in mixed or Windows style, start by that.
34005    new_path=`cmd //c echo $new_path`
34006
34007  input_path="$new_path"
34008  # Check if we need to convert this using DOS-style short mode. If the path
34009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34010  # take no chances and rewrite it.
34011  # Note: m4 eats our [], so we need to use [ and ] instead.
34012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34013  if test "x$has_forbidden_chars" != x; then
34014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34016  fi
34017
34018    # Output is in $new_path
34019
34020  windows_path="$new_path"
34021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34022    unix_path=`$CYGPATH -u "$windows_path"`
34023    new_path="$unix_path"
34024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34026    new_path="$unix_path"
34027  fi
34028
34029    # remove trailing .exe if any
34030    new_path="${new_path/%.exe/}"
34031
34032    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34033    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34034  fi
34035
34036    else
34037      # We're on a unix platform. Hooray! :)
34038      # First separate the path from the arguments. This will split at the first
34039      # space.
34040      complete="$LIPO"
34041      path="${complete%% *}"
34042      tmp="$complete EOL"
34043      arguments="${tmp#* }"
34044
34045      # Cannot rely on the command "which" here since it doesn't always work.
34046      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34047      if test -z "$is_absolute_path"; then
34048        # Path to executable is not absolute. Find it.
34049        IFS_save="$IFS"
34050        IFS=:
34051        for p in $PATH; do
34052          if test -f "$p/$path" && test -x "$p/$path"; then
34053            new_path="$p/$path"
34054            break
34055          fi
34056        done
34057        IFS="$IFS_save"
34058      else
34059        # This is an absolute path, we can use it without further modifications.
34060        new_path="$path"
34061      fi
34062
34063      if test "x$new_path" = x; then
34064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34065$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34066        has_space=`$ECHO "$complete" | $GREP " "`
34067        if test "x$has_space" != x; then
34068          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34069$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34070        fi
34071        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34072      fi
34073    fi
34074
34075    # Now join together the path and the arguments once again
34076    if test "x$arguments" != xEOL; then
34077      new_complete="$new_path ${arguments% *}"
34078    else
34079      new_complete="$new_path"
34080    fi
34081
34082    if test "x$complete" != "x$new_complete"; then
34083      LIPO="$new_complete"
34084      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34085$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34086    fi
34087  fi
34088
34089  fi
34090
34091  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34092    # Extract the first word of "mt", so it can be a program name with args.
34093set dummy mt; ac_word=$2
34094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34095$as_echo_n "checking for $ac_word... " >&6; }
34096if ${ac_cv_prog_MT+:} false; then :
34097  $as_echo_n "(cached) " >&6
34098else
34099  if test -n "$MT"; then
34100  ac_cv_prog_MT="$MT" # Let the user override the test.
34101else
34102  ac_prog_rejected=no
34103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34104for as_dir in $PATH
34105do
34106  IFS=$as_save_IFS
34107  test -z "$as_dir" && as_dir=.
34108    for ac_exec_ext in '' $ac_executable_extensions; do
34109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34110    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34111       ac_prog_rejected=yes
34112       continue
34113     fi
34114    ac_cv_prog_MT="mt"
34115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34116    break 2
34117  fi
34118done
34119  done
34120IFS=$as_save_IFS
34121
34122if test $ac_prog_rejected = yes; then
34123  # We found a bogon in the path, so make sure we never use it.
34124  set dummy $ac_cv_prog_MT
34125  shift
34126  if test $# != 0; then
34127    # We chose a different compiler from the bogus one.
34128    # However, it has the same basename, so the bogon will be chosen
34129    # first if we set MT to just the basename; use the full file name.
34130    shift
34131    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34132  fi
34133fi
34134fi
34135fi
34136MT=$ac_cv_prog_MT
34137if test -n "$MT"; then
34138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34139$as_echo "$MT" >&6; }
34140else
34141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34142$as_echo "no" >&6; }
34143fi
34144
34145
34146
34147  # Only process if variable expands to non-empty
34148
34149  if test "x$MT" != x; then
34150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34151
34152  # First separate the path from the arguments. This will split at the first
34153  # space.
34154  complete="$MT"
34155  path="${complete%% *}"
34156  tmp="$complete EOL"
34157  arguments="${tmp#* }"
34158
34159  # Input might be given as Windows format, start by converting to
34160  # unix format.
34161  new_path=`$CYGPATH -u "$path"`
34162
34163  # Now try to locate executable using which
34164  new_path=`$WHICH "$new_path" 2> /dev/null`
34165  # bat and cmd files are not always considered executable in cygwin causing which
34166  # to not find them
34167  if test "x$new_path" = x \
34168      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34169      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34170    new_path=`$CYGPATH -u "$path"`
34171  fi
34172  if test "x$new_path" = x; then
34173    # Oops. Which didn't find the executable.
34174    # The splitting of arguments from the executable at a space might have been incorrect,
34175    # since paths with space are more likely in Windows. Give it another try with the whole
34176    # argument.
34177    path="$complete"
34178    arguments="EOL"
34179    new_path=`$CYGPATH -u "$path"`
34180    new_path=`$WHICH "$new_path" 2> /dev/null`
34181    # bat and cmd files are not always considered executable in cygwin causing which
34182    # to not find them
34183    if test "x$new_path" = x \
34184        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34185        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34186      new_path=`$CYGPATH -u "$path"`
34187    fi
34188    if test "x$new_path" = x; then
34189      # It's still not found. Now this is an unrecoverable error.
34190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34191$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34192      has_space=`$ECHO "$complete" | $GREP " "`
34193      if test "x$has_space" != x; then
34194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34196      fi
34197      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34198    fi
34199  fi
34200
34201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34204  # "foo.exe" is OK but "foo" is an error.
34205  #
34206  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34207  # It is also a way to make sure we got the proper file name for the real test later on.
34208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34209  if test "x$test_shortpath" = x; then
34210    # Short path failed, file does not exist as specified.
34211    # Try adding .exe or .cmd
34212    if test -f "${new_path}.exe"; then
34213      input_to_shortpath="${new_path}.exe"
34214    elif test -f "${new_path}.cmd"; then
34215      input_to_shortpath="${new_path}.cmd"
34216    else
34217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34218$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34219      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34220$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34221      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34222    fi
34223  else
34224    input_to_shortpath="$new_path"
34225  fi
34226
34227  # Call helper function which possibly converts this using DOS-style short mode.
34228  # If so, the updated path is stored in $new_path.
34229  new_path="$input_to_shortpath"
34230
34231  input_path="$input_to_shortpath"
34232  # Check if we need to convert this using DOS-style short mode. If the path
34233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34234  # take no chances and rewrite it.
34235  # Note: m4 eats our [], so we need to use [ and ] instead.
34236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34237  if test "x$has_forbidden_chars" != x; then
34238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34242      # Going to short mode and back again did indeed matter. Since short mode is
34243      # case insensitive, let's make it lowercase to improve readability.
34244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34245      # Now convert it back to Unix-stile (cygpath)
34246      input_path=`$CYGPATH -u "$shortmode_path"`
34247      new_path="$input_path"
34248    fi
34249  fi
34250
34251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34252  if test "x$test_cygdrive_prefix" = x; then
34253    # As a simple fix, exclude /usr/bin since it's not a real path.
34254    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34256      # a path prefixed by /cygdrive for fixpath to work.
34257      new_path="$CYGWIN_ROOT_PATH$input_path"
34258    fi
34259  fi
34260
34261  # remove trailing .exe if any
34262  new_path="${new_path/%.exe/}"
34263
34264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34265
34266  # First separate the path from the arguments. This will split at the first
34267  # space.
34268  complete="$MT"
34269  path="${complete%% *}"
34270  tmp="$complete EOL"
34271  arguments="${tmp#* }"
34272
34273  # Input might be given as Windows format, start by converting to
34274  # unix format.
34275  new_path="$path"
34276
34277  windows_path="$new_path"
34278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34279    unix_path=`$CYGPATH -u "$windows_path"`
34280    new_path="$unix_path"
34281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34283    new_path="$unix_path"
34284  fi
34285
34286
34287  # Now try to locate executable using which
34288  new_path=`$WHICH "$new_path" 2> /dev/null`
34289
34290  if test "x$new_path" = x; then
34291    # Oops. Which didn't find the executable.
34292    # The splitting of arguments from the executable at a space might have been incorrect,
34293    # since paths with space are more likely in Windows. Give it another try with the whole
34294    # argument.
34295    path="$complete"
34296    arguments="EOL"
34297    new_path="$path"
34298
34299  windows_path="$new_path"
34300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34301    unix_path=`$CYGPATH -u "$windows_path"`
34302    new_path="$unix_path"
34303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34305    new_path="$unix_path"
34306  fi
34307
34308
34309    new_path=`$WHICH "$new_path" 2> /dev/null`
34310    # bat and cmd files are not always considered executable in MSYS causing which
34311    # to not find them
34312    if test "x$new_path" = x \
34313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34315      new_path="$path"
34316
34317  windows_path="$new_path"
34318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34319    unix_path=`$CYGPATH -u "$windows_path"`
34320    new_path="$unix_path"
34321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34323    new_path="$unix_path"
34324  fi
34325
34326    fi
34327
34328    if test "x$new_path" = x; then
34329      # It's still not found. Now this is an unrecoverable error.
34330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34331$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34332      has_space=`$ECHO "$complete" | $GREP " "`
34333      if test "x$has_space" != x; then
34334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34336      fi
34337      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34338    fi
34339  fi
34340
34341  # Now new_path has a complete unix path to the binary
34342  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34343    # Keep paths in /bin as-is, but remove trailing .exe if any
34344    new_path="${new_path/%.exe/}"
34345    # Do not save /bin paths to all_fixpath_prefixes!
34346  else
34347    # Not in mixed or Windows style, start by that.
34348    new_path=`cmd //c echo $new_path`
34349
34350  input_path="$new_path"
34351  # Check if we need to convert this using DOS-style short mode. If the path
34352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34353  # take no chances and rewrite it.
34354  # Note: m4 eats our [], so we need to use [ and ] instead.
34355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34356  if test "x$has_forbidden_chars" != x; then
34357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34359  fi
34360
34361    # Output is in $new_path
34362
34363  windows_path="$new_path"
34364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34365    unix_path=`$CYGPATH -u "$windows_path"`
34366    new_path="$unix_path"
34367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34369    new_path="$unix_path"
34370  fi
34371
34372    # remove trailing .exe if any
34373    new_path="${new_path/%.exe/}"
34374
34375    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34376    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34377  fi
34378
34379    else
34380      # We're on a unix platform. Hooray! :)
34381      # First separate the path from the arguments. This will split at the first
34382      # space.
34383      complete="$MT"
34384      path="${complete%% *}"
34385      tmp="$complete EOL"
34386      arguments="${tmp#* }"
34387
34388      # Cannot rely on the command "which" here since it doesn't always work.
34389      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34390      if test -z "$is_absolute_path"; then
34391        # Path to executable is not absolute. Find it.
34392        IFS_save="$IFS"
34393        IFS=:
34394        for p in $PATH; do
34395          if test -f "$p/$path" && test -x "$p/$path"; then
34396            new_path="$p/$path"
34397            break
34398          fi
34399        done
34400        IFS="$IFS_save"
34401      else
34402        # This is an absolute path, we can use it without further modifications.
34403        new_path="$path"
34404      fi
34405
34406      if test "x$new_path" = x; then
34407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34408$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34409        has_space=`$ECHO "$complete" | $GREP " "`
34410        if test "x$has_space" != x; then
34411          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34412$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34413        fi
34414        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34415      fi
34416    fi
34417
34418    # Now join together the path and the arguments once again
34419    if test "x$arguments" != xEOL; then
34420      new_complete="$new_path ${arguments% *}"
34421    else
34422      new_complete="$new_path"
34423    fi
34424
34425    if test "x$complete" != "x$new_complete"; then
34426      MT="$new_complete"
34427      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34428$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34429    fi
34430  fi
34431
34432    # Setup the resource compiler (RC)
34433    # Extract the first word of "rc", so it can be a program name with args.
34434set dummy rc; ac_word=$2
34435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34436$as_echo_n "checking for $ac_word... " >&6; }
34437if ${ac_cv_prog_RC+:} false; then :
34438  $as_echo_n "(cached) " >&6
34439else
34440  if test -n "$RC"; then
34441  ac_cv_prog_RC="$RC" # Let the user override the test.
34442else
34443  ac_prog_rejected=no
34444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34445for as_dir in $PATH
34446do
34447  IFS=$as_save_IFS
34448  test -z "$as_dir" && as_dir=.
34449    for ac_exec_ext in '' $ac_executable_extensions; do
34450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34451    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34452       ac_prog_rejected=yes
34453       continue
34454     fi
34455    ac_cv_prog_RC="rc"
34456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34457    break 2
34458  fi
34459done
34460  done
34461IFS=$as_save_IFS
34462
34463if test $ac_prog_rejected = yes; then
34464  # We found a bogon in the path, so make sure we never use it.
34465  set dummy $ac_cv_prog_RC
34466  shift
34467  if test $# != 0; then
34468    # We chose a different compiler from the bogus one.
34469    # However, it has the same basename, so the bogon will be chosen
34470    # first if we set RC to just the basename; use the full file name.
34471    shift
34472    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34473  fi
34474fi
34475fi
34476fi
34477RC=$ac_cv_prog_RC
34478if test -n "$RC"; then
34479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34480$as_echo "$RC" >&6; }
34481else
34482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34483$as_echo "no" >&6; }
34484fi
34485
34486
34487
34488  # Only process if variable expands to non-empty
34489
34490  if test "x$RC" != x; then
34491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34492
34493  # First separate the path from the arguments. This will split at the first
34494  # space.
34495  complete="$RC"
34496  path="${complete%% *}"
34497  tmp="$complete EOL"
34498  arguments="${tmp#* }"
34499
34500  # Input might be given as Windows format, start by converting to
34501  # unix format.
34502  new_path=`$CYGPATH -u "$path"`
34503
34504  # Now try to locate executable using which
34505  new_path=`$WHICH "$new_path" 2> /dev/null`
34506  # bat and cmd files are not always considered executable in cygwin causing which
34507  # to not find them
34508  if test "x$new_path" = x \
34509      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34510      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34511    new_path=`$CYGPATH -u "$path"`
34512  fi
34513  if test "x$new_path" = x; then
34514    # Oops. Which didn't find the executable.
34515    # The splitting of arguments from the executable at a space might have been incorrect,
34516    # since paths with space are more likely in Windows. Give it another try with the whole
34517    # argument.
34518    path="$complete"
34519    arguments="EOL"
34520    new_path=`$CYGPATH -u "$path"`
34521    new_path=`$WHICH "$new_path" 2> /dev/null`
34522    # bat and cmd files are not always considered executable in cygwin causing which
34523    # to not find them
34524    if test "x$new_path" = x \
34525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34527      new_path=`$CYGPATH -u "$path"`
34528    fi
34529    if test "x$new_path" = x; then
34530      # It's still not found. Now this is an unrecoverable error.
34531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34532$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34533      has_space=`$ECHO "$complete" | $GREP " "`
34534      if test "x$has_space" != x; then
34535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34537      fi
34538      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34539    fi
34540  fi
34541
34542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34545  # "foo.exe" is OK but "foo" is an error.
34546  #
34547  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34548  # It is also a way to make sure we got the proper file name for the real test later on.
34549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34550  if test "x$test_shortpath" = x; then
34551    # Short path failed, file does not exist as specified.
34552    # Try adding .exe or .cmd
34553    if test -f "${new_path}.exe"; then
34554      input_to_shortpath="${new_path}.exe"
34555    elif test -f "${new_path}.cmd"; then
34556      input_to_shortpath="${new_path}.cmd"
34557    else
34558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34559$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34562      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34563    fi
34564  else
34565    input_to_shortpath="$new_path"
34566  fi
34567
34568  # Call helper function which possibly converts this using DOS-style short mode.
34569  # If so, the updated path is stored in $new_path.
34570  new_path="$input_to_shortpath"
34571
34572  input_path="$input_to_shortpath"
34573  # Check if we need to convert this using DOS-style short mode. If the path
34574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34575  # take no chances and rewrite it.
34576  # Note: m4 eats our [], so we need to use [ and ] instead.
34577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34578  if test "x$has_forbidden_chars" != x; then
34579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34583      # Going to short mode and back again did indeed matter. Since short mode is
34584      # case insensitive, let's make it lowercase to improve readability.
34585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34586      # Now convert it back to Unix-stile (cygpath)
34587      input_path=`$CYGPATH -u "$shortmode_path"`
34588      new_path="$input_path"
34589    fi
34590  fi
34591
34592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34593  if test "x$test_cygdrive_prefix" = x; then
34594    # As a simple fix, exclude /usr/bin since it's not a real path.
34595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34597      # a path prefixed by /cygdrive for fixpath to work.
34598      new_path="$CYGWIN_ROOT_PATH$input_path"
34599    fi
34600  fi
34601
34602  # remove trailing .exe if any
34603  new_path="${new_path/%.exe/}"
34604
34605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34606
34607  # First separate the path from the arguments. This will split at the first
34608  # space.
34609  complete="$RC"
34610  path="${complete%% *}"
34611  tmp="$complete EOL"
34612  arguments="${tmp#* }"
34613
34614  # Input might be given as Windows format, start by converting to
34615  # unix format.
34616  new_path="$path"
34617
34618  windows_path="$new_path"
34619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34620    unix_path=`$CYGPATH -u "$windows_path"`
34621    new_path="$unix_path"
34622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34624    new_path="$unix_path"
34625  fi
34626
34627
34628  # Now try to locate executable using which
34629  new_path=`$WHICH "$new_path" 2> /dev/null`
34630
34631  if test "x$new_path" = x; then
34632    # Oops. Which didn't find the executable.
34633    # The splitting of arguments from the executable at a space might have been incorrect,
34634    # since paths with space are more likely in Windows. Give it another try with the whole
34635    # argument.
34636    path="$complete"
34637    arguments="EOL"
34638    new_path="$path"
34639
34640  windows_path="$new_path"
34641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34642    unix_path=`$CYGPATH -u "$windows_path"`
34643    new_path="$unix_path"
34644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34646    new_path="$unix_path"
34647  fi
34648
34649
34650    new_path=`$WHICH "$new_path" 2> /dev/null`
34651    # bat and cmd files are not always considered executable in MSYS causing which
34652    # to not find them
34653    if test "x$new_path" = x \
34654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34656      new_path="$path"
34657
34658  windows_path="$new_path"
34659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34660    unix_path=`$CYGPATH -u "$windows_path"`
34661    new_path="$unix_path"
34662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34664    new_path="$unix_path"
34665  fi
34666
34667    fi
34668
34669    if test "x$new_path" = x; then
34670      # It's still not found. Now this is an unrecoverable error.
34671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34672$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34673      has_space=`$ECHO "$complete" | $GREP " "`
34674      if test "x$has_space" != x; then
34675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34677      fi
34678      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34679    fi
34680  fi
34681
34682  # Now new_path has a complete unix path to the binary
34683  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34684    # Keep paths in /bin as-is, but remove trailing .exe if any
34685    new_path="${new_path/%.exe/}"
34686    # Do not save /bin paths to all_fixpath_prefixes!
34687  else
34688    # Not in mixed or Windows style, start by that.
34689    new_path=`cmd //c echo $new_path`
34690
34691  input_path="$new_path"
34692  # Check if we need to convert this using DOS-style short mode. If the path
34693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34694  # take no chances and rewrite it.
34695  # Note: m4 eats our [], so we need to use [ and ] instead.
34696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34697  if test "x$has_forbidden_chars" != x; then
34698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34700  fi
34701
34702    # Output is in $new_path
34703
34704  windows_path="$new_path"
34705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34706    unix_path=`$CYGPATH -u "$windows_path"`
34707    new_path="$unix_path"
34708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34710    new_path="$unix_path"
34711  fi
34712
34713    # remove trailing .exe if any
34714    new_path="${new_path/%.exe/}"
34715
34716    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34717    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34718  fi
34719
34720    else
34721      # We're on a unix platform. Hooray! :)
34722      # First separate the path from the arguments. This will split at the first
34723      # space.
34724      complete="$RC"
34725      path="${complete%% *}"
34726      tmp="$complete EOL"
34727      arguments="${tmp#* }"
34728
34729      # Cannot rely on the command "which" here since it doesn't always work.
34730      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34731      if test -z "$is_absolute_path"; then
34732        # Path to executable is not absolute. Find it.
34733        IFS_save="$IFS"
34734        IFS=:
34735        for p in $PATH; do
34736          if test -f "$p/$path" && test -x "$p/$path"; then
34737            new_path="$p/$path"
34738            break
34739          fi
34740        done
34741        IFS="$IFS_save"
34742      else
34743        # This is an absolute path, we can use it without further modifications.
34744        new_path="$path"
34745      fi
34746
34747      if test "x$new_path" = x; then
34748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34749$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34750        has_space=`$ECHO "$complete" | $GREP " "`
34751        if test "x$has_space" != x; then
34752          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34753$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34754        fi
34755        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34756      fi
34757    fi
34758
34759    # Now join together the path and the arguments once again
34760    if test "x$arguments" != xEOL; then
34761      new_complete="$new_path ${arguments% *}"
34762    else
34763      new_complete="$new_path"
34764    fi
34765
34766    if test "x$complete" != "x$new_complete"; then
34767      RC="$new_complete"
34768      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34769$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34770    fi
34771  fi
34772
34773    # Extract the first word of "dumpbin", so it can be a program name with args.
34774set dummy dumpbin; ac_word=$2
34775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34776$as_echo_n "checking for $ac_word... " >&6; }
34777if ${ac_cv_prog_DUMPBIN+:} false; then :
34778  $as_echo_n "(cached) " >&6
34779else
34780  if test -n "$DUMPBIN"; then
34781  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34782else
34783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34784for as_dir in $PATH
34785do
34786  IFS=$as_save_IFS
34787  test -z "$as_dir" && as_dir=.
34788    for ac_exec_ext in '' $ac_executable_extensions; do
34789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34790    ac_cv_prog_DUMPBIN="dumpbin"
34791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34792    break 2
34793  fi
34794done
34795  done
34796IFS=$as_save_IFS
34797
34798fi
34799fi
34800DUMPBIN=$ac_cv_prog_DUMPBIN
34801if test -n "$DUMPBIN"; then
34802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34803$as_echo "$DUMPBIN" >&6; }
34804else
34805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34806$as_echo "no" >&6; }
34807fi
34808
34809
34810
34811  # Only process if variable expands to non-empty
34812
34813  if test "x$DUMPBIN" != x; then
34814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34815
34816  # First separate the path from the arguments. This will split at the first
34817  # space.
34818  complete="$DUMPBIN"
34819  path="${complete%% *}"
34820  tmp="$complete EOL"
34821  arguments="${tmp#* }"
34822
34823  # Input might be given as Windows format, start by converting to
34824  # unix format.
34825  new_path=`$CYGPATH -u "$path"`
34826
34827  # Now try to locate executable using which
34828  new_path=`$WHICH "$new_path" 2> /dev/null`
34829  # bat and cmd files are not always considered executable in cygwin causing which
34830  # to not find them
34831  if test "x$new_path" = x \
34832      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34833      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34834    new_path=`$CYGPATH -u "$path"`
34835  fi
34836  if test "x$new_path" = x; then
34837    # Oops. Which didn't find the executable.
34838    # The splitting of arguments from the executable at a space might have been incorrect,
34839    # since paths with space are more likely in Windows. Give it another try with the whole
34840    # argument.
34841    path="$complete"
34842    arguments="EOL"
34843    new_path=`$CYGPATH -u "$path"`
34844    new_path=`$WHICH "$new_path" 2> /dev/null`
34845    # bat and cmd files are not always considered executable in cygwin causing which
34846    # to not find them
34847    if test "x$new_path" = x \
34848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34850      new_path=`$CYGPATH -u "$path"`
34851    fi
34852    if test "x$new_path" = x; then
34853      # It's still not found. Now this is an unrecoverable error.
34854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34855$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34856      has_space=`$ECHO "$complete" | $GREP " "`
34857      if test "x$has_space" != x; then
34858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34860      fi
34861      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34862    fi
34863  fi
34864
34865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34868  # "foo.exe" is OK but "foo" is an error.
34869  #
34870  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34871  # It is also a way to make sure we got the proper file name for the real test later on.
34872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34873  if test "x$test_shortpath" = x; then
34874    # Short path failed, file does not exist as specified.
34875    # Try adding .exe or .cmd
34876    if test -f "${new_path}.exe"; then
34877      input_to_shortpath="${new_path}.exe"
34878    elif test -f "${new_path}.cmd"; then
34879      input_to_shortpath="${new_path}.cmd"
34880    else
34881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34882$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34883      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34884$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34885      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34886    fi
34887  else
34888    input_to_shortpath="$new_path"
34889  fi
34890
34891  # Call helper function which possibly converts this using DOS-style short mode.
34892  # If so, the updated path is stored in $new_path.
34893  new_path="$input_to_shortpath"
34894
34895  input_path="$input_to_shortpath"
34896  # Check if we need to convert this using DOS-style short mode. If the path
34897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34898  # take no chances and rewrite it.
34899  # Note: m4 eats our [], so we need to use [ and ] instead.
34900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34901  if test "x$has_forbidden_chars" != x; then
34902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34906      # Going to short mode and back again did indeed matter. Since short mode is
34907      # case insensitive, let's make it lowercase to improve readability.
34908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34909      # Now convert it back to Unix-stile (cygpath)
34910      input_path=`$CYGPATH -u "$shortmode_path"`
34911      new_path="$input_path"
34912    fi
34913  fi
34914
34915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34916  if test "x$test_cygdrive_prefix" = x; then
34917    # As a simple fix, exclude /usr/bin since it's not a real path.
34918    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34920      # a path prefixed by /cygdrive for fixpath to work.
34921      new_path="$CYGWIN_ROOT_PATH$input_path"
34922    fi
34923  fi
34924
34925  # remove trailing .exe if any
34926  new_path="${new_path/%.exe/}"
34927
34928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34929
34930  # First separate the path from the arguments. This will split at the first
34931  # space.
34932  complete="$DUMPBIN"
34933  path="${complete%% *}"
34934  tmp="$complete EOL"
34935  arguments="${tmp#* }"
34936
34937  # Input might be given as Windows format, start by converting to
34938  # unix format.
34939  new_path="$path"
34940
34941  windows_path="$new_path"
34942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34943    unix_path=`$CYGPATH -u "$windows_path"`
34944    new_path="$unix_path"
34945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34947    new_path="$unix_path"
34948  fi
34949
34950
34951  # Now try to locate executable using which
34952  new_path=`$WHICH "$new_path" 2> /dev/null`
34953
34954  if test "x$new_path" = x; then
34955    # Oops. Which didn't find the executable.
34956    # The splitting of arguments from the executable at a space might have been incorrect,
34957    # since paths with space are more likely in Windows. Give it another try with the whole
34958    # argument.
34959    path="$complete"
34960    arguments="EOL"
34961    new_path="$path"
34962
34963  windows_path="$new_path"
34964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34965    unix_path=`$CYGPATH -u "$windows_path"`
34966    new_path="$unix_path"
34967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34969    new_path="$unix_path"
34970  fi
34971
34972
34973    new_path=`$WHICH "$new_path" 2> /dev/null`
34974    # bat and cmd files are not always considered executable in MSYS causing which
34975    # to not find them
34976    if test "x$new_path" = x \
34977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34979      new_path="$path"
34980
34981  windows_path="$new_path"
34982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34983    unix_path=`$CYGPATH -u "$windows_path"`
34984    new_path="$unix_path"
34985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34987    new_path="$unix_path"
34988  fi
34989
34990    fi
34991
34992    if test "x$new_path" = x; then
34993      # It's still not found. Now this is an unrecoverable error.
34994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34995$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34996      has_space=`$ECHO "$complete" | $GREP " "`
34997      if test "x$has_space" != x; then
34998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35000      fi
35001      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35002    fi
35003  fi
35004
35005  # Now new_path has a complete unix path to the binary
35006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35007    # Keep paths in /bin as-is, but remove trailing .exe if any
35008    new_path="${new_path/%.exe/}"
35009    # Do not save /bin paths to all_fixpath_prefixes!
35010  else
35011    # Not in mixed or Windows style, start by that.
35012    new_path=`cmd //c echo $new_path`
35013
35014  input_path="$new_path"
35015  # Check if we need to convert this using DOS-style short mode. If the path
35016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35017  # take no chances and rewrite it.
35018  # Note: m4 eats our [], so we need to use [ and ] instead.
35019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35020  if test "x$has_forbidden_chars" != x; then
35021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35023  fi
35024
35025    # Output is in $new_path
35026
35027  windows_path="$new_path"
35028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35029    unix_path=`$CYGPATH -u "$windows_path"`
35030    new_path="$unix_path"
35031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35033    new_path="$unix_path"
35034  fi
35035
35036    # remove trailing .exe if any
35037    new_path="${new_path/%.exe/}"
35038
35039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35041  fi
35042
35043    else
35044      # We're on a unix platform. Hooray! :)
35045      # First separate the path from the arguments. This will split at the first
35046      # space.
35047      complete="$DUMPBIN"
35048      path="${complete%% *}"
35049      tmp="$complete EOL"
35050      arguments="${tmp#* }"
35051
35052      # Cannot rely on the command "which" here since it doesn't always work.
35053      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35054      if test -z "$is_absolute_path"; then
35055        # Path to executable is not absolute. Find it.
35056        IFS_save="$IFS"
35057        IFS=:
35058        for p in $PATH; do
35059          if test -f "$p/$path" && test -x "$p/$path"; then
35060            new_path="$p/$path"
35061            break
35062          fi
35063        done
35064        IFS="$IFS_save"
35065      else
35066        # This is an absolute path, we can use it without further modifications.
35067        new_path="$path"
35068      fi
35069
35070      if test "x$new_path" = x; then
35071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35072$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35073        has_space=`$ECHO "$complete" | $GREP " "`
35074        if test "x$has_space" != x; then
35075          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35077        fi
35078        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35079      fi
35080    fi
35081
35082    # Now join together the path and the arguments once again
35083    if test "x$arguments" != xEOL; then
35084      new_complete="$new_path ${arguments% *}"
35085    else
35086      new_complete="$new_path"
35087    fi
35088
35089    if test "x$complete" != "x$new_complete"; then
35090      DUMPBIN="$new_complete"
35091      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35092$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35093    fi
35094  fi
35095
35096    # We need to check for 'msbuild.exe' because at the place where we expect to
35097    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35098    # won't find the 'msbuild.exe' executable in that case (and the
35099    # 'ac_executable_extensions' is unusable due to performance reasons).
35100    # Notice that we intentionally don't fix up the path to MSBUILD because we
35101    # will call it in a DOS shell during freetype detection on Windows (see
35102    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35103    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35104set dummy msbuild.exe; ac_word=$2
35105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35106$as_echo_n "checking for $ac_word... " >&6; }
35107if ${ac_cv_prog_MSBUILD+:} false; then :
35108  $as_echo_n "(cached) " >&6
35109else
35110  if test -n "$MSBUILD"; then
35111  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35112else
35113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35114for as_dir in $PATH
35115do
35116  IFS=$as_save_IFS
35117  test -z "$as_dir" && as_dir=.
35118    for ac_exec_ext in '' $ac_executable_extensions; do
35119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35120    ac_cv_prog_MSBUILD="msbuild.exe"
35121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35122    break 2
35123  fi
35124done
35125  done
35126IFS=$as_save_IFS
35127
35128fi
35129fi
35130MSBUILD=$ac_cv_prog_MSBUILD
35131if test -n "$MSBUILD"; then
35132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35133$as_echo "$MSBUILD" >&6; }
35134else
35135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35136$as_echo "no" >&6; }
35137fi
35138
35139
35140  fi
35141
35142  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35143
35144
35145  # Publish this variable in the help.
35146
35147
35148  if test "x$STRIP" = x; then
35149    # The variable is not set by user, try to locate tool using the code snippet
35150    for ac_prog in strip
35151do
35152  # Extract the first word of "$ac_prog", so it can be a program name with args.
35153set dummy $ac_prog; ac_word=$2
35154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35155$as_echo_n "checking for $ac_word... " >&6; }
35156if ${ac_cv_path_STRIP+:} false; then :
35157  $as_echo_n "(cached) " >&6
35158else
35159  case $STRIP in
35160  [\\/]* | ?:[\\/]*)
35161  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35162  ;;
35163  *)
35164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35165for as_dir in $PATH
35166do
35167  IFS=$as_save_IFS
35168  test -z "$as_dir" && as_dir=.
35169    for ac_exec_ext in '' $ac_executable_extensions; do
35170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35171    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35173    break 2
35174  fi
35175done
35176  done
35177IFS=$as_save_IFS
35178
35179  ;;
35180esac
35181fi
35182STRIP=$ac_cv_path_STRIP
35183if test -n "$STRIP"; then
35184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35185$as_echo "$STRIP" >&6; }
35186else
35187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35188$as_echo "no" >&6; }
35189fi
35190
35191
35192  test -n "$STRIP" && break
35193done
35194
35195  else
35196    # The variable is set, but is it from the command line or the environment?
35197
35198    # Try to remove the string !STRIP! from our list.
35199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35201      # If it failed, the variable was not from the command line. Ignore it,
35202      # but warn the user (except for BASH, which is always set by the calling BASH).
35203      if test "xSTRIP" != xBASH; then
35204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35205$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35206      fi
35207      # Try to locate tool using the code snippet
35208      for ac_prog in strip
35209do
35210  # Extract the first word of "$ac_prog", so it can be a program name with args.
35211set dummy $ac_prog; ac_word=$2
35212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35213$as_echo_n "checking for $ac_word... " >&6; }
35214if ${ac_cv_path_STRIP+:} false; then :
35215  $as_echo_n "(cached) " >&6
35216else
35217  case $STRIP in
35218  [\\/]* | ?:[\\/]*)
35219  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35220  ;;
35221  *)
35222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35223for as_dir in $PATH
35224do
35225  IFS=$as_save_IFS
35226  test -z "$as_dir" && as_dir=.
35227    for ac_exec_ext in '' $ac_executable_extensions; do
35228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35229    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35231    break 2
35232  fi
35233done
35234  done
35235IFS=$as_save_IFS
35236
35237  ;;
35238esac
35239fi
35240STRIP=$ac_cv_path_STRIP
35241if test -n "$STRIP"; then
35242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35243$as_echo "$STRIP" >&6; }
35244else
35245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35246$as_echo "no" >&6; }
35247fi
35248
35249
35250  test -n "$STRIP" && break
35251done
35252
35253    else
35254      # If it succeeded, then it was overridden by the user. We will use it
35255      # for the tool.
35256
35257      # First remove it from the list of overridden variables, so we can test
35258      # for unknown variables in the end.
35259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35260
35261      # Check if the provided tool contains a complete path.
35262      tool_specified="$STRIP"
35263      tool_basename="${tool_specified##*/}"
35264      if test "x$tool_basename" = "x$tool_specified"; then
35265        # A command without a complete path is provided, search $PATH.
35266        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35267$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35268        # Extract the first word of "$tool_basename", so it can be a program name with args.
35269set dummy $tool_basename; ac_word=$2
35270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35271$as_echo_n "checking for $ac_word... " >&6; }
35272if ${ac_cv_path_STRIP+:} false; then :
35273  $as_echo_n "(cached) " >&6
35274else
35275  case $STRIP in
35276  [\\/]* | ?:[\\/]*)
35277  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35278  ;;
35279  *)
35280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35281for as_dir in $PATH
35282do
35283  IFS=$as_save_IFS
35284  test -z "$as_dir" && as_dir=.
35285    for ac_exec_ext in '' $ac_executable_extensions; do
35286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35287    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35289    break 2
35290  fi
35291done
35292  done
35293IFS=$as_save_IFS
35294
35295  ;;
35296esac
35297fi
35298STRIP=$ac_cv_path_STRIP
35299if test -n "$STRIP"; then
35300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35301$as_echo "$STRIP" >&6; }
35302else
35303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35304$as_echo "no" >&6; }
35305fi
35306
35307
35308        if test "x$STRIP" = x; then
35309          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35310        fi
35311      else
35312        # Otherwise we believe it is a complete path. Use it as it is.
35313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35314$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35316$as_echo_n "checking for STRIP... " >&6; }
35317        if test ! -x "$tool_specified"; then
35318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35319$as_echo "not found" >&6; }
35320          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35321        fi
35322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35323$as_echo "$tool_specified" >&6; }
35324      fi
35325    fi
35326  fi
35327
35328
35329
35330  # Only process if variable expands to non-empty
35331
35332  if test "x$STRIP" != x; then
35333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35334
35335  # First separate the path from the arguments. This will split at the first
35336  # space.
35337  complete="$STRIP"
35338  path="${complete%% *}"
35339  tmp="$complete EOL"
35340  arguments="${tmp#* }"
35341
35342  # Input might be given as Windows format, start by converting to
35343  # unix format.
35344  new_path=`$CYGPATH -u "$path"`
35345
35346  # Now try to locate executable using which
35347  new_path=`$WHICH "$new_path" 2> /dev/null`
35348  # bat and cmd files are not always considered executable in cygwin causing which
35349  # to not find them
35350  if test "x$new_path" = x \
35351      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35352      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35353    new_path=`$CYGPATH -u "$path"`
35354  fi
35355  if test "x$new_path" = x; then
35356    # Oops. Which didn't find the executable.
35357    # The splitting of arguments from the executable at a space might have been incorrect,
35358    # since paths with space are more likely in Windows. Give it another try with the whole
35359    # argument.
35360    path="$complete"
35361    arguments="EOL"
35362    new_path=`$CYGPATH -u "$path"`
35363    new_path=`$WHICH "$new_path" 2> /dev/null`
35364    # bat and cmd files are not always considered executable in cygwin causing which
35365    # to not find them
35366    if test "x$new_path" = x \
35367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35369      new_path=`$CYGPATH -u "$path"`
35370    fi
35371    if test "x$new_path" = x; then
35372      # It's still not found. Now this is an unrecoverable error.
35373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35374$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35375      has_space=`$ECHO "$complete" | $GREP " "`
35376      if test "x$has_space" != x; then
35377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35379      fi
35380      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35381    fi
35382  fi
35383
35384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35387  # "foo.exe" is OK but "foo" is an error.
35388  #
35389  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35390  # It is also a way to make sure we got the proper file name for the real test later on.
35391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35392  if test "x$test_shortpath" = x; then
35393    # Short path failed, file does not exist as specified.
35394    # Try adding .exe or .cmd
35395    if test -f "${new_path}.exe"; then
35396      input_to_shortpath="${new_path}.exe"
35397    elif test -f "${new_path}.cmd"; then
35398      input_to_shortpath="${new_path}.cmd"
35399    else
35400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35401$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35402      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35403$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35404      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35405    fi
35406  else
35407    input_to_shortpath="$new_path"
35408  fi
35409
35410  # Call helper function which possibly converts this using DOS-style short mode.
35411  # If so, the updated path is stored in $new_path.
35412  new_path="$input_to_shortpath"
35413
35414  input_path="$input_to_shortpath"
35415  # Check if we need to convert this using DOS-style short mode. If the path
35416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35417  # take no chances and rewrite it.
35418  # Note: m4 eats our [], so we need to use [ and ] instead.
35419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35420  if test "x$has_forbidden_chars" != x; then
35421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35425      # Going to short mode and back again did indeed matter. Since short mode is
35426      # case insensitive, let's make it lowercase to improve readability.
35427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35428      # Now convert it back to Unix-stile (cygpath)
35429      input_path=`$CYGPATH -u "$shortmode_path"`
35430      new_path="$input_path"
35431    fi
35432  fi
35433
35434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35435  if test "x$test_cygdrive_prefix" = x; then
35436    # As a simple fix, exclude /usr/bin since it's not a real path.
35437    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35439      # a path prefixed by /cygdrive for fixpath to work.
35440      new_path="$CYGWIN_ROOT_PATH$input_path"
35441    fi
35442  fi
35443
35444  # remove trailing .exe if any
35445  new_path="${new_path/%.exe/}"
35446
35447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35448
35449  # First separate the path from the arguments. This will split at the first
35450  # space.
35451  complete="$STRIP"
35452  path="${complete%% *}"
35453  tmp="$complete EOL"
35454  arguments="${tmp#* }"
35455
35456  # Input might be given as Windows format, start by converting to
35457  # unix format.
35458  new_path="$path"
35459
35460  windows_path="$new_path"
35461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35462    unix_path=`$CYGPATH -u "$windows_path"`
35463    new_path="$unix_path"
35464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35466    new_path="$unix_path"
35467  fi
35468
35469
35470  # Now try to locate executable using which
35471  new_path=`$WHICH "$new_path" 2> /dev/null`
35472
35473  if test "x$new_path" = x; then
35474    # Oops. Which didn't find the executable.
35475    # The splitting of arguments from the executable at a space might have been incorrect,
35476    # since paths with space are more likely in Windows. Give it another try with the whole
35477    # argument.
35478    path="$complete"
35479    arguments="EOL"
35480    new_path="$path"
35481
35482  windows_path="$new_path"
35483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35484    unix_path=`$CYGPATH -u "$windows_path"`
35485    new_path="$unix_path"
35486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35488    new_path="$unix_path"
35489  fi
35490
35491
35492    new_path=`$WHICH "$new_path" 2> /dev/null`
35493    # bat and cmd files are not always considered executable in MSYS causing which
35494    # to not find them
35495    if test "x$new_path" = x \
35496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35498      new_path="$path"
35499
35500  windows_path="$new_path"
35501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35502    unix_path=`$CYGPATH -u "$windows_path"`
35503    new_path="$unix_path"
35504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35506    new_path="$unix_path"
35507  fi
35508
35509    fi
35510
35511    if test "x$new_path" = x; then
35512      # It's still not found. Now this is an unrecoverable error.
35513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35514$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35515      has_space=`$ECHO "$complete" | $GREP " "`
35516      if test "x$has_space" != x; then
35517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35519      fi
35520      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35521    fi
35522  fi
35523
35524  # Now new_path has a complete unix path to the binary
35525  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35526    # Keep paths in /bin as-is, but remove trailing .exe if any
35527    new_path="${new_path/%.exe/}"
35528    # Do not save /bin paths to all_fixpath_prefixes!
35529  else
35530    # Not in mixed or Windows style, start by that.
35531    new_path=`cmd //c echo $new_path`
35532
35533  input_path="$new_path"
35534  # Check if we need to convert this using DOS-style short mode. If the path
35535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35536  # take no chances and rewrite it.
35537  # Note: m4 eats our [], so we need to use [ and ] instead.
35538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35539  if test "x$has_forbidden_chars" != x; then
35540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35542  fi
35543
35544    # Output is in $new_path
35545
35546  windows_path="$new_path"
35547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35548    unix_path=`$CYGPATH -u "$windows_path"`
35549    new_path="$unix_path"
35550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35552    new_path="$unix_path"
35553  fi
35554
35555    # remove trailing .exe if any
35556    new_path="${new_path/%.exe/}"
35557
35558    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35559    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35560  fi
35561
35562    else
35563      # We're on a unix platform. Hooray! :)
35564      # First separate the path from the arguments. This will split at the first
35565      # space.
35566      complete="$STRIP"
35567      path="${complete%% *}"
35568      tmp="$complete EOL"
35569      arguments="${tmp#* }"
35570
35571      # Cannot rely on the command "which" here since it doesn't always work.
35572      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35573      if test -z "$is_absolute_path"; then
35574        # Path to executable is not absolute. Find it.
35575        IFS_save="$IFS"
35576        IFS=:
35577        for p in $PATH; do
35578          if test -f "$p/$path" && test -x "$p/$path"; then
35579            new_path="$p/$path"
35580            break
35581          fi
35582        done
35583        IFS="$IFS_save"
35584      else
35585        # This is an absolute path, we can use it without further modifications.
35586        new_path="$path"
35587      fi
35588
35589      if test "x$new_path" = x; then
35590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35591$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35592        has_space=`$ECHO "$complete" | $GREP " "`
35593        if test "x$has_space" != x; then
35594          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35596        fi
35597        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35598      fi
35599    fi
35600
35601    # Now join together the path and the arguments once again
35602    if test "x$arguments" != xEOL; then
35603      new_complete="$new_path ${arguments% *}"
35604    else
35605      new_complete="$new_path"
35606    fi
35607
35608    if test "x$complete" != "x$new_complete"; then
35609      STRIP="$new_complete"
35610      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35611$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35612    fi
35613  fi
35614
35615
35616
35617  # Publish this variable in the help.
35618
35619
35620  if test "x$NM" = x; then
35621    # The variable is not set by user, try to locate tool using the code snippet
35622    for ac_prog in nm
35623do
35624  # Extract the first word of "$ac_prog", so it can be a program name with args.
35625set dummy $ac_prog; ac_word=$2
35626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35627$as_echo_n "checking for $ac_word... " >&6; }
35628if ${ac_cv_path_NM+:} false; then :
35629  $as_echo_n "(cached) " >&6
35630else
35631  case $NM in
35632  [\\/]* | ?:[\\/]*)
35633  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35634  ;;
35635  *)
35636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35637for as_dir in $PATH
35638do
35639  IFS=$as_save_IFS
35640  test -z "$as_dir" && as_dir=.
35641    for ac_exec_ext in '' $ac_executable_extensions; do
35642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35643    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35645    break 2
35646  fi
35647done
35648  done
35649IFS=$as_save_IFS
35650
35651  ;;
35652esac
35653fi
35654NM=$ac_cv_path_NM
35655if test -n "$NM"; then
35656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35657$as_echo "$NM" >&6; }
35658else
35659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35660$as_echo "no" >&6; }
35661fi
35662
35663
35664  test -n "$NM" && break
35665done
35666
35667  else
35668    # The variable is set, but is it from the command line or the environment?
35669
35670    # Try to remove the string !NM! from our list.
35671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35673      # If it failed, the variable was not from the command line. Ignore it,
35674      # but warn the user (except for BASH, which is always set by the calling BASH).
35675      if test "xNM" != xBASH; then
35676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35677$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35678      fi
35679      # Try to locate tool using the code snippet
35680      for ac_prog in nm
35681do
35682  # Extract the first word of "$ac_prog", so it can be a program name with args.
35683set dummy $ac_prog; ac_word=$2
35684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35685$as_echo_n "checking for $ac_word... " >&6; }
35686if ${ac_cv_path_NM+:} false; then :
35687  $as_echo_n "(cached) " >&6
35688else
35689  case $NM in
35690  [\\/]* | ?:[\\/]*)
35691  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35692  ;;
35693  *)
35694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35695for as_dir in $PATH
35696do
35697  IFS=$as_save_IFS
35698  test -z "$as_dir" && as_dir=.
35699    for ac_exec_ext in '' $ac_executable_extensions; do
35700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35701    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35703    break 2
35704  fi
35705done
35706  done
35707IFS=$as_save_IFS
35708
35709  ;;
35710esac
35711fi
35712NM=$ac_cv_path_NM
35713if test -n "$NM"; then
35714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35715$as_echo "$NM" >&6; }
35716else
35717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35718$as_echo "no" >&6; }
35719fi
35720
35721
35722  test -n "$NM" && break
35723done
35724
35725    else
35726      # If it succeeded, then it was overridden by the user. We will use it
35727      # for the tool.
35728
35729      # First remove it from the list of overridden variables, so we can test
35730      # for unknown variables in the end.
35731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35732
35733      # Check if the provided tool contains a complete path.
35734      tool_specified="$NM"
35735      tool_basename="${tool_specified##*/}"
35736      if test "x$tool_basename" = "x$tool_specified"; then
35737        # A command without a complete path is provided, search $PATH.
35738        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35739$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35740        # Extract the first word of "$tool_basename", so it can be a program name with args.
35741set dummy $tool_basename; ac_word=$2
35742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35743$as_echo_n "checking for $ac_word... " >&6; }
35744if ${ac_cv_path_NM+:} false; then :
35745  $as_echo_n "(cached) " >&6
35746else
35747  case $NM in
35748  [\\/]* | ?:[\\/]*)
35749  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35750  ;;
35751  *)
35752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35753for as_dir in $PATH
35754do
35755  IFS=$as_save_IFS
35756  test -z "$as_dir" && as_dir=.
35757    for ac_exec_ext in '' $ac_executable_extensions; do
35758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35759    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35761    break 2
35762  fi
35763done
35764  done
35765IFS=$as_save_IFS
35766
35767  ;;
35768esac
35769fi
35770NM=$ac_cv_path_NM
35771if test -n "$NM"; then
35772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35773$as_echo "$NM" >&6; }
35774else
35775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35776$as_echo "no" >&6; }
35777fi
35778
35779
35780        if test "x$NM" = x; then
35781          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35782        fi
35783      else
35784        # Otherwise we believe it is a complete path. Use it as it is.
35785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35786$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35788$as_echo_n "checking for NM... " >&6; }
35789        if test ! -x "$tool_specified"; then
35790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35791$as_echo "not found" >&6; }
35792          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35793        fi
35794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35795$as_echo "$tool_specified" >&6; }
35796      fi
35797    fi
35798  fi
35799
35800
35801
35802  # Only process if variable expands to non-empty
35803
35804  if test "x$NM" != x; then
35805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35806
35807  # First separate the path from the arguments. This will split at the first
35808  # space.
35809  complete="$NM"
35810  path="${complete%% *}"
35811  tmp="$complete EOL"
35812  arguments="${tmp#* }"
35813
35814  # Input might be given as Windows format, start by converting to
35815  # unix format.
35816  new_path=`$CYGPATH -u "$path"`
35817
35818  # Now try to locate executable using which
35819  new_path=`$WHICH "$new_path" 2> /dev/null`
35820  # bat and cmd files are not always considered executable in cygwin causing which
35821  # to not find them
35822  if test "x$new_path" = x \
35823      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35824      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35825    new_path=`$CYGPATH -u "$path"`
35826  fi
35827  if test "x$new_path" = x; then
35828    # Oops. Which didn't find the executable.
35829    # The splitting of arguments from the executable at a space might have been incorrect,
35830    # since paths with space are more likely in Windows. Give it another try with the whole
35831    # argument.
35832    path="$complete"
35833    arguments="EOL"
35834    new_path=`$CYGPATH -u "$path"`
35835    new_path=`$WHICH "$new_path" 2> /dev/null`
35836    # bat and cmd files are not always considered executable in cygwin causing which
35837    # to not find them
35838    if test "x$new_path" = x \
35839        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35840        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35841      new_path=`$CYGPATH -u "$path"`
35842    fi
35843    if test "x$new_path" = x; then
35844      # It's still not found. Now this is an unrecoverable error.
35845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35846$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35847      has_space=`$ECHO "$complete" | $GREP " "`
35848      if test "x$has_space" != x; then
35849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35851      fi
35852      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35853    fi
35854  fi
35855
35856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35859  # "foo.exe" is OK but "foo" is an error.
35860  #
35861  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35862  # It is also a way to make sure we got the proper file name for the real test later on.
35863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35864  if test "x$test_shortpath" = x; then
35865    # Short path failed, file does not exist as specified.
35866    # Try adding .exe or .cmd
35867    if test -f "${new_path}.exe"; then
35868      input_to_shortpath="${new_path}.exe"
35869    elif test -f "${new_path}.cmd"; then
35870      input_to_shortpath="${new_path}.cmd"
35871    else
35872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35873$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35874      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35875$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35876      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35877    fi
35878  else
35879    input_to_shortpath="$new_path"
35880  fi
35881
35882  # Call helper function which possibly converts this using DOS-style short mode.
35883  # If so, the updated path is stored in $new_path.
35884  new_path="$input_to_shortpath"
35885
35886  input_path="$input_to_shortpath"
35887  # Check if we need to convert this using DOS-style short mode. If the path
35888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35889  # take no chances and rewrite it.
35890  # Note: m4 eats our [], so we need to use [ and ] instead.
35891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35892  if test "x$has_forbidden_chars" != x; then
35893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35897      # Going to short mode and back again did indeed matter. Since short mode is
35898      # case insensitive, let's make it lowercase to improve readability.
35899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35900      # Now convert it back to Unix-stile (cygpath)
35901      input_path=`$CYGPATH -u "$shortmode_path"`
35902      new_path="$input_path"
35903    fi
35904  fi
35905
35906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35907  if test "x$test_cygdrive_prefix" = x; then
35908    # As a simple fix, exclude /usr/bin since it's not a real path.
35909    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35911      # a path prefixed by /cygdrive for fixpath to work.
35912      new_path="$CYGWIN_ROOT_PATH$input_path"
35913    fi
35914  fi
35915
35916  # remove trailing .exe if any
35917  new_path="${new_path/%.exe/}"
35918
35919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35920
35921  # First separate the path from the arguments. This will split at the first
35922  # space.
35923  complete="$NM"
35924  path="${complete%% *}"
35925  tmp="$complete EOL"
35926  arguments="${tmp#* }"
35927
35928  # Input might be given as Windows format, start by converting to
35929  # unix format.
35930  new_path="$path"
35931
35932  windows_path="$new_path"
35933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35934    unix_path=`$CYGPATH -u "$windows_path"`
35935    new_path="$unix_path"
35936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35938    new_path="$unix_path"
35939  fi
35940
35941
35942  # Now try to locate executable using which
35943  new_path=`$WHICH "$new_path" 2> /dev/null`
35944
35945  if test "x$new_path" = x; then
35946    # Oops. Which didn't find the executable.
35947    # The splitting of arguments from the executable at a space might have been incorrect,
35948    # since paths with space are more likely in Windows. Give it another try with the whole
35949    # argument.
35950    path="$complete"
35951    arguments="EOL"
35952    new_path="$path"
35953
35954  windows_path="$new_path"
35955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35956    unix_path=`$CYGPATH -u "$windows_path"`
35957    new_path="$unix_path"
35958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35960    new_path="$unix_path"
35961  fi
35962
35963
35964    new_path=`$WHICH "$new_path" 2> /dev/null`
35965    # bat and cmd files are not always considered executable in MSYS causing which
35966    # to not find them
35967    if test "x$new_path" = x \
35968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35970      new_path="$path"
35971
35972  windows_path="$new_path"
35973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35974    unix_path=`$CYGPATH -u "$windows_path"`
35975    new_path="$unix_path"
35976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35978    new_path="$unix_path"
35979  fi
35980
35981    fi
35982
35983    if test "x$new_path" = x; then
35984      # It's still not found. Now this is an unrecoverable error.
35985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35986$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35987      has_space=`$ECHO "$complete" | $GREP " "`
35988      if test "x$has_space" != x; then
35989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35991      fi
35992      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35993    fi
35994  fi
35995
35996  # Now new_path has a complete unix path to the binary
35997  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35998    # Keep paths in /bin as-is, but remove trailing .exe if any
35999    new_path="${new_path/%.exe/}"
36000    # Do not save /bin paths to all_fixpath_prefixes!
36001  else
36002    # Not in mixed or Windows style, start by that.
36003    new_path=`cmd //c echo $new_path`
36004
36005  input_path="$new_path"
36006  # Check if we need to convert this using DOS-style short mode. If the path
36007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36008  # take no chances and rewrite it.
36009  # Note: m4 eats our [], so we need to use [ and ] instead.
36010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36011  if test "x$has_forbidden_chars" != x; then
36012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36014  fi
36015
36016    # Output is in $new_path
36017
36018  windows_path="$new_path"
36019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36020    unix_path=`$CYGPATH -u "$windows_path"`
36021    new_path="$unix_path"
36022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36024    new_path="$unix_path"
36025  fi
36026
36027    # remove trailing .exe if any
36028    new_path="${new_path/%.exe/}"
36029
36030    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36031    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36032  fi
36033
36034    else
36035      # We're on a unix platform. Hooray! :)
36036      # First separate the path from the arguments. This will split at the first
36037      # space.
36038      complete="$NM"
36039      path="${complete%% *}"
36040      tmp="$complete EOL"
36041      arguments="${tmp#* }"
36042
36043      # Cannot rely on the command "which" here since it doesn't always work.
36044      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36045      if test -z "$is_absolute_path"; then
36046        # Path to executable is not absolute. Find it.
36047        IFS_save="$IFS"
36048        IFS=:
36049        for p in $PATH; do
36050          if test -f "$p/$path" && test -x "$p/$path"; then
36051            new_path="$p/$path"
36052            break
36053          fi
36054        done
36055        IFS="$IFS_save"
36056      else
36057        # This is an absolute path, we can use it without further modifications.
36058        new_path="$path"
36059      fi
36060
36061      if test "x$new_path" = x; then
36062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36063$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36064        has_space=`$ECHO "$complete" | $GREP " "`
36065        if test "x$has_space" != x; then
36066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36068        fi
36069        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36070      fi
36071    fi
36072
36073    # Now join together the path and the arguments once again
36074    if test "x$arguments" != xEOL; then
36075      new_complete="$new_path ${arguments% *}"
36076    else
36077      new_complete="$new_path"
36078    fi
36079
36080    if test "x$complete" != "x$new_complete"; then
36081      NM="$new_complete"
36082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36083$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36084    fi
36085  fi
36086
36087
36088
36089  # Publish this variable in the help.
36090
36091
36092  if test "x$GNM" = x; then
36093    # The variable is not set by user, try to locate tool using the code snippet
36094    for ac_prog in gnm
36095do
36096  # Extract the first word of "$ac_prog", so it can be a program name with args.
36097set dummy $ac_prog; ac_word=$2
36098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36099$as_echo_n "checking for $ac_word... " >&6; }
36100if ${ac_cv_path_GNM+:} false; then :
36101  $as_echo_n "(cached) " >&6
36102else
36103  case $GNM in
36104  [\\/]* | ?:[\\/]*)
36105  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36106  ;;
36107  *)
36108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36109for as_dir in $PATH
36110do
36111  IFS=$as_save_IFS
36112  test -z "$as_dir" && as_dir=.
36113    for ac_exec_ext in '' $ac_executable_extensions; do
36114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36115    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36117    break 2
36118  fi
36119done
36120  done
36121IFS=$as_save_IFS
36122
36123  ;;
36124esac
36125fi
36126GNM=$ac_cv_path_GNM
36127if test -n "$GNM"; then
36128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36129$as_echo "$GNM" >&6; }
36130else
36131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36132$as_echo "no" >&6; }
36133fi
36134
36135
36136  test -n "$GNM" && break
36137done
36138
36139  else
36140    # The variable is set, but is it from the command line or the environment?
36141
36142    # Try to remove the string !GNM! from our list.
36143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36145      # If it failed, the variable was not from the command line. Ignore it,
36146      # but warn the user (except for BASH, which is always set by the calling BASH).
36147      if test "xGNM" != xBASH; then
36148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36149$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36150      fi
36151      # Try to locate tool using the code snippet
36152      for ac_prog in gnm
36153do
36154  # Extract the first word of "$ac_prog", so it can be a program name with args.
36155set dummy $ac_prog; ac_word=$2
36156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36157$as_echo_n "checking for $ac_word... " >&6; }
36158if ${ac_cv_path_GNM+:} false; then :
36159  $as_echo_n "(cached) " >&6
36160else
36161  case $GNM in
36162  [\\/]* | ?:[\\/]*)
36163  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36164  ;;
36165  *)
36166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36167for as_dir in $PATH
36168do
36169  IFS=$as_save_IFS
36170  test -z "$as_dir" && as_dir=.
36171    for ac_exec_ext in '' $ac_executable_extensions; do
36172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36173    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36175    break 2
36176  fi
36177done
36178  done
36179IFS=$as_save_IFS
36180
36181  ;;
36182esac
36183fi
36184GNM=$ac_cv_path_GNM
36185if test -n "$GNM"; then
36186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36187$as_echo "$GNM" >&6; }
36188else
36189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36190$as_echo "no" >&6; }
36191fi
36192
36193
36194  test -n "$GNM" && break
36195done
36196
36197    else
36198      # If it succeeded, then it was overridden by the user. We will use it
36199      # for the tool.
36200
36201      # First remove it from the list of overridden variables, so we can test
36202      # for unknown variables in the end.
36203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36204
36205      # Check if the provided tool contains a complete path.
36206      tool_specified="$GNM"
36207      tool_basename="${tool_specified##*/}"
36208      if test "x$tool_basename" = "x$tool_specified"; then
36209        # A command without a complete path is provided, search $PATH.
36210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36211$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36212        # Extract the first word of "$tool_basename", so it can be a program name with args.
36213set dummy $tool_basename; ac_word=$2
36214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36215$as_echo_n "checking for $ac_word... " >&6; }
36216if ${ac_cv_path_GNM+:} false; then :
36217  $as_echo_n "(cached) " >&6
36218else
36219  case $GNM in
36220  [\\/]* | ?:[\\/]*)
36221  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36222  ;;
36223  *)
36224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36225for as_dir in $PATH
36226do
36227  IFS=$as_save_IFS
36228  test -z "$as_dir" && as_dir=.
36229    for ac_exec_ext in '' $ac_executable_extensions; do
36230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36231    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36233    break 2
36234  fi
36235done
36236  done
36237IFS=$as_save_IFS
36238
36239  ;;
36240esac
36241fi
36242GNM=$ac_cv_path_GNM
36243if test -n "$GNM"; then
36244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36245$as_echo "$GNM" >&6; }
36246else
36247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36248$as_echo "no" >&6; }
36249fi
36250
36251
36252        if test "x$GNM" = x; then
36253          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36254        fi
36255      else
36256        # Otherwise we believe it is a complete path. Use it as it is.
36257        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36258$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36260$as_echo_n "checking for GNM... " >&6; }
36261        if test ! -x "$tool_specified"; then
36262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36263$as_echo "not found" >&6; }
36264          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36265        fi
36266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36267$as_echo "$tool_specified" >&6; }
36268      fi
36269    fi
36270  fi
36271
36272
36273
36274  # Only process if variable expands to non-empty
36275
36276  if test "x$GNM" != x; then
36277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36278
36279  # First separate the path from the arguments. This will split at the first
36280  # space.
36281  complete="$GNM"
36282  path="${complete%% *}"
36283  tmp="$complete EOL"
36284  arguments="${tmp#* }"
36285
36286  # Input might be given as Windows format, start by converting to
36287  # unix format.
36288  new_path=`$CYGPATH -u "$path"`
36289
36290  # Now try to locate executable using which
36291  new_path=`$WHICH "$new_path" 2> /dev/null`
36292  # bat and cmd files are not always considered executable in cygwin causing which
36293  # to not find them
36294  if test "x$new_path" = x \
36295      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36296      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36297    new_path=`$CYGPATH -u "$path"`
36298  fi
36299  if test "x$new_path" = x; then
36300    # Oops. Which didn't find the executable.
36301    # The splitting of arguments from the executable at a space might have been incorrect,
36302    # since paths with space are more likely in Windows. Give it another try with the whole
36303    # argument.
36304    path="$complete"
36305    arguments="EOL"
36306    new_path=`$CYGPATH -u "$path"`
36307    new_path=`$WHICH "$new_path" 2> /dev/null`
36308    # bat and cmd files are not always considered executable in cygwin causing which
36309    # to not find them
36310    if test "x$new_path" = x \
36311        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36312        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36313      new_path=`$CYGPATH -u "$path"`
36314    fi
36315    if test "x$new_path" = x; then
36316      # It's still not found. Now this is an unrecoverable error.
36317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36318$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36319      has_space=`$ECHO "$complete" | $GREP " "`
36320      if test "x$has_space" != x; then
36321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36323      fi
36324      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36325    fi
36326  fi
36327
36328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36331  # "foo.exe" is OK but "foo" is an error.
36332  #
36333  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36334  # It is also a way to make sure we got the proper file name for the real test later on.
36335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36336  if test "x$test_shortpath" = x; then
36337    # Short path failed, file does not exist as specified.
36338    # Try adding .exe or .cmd
36339    if test -f "${new_path}.exe"; then
36340      input_to_shortpath="${new_path}.exe"
36341    elif test -f "${new_path}.cmd"; then
36342      input_to_shortpath="${new_path}.cmd"
36343    else
36344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36345$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36346      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36347$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36348      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36349    fi
36350  else
36351    input_to_shortpath="$new_path"
36352  fi
36353
36354  # Call helper function which possibly converts this using DOS-style short mode.
36355  # If so, the updated path is stored in $new_path.
36356  new_path="$input_to_shortpath"
36357
36358  input_path="$input_to_shortpath"
36359  # Check if we need to convert this using DOS-style short mode. If the path
36360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36361  # take no chances and rewrite it.
36362  # Note: m4 eats our [], so we need to use [ and ] instead.
36363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36364  if test "x$has_forbidden_chars" != x; then
36365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36369      # Going to short mode and back again did indeed matter. Since short mode is
36370      # case insensitive, let's make it lowercase to improve readability.
36371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36372      # Now convert it back to Unix-stile (cygpath)
36373      input_path=`$CYGPATH -u "$shortmode_path"`
36374      new_path="$input_path"
36375    fi
36376  fi
36377
36378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36379  if test "x$test_cygdrive_prefix" = x; then
36380    # As a simple fix, exclude /usr/bin since it's not a real path.
36381    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36383      # a path prefixed by /cygdrive for fixpath to work.
36384      new_path="$CYGWIN_ROOT_PATH$input_path"
36385    fi
36386  fi
36387
36388  # remove trailing .exe if any
36389  new_path="${new_path/%.exe/}"
36390
36391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36392
36393  # First separate the path from the arguments. This will split at the first
36394  # space.
36395  complete="$GNM"
36396  path="${complete%% *}"
36397  tmp="$complete EOL"
36398  arguments="${tmp#* }"
36399
36400  # Input might be given as Windows format, start by converting to
36401  # unix format.
36402  new_path="$path"
36403
36404  windows_path="$new_path"
36405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36406    unix_path=`$CYGPATH -u "$windows_path"`
36407    new_path="$unix_path"
36408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36410    new_path="$unix_path"
36411  fi
36412
36413
36414  # Now try to locate executable using which
36415  new_path=`$WHICH "$new_path" 2> /dev/null`
36416
36417  if test "x$new_path" = x; then
36418    # Oops. Which didn't find the executable.
36419    # The splitting of arguments from the executable at a space might have been incorrect,
36420    # since paths with space are more likely in Windows. Give it another try with the whole
36421    # argument.
36422    path="$complete"
36423    arguments="EOL"
36424    new_path="$path"
36425
36426  windows_path="$new_path"
36427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36428    unix_path=`$CYGPATH -u "$windows_path"`
36429    new_path="$unix_path"
36430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36432    new_path="$unix_path"
36433  fi
36434
36435
36436    new_path=`$WHICH "$new_path" 2> /dev/null`
36437    # bat and cmd files are not always considered executable in MSYS causing which
36438    # to not find them
36439    if test "x$new_path" = x \
36440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36442      new_path="$path"
36443
36444  windows_path="$new_path"
36445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36446    unix_path=`$CYGPATH -u "$windows_path"`
36447    new_path="$unix_path"
36448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36450    new_path="$unix_path"
36451  fi
36452
36453    fi
36454
36455    if test "x$new_path" = x; then
36456      # It's still not found. Now this is an unrecoverable error.
36457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36458$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36459      has_space=`$ECHO "$complete" | $GREP " "`
36460      if test "x$has_space" != x; then
36461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36463      fi
36464      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36465    fi
36466  fi
36467
36468  # Now new_path has a complete unix path to the binary
36469  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36470    # Keep paths in /bin as-is, but remove trailing .exe if any
36471    new_path="${new_path/%.exe/}"
36472    # Do not save /bin paths to all_fixpath_prefixes!
36473  else
36474    # Not in mixed or Windows style, start by that.
36475    new_path=`cmd //c echo $new_path`
36476
36477  input_path="$new_path"
36478  # Check if we need to convert this using DOS-style short mode. If the path
36479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36480  # take no chances and rewrite it.
36481  # Note: m4 eats our [], so we need to use [ and ] instead.
36482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36483  if test "x$has_forbidden_chars" != x; then
36484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36486  fi
36487
36488    # Output is in $new_path
36489
36490  windows_path="$new_path"
36491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36492    unix_path=`$CYGPATH -u "$windows_path"`
36493    new_path="$unix_path"
36494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36496    new_path="$unix_path"
36497  fi
36498
36499    # remove trailing .exe if any
36500    new_path="${new_path/%.exe/}"
36501
36502    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36503    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36504  fi
36505
36506    else
36507      # We're on a unix platform. Hooray! :)
36508      # First separate the path from the arguments. This will split at the first
36509      # space.
36510      complete="$GNM"
36511      path="${complete%% *}"
36512      tmp="$complete EOL"
36513      arguments="${tmp#* }"
36514
36515      # Cannot rely on the command "which" here since it doesn't always work.
36516      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36517      if test -z "$is_absolute_path"; then
36518        # Path to executable is not absolute. Find it.
36519        IFS_save="$IFS"
36520        IFS=:
36521        for p in $PATH; do
36522          if test -f "$p/$path" && test -x "$p/$path"; then
36523            new_path="$p/$path"
36524            break
36525          fi
36526        done
36527        IFS="$IFS_save"
36528      else
36529        # This is an absolute path, we can use it without further modifications.
36530        new_path="$path"
36531      fi
36532
36533      if test "x$new_path" = x; then
36534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36535$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36536        has_space=`$ECHO "$complete" | $GREP " "`
36537        if test "x$has_space" != x; then
36538          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36539$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36540        fi
36541        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36542      fi
36543    fi
36544
36545    # Now join together the path and the arguments once again
36546    if test "x$arguments" != xEOL; then
36547      new_complete="$new_path ${arguments% *}"
36548    else
36549      new_complete="$new_path"
36550    fi
36551
36552    if test "x$complete" != "x$new_complete"; then
36553      GNM="$new_complete"
36554      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36555$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36556    fi
36557  fi
36558
36559
36560
36561
36562  # Publish this variable in the help.
36563
36564
36565  if test "x$MCS" = x; then
36566    # The variable is not set by user, try to locate tool using the code snippet
36567    for ac_prog in mcs
36568do
36569  # Extract the first word of "$ac_prog", so it can be a program name with args.
36570set dummy $ac_prog; ac_word=$2
36571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36572$as_echo_n "checking for $ac_word... " >&6; }
36573if ${ac_cv_path_MCS+:} false; then :
36574  $as_echo_n "(cached) " >&6
36575else
36576  case $MCS in
36577  [\\/]* | ?:[\\/]*)
36578  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36579  ;;
36580  *)
36581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36582for as_dir in $PATH
36583do
36584  IFS=$as_save_IFS
36585  test -z "$as_dir" && as_dir=.
36586    for ac_exec_ext in '' $ac_executable_extensions; do
36587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36588    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36590    break 2
36591  fi
36592done
36593  done
36594IFS=$as_save_IFS
36595
36596  ;;
36597esac
36598fi
36599MCS=$ac_cv_path_MCS
36600if test -n "$MCS"; then
36601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36602$as_echo "$MCS" >&6; }
36603else
36604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36605$as_echo "no" >&6; }
36606fi
36607
36608
36609  test -n "$MCS" && break
36610done
36611
36612  else
36613    # The variable is set, but is it from the command line or the environment?
36614
36615    # Try to remove the string !MCS! from our list.
36616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36618      # If it failed, the variable was not from the command line. Ignore it,
36619      # but warn the user (except for BASH, which is always set by the calling BASH).
36620      if test "xMCS" != xBASH; then
36621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36622$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36623      fi
36624      # Try to locate tool using the code snippet
36625      for ac_prog in mcs
36626do
36627  # Extract the first word of "$ac_prog", so it can be a program name with args.
36628set dummy $ac_prog; ac_word=$2
36629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36630$as_echo_n "checking for $ac_word... " >&6; }
36631if ${ac_cv_path_MCS+:} false; then :
36632  $as_echo_n "(cached) " >&6
36633else
36634  case $MCS in
36635  [\\/]* | ?:[\\/]*)
36636  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36637  ;;
36638  *)
36639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36640for as_dir in $PATH
36641do
36642  IFS=$as_save_IFS
36643  test -z "$as_dir" && as_dir=.
36644    for ac_exec_ext in '' $ac_executable_extensions; do
36645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36646    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36648    break 2
36649  fi
36650done
36651  done
36652IFS=$as_save_IFS
36653
36654  ;;
36655esac
36656fi
36657MCS=$ac_cv_path_MCS
36658if test -n "$MCS"; then
36659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36660$as_echo "$MCS" >&6; }
36661else
36662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36663$as_echo "no" >&6; }
36664fi
36665
36666
36667  test -n "$MCS" && break
36668done
36669
36670    else
36671      # If it succeeded, then it was overridden by the user. We will use it
36672      # for the tool.
36673
36674      # First remove it from the list of overridden variables, so we can test
36675      # for unknown variables in the end.
36676      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36677
36678      # Check if the provided tool contains a complete path.
36679      tool_specified="$MCS"
36680      tool_basename="${tool_specified##*/}"
36681      if test "x$tool_basename" = "x$tool_specified"; then
36682        # A command without a complete path is provided, search $PATH.
36683        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36684$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36685        # Extract the first word of "$tool_basename", so it can be a program name with args.
36686set dummy $tool_basename; ac_word=$2
36687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36688$as_echo_n "checking for $ac_word... " >&6; }
36689if ${ac_cv_path_MCS+:} false; then :
36690  $as_echo_n "(cached) " >&6
36691else
36692  case $MCS in
36693  [\\/]* | ?:[\\/]*)
36694  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36695  ;;
36696  *)
36697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36698for as_dir in $PATH
36699do
36700  IFS=$as_save_IFS
36701  test -z "$as_dir" && as_dir=.
36702    for ac_exec_ext in '' $ac_executable_extensions; do
36703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36704    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36706    break 2
36707  fi
36708done
36709  done
36710IFS=$as_save_IFS
36711
36712  ;;
36713esac
36714fi
36715MCS=$ac_cv_path_MCS
36716if test -n "$MCS"; then
36717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36718$as_echo "$MCS" >&6; }
36719else
36720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36721$as_echo "no" >&6; }
36722fi
36723
36724
36725        if test "x$MCS" = x; then
36726          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36727        fi
36728      else
36729        # Otherwise we believe it is a complete path. Use it as it is.
36730        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36731$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36732        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36733$as_echo_n "checking for MCS... " >&6; }
36734        if test ! -x "$tool_specified"; then
36735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36736$as_echo "not found" >&6; }
36737          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36738        fi
36739        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36740$as_echo "$tool_specified" >&6; }
36741      fi
36742    fi
36743  fi
36744
36745
36746
36747  # Only process if variable expands to non-empty
36748
36749  if test "x$MCS" != x; then
36750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36751
36752  # First separate the path from the arguments. This will split at the first
36753  # space.
36754  complete="$MCS"
36755  path="${complete%% *}"
36756  tmp="$complete EOL"
36757  arguments="${tmp#* }"
36758
36759  # Input might be given as Windows format, start by converting to
36760  # unix format.
36761  new_path=`$CYGPATH -u "$path"`
36762
36763  # Now try to locate executable using which
36764  new_path=`$WHICH "$new_path" 2> /dev/null`
36765  # bat and cmd files are not always considered executable in cygwin causing which
36766  # to not find them
36767  if test "x$new_path" = x \
36768      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36769      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36770    new_path=`$CYGPATH -u "$path"`
36771  fi
36772  if test "x$new_path" = x; then
36773    # Oops. Which didn't find the executable.
36774    # The splitting of arguments from the executable at a space might have been incorrect,
36775    # since paths with space are more likely in Windows. Give it another try with the whole
36776    # argument.
36777    path="$complete"
36778    arguments="EOL"
36779    new_path=`$CYGPATH -u "$path"`
36780    new_path=`$WHICH "$new_path" 2> /dev/null`
36781    # bat and cmd files are not always considered executable in cygwin causing which
36782    # to not find them
36783    if test "x$new_path" = x \
36784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36786      new_path=`$CYGPATH -u "$path"`
36787    fi
36788    if test "x$new_path" = x; then
36789      # It's still not found. Now this is an unrecoverable error.
36790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36791$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36792      has_space=`$ECHO "$complete" | $GREP " "`
36793      if test "x$has_space" != x; then
36794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36796      fi
36797      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36798    fi
36799  fi
36800
36801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36804  # "foo.exe" is OK but "foo" is an error.
36805  #
36806  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36807  # It is also a way to make sure we got the proper file name for the real test later on.
36808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36809  if test "x$test_shortpath" = x; then
36810    # Short path failed, file does not exist as specified.
36811    # Try adding .exe or .cmd
36812    if test -f "${new_path}.exe"; then
36813      input_to_shortpath="${new_path}.exe"
36814    elif test -f "${new_path}.cmd"; then
36815      input_to_shortpath="${new_path}.cmd"
36816    else
36817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36818$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36821      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36822    fi
36823  else
36824    input_to_shortpath="$new_path"
36825  fi
36826
36827  # Call helper function which possibly converts this using DOS-style short mode.
36828  # If so, the updated path is stored in $new_path.
36829  new_path="$input_to_shortpath"
36830
36831  input_path="$input_to_shortpath"
36832  # Check if we need to convert this using DOS-style short mode. If the path
36833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36834  # take no chances and rewrite it.
36835  # Note: m4 eats our [], so we need to use [ and ] instead.
36836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36837  if test "x$has_forbidden_chars" != x; then
36838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36842      # Going to short mode and back again did indeed matter. Since short mode is
36843      # case insensitive, let's make it lowercase to improve readability.
36844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36845      # Now convert it back to Unix-stile (cygpath)
36846      input_path=`$CYGPATH -u "$shortmode_path"`
36847      new_path="$input_path"
36848    fi
36849  fi
36850
36851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36852  if test "x$test_cygdrive_prefix" = x; then
36853    # As a simple fix, exclude /usr/bin since it's not a real path.
36854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36856      # a path prefixed by /cygdrive for fixpath to work.
36857      new_path="$CYGWIN_ROOT_PATH$input_path"
36858    fi
36859  fi
36860
36861  # remove trailing .exe if any
36862  new_path="${new_path/%.exe/}"
36863
36864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36865
36866  # First separate the path from the arguments. This will split at the first
36867  # space.
36868  complete="$MCS"
36869  path="${complete%% *}"
36870  tmp="$complete EOL"
36871  arguments="${tmp#* }"
36872
36873  # Input might be given as Windows format, start by converting to
36874  # unix format.
36875  new_path="$path"
36876
36877  windows_path="$new_path"
36878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36879    unix_path=`$CYGPATH -u "$windows_path"`
36880    new_path="$unix_path"
36881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36883    new_path="$unix_path"
36884  fi
36885
36886
36887  # Now try to locate executable using which
36888  new_path=`$WHICH "$new_path" 2> /dev/null`
36889
36890  if test "x$new_path" = x; then
36891    # Oops. Which didn't find the executable.
36892    # The splitting of arguments from the executable at a space might have been incorrect,
36893    # since paths with space are more likely in Windows. Give it another try with the whole
36894    # argument.
36895    path="$complete"
36896    arguments="EOL"
36897    new_path="$path"
36898
36899  windows_path="$new_path"
36900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36901    unix_path=`$CYGPATH -u "$windows_path"`
36902    new_path="$unix_path"
36903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36905    new_path="$unix_path"
36906  fi
36907
36908
36909    new_path=`$WHICH "$new_path" 2> /dev/null`
36910    # bat and cmd files are not always considered executable in MSYS causing which
36911    # to not find them
36912    if test "x$new_path" = x \
36913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36915      new_path="$path"
36916
36917  windows_path="$new_path"
36918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36919    unix_path=`$CYGPATH -u "$windows_path"`
36920    new_path="$unix_path"
36921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36923    new_path="$unix_path"
36924  fi
36925
36926    fi
36927
36928    if test "x$new_path" = x; then
36929      # It's still not found. Now this is an unrecoverable error.
36930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36931$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36932      has_space=`$ECHO "$complete" | $GREP " "`
36933      if test "x$has_space" != x; then
36934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36936      fi
36937      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36938    fi
36939  fi
36940
36941  # Now new_path has a complete unix path to the binary
36942  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36943    # Keep paths in /bin as-is, but remove trailing .exe if any
36944    new_path="${new_path/%.exe/}"
36945    # Do not save /bin paths to all_fixpath_prefixes!
36946  else
36947    # Not in mixed or Windows style, start by that.
36948    new_path=`cmd //c echo $new_path`
36949
36950  input_path="$new_path"
36951  # Check if we need to convert this using DOS-style short mode. If the path
36952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36953  # take no chances and rewrite it.
36954  # Note: m4 eats our [], so we need to use [ and ] instead.
36955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36956  if test "x$has_forbidden_chars" != x; then
36957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36959  fi
36960
36961    # Output is in $new_path
36962
36963  windows_path="$new_path"
36964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36965    unix_path=`$CYGPATH -u "$windows_path"`
36966    new_path="$unix_path"
36967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36969    new_path="$unix_path"
36970  fi
36971
36972    # remove trailing .exe if any
36973    new_path="${new_path/%.exe/}"
36974
36975    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36976    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36977  fi
36978
36979    else
36980      # We're on a unix platform. Hooray! :)
36981      # First separate the path from the arguments. This will split at the first
36982      # space.
36983      complete="$MCS"
36984      path="${complete%% *}"
36985      tmp="$complete EOL"
36986      arguments="${tmp#* }"
36987
36988      # Cannot rely on the command "which" here since it doesn't always work.
36989      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36990      if test -z "$is_absolute_path"; then
36991        # Path to executable is not absolute. Find it.
36992        IFS_save="$IFS"
36993        IFS=:
36994        for p in $PATH; do
36995          if test -f "$p/$path" && test -x "$p/$path"; then
36996            new_path="$p/$path"
36997            break
36998          fi
36999        done
37000        IFS="$IFS_save"
37001      else
37002        # This is an absolute path, we can use it without further modifications.
37003        new_path="$path"
37004      fi
37005
37006      if test "x$new_path" = x; then
37007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37008$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37009        has_space=`$ECHO "$complete" | $GREP " "`
37010        if test "x$has_space" != x; then
37011          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37013        fi
37014        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37015      fi
37016    fi
37017
37018    # Now join together the path and the arguments once again
37019    if test "x$arguments" != xEOL; then
37020      new_complete="$new_path ${arguments% *}"
37021    else
37022      new_complete="$new_path"
37023    fi
37024
37025    if test "x$complete" != "x$new_complete"; then
37026      MCS="$new_complete"
37027      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37028$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37029    fi
37030  fi
37031
37032  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37033    # FIXME: we should unify this with the solaris case above.
37034
37035
37036  # Publish this variable in the help.
37037
37038
37039  if test "x$STRIP" = x; then
37040    # The variable is not set by user, try to locate tool using the code snippet
37041    if test -n "$ac_tool_prefix"; then
37042  for ac_prog in strip
37043  do
37044    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37047$as_echo_n "checking for $ac_word... " >&6; }
37048if ${ac_cv_prog_STRIP+:} false; then :
37049  $as_echo_n "(cached) " >&6
37050else
37051  if test -n "$STRIP"; then
37052  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37053else
37054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37055for as_dir in $PATH
37056do
37057  IFS=$as_save_IFS
37058  test -z "$as_dir" && as_dir=.
37059    for ac_exec_ext in '' $ac_executable_extensions; do
37060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37061    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37063    break 2
37064  fi
37065done
37066  done
37067IFS=$as_save_IFS
37068
37069fi
37070fi
37071STRIP=$ac_cv_prog_STRIP
37072if test -n "$STRIP"; then
37073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37074$as_echo "$STRIP" >&6; }
37075else
37076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37077$as_echo "no" >&6; }
37078fi
37079
37080
37081    test -n "$STRIP" && break
37082  done
37083fi
37084if test -z "$STRIP"; then
37085  ac_ct_STRIP=$STRIP
37086  for ac_prog in strip
37087do
37088  # Extract the first word of "$ac_prog", so it can be a program name with args.
37089set dummy $ac_prog; ac_word=$2
37090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37091$as_echo_n "checking for $ac_word... " >&6; }
37092if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37093  $as_echo_n "(cached) " >&6
37094else
37095  if test -n "$ac_ct_STRIP"; then
37096  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37097else
37098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37099for as_dir in $PATH
37100do
37101  IFS=$as_save_IFS
37102  test -z "$as_dir" && as_dir=.
37103    for ac_exec_ext in '' $ac_executable_extensions; do
37104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37105    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37107    break 2
37108  fi
37109done
37110  done
37111IFS=$as_save_IFS
37112
37113fi
37114fi
37115ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37116if test -n "$ac_ct_STRIP"; then
37117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37118$as_echo "$ac_ct_STRIP" >&6; }
37119else
37120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37121$as_echo "no" >&6; }
37122fi
37123
37124
37125  test -n "$ac_ct_STRIP" && break
37126done
37127
37128  if test "x$ac_ct_STRIP" = x; then
37129    STRIP=""
37130  else
37131    case $cross_compiling:$ac_tool_warned in
37132yes:)
37133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37135ac_tool_warned=yes ;;
37136esac
37137    STRIP=$ac_ct_STRIP
37138  fi
37139fi
37140
37141  else
37142    # The variable is set, but is it from the command line or the environment?
37143
37144    # Try to remove the string !STRIP! from our list.
37145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37147      # If it failed, the variable was not from the command line. Ignore it,
37148      # but warn the user (except for BASH, which is always set by the calling BASH).
37149      if test "xSTRIP" != xBASH; then
37150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37151$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37152      fi
37153      # Try to locate tool using the code snippet
37154      if test -n "$ac_tool_prefix"; then
37155  for ac_prog in strip
37156  do
37157    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37158set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37160$as_echo_n "checking for $ac_word... " >&6; }
37161if ${ac_cv_prog_STRIP+:} false; then :
37162  $as_echo_n "(cached) " >&6
37163else
37164  if test -n "$STRIP"; then
37165  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37166else
37167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37168for as_dir in $PATH
37169do
37170  IFS=$as_save_IFS
37171  test -z "$as_dir" && as_dir=.
37172    for ac_exec_ext in '' $ac_executable_extensions; do
37173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37174    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37176    break 2
37177  fi
37178done
37179  done
37180IFS=$as_save_IFS
37181
37182fi
37183fi
37184STRIP=$ac_cv_prog_STRIP
37185if test -n "$STRIP"; then
37186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37187$as_echo "$STRIP" >&6; }
37188else
37189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37190$as_echo "no" >&6; }
37191fi
37192
37193
37194    test -n "$STRIP" && break
37195  done
37196fi
37197if test -z "$STRIP"; then
37198  ac_ct_STRIP=$STRIP
37199  for ac_prog in strip
37200do
37201  # Extract the first word of "$ac_prog", so it can be a program name with args.
37202set dummy $ac_prog; ac_word=$2
37203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37204$as_echo_n "checking for $ac_word... " >&6; }
37205if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37206  $as_echo_n "(cached) " >&6
37207else
37208  if test -n "$ac_ct_STRIP"; then
37209  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37210else
37211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37212for as_dir in $PATH
37213do
37214  IFS=$as_save_IFS
37215  test -z "$as_dir" && as_dir=.
37216    for ac_exec_ext in '' $ac_executable_extensions; do
37217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37218    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37220    break 2
37221  fi
37222done
37223  done
37224IFS=$as_save_IFS
37225
37226fi
37227fi
37228ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37229if test -n "$ac_ct_STRIP"; then
37230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37231$as_echo "$ac_ct_STRIP" >&6; }
37232else
37233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37234$as_echo "no" >&6; }
37235fi
37236
37237
37238  test -n "$ac_ct_STRIP" && break
37239done
37240
37241  if test "x$ac_ct_STRIP" = x; then
37242    STRIP=""
37243  else
37244    case $cross_compiling:$ac_tool_warned in
37245yes:)
37246{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37247$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37248ac_tool_warned=yes ;;
37249esac
37250    STRIP=$ac_ct_STRIP
37251  fi
37252fi
37253
37254    else
37255      # If it succeeded, then it was overridden by the user. We will use it
37256      # for the tool.
37257
37258      # First remove it from the list of overridden variables, so we can test
37259      # for unknown variables in the end.
37260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37261
37262      # Check if the provided tool contains a complete path.
37263      tool_specified="$STRIP"
37264      tool_basename="${tool_specified##*/}"
37265      if test "x$tool_basename" = "x$tool_specified"; then
37266        # A command without a complete path is provided, search $PATH.
37267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37268$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37269        # Extract the first word of "$tool_basename", so it can be a program name with args.
37270set dummy $tool_basename; ac_word=$2
37271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37272$as_echo_n "checking for $ac_word... " >&6; }
37273if ${ac_cv_path_STRIP+:} false; then :
37274  $as_echo_n "(cached) " >&6
37275else
37276  case $STRIP in
37277  [\\/]* | ?:[\\/]*)
37278  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37279  ;;
37280  *)
37281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37282for as_dir in $PATH
37283do
37284  IFS=$as_save_IFS
37285  test -z "$as_dir" && as_dir=.
37286    for ac_exec_ext in '' $ac_executable_extensions; do
37287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37288    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37290    break 2
37291  fi
37292done
37293  done
37294IFS=$as_save_IFS
37295
37296  ;;
37297esac
37298fi
37299STRIP=$ac_cv_path_STRIP
37300if test -n "$STRIP"; then
37301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37302$as_echo "$STRIP" >&6; }
37303else
37304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37305$as_echo "no" >&6; }
37306fi
37307
37308
37309        if test "x$STRIP" = x; then
37310          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37311        fi
37312      else
37313        # Otherwise we believe it is a complete path. Use it as it is.
37314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37315$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37317$as_echo_n "checking for STRIP... " >&6; }
37318        if test ! -x "$tool_specified"; then
37319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37320$as_echo "not found" >&6; }
37321          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37322        fi
37323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37324$as_echo "$tool_specified" >&6; }
37325      fi
37326    fi
37327  fi
37328
37329
37330
37331  # Only process if variable expands to non-empty
37332
37333  if test "x$STRIP" != x; then
37334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37335
37336  # First separate the path from the arguments. This will split at the first
37337  # space.
37338  complete="$STRIP"
37339  path="${complete%% *}"
37340  tmp="$complete EOL"
37341  arguments="${tmp#* }"
37342
37343  # Input might be given as Windows format, start by converting to
37344  # unix format.
37345  new_path=`$CYGPATH -u "$path"`
37346
37347  # Now try to locate executable using which
37348  new_path=`$WHICH "$new_path" 2> /dev/null`
37349  # bat and cmd files are not always considered executable in cygwin causing which
37350  # to not find them
37351  if test "x$new_path" = x \
37352      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37353      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37354    new_path=`$CYGPATH -u "$path"`
37355  fi
37356  if test "x$new_path" = x; then
37357    # Oops. Which didn't find the executable.
37358    # The splitting of arguments from the executable at a space might have been incorrect,
37359    # since paths with space are more likely in Windows. Give it another try with the whole
37360    # argument.
37361    path="$complete"
37362    arguments="EOL"
37363    new_path=`$CYGPATH -u "$path"`
37364    new_path=`$WHICH "$new_path" 2> /dev/null`
37365    # bat and cmd files are not always considered executable in cygwin causing which
37366    # to not find them
37367    if test "x$new_path" = x \
37368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37370      new_path=`$CYGPATH -u "$path"`
37371    fi
37372    if test "x$new_path" = x; then
37373      # It's still not found. Now this is an unrecoverable error.
37374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37375$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37376      has_space=`$ECHO "$complete" | $GREP " "`
37377      if test "x$has_space" != x; then
37378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37380      fi
37381      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37382    fi
37383  fi
37384
37385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37388  # "foo.exe" is OK but "foo" is an error.
37389  #
37390  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37391  # It is also a way to make sure we got the proper file name for the real test later on.
37392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37393  if test "x$test_shortpath" = x; then
37394    # Short path failed, file does not exist as specified.
37395    # Try adding .exe or .cmd
37396    if test -f "${new_path}.exe"; then
37397      input_to_shortpath="${new_path}.exe"
37398    elif test -f "${new_path}.cmd"; then
37399      input_to_shortpath="${new_path}.cmd"
37400    else
37401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37402$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37405      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37406    fi
37407  else
37408    input_to_shortpath="$new_path"
37409  fi
37410
37411  # Call helper function which possibly converts this using DOS-style short mode.
37412  # If so, the updated path is stored in $new_path.
37413  new_path="$input_to_shortpath"
37414
37415  input_path="$input_to_shortpath"
37416  # Check if we need to convert this using DOS-style short mode. If the path
37417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37418  # take no chances and rewrite it.
37419  # Note: m4 eats our [], so we need to use [ and ] instead.
37420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37421  if test "x$has_forbidden_chars" != x; then
37422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37426      # Going to short mode and back again did indeed matter. Since short mode is
37427      # case insensitive, let's make it lowercase to improve readability.
37428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37429      # Now convert it back to Unix-stile (cygpath)
37430      input_path=`$CYGPATH -u "$shortmode_path"`
37431      new_path="$input_path"
37432    fi
37433  fi
37434
37435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37436  if test "x$test_cygdrive_prefix" = x; then
37437    # As a simple fix, exclude /usr/bin since it's not a real path.
37438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37440      # a path prefixed by /cygdrive for fixpath to work.
37441      new_path="$CYGWIN_ROOT_PATH$input_path"
37442    fi
37443  fi
37444
37445  # remove trailing .exe if any
37446  new_path="${new_path/%.exe/}"
37447
37448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37449
37450  # First separate the path from the arguments. This will split at the first
37451  # space.
37452  complete="$STRIP"
37453  path="${complete%% *}"
37454  tmp="$complete EOL"
37455  arguments="${tmp#* }"
37456
37457  # Input might be given as Windows format, start by converting to
37458  # unix format.
37459  new_path="$path"
37460
37461  windows_path="$new_path"
37462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37463    unix_path=`$CYGPATH -u "$windows_path"`
37464    new_path="$unix_path"
37465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37467    new_path="$unix_path"
37468  fi
37469
37470
37471  # Now try to locate executable using which
37472  new_path=`$WHICH "$new_path" 2> /dev/null`
37473
37474  if test "x$new_path" = x; then
37475    # Oops. Which didn't find the executable.
37476    # The splitting of arguments from the executable at a space might have been incorrect,
37477    # since paths with space are more likely in Windows. Give it another try with the whole
37478    # argument.
37479    path="$complete"
37480    arguments="EOL"
37481    new_path="$path"
37482
37483  windows_path="$new_path"
37484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37485    unix_path=`$CYGPATH -u "$windows_path"`
37486    new_path="$unix_path"
37487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37489    new_path="$unix_path"
37490  fi
37491
37492
37493    new_path=`$WHICH "$new_path" 2> /dev/null`
37494    # bat and cmd files are not always considered executable in MSYS causing which
37495    # to not find them
37496    if test "x$new_path" = x \
37497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37499      new_path="$path"
37500
37501  windows_path="$new_path"
37502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37503    unix_path=`$CYGPATH -u "$windows_path"`
37504    new_path="$unix_path"
37505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37507    new_path="$unix_path"
37508  fi
37509
37510    fi
37511
37512    if test "x$new_path" = x; then
37513      # It's still not found. Now this is an unrecoverable error.
37514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37515$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37516      has_space=`$ECHO "$complete" | $GREP " "`
37517      if test "x$has_space" != x; then
37518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37520      fi
37521      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37522    fi
37523  fi
37524
37525  # Now new_path has a complete unix path to the binary
37526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37527    # Keep paths in /bin as-is, but remove trailing .exe if any
37528    new_path="${new_path/%.exe/}"
37529    # Do not save /bin paths to all_fixpath_prefixes!
37530  else
37531    # Not in mixed or Windows style, start by that.
37532    new_path=`cmd //c echo $new_path`
37533
37534  input_path="$new_path"
37535  # Check if we need to convert this using DOS-style short mode. If the path
37536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37537  # take no chances and rewrite it.
37538  # Note: m4 eats our [], so we need to use [ and ] instead.
37539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37540  if test "x$has_forbidden_chars" != x; then
37541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37543  fi
37544
37545    # Output is in $new_path
37546
37547  windows_path="$new_path"
37548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37549    unix_path=`$CYGPATH -u "$windows_path"`
37550    new_path="$unix_path"
37551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37553    new_path="$unix_path"
37554  fi
37555
37556    # remove trailing .exe if any
37557    new_path="${new_path/%.exe/}"
37558
37559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37561  fi
37562
37563    else
37564      # We're on a unix platform. Hooray! :)
37565      # First separate the path from the arguments. This will split at the first
37566      # space.
37567      complete="$STRIP"
37568      path="${complete%% *}"
37569      tmp="$complete EOL"
37570      arguments="${tmp#* }"
37571
37572      # Cannot rely on the command "which" here since it doesn't always work.
37573      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37574      if test -z "$is_absolute_path"; then
37575        # Path to executable is not absolute. Find it.
37576        IFS_save="$IFS"
37577        IFS=:
37578        for p in $PATH; do
37579          if test -f "$p/$path" && test -x "$p/$path"; then
37580            new_path="$p/$path"
37581            break
37582          fi
37583        done
37584        IFS="$IFS_save"
37585      else
37586        # This is an absolute path, we can use it without further modifications.
37587        new_path="$path"
37588      fi
37589
37590      if test "x$new_path" = x; then
37591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37592$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37593        has_space=`$ECHO "$complete" | $GREP " "`
37594        if test "x$has_space" != x; then
37595          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37597        fi
37598        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37599      fi
37600    fi
37601
37602    # Now join together the path and the arguments once again
37603    if test "x$arguments" != xEOL; then
37604      new_complete="$new_path ${arguments% *}"
37605    else
37606      new_complete="$new_path"
37607    fi
37608
37609    if test "x$complete" != "x$new_complete"; then
37610      STRIP="$new_complete"
37611      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37612$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37613    fi
37614  fi
37615
37616
37617
37618  # Publish this variable in the help.
37619
37620
37621  if test "x$NM" = x; then
37622    # The variable is not set by user, try to locate tool using the code snippet
37623    if test -n "$ac_tool_prefix"; then
37624  for ac_prog in nm
37625  do
37626    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37627set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37629$as_echo_n "checking for $ac_word... " >&6; }
37630if ${ac_cv_prog_NM+:} false; then :
37631  $as_echo_n "(cached) " >&6
37632else
37633  if test -n "$NM"; then
37634  ac_cv_prog_NM="$NM" # Let the user override the test.
37635else
37636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37637for as_dir in $PATH
37638do
37639  IFS=$as_save_IFS
37640  test -z "$as_dir" && as_dir=.
37641    for ac_exec_ext in '' $ac_executable_extensions; do
37642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37643    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37645    break 2
37646  fi
37647done
37648  done
37649IFS=$as_save_IFS
37650
37651fi
37652fi
37653NM=$ac_cv_prog_NM
37654if test -n "$NM"; then
37655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37656$as_echo "$NM" >&6; }
37657else
37658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37659$as_echo "no" >&6; }
37660fi
37661
37662
37663    test -n "$NM" && break
37664  done
37665fi
37666if test -z "$NM"; then
37667  ac_ct_NM=$NM
37668  for ac_prog in nm
37669do
37670  # Extract the first word of "$ac_prog", so it can be a program name with args.
37671set dummy $ac_prog; ac_word=$2
37672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37673$as_echo_n "checking for $ac_word... " >&6; }
37674if ${ac_cv_prog_ac_ct_NM+:} false; then :
37675  $as_echo_n "(cached) " >&6
37676else
37677  if test -n "$ac_ct_NM"; then
37678  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37679else
37680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37681for as_dir in $PATH
37682do
37683  IFS=$as_save_IFS
37684  test -z "$as_dir" && as_dir=.
37685    for ac_exec_ext in '' $ac_executable_extensions; do
37686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37687    ac_cv_prog_ac_ct_NM="$ac_prog"
37688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37689    break 2
37690  fi
37691done
37692  done
37693IFS=$as_save_IFS
37694
37695fi
37696fi
37697ac_ct_NM=$ac_cv_prog_ac_ct_NM
37698if test -n "$ac_ct_NM"; then
37699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37700$as_echo "$ac_ct_NM" >&6; }
37701else
37702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37703$as_echo "no" >&6; }
37704fi
37705
37706
37707  test -n "$ac_ct_NM" && break
37708done
37709
37710  if test "x$ac_ct_NM" = x; then
37711    NM=""
37712  else
37713    case $cross_compiling:$ac_tool_warned in
37714yes:)
37715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37717ac_tool_warned=yes ;;
37718esac
37719    NM=$ac_ct_NM
37720  fi
37721fi
37722
37723  else
37724    # The variable is set, but is it from the command line or the environment?
37725
37726    # Try to remove the string !NM! from our list.
37727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37729      # If it failed, the variable was not from the command line. Ignore it,
37730      # but warn the user (except for BASH, which is always set by the calling BASH).
37731      if test "xNM" != xBASH; then
37732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37733$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37734      fi
37735      # Try to locate tool using the code snippet
37736      if test -n "$ac_tool_prefix"; then
37737  for ac_prog in nm
37738  do
37739    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37740set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37742$as_echo_n "checking for $ac_word... " >&6; }
37743if ${ac_cv_prog_NM+:} false; then :
37744  $as_echo_n "(cached) " >&6
37745else
37746  if test -n "$NM"; then
37747  ac_cv_prog_NM="$NM" # Let the user override the test.
37748else
37749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37750for as_dir in $PATH
37751do
37752  IFS=$as_save_IFS
37753  test -z "$as_dir" && as_dir=.
37754    for ac_exec_ext in '' $ac_executable_extensions; do
37755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37756    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37758    break 2
37759  fi
37760done
37761  done
37762IFS=$as_save_IFS
37763
37764fi
37765fi
37766NM=$ac_cv_prog_NM
37767if test -n "$NM"; then
37768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37769$as_echo "$NM" >&6; }
37770else
37771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37772$as_echo "no" >&6; }
37773fi
37774
37775
37776    test -n "$NM" && break
37777  done
37778fi
37779if test -z "$NM"; then
37780  ac_ct_NM=$NM
37781  for ac_prog in nm
37782do
37783  # Extract the first word of "$ac_prog", so it can be a program name with args.
37784set dummy $ac_prog; ac_word=$2
37785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37786$as_echo_n "checking for $ac_word... " >&6; }
37787if ${ac_cv_prog_ac_ct_NM+:} false; then :
37788  $as_echo_n "(cached) " >&6
37789else
37790  if test -n "$ac_ct_NM"; then
37791  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37792else
37793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37794for as_dir in $PATH
37795do
37796  IFS=$as_save_IFS
37797  test -z "$as_dir" && as_dir=.
37798    for ac_exec_ext in '' $ac_executable_extensions; do
37799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37800    ac_cv_prog_ac_ct_NM="$ac_prog"
37801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37802    break 2
37803  fi
37804done
37805  done
37806IFS=$as_save_IFS
37807
37808fi
37809fi
37810ac_ct_NM=$ac_cv_prog_ac_ct_NM
37811if test -n "$ac_ct_NM"; then
37812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37813$as_echo "$ac_ct_NM" >&6; }
37814else
37815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37816$as_echo "no" >&6; }
37817fi
37818
37819
37820  test -n "$ac_ct_NM" && break
37821done
37822
37823  if test "x$ac_ct_NM" = x; then
37824    NM=""
37825  else
37826    case $cross_compiling:$ac_tool_warned in
37827yes:)
37828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37830ac_tool_warned=yes ;;
37831esac
37832    NM=$ac_ct_NM
37833  fi
37834fi
37835
37836    else
37837      # If it succeeded, then it was overridden by the user. We will use it
37838      # for the tool.
37839
37840      # First remove it from the list of overridden variables, so we can test
37841      # for unknown variables in the end.
37842      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37843
37844      # Check if the provided tool contains a complete path.
37845      tool_specified="$NM"
37846      tool_basename="${tool_specified##*/}"
37847      if test "x$tool_basename" = "x$tool_specified"; then
37848        # A command without a complete path is provided, search $PATH.
37849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37850$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37851        # Extract the first word of "$tool_basename", so it can be a program name with args.
37852set dummy $tool_basename; ac_word=$2
37853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37854$as_echo_n "checking for $ac_word... " >&6; }
37855if ${ac_cv_path_NM+:} false; then :
37856  $as_echo_n "(cached) " >&6
37857else
37858  case $NM in
37859  [\\/]* | ?:[\\/]*)
37860  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37861  ;;
37862  *)
37863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37864for as_dir in $PATH
37865do
37866  IFS=$as_save_IFS
37867  test -z "$as_dir" && as_dir=.
37868    for ac_exec_ext in '' $ac_executable_extensions; do
37869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37870    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37872    break 2
37873  fi
37874done
37875  done
37876IFS=$as_save_IFS
37877
37878  ;;
37879esac
37880fi
37881NM=$ac_cv_path_NM
37882if test -n "$NM"; then
37883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37884$as_echo "$NM" >&6; }
37885else
37886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37887$as_echo "no" >&6; }
37888fi
37889
37890
37891        if test "x$NM" = x; then
37892          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37893        fi
37894      else
37895        # Otherwise we believe it is a complete path. Use it as it is.
37896        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37897$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37899$as_echo_n "checking for NM... " >&6; }
37900        if test ! -x "$tool_specified"; then
37901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37902$as_echo "not found" >&6; }
37903          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37904        fi
37905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37906$as_echo "$tool_specified" >&6; }
37907      fi
37908    fi
37909  fi
37910
37911
37912
37913  # Only process if variable expands to non-empty
37914
37915  if test "x$NM" != x; then
37916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37917
37918  # First separate the path from the arguments. This will split at the first
37919  # space.
37920  complete="$NM"
37921  path="${complete%% *}"
37922  tmp="$complete EOL"
37923  arguments="${tmp#* }"
37924
37925  # Input might be given as Windows format, start by converting to
37926  # unix format.
37927  new_path=`$CYGPATH -u "$path"`
37928
37929  # Now try to locate executable using which
37930  new_path=`$WHICH "$new_path" 2> /dev/null`
37931  # bat and cmd files are not always considered executable in cygwin causing which
37932  # to not find them
37933  if test "x$new_path" = x \
37934      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37935      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37936    new_path=`$CYGPATH -u "$path"`
37937  fi
37938  if test "x$new_path" = x; then
37939    # Oops. Which didn't find the executable.
37940    # The splitting of arguments from the executable at a space might have been incorrect,
37941    # since paths with space are more likely in Windows. Give it another try with the whole
37942    # argument.
37943    path="$complete"
37944    arguments="EOL"
37945    new_path=`$CYGPATH -u "$path"`
37946    new_path=`$WHICH "$new_path" 2> /dev/null`
37947    # bat and cmd files are not always considered executable in cygwin causing which
37948    # to not find them
37949    if test "x$new_path" = x \
37950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37952      new_path=`$CYGPATH -u "$path"`
37953    fi
37954    if test "x$new_path" = x; then
37955      # It's still not found. Now this is an unrecoverable error.
37956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37957$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37958      has_space=`$ECHO "$complete" | $GREP " "`
37959      if test "x$has_space" != x; then
37960        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37961$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37962      fi
37963      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37964    fi
37965  fi
37966
37967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37970  # "foo.exe" is OK but "foo" is an error.
37971  #
37972  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37973  # It is also a way to make sure we got the proper file name for the real test later on.
37974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37975  if test "x$test_shortpath" = x; then
37976    # Short path failed, file does not exist as specified.
37977    # Try adding .exe or .cmd
37978    if test -f "${new_path}.exe"; then
37979      input_to_shortpath="${new_path}.exe"
37980    elif test -f "${new_path}.cmd"; then
37981      input_to_shortpath="${new_path}.cmd"
37982    else
37983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37984$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37985      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37986$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37987      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37988    fi
37989  else
37990    input_to_shortpath="$new_path"
37991  fi
37992
37993  # Call helper function which possibly converts this using DOS-style short mode.
37994  # If so, the updated path is stored in $new_path.
37995  new_path="$input_to_shortpath"
37996
37997  input_path="$input_to_shortpath"
37998  # Check if we need to convert this using DOS-style short mode. If the path
37999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38000  # take no chances and rewrite it.
38001  # Note: m4 eats our [], so we need to use [ and ] instead.
38002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38003  if test "x$has_forbidden_chars" != x; then
38004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38008      # Going to short mode and back again did indeed matter. Since short mode is
38009      # case insensitive, let's make it lowercase to improve readability.
38010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38011      # Now convert it back to Unix-stile (cygpath)
38012      input_path=`$CYGPATH -u "$shortmode_path"`
38013      new_path="$input_path"
38014    fi
38015  fi
38016
38017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38018  if test "x$test_cygdrive_prefix" = x; then
38019    # As a simple fix, exclude /usr/bin since it's not a real path.
38020    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38022      # a path prefixed by /cygdrive for fixpath to work.
38023      new_path="$CYGWIN_ROOT_PATH$input_path"
38024    fi
38025  fi
38026
38027  # remove trailing .exe if any
38028  new_path="${new_path/%.exe/}"
38029
38030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38031
38032  # First separate the path from the arguments. This will split at the first
38033  # space.
38034  complete="$NM"
38035  path="${complete%% *}"
38036  tmp="$complete EOL"
38037  arguments="${tmp#* }"
38038
38039  # Input might be given as Windows format, start by converting to
38040  # unix format.
38041  new_path="$path"
38042
38043  windows_path="$new_path"
38044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38045    unix_path=`$CYGPATH -u "$windows_path"`
38046    new_path="$unix_path"
38047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38049    new_path="$unix_path"
38050  fi
38051
38052
38053  # Now try to locate executable using which
38054  new_path=`$WHICH "$new_path" 2> /dev/null`
38055
38056  if test "x$new_path" = x; then
38057    # Oops. Which didn't find the executable.
38058    # The splitting of arguments from the executable at a space might have been incorrect,
38059    # since paths with space are more likely in Windows. Give it another try with the whole
38060    # argument.
38061    path="$complete"
38062    arguments="EOL"
38063    new_path="$path"
38064
38065  windows_path="$new_path"
38066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38067    unix_path=`$CYGPATH -u "$windows_path"`
38068    new_path="$unix_path"
38069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38071    new_path="$unix_path"
38072  fi
38073
38074
38075    new_path=`$WHICH "$new_path" 2> /dev/null`
38076    # bat and cmd files are not always considered executable in MSYS causing which
38077    # to not find them
38078    if test "x$new_path" = x \
38079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38081      new_path="$path"
38082
38083  windows_path="$new_path"
38084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38085    unix_path=`$CYGPATH -u "$windows_path"`
38086    new_path="$unix_path"
38087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38089    new_path="$unix_path"
38090  fi
38091
38092    fi
38093
38094    if test "x$new_path" = x; then
38095      # It's still not found. Now this is an unrecoverable error.
38096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38097$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38098      has_space=`$ECHO "$complete" | $GREP " "`
38099      if test "x$has_space" != x; then
38100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38102      fi
38103      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38104    fi
38105  fi
38106
38107  # Now new_path has a complete unix path to the binary
38108  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38109    # Keep paths in /bin as-is, but remove trailing .exe if any
38110    new_path="${new_path/%.exe/}"
38111    # Do not save /bin paths to all_fixpath_prefixes!
38112  else
38113    # Not in mixed or Windows style, start by that.
38114    new_path=`cmd //c echo $new_path`
38115
38116  input_path="$new_path"
38117  # Check if we need to convert this using DOS-style short mode. If the path
38118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38119  # take no chances and rewrite it.
38120  # Note: m4 eats our [], so we need to use [ and ] instead.
38121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38122  if test "x$has_forbidden_chars" != x; then
38123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38125  fi
38126
38127    # Output is in $new_path
38128
38129  windows_path="$new_path"
38130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38131    unix_path=`$CYGPATH -u "$windows_path"`
38132    new_path="$unix_path"
38133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38135    new_path="$unix_path"
38136  fi
38137
38138    # remove trailing .exe if any
38139    new_path="${new_path/%.exe/}"
38140
38141    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38142    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38143  fi
38144
38145    else
38146      # We're on a unix platform. Hooray! :)
38147      # First separate the path from the arguments. This will split at the first
38148      # space.
38149      complete="$NM"
38150      path="${complete%% *}"
38151      tmp="$complete EOL"
38152      arguments="${tmp#* }"
38153
38154      # Cannot rely on the command "which" here since it doesn't always work.
38155      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38156      if test -z "$is_absolute_path"; then
38157        # Path to executable is not absolute. Find it.
38158        IFS_save="$IFS"
38159        IFS=:
38160        for p in $PATH; do
38161          if test -f "$p/$path" && test -x "$p/$path"; then
38162            new_path="$p/$path"
38163            break
38164          fi
38165        done
38166        IFS="$IFS_save"
38167      else
38168        # This is an absolute path, we can use it without further modifications.
38169        new_path="$path"
38170      fi
38171
38172      if test "x$new_path" = x; then
38173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38174$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38175        has_space=`$ECHO "$complete" | $GREP " "`
38176        if test "x$has_space" != x; then
38177          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38178$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38179        fi
38180        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38181      fi
38182    fi
38183
38184    # Now join together the path and the arguments once again
38185    if test "x$arguments" != xEOL; then
38186      new_complete="$new_path ${arguments% *}"
38187    else
38188      new_complete="$new_path"
38189    fi
38190
38191    if test "x$complete" != "x$new_complete"; then
38192      NM="$new_complete"
38193      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38194$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38195    fi
38196  fi
38197
38198    GNM="$NM"
38199
38200  fi
38201
38202  # objcopy is used for moving debug symbols to separate files when
38203  # full debug symbols are enabled.
38204  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38205
38206
38207  # Publish this variable in the help.
38208
38209
38210  if test "x$OBJCOPY" = x; then
38211    # The variable is not set by user, try to locate tool using the code snippet
38212    if test -n "$ac_tool_prefix"; then
38213  for ac_prog in gobjcopy objcopy
38214  do
38215    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38216set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38218$as_echo_n "checking for $ac_word... " >&6; }
38219if ${ac_cv_prog_OBJCOPY+:} false; then :
38220  $as_echo_n "(cached) " >&6
38221else
38222  if test -n "$OBJCOPY"; then
38223  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38224else
38225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38226for as_dir in $PATH
38227do
38228  IFS=$as_save_IFS
38229  test -z "$as_dir" && as_dir=.
38230    for ac_exec_ext in '' $ac_executable_extensions; do
38231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38232    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38234    break 2
38235  fi
38236done
38237  done
38238IFS=$as_save_IFS
38239
38240fi
38241fi
38242OBJCOPY=$ac_cv_prog_OBJCOPY
38243if test -n "$OBJCOPY"; then
38244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38245$as_echo "$OBJCOPY" >&6; }
38246else
38247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38248$as_echo "no" >&6; }
38249fi
38250
38251
38252    test -n "$OBJCOPY" && break
38253  done
38254fi
38255if test -z "$OBJCOPY"; then
38256  ac_ct_OBJCOPY=$OBJCOPY
38257  for ac_prog in gobjcopy objcopy
38258do
38259  # Extract the first word of "$ac_prog", so it can be a program name with args.
38260set dummy $ac_prog; ac_word=$2
38261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38262$as_echo_n "checking for $ac_word... " >&6; }
38263if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38264  $as_echo_n "(cached) " >&6
38265else
38266  if test -n "$ac_ct_OBJCOPY"; then
38267  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38268else
38269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38270for as_dir in $PATH
38271do
38272  IFS=$as_save_IFS
38273  test -z "$as_dir" && as_dir=.
38274    for ac_exec_ext in '' $ac_executable_extensions; do
38275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38276    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38278    break 2
38279  fi
38280done
38281  done
38282IFS=$as_save_IFS
38283
38284fi
38285fi
38286ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38287if test -n "$ac_ct_OBJCOPY"; then
38288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38289$as_echo "$ac_ct_OBJCOPY" >&6; }
38290else
38291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38292$as_echo "no" >&6; }
38293fi
38294
38295
38296  test -n "$ac_ct_OBJCOPY" && break
38297done
38298
38299  if test "x$ac_ct_OBJCOPY" = x; then
38300    OBJCOPY=""
38301  else
38302    case $cross_compiling:$ac_tool_warned in
38303yes:)
38304{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38305$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38306ac_tool_warned=yes ;;
38307esac
38308    OBJCOPY=$ac_ct_OBJCOPY
38309  fi
38310fi
38311
38312  else
38313    # The variable is set, but is it from the command line or the environment?
38314
38315    # Try to remove the string !OBJCOPY! from our list.
38316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38318      # If it failed, the variable was not from the command line. Ignore it,
38319      # but warn the user (except for BASH, which is always set by the calling BASH).
38320      if test "xOBJCOPY" != xBASH; then
38321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38322$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38323      fi
38324      # Try to locate tool using the code snippet
38325      if test -n "$ac_tool_prefix"; then
38326  for ac_prog in gobjcopy objcopy
38327  do
38328    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38329set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38331$as_echo_n "checking for $ac_word... " >&6; }
38332if ${ac_cv_prog_OBJCOPY+:} false; then :
38333  $as_echo_n "(cached) " >&6
38334else
38335  if test -n "$OBJCOPY"; then
38336  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38337else
38338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38339for as_dir in $PATH
38340do
38341  IFS=$as_save_IFS
38342  test -z "$as_dir" && as_dir=.
38343    for ac_exec_ext in '' $ac_executable_extensions; do
38344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38345    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38347    break 2
38348  fi
38349done
38350  done
38351IFS=$as_save_IFS
38352
38353fi
38354fi
38355OBJCOPY=$ac_cv_prog_OBJCOPY
38356if test -n "$OBJCOPY"; then
38357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38358$as_echo "$OBJCOPY" >&6; }
38359else
38360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38361$as_echo "no" >&6; }
38362fi
38363
38364
38365    test -n "$OBJCOPY" && break
38366  done
38367fi
38368if test -z "$OBJCOPY"; then
38369  ac_ct_OBJCOPY=$OBJCOPY
38370  for ac_prog in gobjcopy objcopy
38371do
38372  # Extract the first word of "$ac_prog", so it can be a program name with args.
38373set dummy $ac_prog; ac_word=$2
38374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38375$as_echo_n "checking for $ac_word... " >&6; }
38376if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38377  $as_echo_n "(cached) " >&6
38378else
38379  if test -n "$ac_ct_OBJCOPY"; then
38380  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38381else
38382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38383for as_dir in $PATH
38384do
38385  IFS=$as_save_IFS
38386  test -z "$as_dir" && as_dir=.
38387    for ac_exec_ext in '' $ac_executable_extensions; do
38388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38389    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38391    break 2
38392  fi
38393done
38394  done
38395IFS=$as_save_IFS
38396
38397fi
38398fi
38399ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38400if test -n "$ac_ct_OBJCOPY"; then
38401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38402$as_echo "$ac_ct_OBJCOPY" >&6; }
38403else
38404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38405$as_echo "no" >&6; }
38406fi
38407
38408
38409  test -n "$ac_ct_OBJCOPY" && break
38410done
38411
38412  if test "x$ac_ct_OBJCOPY" = x; then
38413    OBJCOPY=""
38414  else
38415    case $cross_compiling:$ac_tool_warned in
38416yes:)
38417{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38418$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38419ac_tool_warned=yes ;;
38420esac
38421    OBJCOPY=$ac_ct_OBJCOPY
38422  fi
38423fi
38424
38425    else
38426      # If it succeeded, then it was overridden by the user. We will use it
38427      # for the tool.
38428
38429      # First remove it from the list of overridden variables, so we can test
38430      # for unknown variables in the end.
38431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38432
38433      # Check if the provided tool contains a complete path.
38434      tool_specified="$OBJCOPY"
38435      tool_basename="${tool_specified##*/}"
38436      if test "x$tool_basename" = "x$tool_specified"; then
38437        # A command without a complete path is provided, search $PATH.
38438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38439$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38440        # Extract the first word of "$tool_basename", so it can be a program name with args.
38441set dummy $tool_basename; 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_path_OBJCOPY+:} false; then :
38445  $as_echo_n "(cached) " >&6
38446else
38447  case $OBJCOPY in
38448  [\\/]* | ?:[\\/]*)
38449  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38450  ;;
38451  *)
38452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38453for as_dir in $PATH
38454do
38455  IFS=$as_save_IFS
38456  test -z "$as_dir" && as_dir=.
38457    for ac_exec_ext in '' $ac_executable_extensions; do
38458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38459    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38461    break 2
38462  fi
38463done
38464  done
38465IFS=$as_save_IFS
38466
38467  ;;
38468esac
38469fi
38470OBJCOPY=$ac_cv_path_OBJCOPY
38471if test -n "$OBJCOPY"; then
38472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38473$as_echo "$OBJCOPY" >&6; }
38474else
38475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38476$as_echo "no" >&6; }
38477fi
38478
38479
38480        if test "x$OBJCOPY" = x; then
38481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38482        fi
38483      else
38484        # Otherwise we believe it is a complete path. Use it as it is.
38485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38486$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38488$as_echo_n "checking for OBJCOPY... " >&6; }
38489        if test ! -x "$tool_specified"; then
38490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38491$as_echo "not found" >&6; }
38492          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38493        fi
38494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38495$as_echo "$tool_specified" >&6; }
38496      fi
38497    fi
38498  fi
38499
38500
38501    # Only call fixup if objcopy was found.
38502    if test -n "$OBJCOPY"; then
38503
38504  # Only process if variable expands to non-empty
38505
38506  if test "x$OBJCOPY" != x; then
38507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38508
38509  # First separate the path from the arguments. This will split at the first
38510  # space.
38511  complete="$OBJCOPY"
38512  path="${complete%% *}"
38513  tmp="$complete EOL"
38514  arguments="${tmp#* }"
38515
38516  # Input might be given as Windows format, start by converting to
38517  # unix format.
38518  new_path=`$CYGPATH -u "$path"`
38519
38520  # Now try to locate executable using which
38521  new_path=`$WHICH "$new_path" 2> /dev/null`
38522  # bat and cmd files are not always considered executable in cygwin causing which
38523  # to not find them
38524  if test "x$new_path" = x \
38525      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38526      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38527    new_path=`$CYGPATH -u "$path"`
38528  fi
38529  if test "x$new_path" = x; then
38530    # Oops. Which didn't find the executable.
38531    # The splitting of arguments from the executable at a space might have been incorrect,
38532    # since paths with space are more likely in Windows. Give it another try with the whole
38533    # argument.
38534    path="$complete"
38535    arguments="EOL"
38536    new_path=`$CYGPATH -u "$path"`
38537    new_path=`$WHICH "$new_path" 2> /dev/null`
38538    # bat and cmd files are not always considered executable in cygwin causing which
38539    # to not find them
38540    if test "x$new_path" = x \
38541        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38542        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38543      new_path=`$CYGPATH -u "$path"`
38544    fi
38545    if test "x$new_path" = x; then
38546      # It's still not found. Now this is an unrecoverable error.
38547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38548$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38549      has_space=`$ECHO "$complete" | $GREP " "`
38550      if test "x$has_space" != x; then
38551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38553      fi
38554      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38555    fi
38556  fi
38557
38558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38561  # "foo.exe" is OK but "foo" is an error.
38562  #
38563  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38564  # It is also a way to make sure we got the proper file name for the real test later on.
38565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38566  if test "x$test_shortpath" = x; then
38567    # Short path failed, file does not exist as specified.
38568    # Try adding .exe or .cmd
38569    if test -f "${new_path}.exe"; then
38570      input_to_shortpath="${new_path}.exe"
38571    elif test -f "${new_path}.cmd"; then
38572      input_to_shortpath="${new_path}.cmd"
38573    else
38574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38575$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38576      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38577$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38578      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38579    fi
38580  else
38581    input_to_shortpath="$new_path"
38582  fi
38583
38584  # Call helper function which possibly converts this using DOS-style short mode.
38585  # If so, the updated path is stored in $new_path.
38586  new_path="$input_to_shortpath"
38587
38588  input_path="$input_to_shortpath"
38589  # Check if we need to convert this using DOS-style short mode. If the path
38590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38591  # take no chances and rewrite it.
38592  # Note: m4 eats our [], so we need to use [ and ] instead.
38593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38594  if test "x$has_forbidden_chars" != x; then
38595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38599      # Going to short mode and back again did indeed matter. Since short mode is
38600      # case insensitive, let's make it lowercase to improve readability.
38601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38602      # Now convert it back to Unix-stile (cygpath)
38603      input_path=`$CYGPATH -u "$shortmode_path"`
38604      new_path="$input_path"
38605    fi
38606  fi
38607
38608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38609  if test "x$test_cygdrive_prefix" = x; then
38610    # As a simple fix, exclude /usr/bin since it's not a real path.
38611    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38613      # a path prefixed by /cygdrive for fixpath to work.
38614      new_path="$CYGWIN_ROOT_PATH$input_path"
38615    fi
38616  fi
38617
38618  # remove trailing .exe if any
38619  new_path="${new_path/%.exe/}"
38620
38621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38622
38623  # First separate the path from the arguments. This will split at the first
38624  # space.
38625  complete="$OBJCOPY"
38626  path="${complete%% *}"
38627  tmp="$complete EOL"
38628  arguments="${tmp#* }"
38629
38630  # Input might be given as Windows format, start by converting to
38631  # unix format.
38632  new_path="$path"
38633
38634  windows_path="$new_path"
38635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38636    unix_path=`$CYGPATH -u "$windows_path"`
38637    new_path="$unix_path"
38638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38640    new_path="$unix_path"
38641  fi
38642
38643
38644  # Now try to locate executable using which
38645  new_path=`$WHICH "$new_path" 2> /dev/null`
38646
38647  if test "x$new_path" = x; then
38648    # Oops. Which didn't find the executable.
38649    # The splitting of arguments from the executable at a space might have been incorrect,
38650    # since paths with space are more likely in Windows. Give it another try with the whole
38651    # argument.
38652    path="$complete"
38653    arguments="EOL"
38654    new_path="$path"
38655
38656  windows_path="$new_path"
38657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38658    unix_path=`$CYGPATH -u "$windows_path"`
38659    new_path="$unix_path"
38660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38662    new_path="$unix_path"
38663  fi
38664
38665
38666    new_path=`$WHICH "$new_path" 2> /dev/null`
38667    # bat and cmd files are not always considered executable in MSYS causing which
38668    # to not find them
38669    if test "x$new_path" = x \
38670        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38671        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38672      new_path="$path"
38673
38674  windows_path="$new_path"
38675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38676    unix_path=`$CYGPATH -u "$windows_path"`
38677    new_path="$unix_path"
38678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38680    new_path="$unix_path"
38681  fi
38682
38683    fi
38684
38685    if test "x$new_path" = x; then
38686      # It's still not found. Now this is an unrecoverable error.
38687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38688$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38689      has_space=`$ECHO "$complete" | $GREP " "`
38690      if test "x$has_space" != x; then
38691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38693      fi
38694      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38695    fi
38696  fi
38697
38698  # Now new_path has a complete unix path to the binary
38699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38700    # Keep paths in /bin as-is, but remove trailing .exe if any
38701    new_path="${new_path/%.exe/}"
38702    # Do not save /bin paths to all_fixpath_prefixes!
38703  else
38704    # Not in mixed or Windows style, start by that.
38705    new_path=`cmd //c echo $new_path`
38706
38707  input_path="$new_path"
38708  # Check if we need to convert this using DOS-style short mode. If the path
38709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38710  # take no chances and rewrite it.
38711  # Note: m4 eats our [], so we need to use [ and ] instead.
38712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38713  if test "x$has_forbidden_chars" != x; then
38714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38716  fi
38717
38718    # Output is in $new_path
38719
38720  windows_path="$new_path"
38721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38722    unix_path=`$CYGPATH -u "$windows_path"`
38723    new_path="$unix_path"
38724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38726    new_path="$unix_path"
38727  fi
38728
38729    # remove trailing .exe if any
38730    new_path="${new_path/%.exe/}"
38731
38732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38734  fi
38735
38736    else
38737      # We're on a unix platform. Hooray! :)
38738      # First separate the path from the arguments. This will split at the first
38739      # space.
38740      complete="$OBJCOPY"
38741      path="${complete%% *}"
38742      tmp="$complete EOL"
38743      arguments="${tmp#* }"
38744
38745      # Cannot rely on the command "which" here since it doesn't always work.
38746      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38747      if test -z "$is_absolute_path"; then
38748        # Path to executable is not absolute. Find it.
38749        IFS_save="$IFS"
38750        IFS=:
38751        for p in $PATH; do
38752          if test -f "$p/$path" && test -x "$p/$path"; then
38753            new_path="$p/$path"
38754            break
38755          fi
38756        done
38757        IFS="$IFS_save"
38758      else
38759        # This is an absolute path, we can use it without further modifications.
38760        new_path="$path"
38761      fi
38762
38763      if test "x$new_path" = x; then
38764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38765$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38766        has_space=`$ECHO "$complete" | $GREP " "`
38767        if test "x$has_space" != x; then
38768          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38769$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38770        fi
38771        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38772      fi
38773    fi
38774
38775    # Now join together the path and the arguments once again
38776    if test "x$arguments" != xEOL; then
38777      new_complete="$new_path ${arguments% *}"
38778    else
38779      new_complete="$new_path"
38780    fi
38781
38782    if test "x$complete" != "x$new_complete"; then
38783      OBJCOPY="$new_complete"
38784      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38785$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38786    fi
38787  fi
38788
38789    fi
38790  fi
38791
38792
38793
38794  # Publish this variable in the help.
38795
38796
38797  if test "x$OBJDUMP" = x; then
38798    # The variable is not set by user, try to locate tool using the code snippet
38799    if test -n "$ac_tool_prefix"; then
38800  for ac_prog in gobjdump objdump
38801  do
38802    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38805$as_echo_n "checking for $ac_word... " >&6; }
38806if ${ac_cv_prog_OBJDUMP+:} false; then :
38807  $as_echo_n "(cached) " >&6
38808else
38809  if test -n "$OBJDUMP"; then
38810  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38811else
38812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38813for as_dir in $PATH
38814do
38815  IFS=$as_save_IFS
38816  test -z "$as_dir" && as_dir=.
38817    for ac_exec_ext in '' $ac_executable_extensions; do
38818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38819    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38821    break 2
38822  fi
38823done
38824  done
38825IFS=$as_save_IFS
38826
38827fi
38828fi
38829OBJDUMP=$ac_cv_prog_OBJDUMP
38830if test -n "$OBJDUMP"; then
38831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38832$as_echo "$OBJDUMP" >&6; }
38833else
38834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38835$as_echo "no" >&6; }
38836fi
38837
38838
38839    test -n "$OBJDUMP" && break
38840  done
38841fi
38842if test -z "$OBJDUMP"; then
38843  ac_ct_OBJDUMP=$OBJDUMP
38844  for ac_prog in gobjdump objdump
38845do
38846  # Extract the first word of "$ac_prog", so it can be a program name with args.
38847set dummy $ac_prog; ac_word=$2
38848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38849$as_echo_n "checking for $ac_word... " >&6; }
38850if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38851  $as_echo_n "(cached) " >&6
38852else
38853  if test -n "$ac_ct_OBJDUMP"; then
38854  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38855else
38856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38857for as_dir in $PATH
38858do
38859  IFS=$as_save_IFS
38860  test -z "$as_dir" && as_dir=.
38861    for ac_exec_ext in '' $ac_executable_extensions; do
38862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38863    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38865    break 2
38866  fi
38867done
38868  done
38869IFS=$as_save_IFS
38870
38871fi
38872fi
38873ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38874if test -n "$ac_ct_OBJDUMP"; then
38875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38876$as_echo "$ac_ct_OBJDUMP" >&6; }
38877else
38878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38879$as_echo "no" >&6; }
38880fi
38881
38882
38883  test -n "$ac_ct_OBJDUMP" && break
38884done
38885
38886  if test "x$ac_ct_OBJDUMP" = x; then
38887    OBJDUMP=""
38888  else
38889    case $cross_compiling:$ac_tool_warned in
38890yes:)
38891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38893ac_tool_warned=yes ;;
38894esac
38895    OBJDUMP=$ac_ct_OBJDUMP
38896  fi
38897fi
38898
38899  else
38900    # The variable is set, but is it from the command line or the environment?
38901
38902    # Try to remove the string !OBJDUMP! from our list.
38903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38905      # If it failed, the variable was not from the command line. Ignore it,
38906      # but warn the user (except for BASH, which is always set by the calling BASH).
38907      if test "xOBJDUMP" != xBASH; then
38908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38909$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38910      fi
38911      # Try to locate tool using the code snippet
38912      if test -n "$ac_tool_prefix"; then
38913  for ac_prog in gobjdump objdump
38914  do
38915    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38916set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38918$as_echo_n "checking for $ac_word... " >&6; }
38919if ${ac_cv_prog_OBJDUMP+:} false; then :
38920  $as_echo_n "(cached) " >&6
38921else
38922  if test -n "$OBJDUMP"; then
38923  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38924else
38925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38926for as_dir in $PATH
38927do
38928  IFS=$as_save_IFS
38929  test -z "$as_dir" && as_dir=.
38930    for ac_exec_ext in '' $ac_executable_extensions; do
38931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38932    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38934    break 2
38935  fi
38936done
38937  done
38938IFS=$as_save_IFS
38939
38940fi
38941fi
38942OBJDUMP=$ac_cv_prog_OBJDUMP
38943if test -n "$OBJDUMP"; then
38944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38945$as_echo "$OBJDUMP" >&6; }
38946else
38947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38948$as_echo "no" >&6; }
38949fi
38950
38951
38952    test -n "$OBJDUMP" && break
38953  done
38954fi
38955if test -z "$OBJDUMP"; then
38956  ac_ct_OBJDUMP=$OBJDUMP
38957  for ac_prog in gobjdump objdump
38958do
38959  # Extract the first word of "$ac_prog", so it can be a program name with args.
38960set dummy $ac_prog; ac_word=$2
38961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38962$as_echo_n "checking for $ac_word... " >&6; }
38963if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38964  $as_echo_n "(cached) " >&6
38965else
38966  if test -n "$ac_ct_OBJDUMP"; then
38967  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38968else
38969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38970for as_dir in $PATH
38971do
38972  IFS=$as_save_IFS
38973  test -z "$as_dir" && as_dir=.
38974    for ac_exec_ext in '' $ac_executable_extensions; do
38975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38976    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38978    break 2
38979  fi
38980done
38981  done
38982IFS=$as_save_IFS
38983
38984fi
38985fi
38986ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38987if test -n "$ac_ct_OBJDUMP"; then
38988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38989$as_echo "$ac_ct_OBJDUMP" >&6; }
38990else
38991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38992$as_echo "no" >&6; }
38993fi
38994
38995
38996  test -n "$ac_ct_OBJDUMP" && break
38997done
38998
38999  if test "x$ac_ct_OBJDUMP" = x; then
39000    OBJDUMP=""
39001  else
39002    case $cross_compiling:$ac_tool_warned in
39003yes:)
39004{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39005$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39006ac_tool_warned=yes ;;
39007esac
39008    OBJDUMP=$ac_ct_OBJDUMP
39009  fi
39010fi
39011
39012    else
39013      # If it succeeded, then it was overridden by the user. We will use it
39014      # for the tool.
39015
39016      # First remove it from the list of overridden variables, so we can test
39017      # for unknown variables in the end.
39018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39019
39020      # Check if the provided tool contains a complete path.
39021      tool_specified="$OBJDUMP"
39022      tool_basename="${tool_specified##*/}"
39023      if test "x$tool_basename" = "x$tool_specified"; then
39024        # A command without a complete path is provided, search $PATH.
39025        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39026$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39027        # Extract the first word of "$tool_basename", so it can be a program name with args.
39028set dummy $tool_basename; ac_word=$2
39029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39030$as_echo_n "checking for $ac_word... " >&6; }
39031if ${ac_cv_path_OBJDUMP+:} false; then :
39032  $as_echo_n "(cached) " >&6
39033else
39034  case $OBJDUMP in
39035  [\\/]* | ?:[\\/]*)
39036  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39037  ;;
39038  *)
39039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39040for as_dir in $PATH
39041do
39042  IFS=$as_save_IFS
39043  test -z "$as_dir" && as_dir=.
39044    for ac_exec_ext in '' $ac_executable_extensions; do
39045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39046    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39048    break 2
39049  fi
39050done
39051  done
39052IFS=$as_save_IFS
39053
39054  ;;
39055esac
39056fi
39057OBJDUMP=$ac_cv_path_OBJDUMP
39058if test -n "$OBJDUMP"; then
39059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39060$as_echo "$OBJDUMP" >&6; }
39061else
39062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39063$as_echo "no" >&6; }
39064fi
39065
39066
39067        if test "x$OBJDUMP" = x; then
39068          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39069        fi
39070      else
39071        # Otherwise we believe it is a complete path. Use it as it is.
39072        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39073$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39075$as_echo_n "checking for OBJDUMP... " >&6; }
39076        if test ! -x "$tool_specified"; then
39077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39078$as_echo "not found" >&6; }
39079          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39080        fi
39081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39082$as_echo "$tool_specified" >&6; }
39083      fi
39084    fi
39085  fi
39086
39087
39088  if test "x$OBJDUMP" != x; then
39089    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39090    # bails if argument is missing.
39091
39092  # Only process if variable expands to non-empty
39093
39094  if test "x$OBJDUMP" != x; then
39095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39096
39097  # First separate the path from the arguments. This will split at the first
39098  # space.
39099  complete="$OBJDUMP"
39100  path="${complete%% *}"
39101  tmp="$complete EOL"
39102  arguments="${tmp#* }"
39103
39104  # Input might be given as Windows format, start by converting to
39105  # unix format.
39106  new_path=`$CYGPATH -u "$path"`
39107
39108  # Now try to locate executable using which
39109  new_path=`$WHICH "$new_path" 2> /dev/null`
39110  # bat and cmd files are not always considered executable in cygwin causing which
39111  # to not find them
39112  if test "x$new_path" = x \
39113      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39114      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39115    new_path=`$CYGPATH -u "$path"`
39116  fi
39117  if test "x$new_path" = x; then
39118    # Oops. Which didn't find the executable.
39119    # The splitting of arguments from the executable at a space might have been incorrect,
39120    # since paths with space are more likely in Windows. Give it another try with the whole
39121    # argument.
39122    path="$complete"
39123    arguments="EOL"
39124    new_path=`$CYGPATH -u "$path"`
39125    new_path=`$WHICH "$new_path" 2> /dev/null`
39126    # bat and cmd files are not always considered executable in cygwin causing which
39127    # to not find them
39128    if test "x$new_path" = x \
39129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39131      new_path=`$CYGPATH -u "$path"`
39132    fi
39133    if test "x$new_path" = x; then
39134      # It's still not found. Now this is an unrecoverable error.
39135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39136$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39137      has_space=`$ECHO "$complete" | $GREP " "`
39138      if test "x$has_space" != x; then
39139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39141      fi
39142      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39143    fi
39144  fi
39145
39146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39149  # "foo.exe" is OK but "foo" is an error.
39150  #
39151  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39152  # It is also a way to make sure we got the proper file name for the real test later on.
39153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39154  if test "x$test_shortpath" = x; then
39155    # Short path failed, file does not exist as specified.
39156    # Try adding .exe or .cmd
39157    if test -f "${new_path}.exe"; then
39158      input_to_shortpath="${new_path}.exe"
39159    elif test -f "${new_path}.cmd"; then
39160      input_to_shortpath="${new_path}.cmd"
39161    else
39162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39163$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39164      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39165$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39166      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39167    fi
39168  else
39169    input_to_shortpath="$new_path"
39170  fi
39171
39172  # Call helper function which possibly converts this using DOS-style short mode.
39173  # If so, the updated path is stored in $new_path.
39174  new_path="$input_to_shortpath"
39175
39176  input_path="$input_to_shortpath"
39177  # Check if we need to convert this using DOS-style short mode. If the path
39178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39179  # take no chances and rewrite it.
39180  # Note: m4 eats our [], so we need to use [ and ] instead.
39181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39182  if test "x$has_forbidden_chars" != x; then
39183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39187      # Going to short mode and back again did indeed matter. Since short mode is
39188      # case insensitive, let's make it lowercase to improve readability.
39189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39190      # Now convert it back to Unix-stile (cygpath)
39191      input_path=`$CYGPATH -u "$shortmode_path"`
39192      new_path="$input_path"
39193    fi
39194  fi
39195
39196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39197  if test "x$test_cygdrive_prefix" = x; then
39198    # As a simple fix, exclude /usr/bin since it's not a real path.
39199    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39201      # a path prefixed by /cygdrive for fixpath to work.
39202      new_path="$CYGWIN_ROOT_PATH$input_path"
39203    fi
39204  fi
39205
39206  # remove trailing .exe if any
39207  new_path="${new_path/%.exe/}"
39208
39209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39210
39211  # First separate the path from the arguments. This will split at the first
39212  # space.
39213  complete="$OBJDUMP"
39214  path="${complete%% *}"
39215  tmp="$complete EOL"
39216  arguments="${tmp#* }"
39217
39218  # Input might be given as Windows format, start by converting to
39219  # unix format.
39220  new_path="$path"
39221
39222  windows_path="$new_path"
39223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39224    unix_path=`$CYGPATH -u "$windows_path"`
39225    new_path="$unix_path"
39226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39228    new_path="$unix_path"
39229  fi
39230
39231
39232  # Now try to locate executable using which
39233  new_path=`$WHICH "$new_path" 2> /dev/null`
39234
39235  if test "x$new_path" = x; then
39236    # Oops. Which didn't find the executable.
39237    # The splitting of arguments from the executable at a space might have been incorrect,
39238    # since paths with space are more likely in Windows. Give it another try with the whole
39239    # argument.
39240    path="$complete"
39241    arguments="EOL"
39242    new_path="$path"
39243
39244  windows_path="$new_path"
39245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39246    unix_path=`$CYGPATH -u "$windows_path"`
39247    new_path="$unix_path"
39248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39250    new_path="$unix_path"
39251  fi
39252
39253
39254    new_path=`$WHICH "$new_path" 2> /dev/null`
39255    # bat and cmd files are not always considered executable in MSYS causing which
39256    # to not find them
39257    if test "x$new_path" = x \
39258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39260      new_path="$path"
39261
39262  windows_path="$new_path"
39263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39264    unix_path=`$CYGPATH -u "$windows_path"`
39265    new_path="$unix_path"
39266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39268    new_path="$unix_path"
39269  fi
39270
39271    fi
39272
39273    if test "x$new_path" = x; then
39274      # It's still not found. Now this is an unrecoverable error.
39275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39276$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39277      has_space=`$ECHO "$complete" | $GREP " "`
39278      if test "x$has_space" != x; then
39279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39281      fi
39282      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39283    fi
39284  fi
39285
39286  # Now new_path has a complete unix path to the binary
39287  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39288    # Keep paths in /bin as-is, but remove trailing .exe if any
39289    new_path="${new_path/%.exe/}"
39290    # Do not save /bin paths to all_fixpath_prefixes!
39291  else
39292    # Not in mixed or Windows style, start by that.
39293    new_path=`cmd //c echo $new_path`
39294
39295  input_path="$new_path"
39296  # Check if we need to convert this using DOS-style short mode. If the path
39297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39298  # take no chances and rewrite it.
39299  # Note: m4 eats our [], so we need to use [ and ] instead.
39300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39301  if test "x$has_forbidden_chars" != x; then
39302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39304  fi
39305
39306    # Output is in $new_path
39307
39308  windows_path="$new_path"
39309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39310    unix_path=`$CYGPATH -u "$windows_path"`
39311    new_path="$unix_path"
39312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39314    new_path="$unix_path"
39315  fi
39316
39317    # remove trailing .exe if any
39318    new_path="${new_path/%.exe/}"
39319
39320    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39321    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39322  fi
39323
39324    else
39325      # We're on a unix platform. Hooray! :)
39326      # First separate the path from the arguments. This will split at the first
39327      # space.
39328      complete="$OBJDUMP"
39329      path="${complete%% *}"
39330      tmp="$complete EOL"
39331      arguments="${tmp#* }"
39332
39333      # Cannot rely on the command "which" here since it doesn't always work.
39334      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39335      if test -z "$is_absolute_path"; then
39336        # Path to executable is not absolute. Find it.
39337        IFS_save="$IFS"
39338        IFS=:
39339        for p in $PATH; do
39340          if test -f "$p/$path" && test -x "$p/$path"; then
39341            new_path="$p/$path"
39342            break
39343          fi
39344        done
39345        IFS="$IFS_save"
39346      else
39347        # This is an absolute path, we can use it without further modifications.
39348        new_path="$path"
39349      fi
39350
39351      if test "x$new_path" = x; then
39352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39353$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39354        has_space=`$ECHO "$complete" | $GREP " "`
39355        if test "x$has_space" != x; then
39356          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39357$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39358        fi
39359        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39360      fi
39361    fi
39362
39363    # Now join together the path and the arguments once again
39364    if test "x$arguments" != xEOL; then
39365      new_complete="$new_path ${arguments% *}"
39366    else
39367      new_complete="$new_path"
39368    fi
39369
39370    if test "x$complete" != "x$new_complete"; then
39371      OBJDUMP="$new_complete"
39372      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39373$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39374    fi
39375  fi
39376
39377  fi
39378
39379
39380  # Restore old path.
39381  PATH="$OLD_PATH"
39382
39383  # Restore the flags to the user specified values.
39384  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39385  CFLAGS="$ORG_CFLAGS"
39386  CXXFLAGS="$ORG_CXXFLAGS"
39387
39388
39389# Finally do some processing after the detection phase
39390
39391  if test "x$COMPILE_TYPE" = "xcross"; then
39392    # Now we need to find a C/C++ compiler that can build executables for the
39393    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39394    # used once. Also, we need to do this without adding a tools dir to the
39395    # path, otherwise we might pick up cross-compilers which don't use standard
39396    # naming.
39397
39398    # FIXME: we should list the discovered compilers as an exclude pattern!
39399    # If we do that, we can do this detection before POST_DETECTION, and still
39400    # find the build compilers in the tools dir, if needed.
39401
39402
39403  # Publish this variable in the help.
39404
39405
39406  if test "x$BUILD_CC" = x; then
39407    # The variable is not set by user, try to locate tool using the code snippet
39408    for ac_prog in cl cc gcc
39409do
39410  # Extract the first word of "$ac_prog", so it can be a program name with args.
39411set dummy $ac_prog; ac_word=$2
39412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39413$as_echo_n "checking for $ac_word... " >&6; }
39414if ${ac_cv_path_BUILD_CC+:} false; then :
39415  $as_echo_n "(cached) " >&6
39416else
39417  case $BUILD_CC in
39418  [\\/]* | ?:[\\/]*)
39419  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39420  ;;
39421  *)
39422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39423for as_dir in $PATH
39424do
39425  IFS=$as_save_IFS
39426  test -z "$as_dir" && as_dir=.
39427    for ac_exec_ext in '' $ac_executable_extensions; do
39428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39429    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39431    break 2
39432  fi
39433done
39434  done
39435IFS=$as_save_IFS
39436
39437  ;;
39438esac
39439fi
39440BUILD_CC=$ac_cv_path_BUILD_CC
39441if test -n "$BUILD_CC"; then
39442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39443$as_echo "$BUILD_CC" >&6; }
39444else
39445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39446$as_echo "no" >&6; }
39447fi
39448
39449
39450  test -n "$BUILD_CC" && break
39451done
39452
39453  else
39454    # The variable is set, but is it from the command line or the environment?
39455
39456    # Try to remove the string !BUILD_CC! from our list.
39457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39459      # If it failed, the variable was not from the command line. Ignore it,
39460      # but warn the user (except for BASH, which is always set by the calling BASH).
39461      if test "xBUILD_CC" != xBASH; then
39462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39463$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39464      fi
39465      # Try to locate tool using the code snippet
39466      for ac_prog in cl cc gcc
39467do
39468  # Extract the first word of "$ac_prog", so it can be a program name with args.
39469set dummy $ac_prog; ac_word=$2
39470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39471$as_echo_n "checking for $ac_word... " >&6; }
39472if ${ac_cv_path_BUILD_CC+:} false; then :
39473  $as_echo_n "(cached) " >&6
39474else
39475  case $BUILD_CC in
39476  [\\/]* | ?:[\\/]*)
39477  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39478  ;;
39479  *)
39480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39481for as_dir in $PATH
39482do
39483  IFS=$as_save_IFS
39484  test -z "$as_dir" && as_dir=.
39485    for ac_exec_ext in '' $ac_executable_extensions; do
39486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39487    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39489    break 2
39490  fi
39491done
39492  done
39493IFS=$as_save_IFS
39494
39495  ;;
39496esac
39497fi
39498BUILD_CC=$ac_cv_path_BUILD_CC
39499if test -n "$BUILD_CC"; then
39500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39501$as_echo "$BUILD_CC" >&6; }
39502else
39503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39504$as_echo "no" >&6; }
39505fi
39506
39507
39508  test -n "$BUILD_CC" && break
39509done
39510
39511    else
39512      # If it succeeded, then it was overridden by the user. We will use it
39513      # for the tool.
39514
39515      # First remove it from the list of overridden variables, so we can test
39516      # for unknown variables in the end.
39517      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39518
39519      # Check if the provided tool contains a complete path.
39520      tool_specified="$BUILD_CC"
39521      tool_basename="${tool_specified##*/}"
39522      if test "x$tool_basename" = "x$tool_specified"; then
39523        # A command without a complete path is provided, search $PATH.
39524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39525$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39526        # Extract the first word of "$tool_basename", so it can be a program name with args.
39527set dummy $tool_basename; ac_word=$2
39528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39529$as_echo_n "checking for $ac_word... " >&6; }
39530if ${ac_cv_path_BUILD_CC+:} false; then :
39531  $as_echo_n "(cached) " >&6
39532else
39533  case $BUILD_CC in
39534  [\\/]* | ?:[\\/]*)
39535  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39536  ;;
39537  *)
39538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39539for as_dir in $PATH
39540do
39541  IFS=$as_save_IFS
39542  test -z "$as_dir" && as_dir=.
39543    for ac_exec_ext in '' $ac_executable_extensions; do
39544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39545    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39547    break 2
39548  fi
39549done
39550  done
39551IFS=$as_save_IFS
39552
39553  ;;
39554esac
39555fi
39556BUILD_CC=$ac_cv_path_BUILD_CC
39557if test -n "$BUILD_CC"; then
39558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39559$as_echo "$BUILD_CC" >&6; }
39560else
39561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39562$as_echo "no" >&6; }
39563fi
39564
39565
39566        if test "x$BUILD_CC" = x; then
39567          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39568        fi
39569      else
39570        # Otherwise we believe it is a complete path. Use it as it is.
39571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39572$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39574$as_echo_n "checking for BUILD_CC... " >&6; }
39575        if test ! -x "$tool_specified"; then
39576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39577$as_echo "not found" >&6; }
39578          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39579        fi
39580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39581$as_echo "$tool_specified" >&6; }
39582      fi
39583    fi
39584  fi
39585
39586
39587
39588  # Only process if variable expands to non-empty
39589
39590  if test "x$BUILD_CC" != x; then
39591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39592
39593  # First separate the path from the arguments. This will split at the first
39594  # space.
39595  complete="$BUILD_CC"
39596  path="${complete%% *}"
39597  tmp="$complete EOL"
39598  arguments="${tmp#* }"
39599
39600  # Input might be given as Windows format, start by converting to
39601  # unix format.
39602  new_path=`$CYGPATH -u "$path"`
39603
39604  # Now try to locate executable using which
39605  new_path=`$WHICH "$new_path" 2> /dev/null`
39606  # bat and cmd files are not always considered executable in cygwin causing which
39607  # to not find them
39608  if test "x$new_path" = x \
39609      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39610      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39611    new_path=`$CYGPATH -u "$path"`
39612  fi
39613  if test "x$new_path" = x; then
39614    # Oops. Which didn't find the executable.
39615    # The splitting of arguments from the executable at a space might have been incorrect,
39616    # since paths with space are more likely in Windows. Give it another try with the whole
39617    # argument.
39618    path="$complete"
39619    arguments="EOL"
39620    new_path=`$CYGPATH -u "$path"`
39621    new_path=`$WHICH "$new_path" 2> /dev/null`
39622    # bat and cmd files are not always considered executable in cygwin causing which
39623    # to not find them
39624    if test "x$new_path" = x \
39625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39627      new_path=`$CYGPATH -u "$path"`
39628    fi
39629    if test "x$new_path" = x; then
39630      # It's still not found. Now this is an unrecoverable error.
39631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39632$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39633      has_space=`$ECHO "$complete" | $GREP " "`
39634      if test "x$has_space" != x; then
39635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39637      fi
39638      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39639    fi
39640  fi
39641
39642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39645  # "foo.exe" is OK but "foo" is an error.
39646  #
39647  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39648  # It is also a way to make sure we got the proper file name for the real test later on.
39649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39650  if test "x$test_shortpath" = x; then
39651    # Short path failed, file does not exist as specified.
39652    # Try adding .exe or .cmd
39653    if test -f "${new_path}.exe"; then
39654      input_to_shortpath="${new_path}.exe"
39655    elif test -f "${new_path}.cmd"; then
39656      input_to_shortpath="${new_path}.cmd"
39657    else
39658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39659$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39660      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39661$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39662      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39663    fi
39664  else
39665    input_to_shortpath="$new_path"
39666  fi
39667
39668  # Call helper function which possibly converts this using DOS-style short mode.
39669  # If so, the updated path is stored in $new_path.
39670  new_path="$input_to_shortpath"
39671
39672  input_path="$input_to_shortpath"
39673  # Check if we need to convert this using DOS-style short mode. If the path
39674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39675  # take no chances and rewrite it.
39676  # Note: m4 eats our [], so we need to use [ and ] instead.
39677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39678  if test "x$has_forbidden_chars" != x; then
39679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39683      # Going to short mode and back again did indeed matter. Since short mode is
39684      # case insensitive, let's make it lowercase to improve readability.
39685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39686      # Now convert it back to Unix-stile (cygpath)
39687      input_path=`$CYGPATH -u "$shortmode_path"`
39688      new_path="$input_path"
39689    fi
39690  fi
39691
39692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39693  if test "x$test_cygdrive_prefix" = x; then
39694    # As a simple fix, exclude /usr/bin since it's not a real path.
39695    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39697      # a path prefixed by /cygdrive for fixpath to work.
39698      new_path="$CYGWIN_ROOT_PATH$input_path"
39699    fi
39700  fi
39701
39702  # remove trailing .exe if any
39703  new_path="${new_path/%.exe/}"
39704
39705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39706
39707  # First separate the path from the arguments. This will split at the first
39708  # space.
39709  complete="$BUILD_CC"
39710  path="${complete%% *}"
39711  tmp="$complete EOL"
39712  arguments="${tmp#* }"
39713
39714  # Input might be given as Windows format, start by converting to
39715  # unix format.
39716  new_path="$path"
39717
39718  windows_path="$new_path"
39719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39720    unix_path=`$CYGPATH -u "$windows_path"`
39721    new_path="$unix_path"
39722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39724    new_path="$unix_path"
39725  fi
39726
39727
39728  # Now try to locate executable using which
39729  new_path=`$WHICH "$new_path" 2> /dev/null`
39730
39731  if test "x$new_path" = x; then
39732    # Oops. Which didn't find the executable.
39733    # The splitting of arguments from the executable at a space might have been incorrect,
39734    # since paths with space are more likely in Windows. Give it another try with the whole
39735    # argument.
39736    path="$complete"
39737    arguments="EOL"
39738    new_path="$path"
39739
39740  windows_path="$new_path"
39741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39742    unix_path=`$CYGPATH -u "$windows_path"`
39743    new_path="$unix_path"
39744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39746    new_path="$unix_path"
39747  fi
39748
39749
39750    new_path=`$WHICH "$new_path" 2> /dev/null`
39751    # bat and cmd files are not always considered executable in MSYS causing which
39752    # to not find them
39753    if test "x$new_path" = x \
39754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39756      new_path="$path"
39757
39758  windows_path="$new_path"
39759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39760    unix_path=`$CYGPATH -u "$windows_path"`
39761    new_path="$unix_path"
39762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39764    new_path="$unix_path"
39765  fi
39766
39767    fi
39768
39769    if test "x$new_path" = x; then
39770      # It's still not found. Now this is an unrecoverable error.
39771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39772$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39773      has_space=`$ECHO "$complete" | $GREP " "`
39774      if test "x$has_space" != x; then
39775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39777      fi
39778      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39779    fi
39780  fi
39781
39782  # Now new_path has a complete unix path to the binary
39783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39784    # Keep paths in /bin as-is, but remove trailing .exe if any
39785    new_path="${new_path/%.exe/}"
39786    # Do not save /bin paths to all_fixpath_prefixes!
39787  else
39788    # Not in mixed or Windows style, start by that.
39789    new_path=`cmd //c echo $new_path`
39790
39791  input_path="$new_path"
39792  # Check if we need to convert this using DOS-style short mode. If the path
39793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39794  # take no chances and rewrite it.
39795  # Note: m4 eats our [], so we need to use [ and ] instead.
39796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39797  if test "x$has_forbidden_chars" != x; then
39798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39800  fi
39801
39802    # Output is in $new_path
39803
39804  windows_path="$new_path"
39805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39806    unix_path=`$CYGPATH -u "$windows_path"`
39807    new_path="$unix_path"
39808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39810    new_path="$unix_path"
39811  fi
39812
39813    # remove trailing .exe if any
39814    new_path="${new_path/%.exe/}"
39815
39816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39818  fi
39819
39820    else
39821      # We're on a unix platform. Hooray! :)
39822      # First separate the path from the arguments. This will split at the first
39823      # space.
39824      complete="$BUILD_CC"
39825      path="${complete%% *}"
39826      tmp="$complete EOL"
39827      arguments="${tmp#* }"
39828
39829      # Cannot rely on the command "which" here since it doesn't always work.
39830      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39831      if test -z "$is_absolute_path"; then
39832        # Path to executable is not absolute. Find it.
39833        IFS_save="$IFS"
39834        IFS=:
39835        for p in $PATH; do
39836          if test -f "$p/$path" && test -x "$p/$path"; then
39837            new_path="$p/$path"
39838            break
39839          fi
39840        done
39841        IFS="$IFS_save"
39842      else
39843        # This is an absolute path, we can use it without further modifications.
39844        new_path="$path"
39845      fi
39846
39847      if test "x$new_path" = x; then
39848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39849$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39850        has_space=`$ECHO "$complete" | $GREP " "`
39851        if test "x$has_space" != x; then
39852          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39853$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39854        fi
39855        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39856      fi
39857    fi
39858
39859    # Now join together the path and the arguments once again
39860    if test "x$arguments" != xEOL; then
39861      new_complete="$new_path ${arguments% *}"
39862    else
39863      new_complete="$new_path"
39864    fi
39865
39866    if test "x$complete" != "x$new_complete"; then
39867      BUILD_CC="$new_complete"
39868      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39869$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39870    fi
39871  fi
39872
39873
39874
39875  # Publish this variable in the help.
39876
39877
39878  if test "x$BUILD_CXX" = x; then
39879    # The variable is not set by user, try to locate tool using the code snippet
39880    for ac_prog in cl CC g++
39881do
39882  # Extract the first word of "$ac_prog", so it can be a program name with args.
39883set dummy $ac_prog; ac_word=$2
39884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39885$as_echo_n "checking for $ac_word... " >&6; }
39886if ${ac_cv_path_BUILD_CXX+:} false; then :
39887  $as_echo_n "(cached) " >&6
39888else
39889  case $BUILD_CXX in
39890  [\\/]* | ?:[\\/]*)
39891  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39892  ;;
39893  *)
39894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39895for as_dir in $PATH
39896do
39897  IFS=$as_save_IFS
39898  test -z "$as_dir" && as_dir=.
39899    for ac_exec_ext in '' $ac_executable_extensions; do
39900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39901    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39903    break 2
39904  fi
39905done
39906  done
39907IFS=$as_save_IFS
39908
39909  ;;
39910esac
39911fi
39912BUILD_CXX=$ac_cv_path_BUILD_CXX
39913if test -n "$BUILD_CXX"; then
39914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39915$as_echo "$BUILD_CXX" >&6; }
39916else
39917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39918$as_echo "no" >&6; }
39919fi
39920
39921
39922  test -n "$BUILD_CXX" && break
39923done
39924
39925  else
39926    # The variable is set, but is it from the command line or the environment?
39927
39928    # Try to remove the string !BUILD_CXX! from our list.
39929    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39930    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39931      # If it failed, the variable was not from the command line. Ignore it,
39932      # but warn the user (except for BASH, which is always set by the calling BASH).
39933      if test "xBUILD_CXX" != xBASH; then
39934        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39935$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39936      fi
39937      # Try to locate tool using the code snippet
39938      for ac_prog in cl CC g++
39939do
39940  # Extract the first word of "$ac_prog", so it can be a program name with args.
39941set dummy $ac_prog; ac_word=$2
39942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39943$as_echo_n "checking for $ac_word... " >&6; }
39944if ${ac_cv_path_BUILD_CXX+:} false; then :
39945  $as_echo_n "(cached) " >&6
39946else
39947  case $BUILD_CXX in
39948  [\\/]* | ?:[\\/]*)
39949  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39950  ;;
39951  *)
39952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39953for as_dir in $PATH
39954do
39955  IFS=$as_save_IFS
39956  test -z "$as_dir" && as_dir=.
39957    for ac_exec_ext in '' $ac_executable_extensions; do
39958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39959    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39961    break 2
39962  fi
39963done
39964  done
39965IFS=$as_save_IFS
39966
39967  ;;
39968esac
39969fi
39970BUILD_CXX=$ac_cv_path_BUILD_CXX
39971if test -n "$BUILD_CXX"; then
39972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39973$as_echo "$BUILD_CXX" >&6; }
39974else
39975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39976$as_echo "no" >&6; }
39977fi
39978
39979
39980  test -n "$BUILD_CXX" && break
39981done
39982
39983    else
39984      # If it succeeded, then it was overridden by the user. We will use it
39985      # for the tool.
39986
39987      # First remove it from the list of overridden variables, so we can test
39988      # for unknown variables in the end.
39989      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39990
39991      # Check if the provided tool contains a complete path.
39992      tool_specified="$BUILD_CXX"
39993      tool_basename="${tool_specified##*/}"
39994      if test "x$tool_basename" = "x$tool_specified"; then
39995        # A command without a complete path is provided, search $PATH.
39996        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39997$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39998        # Extract the first word of "$tool_basename", so it can be a program name with args.
39999set dummy $tool_basename; ac_word=$2
40000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40001$as_echo_n "checking for $ac_word... " >&6; }
40002if ${ac_cv_path_BUILD_CXX+:} false; then :
40003  $as_echo_n "(cached) " >&6
40004else
40005  case $BUILD_CXX in
40006  [\\/]* | ?:[\\/]*)
40007  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40008  ;;
40009  *)
40010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40011for as_dir in $PATH
40012do
40013  IFS=$as_save_IFS
40014  test -z "$as_dir" && as_dir=.
40015    for ac_exec_ext in '' $ac_executable_extensions; do
40016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40017    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40019    break 2
40020  fi
40021done
40022  done
40023IFS=$as_save_IFS
40024
40025  ;;
40026esac
40027fi
40028BUILD_CXX=$ac_cv_path_BUILD_CXX
40029if test -n "$BUILD_CXX"; then
40030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40031$as_echo "$BUILD_CXX" >&6; }
40032else
40033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40034$as_echo "no" >&6; }
40035fi
40036
40037
40038        if test "x$BUILD_CXX" = x; then
40039          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40040        fi
40041      else
40042        # Otherwise we believe it is a complete path. Use it as it is.
40043        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40044$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40046$as_echo_n "checking for BUILD_CXX... " >&6; }
40047        if test ! -x "$tool_specified"; then
40048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40049$as_echo "not found" >&6; }
40050          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40051        fi
40052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40053$as_echo "$tool_specified" >&6; }
40054      fi
40055    fi
40056  fi
40057
40058
40059
40060  # Only process if variable expands to non-empty
40061
40062  if test "x$BUILD_CXX" != x; then
40063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40064
40065  # First separate the path from the arguments. This will split at the first
40066  # space.
40067  complete="$BUILD_CXX"
40068  path="${complete%% *}"
40069  tmp="$complete EOL"
40070  arguments="${tmp#* }"
40071
40072  # Input might be given as Windows format, start by converting to
40073  # unix format.
40074  new_path=`$CYGPATH -u "$path"`
40075
40076  # Now try to locate executable using which
40077  new_path=`$WHICH "$new_path" 2> /dev/null`
40078  # bat and cmd files are not always considered executable in cygwin causing which
40079  # to not find them
40080  if test "x$new_path" = x \
40081      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40082      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40083    new_path=`$CYGPATH -u "$path"`
40084  fi
40085  if test "x$new_path" = x; then
40086    # Oops. Which didn't find the executable.
40087    # The splitting of arguments from the executable at a space might have been incorrect,
40088    # since paths with space are more likely in Windows. Give it another try with the whole
40089    # argument.
40090    path="$complete"
40091    arguments="EOL"
40092    new_path=`$CYGPATH -u "$path"`
40093    new_path=`$WHICH "$new_path" 2> /dev/null`
40094    # bat and cmd files are not always considered executable in cygwin causing which
40095    # to not find them
40096    if test "x$new_path" = x \
40097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40099      new_path=`$CYGPATH -u "$path"`
40100    fi
40101    if test "x$new_path" = x; then
40102      # It's still not found. Now this is an unrecoverable error.
40103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40104$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40105      has_space=`$ECHO "$complete" | $GREP " "`
40106      if test "x$has_space" != x; then
40107        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40108$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40109      fi
40110      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40111    fi
40112  fi
40113
40114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40117  # "foo.exe" is OK but "foo" is an error.
40118  #
40119  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40120  # It is also a way to make sure we got the proper file name for the real test later on.
40121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40122  if test "x$test_shortpath" = x; then
40123    # Short path failed, file does not exist as specified.
40124    # Try adding .exe or .cmd
40125    if test -f "${new_path}.exe"; then
40126      input_to_shortpath="${new_path}.exe"
40127    elif test -f "${new_path}.cmd"; then
40128      input_to_shortpath="${new_path}.cmd"
40129    else
40130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40131$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40132      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40133$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40134      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40135    fi
40136  else
40137    input_to_shortpath="$new_path"
40138  fi
40139
40140  # Call helper function which possibly converts this using DOS-style short mode.
40141  # If so, the updated path is stored in $new_path.
40142  new_path="$input_to_shortpath"
40143
40144  input_path="$input_to_shortpath"
40145  # Check if we need to convert this using DOS-style short mode. If the path
40146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40147  # take no chances and rewrite it.
40148  # Note: m4 eats our [], so we need to use [ and ] instead.
40149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40150  if test "x$has_forbidden_chars" != x; then
40151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40155      # Going to short mode and back again did indeed matter. Since short mode is
40156      # case insensitive, let's make it lowercase to improve readability.
40157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40158      # Now convert it back to Unix-stile (cygpath)
40159      input_path=`$CYGPATH -u "$shortmode_path"`
40160      new_path="$input_path"
40161    fi
40162  fi
40163
40164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40165  if test "x$test_cygdrive_prefix" = x; then
40166    # As a simple fix, exclude /usr/bin since it's not a real path.
40167    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40169      # a path prefixed by /cygdrive for fixpath to work.
40170      new_path="$CYGWIN_ROOT_PATH$input_path"
40171    fi
40172  fi
40173
40174  # remove trailing .exe if any
40175  new_path="${new_path/%.exe/}"
40176
40177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40178
40179  # First separate the path from the arguments. This will split at the first
40180  # space.
40181  complete="$BUILD_CXX"
40182  path="${complete%% *}"
40183  tmp="$complete EOL"
40184  arguments="${tmp#* }"
40185
40186  # Input might be given as Windows format, start by converting to
40187  # unix format.
40188  new_path="$path"
40189
40190  windows_path="$new_path"
40191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40192    unix_path=`$CYGPATH -u "$windows_path"`
40193    new_path="$unix_path"
40194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40196    new_path="$unix_path"
40197  fi
40198
40199
40200  # Now try to locate executable using which
40201  new_path=`$WHICH "$new_path" 2> /dev/null`
40202
40203  if test "x$new_path" = x; then
40204    # Oops. Which didn't find the executable.
40205    # The splitting of arguments from the executable at a space might have been incorrect,
40206    # since paths with space are more likely in Windows. Give it another try with the whole
40207    # argument.
40208    path="$complete"
40209    arguments="EOL"
40210    new_path="$path"
40211
40212  windows_path="$new_path"
40213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40214    unix_path=`$CYGPATH -u "$windows_path"`
40215    new_path="$unix_path"
40216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40218    new_path="$unix_path"
40219  fi
40220
40221
40222    new_path=`$WHICH "$new_path" 2> /dev/null`
40223    # bat and cmd files are not always considered executable in MSYS causing which
40224    # to not find them
40225    if test "x$new_path" = x \
40226        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40227        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40228      new_path="$path"
40229
40230  windows_path="$new_path"
40231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40232    unix_path=`$CYGPATH -u "$windows_path"`
40233    new_path="$unix_path"
40234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40236    new_path="$unix_path"
40237  fi
40238
40239    fi
40240
40241    if test "x$new_path" = x; then
40242      # It's still not found. Now this is an unrecoverable error.
40243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40244$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40245      has_space=`$ECHO "$complete" | $GREP " "`
40246      if test "x$has_space" != x; then
40247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40249      fi
40250      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40251    fi
40252  fi
40253
40254  # Now new_path has a complete unix path to the binary
40255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40256    # Keep paths in /bin as-is, but remove trailing .exe if any
40257    new_path="${new_path/%.exe/}"
40258    # Do not save /bin paths to all_fixpath_prefixes!
40259  else
40260    # Not in mixed or Windows style, start by that.
40261    new_path=`cmd //c echo $new_path`
40262
40263  input_path="$new_path"
40264  # Check if we need to convert this using DOS-style short mode. If the path
40265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40266  # take no chances and rewrite it.
40267  # Note: m4 eats our [], so we need to use [ and ] instead.
40268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40269  if test "x$has_forbidden_chars" != x; then
40270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40272  fi
40273
40274    # Output is in $new_path
40275
40276  windows_path="$new_path"
40277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40278    unix_path=`$CYGPATH -u "$windows_path"`
40279    new_path="$unix_path"
40280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40282    new_path="$unix_path"
40283  fi
40284
40285    # remove trailing .exe if any
40286    new_path="${new_path/%.exe/}"
40287
40288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40290  fi
40291
40292    else
40293      # We're on a unix platform. Hooray! :)
40294      # First separate the path from the arguments. This will split at the first
40295      # space.
40296      complete="$BUILD_CXX"
40297      path="${complete%% *}"
40298      tmp="$complete EOL"
40299      arguments="${tmp#* }"
40300
40301      # Cannot rely on the command "which" here since it doesn't always work.
40302      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40303      if test -z "$is_absolute_path"; then
40304        # Path to executable is not absolute. Find it.
40305        IFS_save="$IFS"
40306        IFS=:
40307        for p in $PATH; do
40308          if test -f "$p/$path" && test -x "$p/$path"; then
40309            new_path="$p/$path"
40310            break
40311          fi
40312        done
40313        IFS="$IFS_save"
40314      else
40315        # This is an absolute path, we can use it without further modifications.
40316        new_path="$path"
40317      fi
40318
40319      if test "x$new_path" = x; then
40320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40321$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40322        has_space=`$ECHO "$complete" | $GREP " "`
40323        if test "x$has_space" != x; then
40324          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40325$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40326        fi
40327        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40328      fi
40329    fi
40330
40331    # Now join together the path and the arguments once again
40332    if test "x$arguments" != xEOL; then
40333      new_complete="$new_path ${arguments% *}"
40334    else
40335      new_complete="$new_path"
40336    fi
40337
40338    if test "x$complete" != "x$new_complete"; then
40339      BUILD_CXX="$new_complete"
40340      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40341$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40342    fi
40343  fi
40344
40345
40346
40347  # Publish this variable in the help.
40348
40349
40350  if test "x$BUILD_LD" = x; then
40351    # The variable is not set by user, try to locate tool using the code snippet
40352    for ac_prog in ld
40353do
40354  # Extract the first word of "$ac_prog", so it can be a program name with args.
40355set dummy $ac_prog; ac_word=$2
40356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40357$as_echo_n "checking for $ac_word... " >&6; }
40358if ${ac_cv_path_BUILD_LD+:} false; then :
40359  $as_echo_n "(cached) " >&6
40360else
40361  case $BUILD_LD in
40362  [\\/]* | ?:[\\/]*)
40363  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40364  ;;
40365  *)
40366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40367for as_dir in $PATH
40368do
40369  IFS=$as_save_IFS
40370  test -z "$as_dir" && as_dir=.
40371    for ac_exec_ext in '' $ac_executable_extensions; do
40372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40373    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40375    break 2
40376  fi
40377done
40378  done
40379IFS=$as_save_IFS
40380
40381  ;;
40382esac
40383fi
40384BUILD_LD=$ac_cv_path_BUILD_LD
40385if test -n "$BUILD_LD"; then
40386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40387$as_echo "$BUILD_LD" >&6; }
40388else
40389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40390$as_echo "no" >&6; }
40391fi
40392
40393
40394  test -n "$BUILD_LD" && break
40395done
40396
40397  else
40398    # The variable is set, but is it from the command line or the environment?
40399
40400    # Try to remove the string !BUILD_LD! from our list.
40401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40403      # If it failed, the variable was not from the command line. Ignore it,
40404      # but warn the user (except for BASH, which is always set by the calling BASH).
40405      if test "xBUILD_LD" != xBASH; then
40406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40407$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40408      fi
40409      # Try to locate tool using the code snippet
40410      for ac_prog in ld
40411do
40412  # Extract the first word of "$ac_prog", so it can be a program name with args.
40413set dummy $ac_prog; ac_word=$2
40414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40415$as_echo_n "checking for $ac_word... " >&6; }
40416if ${ac_cv_path_BUILD_LD+:} false; then :
40417  $as_echo_n "(cached) " >&6
40418else
40419  case $BUILD_LD in
40420  [\\/]* | ?:[\\/]*)
40421  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40422  ;;
40423  *)
40424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40425for as_dir in $PATH
40426do
40427  IFS=$as_save_IFS
40428  test -z "$as_dir" && as_dir=.
40429    for ac_exec_ext in '' $ac_executable_extensions; do
40430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40431    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40433    break 2
40434  fi
40435done
40436  done
40437IFS=$as_save_IFS
40438
40439  ;;
40440esac
40441fi
40442BUILD_LD=$ac_cv_path_BUILD_LD
40443if test -n "$BUILD_LD"; then
40444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40445$as_echo "$BUILD_LD" >&6; }
40446else
40447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40448$as_echo "no" >&6; }
40449fi
40450
40451
40452  test -n "$BUILD_LD" && break
40453done
40454
40455    else
40456      # If it succeeded, then it was overridden by the user. We will use it
40457      # for the tool.
40458
40459      # First remove it from the list of overridden variables, so we can test
40460      # for unknown variables in the end.
40461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40462
40463      # Check if the provided tool contains a complete path.
40464      tool_specified="$BUILD_LD"
40465      tool_basename="${tool_specified##*/}"
40466      if test "x$tool_basename" = "x$tool_specified"; then
40467        # A command without a complete path is provided, search $PATH.
40468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40469$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40470        # Extract the first word of "$tool_basename", so it can be a program name with args.
40471set dummy $tool_basename; ac_word=$2
40472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40473$as_echo_n "checking for $ac_word... " >&6; }
40474if ${ac_cv_path_BUILD_LD+:} false; then :
40475  $as_echo_n "(cached) " >&6
40476else
40477  case $BUILD_LD in
40478  [\\/]* | ?:[\\/]*)
40479  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40480  ;;
40481  *)
40482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40483for as_dir in $PATH
40484do
40485  IFS=$as_save_IFS
40486  test -z "$as_dir" && as_dir=.
40487    for ac_exec_ext in '' $ac_executable_extensions; do
40488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40489    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40491    break 2
40492  fi
40493done
40494  done
40495IFS=$as_save_IFS
40496
40497  ;;
40498esac
40499fi
40500BUILD_LD=$ac_cv_path_BUILD_LD
40501if test -n "$BUILD_LD"; then
40502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40503$as_echo "$BUILD_LD" >&6; }
40504else
40505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40506$as_echo "no" >&6; }
40507fi
40508
40509
40510        if test "x$BUILD_LD" = x; then
40511          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40512        fi
40513      else
40514        # Otherwise we believe it is a complete path. Use it as it is.
40515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40516$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40518$as_echo_n "checking for BUILD_LD... " >&6; }
40519        if test ! -x "$tool_specified"; then
40520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40521$as_echo "not found" >&6; }
40522          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40523        fi
40524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40525$as_echo "$tool_specified" >&6; }
40526      fi
40527    fi
40528  fi
40529
40530
40531
40532  # Only process if variable expands to non-empty
40533
40534  if test "x$BUILD_LD" != x; then
40535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40536
40537  # First separate the path from the arguments. This will split at the first
40538  # space.
40539  complete="$BUILD_LD"
40540  path="${complete%% *}"
40541  tmp="$complete EOL"
40542  arguments="${tmp#* }"
40543
40544  # Input might be given as Windows format, start by converting to
40545  # unix format.
40546  new_path=`$CYGPATH -u "$path"`
40547
40548  # Now try to locate executable using which
40549  new_path=`$WHICH "$new_path" 2> /dev/null`
40550  # bat and cmd files are not always considered executable in cygwin causing which
40551  # to not find them
40552  if test "x$new_path" = x \
40553      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40554      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40555    new_path=`$CYGPATH -u "$path"`
40556  fi
40557  if test "x$new_path" = x; then
40558    # Oops. Which didn't find the executable.
40559    # The splitting of arguments from the executable at a space might have been incorrect,
40560    # since paths with space are more likely in Windows. Give it another try with the whole
40561    # argument.
40562    path="$complete"
40563    arguments="EOL"
40564    new_path=`$CYGPATH -u "$path"`
40565    new_path=`$WHICH "$new_path" 2> /dev/null`
40566    # bat and cmd files are not always considered executable in cygwin causing which
40567    # to not find them
40568    if test "x$new_path" = x \
40569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40571      new_path=`$CYGPATH -u "$path"`
40572    fi
40573    if test "x$new_path" = x; then
40574      # It's still not found. Now this is an unrecoverable error.
40575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40576$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40577      has_space=`$ECHO "$complete" | $GREP " "`
40578      if test "x$has_space" != x; then
40579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40581      fi
40582      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40583    fi
40584  fi
40585
40586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40589  # "foo.exe" is OK but "foo" is an error.
40590  #
40591  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40592  # It is also a way to make sure we got the proper file name for the real test later on.
40593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40594  if test "x$test_shortpath" = x; then
40595    # Short path failed, file does not exist as specified.
40596    # Try adding .exe or .cmd
40597    if test -f "${new_path}.exe"; then
40598      input_to_shortpath="${new_path}.exe"
40599    elif test -f "${new_path}.cmd"; then
40600      input_to_shortpath="${new_path}.cmd"
40601    else
40602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40603$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40606      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40607    fi
40608  else
40609    input_to_shortpath="$new_path"
40610  fi
40611
40612  # Call helper function which possibly converts this using DOS-style short mode.
40613  # If so, the updated path is stored in $new_path.
40614  new_path="$input_to_shortpath"
40615
40616  input_path="$input_to_shortpath"
40617  # Check if we need to convert this using DOS-style short mode. If the path
40618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40619  # take no chances and rewrite it.
40620  # Note: m4 eats our [], so we need to use [ and ] instead.
40621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40622  if test "x$has_forbidden_chars" != x; then
40623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40627      # Going to short mode and back again did indeed matter. Since short mode is
40628      # case insensitive, let's make it lowercase to improve readability.
40629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40630      # Now convert it back to Unix-stile (cygpath)
40631      input_path=`$CYGPATH -u "$shortmode_path"`
40632      new_path="$input_path"
40633    fi
40634  fi
40635
40636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40637  if test "x$test_cygdrive_prefix" = x; then
40638    # As a simple fix, exclude /usr/bin since it's not a real path.
40639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40641      # a path prefixed by /cygdrive for fixpath to work.
40642      new_path="$CYGWIN_ROOT_PATH$input_path"
40643    fi
40644  fi
40645
40646  # remove trailing .exe if any
40647  new_path="${new_path/%.exe/}"
40648
40649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40650
40651  # First separate the path from the arguments. This will split at the first
40652  # space.
40653  complete="$BUILD_LD"
40654  path="${complete%% *}"
40655  tmp="$complete EOL"
40656  arguments="${tmp#* }"
40657
40658  # Input might be given as Windows format, start by converting to
40659  # unix format.
40660  new_path="$path"
40661
40662  windows_path="$new_path"
40663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40664    unix_path=`$CYGPATH -u "$windows_path"`
40665    new_path="$unix_path"
40666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40668    new_path="$unix_path"
40669  fi
40670
40671
40672  # Now try to locate executable using which
40673  new_path=`$WHICH "$new_path" 2> /dev/null`
40674
40675  if test "x$new_path" = x; then
40676    # Oops. Which didn't find the executable.
40677    # The splitting of arguments from the executable at a space might have been incorrect,
40678    # since paths with space are more likely in Windows. Give it another try with the whole
40679    # argument.
40680    path="$complete"
40681    arguments="EOL"
40682    new_path="$path"
40683
40684  windows_path="$new_path"
40685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40686    unix_path=`$CYGPATH -u "$windows_path"`
40687    new_path="$unix_path"
40688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40690    new_path="$unix_path"
40691  fi
40692
40693
40694    new_path=`$WHICH "$new_path" 2> /dev/null`
40695    # bat and cmd files are not always considered executable in MSYS causing which
40696    # to not find them
40697    if test "x$new_path" = x \
40698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40700      new_path="$path"
40701
40702  windows_path="$new_path"
40703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40704    unix_path=`$CYGPATH -u "$windows_path"`
40705    new_path="$unix_path"
40706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40708    new_path="$unix_path"
40709  fi
40710
40711    fi
40712
40713    if test "x$new_path" = x; then
40714      # It's still not found. Now this is an unrecoverable error.
40715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40716$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40717      has_space=`$ECHO "$complete" | $GREP " "`
40718      if test "x$has_space" != x; then
40719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40721      fi
40722      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40723    fi
40724  fi
40725
40726  # Now new_path has a complete unix path to the binary
40727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40728    # Keep paths in /bin as-is, but remove trailing .exe if any
40729    new_path="${new_path/%.exe/}"
40730    # Do not save /bin paths to all_fixpath_prefixes!
40731  else
40732    # Not in mixed or Windows style, start by that.
40733    new_path=`cmd //c echo $new_path`
40734
40735  input_path="$new_path"
40736  # Check if we need to convert this using DOS-style short mode. If the path
40737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40738  # take no chances and rewrite it.
40739  # Note: m4 eats our [], so we need to use [ and ] instead.
40740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40741  if test "x$has_forbidden_chars" != x; then
40742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40744  fi
40745
40746    # Output is in $new_path
40747
40748  windows_path="$new_path"
40749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40750    unix_path=`$CYGPATH -u "$windows_path"`
40751    new_path="$unix_path"
40752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40754    new_path="$unix_path"
40755  fi
40756
40757    # remove trailing .exe if any
40758    new_path="${new_path/%.exe/}"
40759
40760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40762  fi
40763
40764    else
40765      # We're on a unix platform. Hooray! :)
40766      # First separate the path from the arguments. This will split at the first
40767      # space.
40768      complete="$BUILD_LD"
40769      path="${complete%% *}"
40770      tmp="$complete EOL"
40771      arguments="${tmp#* }"
40772
40773      # Cannot rely on the command "which" here since it doesn't always work.
40774      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40775      if test -z "$is_absolute_path"; then
40776        # Path to executable is not absolute. Find it.
40777        IFS_save="$IFS"
40778        IFS=:
40779        for p in $PATH; do
40780          if test -f "$p/$path" && test -x "$p/$path"; then
40781            new_path="$p/$path"
40782            break
40783          fi
40784        done
40785        IFS="$IFS_save"
40786      else
40787        # This is an absolute path, we can use it without further modifications.
40788        new_path="$path"
40789      fi
40790
40791      if test "x$new_path" = x; then
40792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40793$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40794        has_space=`$ECHO "$complete" | $GREP " "`
40795        if test "x$has_space" != x; then
40796          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40798        fi
40799        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40800      fi
40801    fi
40802
40803    # Now join together the path and the arguments once again
40804    if test "x$arguments" != xEOL; then
40805      new_complete="$new_path ${arguments% *}"
40806    else
40807      new_complete="$new_path"
40808    fi
40809
40810    if test "x$complete" != "x$new_complete"; then
40811      BUILD_LD="$new_complete"
40812      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40813$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40814    fi
40815  fi
40816
40817  else
40818    # If we are not cross compiling, use the normal target compilers for
40819    # building the build platform executables.
40820    BUILD_CC="$CC"
40821    BUILD_CXX="$CXX"
40822    BUILD_LD="$LD"
40823  fi
40824
40825
40826
40827
40828
40829
40830  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40831    # For hotspot, we need these in Windows mixed path,
40832    # so rewrite them all. Need added .exe suffix.
40833    HOTSPOT_CXX="$CXX.exe"
40834    HOTSPOT_LD="$LD.exe"
40835    HOTSPOT_MT="$MT.exe"
40836    HOTSPOT_RC="$RC.exe"
40837
40838  unix_path="$HOTSPOT_CXX"
40839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40840    windows_path=`$CYGPATH -m "$unix_path"`
40841    HOTSPOT_CXX="$windows_path"
40842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40843    windows_path=`cmd //c echo $unix_path`
40844    HOTSPOT_CXX="$windows_path"
40845  fi
40846
40847
40848  unix_path="$HOTSPOT_LD"
40849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40850    windows_path=`$CYGPATH -m "$unix_path"`
40851    HOTSPOT_LD="$windows_path"
40852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40853    windows_path=`cmd //c echo $unix_path`
40854    HOTSPOT_LD="$windows_path"
40855  fi
40856
40857
40858  unix_path="$HOTSPOT_MT"
40859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40860    windows_path=`$CYGPATH -m "$unix_path"`
40861    HOTSPOT_MT="$windows_path"
40862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40863    windows_path=`cmd //c echo $unix_path`
40864    HOTSPOT_MT="$windows_path"
40865  fi
40866
40867
40868  unix_path="$HOTSPOT_RC"
40869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40870    windows_path=`$CYGPATH -m "$unix_path"`
40871    HOTSPOT_RC="$windows_path"
40872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40873    windows_path=`cmd //c echo $unix_path`
40874    HOTSPOT_RC="$windows_path"
40875  fi
40876
40877
40878
40879  else
40880    HOTSPOT_CXX="$CXX"
40881    HOTSPOT_LD="$LD"
40882  fi
40883
40884
40885
40886  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40887    USE_CLANG=true
40888  fi
40889
40890
40891  # LDEXE is the linker to use, when creating executables. Not really used.
40892  # FIXME: These should just be removed!
40893  LDEXE="$LD"
40894  LDEXECXX="$LDCXX"
40895
40896
40897
40898
40899
40900
40901  # The package path is used only on macosx?
40902  # FIXME: clean this up, and/or move it elsewhere.
40903  PACKAGE_PATH=/opt/local
40904
40905
40906  # Check for extra potential brokenness.
40907  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40908    # On Windows, double-check that we got the right compiler.
40909    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40910    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40911    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40912      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40913        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
40914      fi
40915    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40916      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40917        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40918      fi
40919    fi
40920  fi
40921
40922  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40923    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40924    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40925    # This is later checked when setting flags.
40926
40927    # "-Og" suppported for GCC 4.8 and later
40928    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40929
40930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40931$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40932  supports=yes
40933
40934  saved_cflags="$CFLAGS"
40935  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40936  ac_ext=c
40937ac_cpp='$CPP $CPPFLAGS'
40938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40940ac_compiler_gnu=$ac_cv_c_compiler_gnu
40941
40942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40943/* end confdefs.h.  */
40944int i;
40945_ACEOF
40946if ac_fn_c_try_compile "$LINENO"; then :
40947
40948else
40949  supports=no
40950fi
40951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40952  ac_ext=cpp
40953ac_cpp='$CXXCPP $CPPFLAGS'
40954ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40955ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40956ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40957
40958  CFLAGS="$saved_cflags"
40959
40960  saved_cxxflags="$CXXFLAGS"
40961  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40962  ac_ext=cpp
40963ac_cpp='$CXXCPP $CPPFLAGS'
40964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40967
40968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40969/* end confdefs.h.  */
40970int i;
40971_ACEOF
40972if ac_fn_cxx_try_compile "$LINENO"; then :
40973
40974else
40975  supports=no
40976fi
40977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40978  ac_ext=cpp
40979ac_cpp='$CXXCPP $CPPFLAGS'
40980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40983
40984  CXXFLAGS="$saved_cxxflags"
40985
40986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40987$as_echo "$supports" >&6; }
40988  if test "x$supports" = "xyes" ; then
40989    HAS_CFLAG_OPTIMIZE_DEBUG=true
40990  else
40991    HAS_CFLAG_OPTIMIZE_DEBUG=false
40992  fi
40993
40994
40995    # "-z relro" supported in GNU binutils 2.17 and later
40996    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40997
40998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40999$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41000  supports=yes
41001
41002  saved_ldflags="$LDFLAGS"
41003  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41004  ac_ext=c
41005ac_cpp='$CPP $CPPFLAGS'
41006ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41007ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41008ac_compiler_gnu=$ac_cv_c_compiler_gnu
41009
41010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41011/* end confdefs.h.  */
41012
41013int
41014main ()
41015{
41016
41017  ;
41018  return 0;
41019}
41020_ACEOF
41021if ac_fn_c_try_link "$LINENO"; then :
41022
41023else
41024  supports=no
41025fi
41026rm -f core conftest.err conftest.$ac_objext \
41027    conftest$ac_exeext conftest.$ac_ext
41028  ac_ext=cpp
41029ac_cpp='$CXXCPP $CPPFLAGS'
41030ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41031ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41032ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41033
41034  LDFLAGS="$saved_ldflags"
41035
41036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41037$as_echo "$supports" >&6; }
41038  if test "x$supports" = "xyes" ; then
41039    HAS_LINKER_RELRO=true
41040  else
41041    HAS_LINKER_RELRO=false
41042  fi
41043
41044
41045    # "-z now" supported in GNU binutils 2.11 and later
41046    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41047
41048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41049$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41050  supports=yes
41051
41052  saved_ldflags="$LDFLAGS"
41053  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41054  ac_ext=c
41055ac_cpp='$CPP $CPPFLAGS'
41056ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41057ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41058ac_compiler_gnu=$ac_cv_c_compiler_gnu
41059
41060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41061/* end confdefs.h.  */
41062
41063int
41064main ()
41065{
41066
41067  ;
41068  return 0;
41069}
41070_ACEOF
41071if ac_fn_c_try_link "$LINENO"; then :
41072
41073else
41074  supports=no
41075fi
41076rm -f core conftest.err conftest.$ac_objext \
41077    conftest$ac_exeext conftest.$ac_ext
41078  ac_ext=cpp
41079ac_cpp='$CXXCPP $CPPFLAGS'
41080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41083
41084  LDFLAGS="$saved_ldflags"
41085
41086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41087$as_echo "$supports" >&6; }
41088  if test "x$supports" = "xyes" ; then
41089    HAS_LINKER_NOW=true
41090  else
41091    HAS_LINKER_NOW=false
41092  fi
41093
41094  fi
41095
41096  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41097  # in executable.'
41098  USING_BROKEN_SUSE_LD=no
41099  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41101$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41102    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41103    $ECHO "int main() { }" > main.c
41104    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41106$as_echo "no" >&6; }
41107      USING_BROKEN_SUSE_LD=no
41108    else
41109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41110$as_echo "yes" >&6; }
41111      USING_BROKEN_SUSE_LD=yes
41112    fi
41113    rm -rf version-script.map main.c a.out
41114  fi
41115
41116
41117
41118# Setup the JTReg Regression Test Harness.
41119
41120
41121# Check whether --with-jtreg was given.
41122if test "${with_jtreg+set}" = set; then :
41123  withval=$with_jtreg;
41124else
41125  with_jtreg=no
41126fi
41127
41128
41129  if test "x$with_jtreg" = xno; then
41130    # jtreg disabled
41131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41132$as_echo_n "checking for jtreg... " >&6; }
41133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41134$as_echo "no" >&6; }
41135  else
41136    if test "x$with_jtreg" != xyes; then
41137      # with path specified.
41138      JT_HOME="$with_jtreg"
41139    fi
41140
41141    if test "x$JT_HOME" != x; then
41142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41143$as_echo_n "checking for jtreg... " >&6; }
41144
41145      # use JT_HOME enviroment var.
41146
41147  # Only process if variable expands to non-empty
41148
41149  if test "x$JT_HOME" != x; then
41150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41151
41152  # Input might be given as Windows format, start by converting to
41153  # unix format.
41154  path="$JT_HOME"
41155  new_path=`$CYGPATH -u "$path"`
41156
41157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41160  # "foo.exe" is OK but "foo" is an error.
41161  #
41162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41163  # It is also a way to make sure we got the proper file name for the real test later on.
41164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41165  if test "x$test_shortpath" = x; then
41166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41167$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41168    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41169  fi
41170
41171  # Call helper function which possibly converts this using DOS-style short mode.
41172  # If so, the updated path is stored in $new_path.
41173
41174  input_path="$new_path"
41175  # Check if we need to convert this using DOS-style short mode. If the path
41176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41177  # take no chances and rewrite it.
41178  # Note: m4 eats our [], so we need to use [ and ] instead.
41179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41180  if test "x$has_forbidden_chars" != x; then
41181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41185      # Going to short mode and back again did indeed matter. Since short mode is
41186      # case insensitive, let's make it lowercase to improve readability.
41187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41188      # Now convert it back to Unix-stile (cygpath)
41189      input_path=`$CYGPATH -u "$shortmode_path"`
41190      new_path="$input_path"
41191    fi
41192  fi
41193
41194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41195  if test "x$test_cygdrive_prefix" = x; then
41196    # As a simple fix, exclude /usr/bin since it's not a real path.
41197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41199      # a path prefixed by /cygdrive for fixpath to work.
41200      new_path="$CYGWIN_ROOT_PATH$input_path"
41201    fi
41202  fi
41203
41204
41205  if test "x$path" != "x$new_path"; then
41206    JT_HOME="$new_path"
41207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41208$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41209  fi
41210
41211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41212
41213  path="$JT_HOME"
41214  has_colon=`$ECHO $path | $GREP ^.:`
41215  new_path="$path"
41216  if test "x$has_colon" = x; then
41217    # Not in mixed or Windows style, start by that.
41218    new_path=`cmd //c echo $path`
41219  fi
41220
41221
41222  input_path="$new_path"
41223  # Check if we need to convert this using DOS-style short mode. If the path
41224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41225  # take no chances and rewrite it.
41226  # Note: m4 eats our [], so we need to use [ and ] instead.
41227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41228  if test "x$has_forbidden_chars" != x; then
41229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41231  fi
41232
41233
41234  windows_path="$new_path"
41235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41236    unix_path=`$CYGPATH -u "$windows_path"`
41237    new_path="$unix_path"
41238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41240    new_path="$unix_path"
41241  fi
41242
41243  if test "x$path" != "x$new_path"; then
41244    JT_HOME="$new_path"
41245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41246$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41247  fi
41248
41249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41251
41252    else
41253      # We're on a unix platform. Hooray! :)
41254      path="$JT_HOME"
41255      has_space=`$ECHO "$path" | $GREP " "`
41256      if test "x$has_space" != x; then
41257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41258$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41260      fi
41261
41262      # Use eval to expand a potential ~
41263      eval path="$path"
41264      if test ! -f "$path" && test ! -d "$path"; then
41265        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41266      fi
41267
41268      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41269    fi
41270  fi
41271
41272
41273      # jtreg win32 script works for everybody
41274      JTREGEXE="$JT_HOME/bin/jtreg"
41275
41276      if test ! -f "$JTREGEXE"; then
41277        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41278      fi
41279
41280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41281$as_echo "$JTREGEXE" >&6; }
41282    else
41283      # try to find jtreg on path
41284
41285
41286
41287  # Publish this variable in the help.
41288
41289
41290  if test "x$JTREGEXE" = x; then
41291    # The variable is not set by user, try to locate tool using the code snippet
41292    for ac_prog in jtreg
41293do
41294  # Extract the first word of "$ac_prog", so it can be a program name with args.
41295set dummy $ac_prog; ac_word=$2
41296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41297$as_echo_n "checking for $ac_word... " >&6; }
41298if ${ac_cv_path_JTREGEXE+:} false; then :
41299  $as_echo_n "(cached) " >&6
41300else
41301  case $JTREGEXE in
41302  [\\/]* | ?:[\\/]*)
41303  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41304  ;;
41305  *)
41306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41307for as_dir in $PATH
41308do
41309  IFS=$as_save_IFS
41310  test -z "$as_dir" && as_dir=.
41311    for ac_exec_ext in '' $ac_executable_extensions; do
41312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41313    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41315    break 2
41316  fi
41317done
41318  done
41319IFS=$as_save_IFS
41320
41321  ;;
41322esac
41323fi
41324JTREGEXE=$ac_cv_path_JTREGEXE
41325if test -n "$JTREGEXE"; then
41326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41327$as_echo "$JTREGEXE" >&6; }
41328else
41329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41330$as_echo "no" >&6; }
41331fi
41332
41333
41334  test -n "$JTREGEXE" && break
41335done
41336
41337  else
41338    # The variable is set, but is it from the command line or the environment?
41339
41340    # Try to remove the string !JTREGEXE! from our list.
41341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41343      # If it failed, the variable was not from the command line. Ignore it,
41344      # but warn the user (except for BASH, which is always set by the calling BASH).
41345      if test "xJTREGEXE" != xBASH; then
41346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41347$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41348      fi
41349      # Try to locate tool using the code snippet
41350      for ac_prog in jtreg
41351do
41352  # Extract the first word of "$ac_prog", so it can be a program name with args.
41353set dummy $ac_prog; ac_word=$2
41354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41355$as_echo_n "checking for $ac_word... " >&6; }
41356if ${ac_cv_path_JTREGEXE+:} false; then :
41357  $as_echo_n "(cached) " >&6
41358else
41359  case $JTREGEXE in
41360  [\\/]* | ?:[\\/]*)
41361  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41362  ;;
41363  *)
41364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41365for as_dir in $PATH
41366do
41367  IFS=$as_save_IFS
41368  test -z "$as_dir" && as_dir=.
41369    for ac_exec_ext in '' $ac_executable_extensions; do
41370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41371    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41373    break 2
41374  fi
41375done
41376  done
41377IFS=$as_save_IFS
41378
41379  ;;
41380esac
41381fi
41382JTREGEXE=$ac_cv_path_JTREGEXE
41383if test -n "$JTREGEXE"; then
41384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41385$as_echo "$JTREGEXE" >&6; }
41386else
41387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41388$as_echo "no" >&6; }
41389fi
41390
41391
41392  test -n "$JTREGEXE" && break
41393done
41394
41395    else
41396      # If it succeeded, then it was overridden by the user. We will use it
41397      # for the tool.
41398
41399      # First remove it from the list of overridden variables, so we can test
41400      # for unknown variables in the end.
41401      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41402
41403      # Check if the provided tool contains a complete path.
41404      tool_specified="$JTREGEXE"
41405      tool_basename="${tool_specified##*/}"
41406      if test "x$tool_basename" = "x$tool_specified"; then
41407        # A command without a complete path is provided, search $PATH.
41408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41409$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41410        # Extract the first word of "$tool_basename", so it can be a program name with args.
41411set dummy $tool_basename; ac_word=$2
41412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41413$as_echo_n "checking for $ac_word... " >&6; }
41414if ${ac_cv_path_JTREGEXE+:} false; then :
41415  $as_echo_n "(cached) " >&6
41416else
41417  case $JTREGEXE in
41418  [\\/]* | ?:[\\/]*)
41419  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41420  ;;
41421  *)
41422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41423for as_dir in $PATH
41424do
41425  IFS=$as_save_IFS
41426  test -z "$as_dir" && as_dir=.
41427    for ac_exec_ext in '' $ac_executable_extensions; do
41428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41429    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41431    break 2
41432  fi
41433done
41434  done
41435IFS=$as_save_IFS
41436
41437  ;;
41438esac
41439fi
41440JTREGEXE=$ac_cv_path_JTREGEXE
41441if test -n "$JTREGEXE"; then
41442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41443$as_echo "$JTREGEXE" >&6; }
41444else
41445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41446$as_echo "no" >&6; }
41447fi
41448
41449
41450        if test "x$JTREGEXE" = x; then
41451          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41452        fi
41453      else
41454        # Otherwise we believe it is a complete path. Use it as it is.
41455        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41456$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41457        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41458$as_echo_n "checking for JTREGEXE... " >&6; }
41459        if test ! -x "$tool_specified"; then
41460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41461$as_echo "not found" >&6; }
41462          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41463        fi
41464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41465$as_echo "$tool_specified" >&6; }
41466      fi
41467    fi
41468  fi
41469
41470
41471
41472  if test "x$JTREGEXE" = x; then
41473    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41474  fi
41475
41476
41477      JT_HOME="`$DIRNAME $JTREGEXE`"
41478    fi
41479  fi
41480
41481
41482
41483
41484
41485
41486  # Option used to tell the compiler whether to create 32- or 64-bit executables
41487  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41488    COMPILER_TARGET_BITS_FLAG="-q"
41489  else
41490    COMPILER_TARGET_BITS_FLAG="-m"
41491  fi
41492
41493
41494  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41495  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41496    ARFLAGS="-r"
41497  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41498    ARFLAGS="-X64"
41499  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41500    # lib.exe is used as AR to create static libraries.
41501    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41502  else
41503    ARFLAGS=""
41504  fi
41505
41506
41507  ## Setup strip.
41508  # FIXME: should this really be per platform, or should it be per toolchain type?
41509  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41510  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41511  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41512    STRIPFLAGS="-g"
41513  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41514    STRIPFLAGS="-x"
41515  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41516    STRIPFLAGS="-S"
41517  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41518    STRIPFLAGS="-X32_64"
41519  fi
41520
41521  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41522    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41523  fi
41524
41525
41526  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41527    # FIXME: break out into MCSFLAGS
41528    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41529  fi
41530
41531
41532  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41533    CC_OUT_OPTION=-Fo
41534    EXE_OUT_OPTION=-out:
41535    LD_OUT_OPTION=-out:
41536    AR_OUT_OPTION=-out:
41537  else
41538    # The option used to specify the target .o,.a or .so file.
41539    # When compiling, how to specify the to be created object file.
41540    CC_OUT_OPTION='-o$(SPACE)'
41541    # When linking, how to specify the to be created executable.
41542    EXE_OUT_OPTION='-o$(SPACE)'
41543    # When linking, how to specify the to be created dynamically linkable library.
41544    LD_OUT_OPTION='-o$(SPACE)'
41545    # When archiving, how to specify the to be create static archive for object files.
41546    AR_OUT_OPTION='rcs$(SPACE)'
41547  fi
41548
41549
41550
41551
41552
41553  # On Windows, we need to set RC flags.
41554  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41555    RC_FLAGS="-nologo -l0x409"
41556    if test "x$VARIANT" = xOPT; then
41557      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41558    fi
41559
41560    # The version variables used to create RC_FLAGS may be overridden
41561    # in a custom configure script, or possibly the command line.
41562    # Let those variables be expanded at make time in spec.gmk.
41563    # The \$ are escaped to the shell, and the $(...) variables
41564    # are evaluated by make.
41565    RC_FLAGS="$RC_FLAGS \
41566        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41567        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41568        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41569        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41570        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41571        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41572        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41573  fi
41574
41575
41576  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41577    # silence copyright notice and other headers.
41578    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41579  fi
41580
41581  if test "x$SYSROOT" != "x"; then
41582    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41583      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41584        # Solaris Studio does not have a concept of sysroot. Instead we must
41585        # make sure the default include and lib dirs are appended to each
41586        # compile and link command line.
41587        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41588        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41589            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41590            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41591      fi
41592    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41593      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41594      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41595      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41596    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41597      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41598      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41599    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41600      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41601      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41602    fi
41603    # Propagate the sysroot args to hotspot
41604    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41605    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41606    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41607  fi
41608
41609  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41610  # set this here so it doesn't have to be peppered throughout the forest
41611  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41612    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41613    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41614  fi
41615
41616
41617
41618
41619
41620# FIXME: Currently we must test this after toolchain but before flags. Fix!
41621
41622# Now we can test some aspects on the target using configure macros.
41623
41624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41625$as_echo_n "checking for ANSI C header files... " >&6; }
41626if ${ac_cv_header_stdc+:} false; then :
41627  $as_echo_n "(cached) " >&6
41628else
41629  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41630/* end confdefs.h.  */
41631#include <stdlib.h>
41632#include <stdarg.h>
41633#include <string.h>
41634#include <float.h>
41635
41636int
41637main ()
41638{
41639
41640  ;
41641  return 0;
41642}
41643_ACEOF
41644if ac_fn_cxx_try_compile "$LINENO"; then :
41645  ac_cv_header_stdc=yes
41646else
41647  ac_cv_header_stdc=no
41648fi
41649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41650
41651if test $ac_cv_header_stdc = yes; then
41652  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41653  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41654/* end confdefs.h.  */
41655#include <string.h>
41656
41657_ACEOF
41658if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41659  $EGREP "memchr" >/dev/null 2>&1; then :
41660
41661else
41662  ac_cv_header_stdc=no
41663fi
41664rm -f conftest*
41665
41666fi
41667
41668if test $ac_cv_header_stdc = yes; then
41669  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41671/* end confdefs.h.  */
41672#include <stdlib.h>
41673
41674_ACEOF
41675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41676  $EGREP "free" >/dev/null 2>&1; then :
41677
41678else
41679  ac_cv_header_stdc=no
41680fi
41681rm -f conftest*
41682
41683fi
41684
41685if test $ac_cv_header_stdc = yes; then
41686  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41687  if test "$cross_compiling" = yes; then :
41688  :
41689else
41690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41691/* end confdefs.h.  */
41692#include <ctype.h>
41693#include <stdlib.h>
41694#if ((' ' & 0x0FF) == 0x020)
41695# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41696# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41697#else
41698# define ISLOWER(c) \
41699		   (('a' <= (c) && (c) <= 'i') \
41700		     || ('j' <= (c) && (c) <= 'r') \
41701		     || ('s' <= (c) && (c) <= 'z'))
41702# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41703#endif
41704
41705#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41706int
41707main ()
41708{
41709  int i;
41710  for (i = 0; i < 256; i++)
41711    if (XOR (islower (i), ISLOWER (i))
41712	|| toupper (i) != TOUPPER (i))
41713      return 2;
41714  return 0;
41715}
41716_ACEOF
41717if ac_fn_cxx_try_run "$LINENO"; then :
41718
41719else
41720  ac_cv_header_stdc=no
41721fi
41722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41723  conftest.$ac_objext conftest.beam conftest.$ac_ext
41724fi
41725
41726fi
41727fi
41728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41729$as_echo "$ac_cv_header_stdc" >&6; }
41730if test $ac_cv_header_stdc = yes; then
41731
41732$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41733
41734fi
41735
41736# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41737for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41738		  inttypes.h stdint.h unistd.h
41739do :
41740  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41741ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41742"
41743if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41744  cat >>confdefs.h <<_ACEOF
41745#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41746_ACEOF
41747
41748fi
41749
41750done
41751
41752
41753
41754  ###############################################################################
41755  #
41756  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41757  # (The JVM can use 32 or 64 bit Java pointers but that decision
41758  # is made at runtime.)
41759  #
41760
41761  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41762    # Always specify -m flag on Solaris
41763    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41764
41765  # When we add flags to the "official" CFLAGS etc, we need to
41766  # keep track of these additions in ADDED_CFLAGS etc. These
41767  # will later be checked to make sure only controlled additions
41768  # have been made to CFLAGS etc.
41769  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41770  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41771  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41772
41773  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41774  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41775  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41776
41777  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41778  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41779  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41780
41781  elif test "x$COMPILE_TYPE" = xreduced; then
41782    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41783      # Specify -m if running reduced on unix platforms
41784
41785  # When we add flags to the "official" CFLAGS etc, we need to
41786  # keep track of these additions in ADDED_CFLAGS etc. These
41787  # will later be checked to make sure only controlled additions
41788  # have been made to CFLAGS etc.
41789  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41790  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41791  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41792
41793  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41794  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41795  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41796
41797  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41798  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41799  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41800
41801    fi
41802  fi
41803
41804  # Make compilation sanity check
41805  for ac_header in stdio.h
41806do :
41807  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41808if test "x$ac_cv_header_stdio_h" = xyes; then :
41809  cat >>confdefs.h <<_ACEOF
41810#define HAVE_STDIO_H 1
41811_ACEOF
41812
41813else
41814
41815    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41816$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41817    if test "x$COMPILE_TYPE" = xreduced; then
41818      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41819$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41820    elif test "x$COMPILE_TYPE" = xcross; then
41821      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41822$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41823    fi
41824    as_fn_error $? "Cannot continue." "$LINENO" 5
41825
41826fi
41827
41828done
41829
41830
41831  # The cast to long int works around a bug in the HP C Compiler
41832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41834# This bug is HP SR number 8606223364.
41835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41836$as_echo_n "checking size of int *... " >&6; }
41837if ${ac_cv_sizeof_int_p+:} false; then :
41838  $as_echo_n "(cached) " >&6
41839else
41840  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41841
41842else
41843  if test "$ac_cv_type_int_p" = yes; then
41844     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41846as_fn_error 77 "cannot compute sizeof (int *)
41847See \`config.log' for more details" "$LINENO" 5; }
41848   else
41849     ac_cv_sizeof_int_p=0
41850   fi
41851fi
41852
41853fi
41854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41855$as_echo "$ac_cv_sizeof_int_p" >&6; }
41856
41857
41858
41859cat >>confdefs.h <<_ACEOF
41860#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41861_ACEOF
41862
41863
41864
41865  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41866  if test "x$ac_cv_sizeof_int_p" = x; then
41867    # The test failed, lets stick to the assumed value.
41868    { $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
41869$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41870  else
41871    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41872
41873    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41874      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41875      # Let's try to implicitely set the compilers target architecture and retry the test
41876      { $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
41877$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;}
41878      { $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
41879$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;}
41880
41881  # When we add flags to the "official" CFLAGS etc, we need to
41882  # keep track of these additions in ADDED_CFLAGS etc. These
41883  # will later be checked to make sure only controlled additions
41884  # have been made to CFLAGS etc.
41885  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41886  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41887  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41888
41889  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41890  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41891  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41892
41893  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41894  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41895  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41896
41897
41898      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41899      unset ac_cv_sizeof_int_p
41900      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41901      cat >>confdefs.h <<_ACEOF
41902#undef SIZEOF_INT_P
41903_ACEOF
41904
41905      # The cast to long int works around a bug in the HP C Compiler
41906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41908# This bug is HP SR number 8606223364.
41909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41910$as_echo_n "checking size of int *... " >&6; }
41911if ${ac_cv_sizeof_int_p+:} false; then :
41912  $as_echo_n "(cached) " >&6
41913else
41914  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41915
41916else
41917  if test "$ac_cv_type_int_p" = yes; then
41918     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41920as_fn_error 77 "cannot compute sizeof (int *)
41921See \`config.log' for more details" "$LINENO" 5; }
41922   else
41923     ac_cv_sizeof_int_p=0
41924   fi
41925fi
41926
41927fi
41928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41929$as_echo "$ac_cv_sizeof_int_p" >&6; }
41930
41931
41932
41933cat >>confdefs.h <<_ACEOF
41934#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41935_ACEOF
41936
41937
41938
41939      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41940
41941      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41942        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
41943      fi
41944    fi
41945  fi
41946
41947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41948$as_echo_n "checking for target address size... " >&6; }
41949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41950$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41951
41952
41953  ###############################################################################
41954  #
41955  # Is the target little of big endian?
41956  #
41957   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41958$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41959if ${ac_cv_c_bigendian+:} false; then :
41960  $as_echo_n "(cached) " >&6
41961else
41962  ac_cv_c_bigendian=unknown
41963    # See if we're dealing with a universal compiler.
41964    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41965/* end confdefs.h.  */
41966#ifndef __APPLE_CC__
41967	       not a universal capable compiler
41968	     #endif
41969	     typedef int dummy;
41970
41971_ACEOF
41972if ac_fn_cxx_try_compile "$LINENO"; then :
41973
41974	# Check for potential -arch flags.  It is not universal unless
41975	# there are at least two -arch flags with different values.
41976	ac_arch=
41977	ac_prev=
41978	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41979	 if test -n "$ac_prev"; then
41980	   case $ac_word in
41981	     i?86 | x86_64 | ppc | ppc64)
41982	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41983		 ac_arch=$ac_word
41984	       else
41985		 ac_cv_c_bigendian=universal
41986		 break
41987	       fi
41988	       ;;
41989	   esac
41990	   ac_prev=
41991	 elif test "x$ac_word" = "x-arch"; then
41992	   ac_prev=arch
41993	 fi
41994       done
41995fi
41996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41997    if test $ac_cv_c_bigendian = unknown; then
41998      # See if sys/param.h defines the BYTE_ORDER macro.
41999      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42000/* end confdefs.h.  */
42001#include <sys/types.h>
42002	     #include <sys/param.h>
42003
42004int
42005main ()
42006{
42007#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42008		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42009		     && LITTLE_ENDIAN)
42010	      bogus endian macros
42011	     #endif
42012
42013  ;
42014  return 0;
42015}
42016_ACEOF
42017if ac_fn_cxx_try_compile "$LINENO"; then :
42018  # It does; now see whether it defined to BIG_ENDIAN or not.
42019	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42020/* end confdefs.h.  */
42021#include <sys/types.h>
42022		#include <sys/param.h>
42023
42024int
42025main ()
42026{
42027#if BYTE_ORDER != BIG_ENDIAN
42028		 not big endian
42029		#endif
42030
42031  ;
42032  return 0;
42033}
42034_ACEOF
42035if ac_fn_cxx_try_compile "$LINENO"; then :
42036  ac_cv_c_bigendian=yes
42037else
42038  ac_cv_c_bigendian=no
42039fi
42040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42041fi
42042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42043    fi
42044    if test $ac_cv_c_bigendian = unknown; then
42045      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42046      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42047/* end confdefs.h.  */
42048#include <limits.h>
42049
42050int
42051main ()
42052{
42053#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42054	      bogus endian macros
42055	     #endif
42056
42057  ;
42058  return 0;
42059}
42060_ACEOF
42061if ac_fn_cxx_try_compile "$LINENO"; then :
42062  # It does; now see whether it defined to _BIG_ENDIAN or not.
42063	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42064/* end confdefs.h.  */
42065#include <limits.h>
42066
42067int
42068main ()
42069{
42070#ifndef _BIG_ENDIAN
42071		 not big endian
42072		#endif
42073
42074  ;
42075  return 0;
42076}
42077_ACEOF
42078if ac_fn_cxx_try_compile "$LINENO"; then :
42079  ac_cv_c_bigendian=yes
42080else
42081  ac_cv_c_bigendian=no
42082fi
42083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42084fi
42085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42086    fi
42087    if test $ac_cv_c_bigendian = unknown; then
42088      # Compile a test program.
42089      if test "$cross_compiling" = yes; then :
42090  # Try to guess by grepping values from an object file.
42091	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42092/* end confdefs.h.  */
42093short int ascii_mm[] =
42094		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42095		short int ascii_ii[] =
42096		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42097		int use_ascii (int i) {
42098		  return ascii_mm[i] + ascii_ii[i];
42099		}
42100		short int ebcdic_ii[] =
42101		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42102		short int ebcdic_mm[] =
42103		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42104		int use_ebcdic (int i) {
42105		  return ebcdic_mm[i] + ebcdic_ii[i];
42106		}
42107		extern int foo;
42108
42109int
42110main ()
42111{
42112return use_ascii (foo) == use_ebcdic (foo);
42113  ;
42114  return 0;
42115}
42116_ACEOF
42117if ac_fn_cxx_try_compile "$LINENO"; then :
42118  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42119	      ac_cv_c_bigendian=yes
42120	    fi
42121	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42122	      if test "$ac_cv_c_bigendian" = unknown; then
42123		ac_cv_c_bigendian=no
42124	      else
42125		# finding both strings is unlikely to happen, but who knows?
42126		ac_cv_c_bigendian=unknown
42127	      fi
42128	    fi
42129fi
42130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42131else
42132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42133/* end confdefs.h.  */
42134$ac_includes_default
42135int
42136main ()
42137{
42138
42139	     /* Are we little or big endian?  From Harbison&Steele.  */
42140	     union
42141	     {
42142	       long int l;
42143	       char c[sizeof (long int)];
42144	     } u;
42145	     u.l = 1;
42146	     return u.c[sizeof (long int) - 1] == 1;
42147
42148  ;
42149  return 0;
42150}
42151_ACEOF
42152if ac_fn_cxx_try_run "$LINENO"; then :
42153  ac_cv_c_bigendian=no
42154else
42155  ac_cv_c_bigendian=yes
42156fi
42157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42158  conftest.$ac_objext conftest.beam conftest.$ac_ext
42159fi
42160
42161    fi
42162fi
42163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42164$as_echo "$ac_cv_c_bigendian" >&6; }
42165 case $ac_cv_c_bigendian in #(
42166   yes)
42167     ENDIAN="big";; #(
42168   no)
42169     ENDIAN="little" ;; #(
42170   universal)
42171     ENDIAN="universal_endianness"
42172     ;; #(
42173   *)
42174     ENDIAN="unknown" ;;
42175 esac
42176
42177
42178  if test "x$ENDIAN" = xuniversal_endianness; then
42179    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42180  fi
42181  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42182    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
42183  fi
42184
42185
42186# Configure flags for the tools
42187
42188  ###############################################################################
42189  #
42190  # How to compile shared libraries.
42191  #
42192
42193  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42194    PICFLAG="-fPIC"
42195    C_FLAG_REORDER=''
42196    CXX_FLAG_REORDER=''
42197
42198    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42199      # Linking is different on MacOSX
42200      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42201      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42202      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42203      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42204      SET_SHARED_LIBRARY_MAPFILE=''
42205    else
42206      # Default works for linux, might work on other platforms as well.
42207      SHARED_LIBRARY_FLAGS='-shared'
42208      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42209      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42210      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42211      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42212    fi
42213  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42214    PICFLAG=''
42215    C_FLAG_REORDER=''
42216    CXX_FLAG_REORDER=''
42217
42218    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42219      # Linking is different on MacOSX
42220      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42221      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42222      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42223      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42224      SET_SHARED_LIBRARY_MAPFILE=''
42225    else
42226      # Default works for linux, might work on other platforms as well.
42227      SHARED_LIBRARY_FLAGS='-shared'
42228      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42229      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42230      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42231      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42232    fi
42233  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42234    PICFLAG="-KPIC"
42235    C_FLAG_REORDER='-xF'
42236    CXX_FLAG_REORDER='-xF'
42237    SHARED_LIBRARY_FLAGS="-G"
42238    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42239    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42240    SET_SHARED_LIBRARY_NAME=''
42241    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42242  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42243    PICFLAG="-qpic=large"
42244    C_FLAG_REORDER=''
42245    CXX_FLAG_REORDER=''
42246    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42247    SET_EXECUTABLE_ORIGIN=""
42248    SET_SHARED_LIBRARY_ORIGIN=''
42249    SET_SHARED_LIBRARY_NAME=''
42250    SET_SHARED_LIBRARY_MAPFILE=''
42251  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42252    PICFLAG=""
42253    C_FLAG_REORDER=''
42254    CXX_FLAG_REORDER=''
42255    SHARED_LIBRARY_FLAGS="-LD"
42256    SET_EXECUTABLE_ORIGIN=''
42257    SET_SHARED_LIBRARY_ORIGIN=''
42258    SET_SHARED_LIBRARY_NAME=''
42259    SET_SHARED_LIBRARY_MAPFILE=''
42260  fi
42261
42262
42263
42264
42265
42266
42267
42268
42269
42270  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42271    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42272    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42273    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42274  fi
42275  # The (cross) compiler is now configured, we can now test capabilities
42276  # of the target platform.
42277
42278
42279
42280  ###############################################################################
42281  #
42282  # Setup the opt flags for different compilers
42283  # and different operating systems.
42284  #
42285
42286  # FIXME: this was indirectly the old default, but just inherited.
42287  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42288  #   C_FLAG_DEPS="-MMD -MF"
42289  # fi
42290
42291  # Generate make dependency files
42292  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42293    C_FLAG_DEPS="-MMD -MF"
42294  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42295    C_FLAG_DEPS="-MMD -MF"
42296  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42297    C_FLAG_DEPS="-xMMD -xMF"
42298  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42299    C_FLAG_DEPS="-qmakedep=gcc -MF"
42300  fi
42301  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42302
42303
42304
42305  # Debug symbols
42306  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42307    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42308      # reduce from default "-g2" option to save space
42309      CFLAGS_DEBUG_SYMBOLS="-g1"
42310      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42311    else
42312      CFLAGS_DEBUG_SYMBOLS="-g"
42313      CXXFLAGS_DEBUG_SYMBOLS="-g"
42314    fi
42315  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42316    CFLAGS_DEBUG_SYMBOLS="-g"
42317    CXXFLAGS_DEBUG_SYMBOLS="-g"
42318  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42319    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42320    # FIXME: likely a bug, this disables debug symbols rather than enables them
42321    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42322  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42323    CFLAGS_DEBUG_SYMBOLS="-g"
42324    CXXFLAGS_DEBUG_SYMBOLS="-g"
42325  fi
42326
42327
42328
42329  # bounds, memory and behavior checking options
42330  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42331    case $DEBUG_LEVEL in
42332    release )
42333      # no adjustment
42334      ;;
42335    fastdebug )
42336      # no adjustment
42337      ;;
42338    slowdebug )
42339      # Add runtime stack smashing and undefined behavior checks
42340      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42341      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42342      ;;
42343    esac
42344  fi
42345
42346
42347
42348  # Optimization levels
42349  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42350    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42351
42352    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42353      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42354      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42355      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42356      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42357      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42358      C_O_FLAG_NONE="-xregs=no%frameptr"
42359      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42360      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42361      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42362      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42363      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42364      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42365        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42366        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42367      fi
42368    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42369      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42370      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42371      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42372      C_O_FLAG_DEBUG=""
42373      C_O_FLAG_NONE=""
42374      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42375      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42376      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42377      C_O_FLAG_DEBUG=""
42378      CXX_O_FLAG_NONE=""
42379    fi
42380  else
42381    # The remaining toolchains share opt flags between CC and CXX;
42382    # setup for C and duplicate afterwards.
42383    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42384      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42385        # On MacOSX we optimize for size, something
42386        # we should do for all platforms?
42387        C_O_FLAG_HIGHEST="-Os"
42388        C_O_FLAG_HI="-Os"
42389        C_O_FLAG_NORM="-Os"
42390      else
42391        C_O_FLAG_HIGHEST="-O3"
42392        C_O_FLAG_HI="-O3"
42393        C_O_FLAG_NORM="-O2"
42394      fi
42395      C_O_FLAG_DEBUG="-O0"
42396      C_O_FLAG_NONE="-O0"
42397    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42398      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42399        # On MacOSX we optimize for size, something
42400        # we should do for all platforms?
42401        C_O_FLAG_HIGHEST="-Os"
42402        C_O_FLAG_HI="-Os"
42403        C_O_FLAG_NORM="-Os"
42404      else
42405        C_O_FLAG_HIGHEST="-O3"
42406        C_O_FLAG_HI="-O3"
42407        C_O_FLAG_NORM="-O2"
42408      fi
42409      C_O_FLAG_DEBUG="-O0"
42410      C_O_FLAG_NONE="-O0"
42411    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42412      C_O_FLAG_HIGHEST="-O3"
42413      C_O_FLAG_HI="-O3 -qstrict"
42414      C_O_FLAG_NORM="-O2"
42415      C_O_FLAG_DEBUG="-qnoopt"
42416      C_O_FLAG_NONE="-qnoop"
42417    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42418      C_O_FLAG_HIGHEST="-O2"
42419      C_O_FLAG_HI="-O1"
42420      C_O_FLAG_NORM="-O1"
42421      C_O_FLAG_DEBUG="-Od"
42422      C_O_FLAG_NONE="-Od"
42423    fi
42424    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42425    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42426    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42427    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42428    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42429  fi
42430
42431  # Adjust optimization flags according to debug level.
42432  case $DEBUG_LEVEL in
42433    release )
42434      # no adjustment
42435      ;;
42436    fastdebug )
42437      # Not quite so much optimization
42438      C_O_FLAG_HI="$C_O_FLAG_NORM"
42439      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42440      ;;
42441    slowdebug )
42442      # Disable optimization
42443      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42444      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42445      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42446      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42447      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42448      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42449      ;;
42450  esac
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464  # Special extras...
42465  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42466    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42467      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42468      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42469    fi
42470    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42471    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42472  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42473    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42474    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42475  fi
42476
42477  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42479$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42480  fi
42481
42482  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42484$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42485  fi
42486
42487  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42489$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42490  fi
42491
42492
42493# Check whether --with-extra-cflags was given.
42494if test "${with_extra_cflags+set}" = set; then :
42495  withval=$with_extra_cflags;
42496fi
42497
42498
42499
42500# Check whether --with-extra-cxxflags was given.
42501if test "${with_extra_cxxflags+set}" = set; then :
42502  withval=$with_extra_cxxflags;
42503fi
42504
42505
42506
42507# Check whether --with-extra-ldflags was given.
42508if test "${with_extra_ldflags+set}" = set; then :
42509  withval=$with_extra_ldflags;
42510fi
42511
42512
42513  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42514  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42515  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42516
42517  # Hotspot needs these set in their legacy form
42518  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42519  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42520  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42521
42522
42523
42524
42525
42526  ###############################################################################
42527  #
42528  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42529  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42530  #
42531
42532  # Setup compiler/platform specific flags into
42533  #    CFLAGS_JDK    - C Compiler flags
42534  #    CXXFLAGS_JDK  - C++ Compiler flags
42535  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42536  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42537    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42538        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42539    case $OPENJDK_TARGET_CPU_ARCH in
42540      arm )
42541        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42542        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42543        ;;
42544      ppc )
42545        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42546        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42547        ;;
42548      * )
42549        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42550        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42551        ;;
42552    esac
42553  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42554    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42555    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42556      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42557    fi
42558
42559    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42560    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42561  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42562    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42563    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42564  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42565    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42566        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42567        -DWIN32_LEAN_AND_MEAN \
42568        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42569        -DWIN32 -DIAL"
42570    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42571      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42572    else
42573      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42574    fi
42575    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42576    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42577    # studio.
42578    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42579      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42580          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42581    fi
42582  fi
42583
42584  ###############################################################################
42585
42586  # Adjust flags according to debug level.
42587  case $DEBUG_LEVEL in
42588    fastdebug | slowdebug )
42589      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42590      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42591      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42592      ;;
42593    release )
42594      ;;
42595    * )
42596      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42597      ;;
42598  esac
42599
42600  # Setup LP64
42601  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42602
42603  # Set some common defines. These works for all compilers, but assume
42604  # -D is universally accepted.
42605
42606  # Setup endianness
42607  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42608    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42609    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42610    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42611    #   Note: -Dmacro         is the same as    #define macro 1
42612    #         -Dmacro=        is the same as    #define macro
42613    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42614      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42615    else
42616      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42617    fi
42618  else
42619    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42620    # are defined in the system?
42621    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42622      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42623    else
42624      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42625    fi
42626  fi
42627
42628  # Setup target OS define. Use OS target name but in upper case.
42629  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42630  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42631
42632  # Setup target CPU
42633  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42634
42635  # Setup debug/release defines
42636  if test "x$DEBUG_LEVEL" = xrelease; then
42637    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42638    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42639      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42640    fi
42641  else
42642    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42643  fi
42644
42645  # Setup release name
42646  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42647
42648
42649  # Set some additional per-OS defines.
42650  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42651    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42652  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42653    # FIXME: PPC64 should not be here.
42654    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42655  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42656    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42657  fi
42658
42659  # Additional macosx handling
42660  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42661    # Setting these parameters makes it an error to link to macosx APIs that are
42662    # newer than the given OS version and makes the linked binaries compatible
42663    # even if built on a newer version of the OS.
42664    # The expected format is X.Y.Z
42665    MACOSX_VERSION_MIN=10.7.0
42666
42667
42668    # The macro takes the version with no dots, ex: 1070
42669    # Let the flags variables get resolved in make for easier override on make
42670    # command line.
42671    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42672    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42673  fi
42674
42675  # Setup some hard coded includes
42676  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42677      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42678      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42679      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42680
42681  # The shared libraries are compiled using the picflag.
42682  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42683  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42684
42685  # Executable flags
42686  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42687  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42688
42689
42690
42691
42692
42693
42694  # Flags for compiling test libraries
42695  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42696  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42697
42698  # Flags for compiling test executables
42699  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42700  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42701
42702
42703
42704
42705
42706
42707  # Setup LDFLAGS et al.
42708  #
42709
42710  # Now this is odd. The JDK native libraries have to link against libjvm.so
42711  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42712  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42713  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42714  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42715  # libraries will link to whatever is in memory. Yuck.
42716  #
42717  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42718  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42719    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42720    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42721      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42722    fi
42723    # TODO: make -debug optional "--disable-full-debug-symbols"
42724    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42725  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42726    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42727    # We have previously set HAS_GNU_HASH if this is the case
42728    if test -n "$HAS_GNU_HASH"; then
42729      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42730    fi
42731    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42732      # And since we now know that the linker is gnu, then add -z defs, to forbid
42733      # undefined symbols in object files.
42734      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42735      case $DEBUG_LEVEL in
42736        release )
42737          # tell linker to optimize libraries.
42738          # Should this be supplied to the OSS linker as well?
42739          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42740          ;;
42741        slowdebug )
42742          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42743            # do relocations at load
42744            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42745            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42746          fi
42747          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42748            # mark relocations read only
42749            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42750            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42751          fi
42752          ;;
42753        fastdebug )
42754          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42755            # mark relocations read only
42756            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42757            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42758          fi
42759          ;;
42760        * )
42761          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42762          ;;
42763        esac
42764    fi
42765  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42766    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42767    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42768  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42769    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42770  fi
42771
42772  # Customize LDFLAGS for executables
42773
42774  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42775
42776  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42777    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42778      LDFLAGS_STACK_SIZE=1048576
42779    else
42780      LDFLAGS_STACK_SIZE=327680
42781    fi
42782    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42783  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42784    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42785  fi
42786
42787  # Customize LDFLAGS for libs
42788  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42789
42790  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42791    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42792    LDFLAGS_JDKLIB_SUFFIX=""
42793  else
42794    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42795        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42796
42797    # On some platforms (mac) the linker warns about non existing -L dirs.
42798    # Add server first if available. Linking aginst client does not always produce the same results.
42799    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42800    # Default to server for other variants.
42801    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42802      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42803    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42804      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42805    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42806      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42807    else
42808      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42809    fi
42810
42811    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42812    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42813      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42814    fi
42815  fi
42816
42817
42818
42819
42820
42821
42822
42823  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42824  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42825  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42826  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42827
42828
42829
42830
42831
42832
42833
42834  # Some Zero and Shark settings.
42835  # ZERO_ARCHFLAG tells the compiler which mode to build for
42836  case "${OPENJDK_TARGET_CPU}" in
42837    s390)
42838      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42839      ;;
42840    *)
42841      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42842  esac
42843
42844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42845$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42846  supports=yes
42847
42848  saved_cflags="$CFLAGS"
42849  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42850  ac_ext=c
42851ac_cpp='$CPP $CPPFLAGS'
42852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42854ac_compiler_gnu=$ac_cv_c_compiler_gnu
42855
42856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42857/* end confdefs.h.  */
42858int i;
42859_ACEOF
42860if ac_fn_c_try_compile "$LINENO"; then :
42861
42862else
42863  supports=no
42864fi
42865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42866  ac_ext=cpp
42867ac_cpp='$CXXCPP $CPPFLAGS'
42868ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42869ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42870ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42871
42872  CFLAGS="$saved_cflags"
42873
42874  saved_cxxflags="$CXXFLAGS"
42875  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42876  ac_ext=cpp
42877ac_cpp='$CXXCPP $CPPFLAGS'
42878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42881
42882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42883/* end confdefs.h.  */
42884int i;
42885_ACEOF
42886if ac_fn_cxx_try_compile "$LINENO"; then :
42887
42888else
42889  supports=no
42890fi
42891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42892  ac_ext=cpp
42893ac_cpp='$CXXCPP $CPPFLAGS'
42894ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42895ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42896ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42897
42898  CXXFLAGS="$saved_cxxflags"
42899
42900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42901$as_echo "$supports" >&6; }
42902  if test "x$supports" = "xyes" ; then
42903    :
42904  else
42905    ZERO_ARCHFLAG=""
42906  fi
42907
42908
42909
42910  # Check that the compiler supports -mX (or -qX on AIX) flags
42911  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42912
42913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42914$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42915  supports=yes
42916
42917  saved_cflags="$CFLAGS"
42918  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42919  ac_ext=c
42920ac_cpp='$CPP $CPPFLAGS'
42921ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42922ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42923ac_compiler_gnu=$ac_cv_c_compiler_gnu
42924
42925  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42926/* end confdefs.h.  */
42927int i;
42928_ACEOF
42929if ac_fn_c_try_compile "$LINENO"; then :
42930
42931else
42932  supports=no
42933fi
42934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42935  ac_ext=cpp
42936ac_cpp='$CXXCPP $CPPFLAGS'
42937ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42938ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42939ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42940
42941  CFLAGS="$saved_cflags"
42942
42943  saved_cxxflags="$CXXFLAGS"
42944  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42945  ac_ext=cpp
42946ac_cpp='$CXXCPP $CPPFLAGS'
42947ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42948ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42949ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42950
42951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42952/* end confdefs.h.  */
42953int i;
42954_ACEOF
42955if ac_fn_cxx_try_compile "$LINENO"; then :
42956
42957else
42958  supports=no
42959fi
42960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42961  ac_ext=cpp
42962ac_cpp='$CXXCPP $CPPFLAGS'
42963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42966
42967  CXXFLAGS="$saved_cxxflags"
42968
42969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42970$as_echo "$supports" >&6; }
42971  if test "x$supports" = "xyes" ; then
42972    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42973  else
42974    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42975  fi
42976
42977
42978
42979  case "${TOOLCHAIN_TYPE}" in
42980    microsoft)
42981      DISABLE_WARNING_PREFIX="-wd"
42982      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42983      ;;
42984    solstudio)
42985      DISABLE_WARNING_PREFIX="-erroff="
42986      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42987      ;;
42988    gcc)
42989      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42990
42991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42992$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42993  supports=yes
42994
42995  saved_cflags="$CFLAGS"
42996  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42997  ac_ext=c
42998ac_cpp='$CPP $CPPFLAGS'
42999ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43000ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43001ac_compiler_gnu=$ac_cv_c_compiler_gnu
43002
43003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43004/* end confdefs.h.  */
43005int i;
43006_ACEOF
43007if ac_fn_c_try_compile "$LINENO"; then :
43008
43009else
43010  supports=no
43011fi
43012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43013  ac_ext=cpp
43014ac_cpp='$CXXCPP $CPPFLAGS'
43015ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43016ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43017ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43018
43019  CFLAGS="$saved_cflags"
43020
43021  saved_cxxflags="$CXXFLAGS"
43022  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43023  ac_ext=cpp
43024ac_cpp='$CXXCPP $CPPFLAGS'
43025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43028
43029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43030/* end confdefs.h.  */
43031int i;
43032_ACEOF
43033if ac_fn_cxx_try_compile "$LINENO"; then :
43034
43035else
43036  supports=no
43037fi
43038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43039  ac_ext=cpp
43040ac_cpp='$CXXCPP $CPPFLAGS'
43041ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43042ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43043ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43044
43045  CXXFLAGS="$saved_cxxflags"
43046
43047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43048$as_echo "$supports" >&6; }
43049  if test "x$supports" = "xyes" ; then
43050    GCC_CAN_DISABLE_WARNINGS=true
43051  else
43052    GCC_CAN_DISABLE_WARNINGS=false
43053
43054  fi
43055
43056      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43057        DISABLE_WARNING_PREFIX="-Wno-"
43058      else
43059        DISABLE_WARNING_PREFIX=
43060      fi
43061      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43062      ;;
43063    clang)
43064      DISABLE_WARNING_PREFIX="-Wno-"
43065      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43066      ;;
43067  esac
43068
43069
43070
43071
43072# Setup debug symbols (need objcopy from the toolchain for that)
43073
43074  #
43075  # ENABLE_DEBUG_SYMBOLS
43076  # This must be done after the toolchain is setup, since we're looking at objcopy.
43077  #
43078  # Check whether --enable-debug-symbols was given.
43079if test "${enable_debug_symbols+set}" = set; then :
43080  enableval=$enable_debug_symbols;
43081fi
43082
43083
43084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43085$as_echo_n "checking if we should generate debug symbols... " >&6; }
43086
43087  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43088    # explicit enabling of enable-debug-symbols and can't find objcopy
43089    #   this is an error
43090    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43091  fi
43092
43093  if test "x$enable_debug_symbols" = "xyes"; then
43094    ENABLE_DEBUG_SYMBOLS=true
43095  elif test "x$enable_debug_symbols" = "xno"; then
43096    ENABLE_DEBUG_SYMBOLS=false
43097  else
43098    # Default is on if objcopy is found
43099    if test "x$OBJCOPY" != x; then
43100      ENABLE_DEBUG_SYMBOLS=true
43101    # MacOS X and Windows don't use objcopy but default is on for those OSes
43102    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43103      ENABLE_DEBUG_SYMBOLS=true
43104    else
43105      ENABLE_DEBUG_SYMBOLS=false
43106    fi
43107  fi
43108
43109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43110$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43111
43112  #
43113  # ZIP_DEBUGINFO_FILES
43114  #
43115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43116$as_echo_n "checking if we should zip debug-info files... " >&6; }
43117  # Check whether --enable-zip-debug-info was given.
43118if test "${enable_zip_debug_info+set}" = set; then :
43119  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43120else
43121  enable_zip_debug_info="yes"
43122fi
43123
43124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43125$as_echo "${enable_zip_debug_info}" >&6; }
43126
43127  if test "x${enable_zip_debug_info}" = "xno"; then
43128    ZIP_DEBUGINFO_FILES=false
43129  else
43130    ZIP_DEBUGINFO_FILES=true
43131  fi
43132
43133
43134
43135
43136
43137  # Check whether --enable-native-coverage was given.
43138if test "${enable_native_coverage+set}" = set; then :
43139  enableval=$enable_native_coverage;
43140fi
43141
43142  GCOV_ENABLED="false"
43143  if test "x$enable_native_coverage" = "xyes"; then
43144    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43145      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43146$as_echo_n "checking if native coverage is enabled... " >&6; }
43147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43148$as_echo "yes" >&6; }
43149      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43150      GCOV_LDFLAGS="-fprofile-arcs"
43151      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43152      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43153      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43154      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43155      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43156      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43157      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43158      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43159      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43160      GCOV_ENABLED="true"
43161    else
43162      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43163    fi
43164  elif test "x$enable_native_coverage" = "xno"; then
43165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43166$as_echo_n "checking if native coverage is enabled... " >&6; }
43167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43168$as_echo "no" >&6; }
43169  elif test "x$enable_native_coverage" != "x"; then
43170    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43171  fi
43172
43173
43174
43175
43176###############################################################################
43177#
43178# Check dependencies for external and internal libraries.
43179#
43180###############################################################################
43181
43182# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43183
43184  # When using cygwin or msys, we need a wrapper binary that renames
43185  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43186  # @files and rewrites these too! This wrapper binary is
43187  # called fixpath.
43188  FIXPATH=
43189  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43191$as_echo_n "checking if fixpath can be created... " >&6; }
43192    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43193    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43194    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43195    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43196      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43197      FIXPATH="$FIXPATH_BIN -c"
43198    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43199      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43200      # @ was chosen as separator to minimize risk of other tools messing around with it
43201      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43202          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43203      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43204      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43205    fi
43206    FIXPATH_SRC_W="$FIXPATH_SRC"
43207    FIXPATH_BIN_W="$FIXPATH_BIN"
43208
43209  unix_path="$FIXPATH_SRC_W"
43210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43211    windows_path=`$CYGPATH -m "$unix_path"`
43212    FIXPATH_SRC_W="$windows_path"
43213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43214    windows_path=`cmd //c echo $unix_path`
43215    FIXPATH_SRC_W="$windows_path"
43216  fi
43217
43218
43219  unix_path="$FIXPATH_BIN_W"
43220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43221    windows_path=`$CYGPATH -m "$unix_path"`
43222    FIXPATH_BIN_W="$windows_path"
43223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43224    windows_path=`cmd //c echo $unix_path`
43225    FIXPATH_BIN_W="$windows_path"
43226  fi
43227
43228    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43229    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43230    cd $FIXPATH_DIR
43231    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43232    cd $CURDIR
43233
43234    if test ! -x $FIXPATH_BIN; then
43235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43236$as_echo "no" >&6; }
43237      cat $FIXPATH_DIR/fixpath1.log
43238      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43239    fi
43240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43241$as_echo "yes" >&6; }
43242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43243$as_echo_n "checking if fixpath.exe works... " >&6; }
43244    cd $FIXPATH_DIR
43245    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43246        > $FIXPATH_DIR/fixpath2.log 2>&1
43247    cd $CURDIR
43248    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43250$as_echo "no" >&6; }
43251      cat $FIXPATH_DIR/fixpath2.log
43252      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43253    fi
43254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43255$as_echo "yes" >&6; }
43256  fi
43257
43258
43259
43260
43261
43262
43263  ###############################################################################
43264  #
43265  # OS specific settings that we never will need to probe.
43266  #
43267  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43269$as_echo_n "checking what is not needed on Linux?... " >&6; }
43270    PULSE_NOT_NEEDED=yes
43271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43272$as_echo "pulse" >&6; }
43273  fi
43274
43275  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43277$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43278    ALSA_NOT_NEEDED=yes
43279    PULSE_NOT_NEEDED=yes
43280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43281$as_echo "alsa pulse" >&6; }
43282  fi
43283
43284  if test "x$OPENJDK_TARGET_OS" = xaix; then
43285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43286$as_echo_n "checking what is not needed on AIX?... " >&6; }
43287    ALSA_NOT_NEEDED=yes
43288    PULSE_NOT_NEEDED=yes
43289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43290$as_echo "alsa pulse" >&6; }
43291  fi
43292
43293
43294  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43296$as_echo_n "checking what is not needed on Windows?... " >&6; }
43297    CUPS_NOT_NEEDED=yes
43298    ALSA_NOT_NEEDED=yes
43299    PULSE_NOT_NEEDED=yes
43300    X11_NOT_NEEDED=yes
43301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43302$as_echo "alsa cups pulse x11" >&6; }
43303  fi
43304
43305  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43307$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43308    ALSA_NOT_NEEDED=yes
43309    PULSE_NOT_NEEDED=yes
43310    X11_NOT_NEEDED=yes
43311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43312$as_echo "alsa pulse x11" >&6; }
43313  fi
43314
43315  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43317$as_echo_n "checking what is not needed on bsd?... " >&6; }
43318    ALSA_NOT_NEEDED=yes
43319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43320$as_echo "alsa" >&6; }
43321  fi
43322
43323  if test "x$OPENJDK" = "xfalse"; then
43324    FREETYPE_NOT_NEEDED=yes
43325  fi
43326
43327  if test "x$SUPPORT_HEADFUL" = xno; then
43328    X11_NOT_NEEDED=yes
43329  fi
43330
43331
43332
43333  ###############################################################################
43334  #
43335  # Check for X Windows
43336  #
43337
43338  if test "x$X11_NOT_NEEDED" = xyes; then
43339    if test "x${with_x}" != x; then
43340      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43341$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43342    fi
43343    X_CFLAGS=
43344    X_LIBS=
43345  else
43346    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43347    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43348    # --x-libraries for the sysroot, if that seems to be correct.
43349    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43350      if test "x$SYSROOT" != "x"; then
43351        if test "x$x_includes" = xNONE; then
43352          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43353            x_includes="$SYSROOT/usr/X11R6/include"
43354          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43355            x_includes="$SYSROOT/usr/include"
43356          fi
43357        fi
43358        if test "x$x_libraries" = xNONE; then
43359          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43360            x_libraries="$SYSROOT/usr/X11R6/lib"
43361          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43362            x_libraries="$SYSROOT/usr/lib64"
43363          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43364            x_libraries="$SYSROOT/usr/lib"
43365          fi
43366        fi
43367      fi
43368    fi
43369
43370    # Now let autoconf do it's magic
43371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43372$as_echo_n "checking for X... " >&6; }
43373
43374
43375# Check whether --with-x was given.
43376if test "${with_x+set}" = set; then :
43377  withval=$with_x;
43378fi
43379
43380# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43381if test "x$with_x" = xno; then
43382  # The user explicitly disabled X.
43383  have_x=disabled
43384else
43385  case $x_includes,$x_libraries in #(
43386    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43387    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43388  $as_echo_n "(cached) " >&6
43389else
43390  # One or both of the vars are not set, and there is no cached value.
43391ac_x_includes=no ac_x_libraries=no
43392rm -f -r conftest.dir
43393if mkdir conftest.dir; then
43394  cd conftest.dir
43395  cat >Imakefile <<'_ACEOF'
43396incroot:
43397	@echo incroot='${INCROOT}'
43398usrlibdir:
43399	@echo usrlibdir='${USRLIBDIR}'
43400libdir:
43401	@echo libdir='${LIBDIR}'
43402_ACEOF
43403  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43404    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43405    for ac_var in incroot usrlibdir libdir; do
43406      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43407    done
43408    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43409    for ac_extension in a so sl dylib la dll; do
43410      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43411	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43412	ac_im_usrlibdir=$ac_im_libdir; break
43413      fi
43414    done
43415    # Screen out bogus values from the imake configuration.  They are
43416    # bogus both because they are the default anyway, and because
43417    # using them would break gcc on systems where it needs fixed includes.
43418    case $ac_im_incroot in
43419	/usr/include) ac_x_includes= ;;
43420	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43421    esac
43422    case $ac_im_usrlibdir in
43423	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43424	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43425    esac
43426  fi
43427  cd ..
43428  rm -f -r conftest.dir
43429fi
43430
43431# Standard set of common directories for X headers.
43432# Check X11 before X11Rn because it is often a symlink to the current release.
43433ac_x_header_dirs='
43434/usr/X11/include
43435/usr/X11R7/include
43436/usr/X11R6/include
43437/usr/X11R5/include
43438/usr/X11R4/include
43439
43440/usr/include/X11
43441/usr/include/X11R7
43442/usr/include/X11R6
43443/usr/include/X11R5
43444/usr/include/X11R4
43445
43446/usr/local/X11/include
43447/usr/local/X11R7/include
43448/usr/local/X11R6/include
43449/usr/local/X11R5/include
43450/usr/local/X11R4/include
43451
43452/usr/local/include/X11
43453/usr/local/include/X11R7
43454/usr/local/include/X11R6
43455/usr/local/include/X11R5
43456/usr/local/include/X11R4
43457
43458/usr/X386/include
43459/usr/x386/include
43460/usr/XFree86/include/X11
43461
43462/usr/include
43463/usr/local/include
43464/usr/unsupported/include
43465/usr/athena/include
43466/usr/local/x11r5/include
43467/usr/lpp/Xamples/include
43468
43469/usr/openwin/include
43470/usr/openwin/share/include'
43471
43472if test "$ac_x_includes" = no; then
43473  # Guess where to find include files, by looking for Xlib.h.
43474  # First, try using that file with no special directory specified.
43475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43476/* end confdefs.h.  */
43477#include <X11/Xlib.h>
43478_ACEOF
43479if ac_fn_cxx_try_cpp "$LINENO"; then :
43480  # We can compile using X headers with no special include directory.
43481ac_x_includes=
43482else
43483  for ac_dir in $ac_x_header_dirs; do
43484  if test -r "$ac_dir/X11/Xlib.h"; then
43485    ac_x_includes=$ac_dir
43486    break
43487  fi
43488done
43489fi
43490rm -f conftest.err conftest.i conftest.$ac_ext
43491fi # $ac_x_includes = no
43492
43493if test "$ac_x_libraries" = no; then
43494  # Check for the libraries.
43495  # See if we find them without any special options.
43496  # Don't add to $LIBS permanently.
43497  ac_save_LIBS=$LIBS
43498  LIBS="-lX11 $LIBS"
43499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43500/* end confdefs.h.  */
43501#include <X11/Xlib.h>
43502int
43503main ()
43504{
43505XrmInitialize ()
43506  ;
43507  return 0;
43508}
43509_ACEOF
43510if ac_fn_cxx_try_link "$LINENO"; then :
43511  LIBS=$ac_save_LIBS
43512# We can link X programs with no special library path.
43513ac_x_libraries=
43514else
43515  LIBS=$ac_save_LIBS
43516for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43517do
43518  # Don't even attempt the hair of trying to link an X program!
43519  for ac_extension in a so sl dylib la dll; do
43520    if test -r "$ac_dir/libX11.$ac_extension"; then
43521      ac_x_libraries=$ac_dir
43522      break 2
43523    fi
43524  done
43525done
43526fi
43527rm -f core conftest.err conftest.$ac_objext \
43528    conftest$ac_exeext conftest.$ac_ext
43529fi # $ac_x_libraries = no
43530
43531case $ac_x_includes,$ac_x_libraries in #(
43532  no,* | *,no | *\'*)
43533    # Didn't find X, or a directory has "'" in its name.
43534    ac_cv_have_x="have_x=no";; #(
43535  *)
43536    # Record where we found X for the cache.
43537    ac_cv_have_x="have_x=yes\
43538	ac_x_includes='$ac_x_includes'\
43539	ac_x_libraries='$ac_x_libraries'"
43540esac
43541fi
43542;; #(
43543    *) have_x=yes;;
43544  esac
43545  eval "$ac_cv_have_x"
43546fi # $with_x != no
43547
43548if test "$have_x" != yes; then
43549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43550$as_echo "$have_x" >&6; }
43551  no_x=yes
43552else
43553  # If each of the values was on the command line, it overrides each guess.
43554  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43555  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43556  # Update the cache value to reflect the command line values.
43557  ac_cv_have_x="have_x=yes\
43558	ac_x_includes='$x_includes'\
43559	ac_x_libraries='$x_libraries'"
43560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43561$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43562fi
43563
43564    if test "$no_x" = yes; then
43565  # Not all programs may use this symbol, but it does not hurt to define it.
43566
43567$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43568
43569  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43570else
43571  if test -n "$x_includes"; then
43572    X_CFLAGS="$X_CFLAGS -I$x_includes"
43573  fi
43574
43575  # It would also be nice to do this for all -L options, not just this one.
43576  if test -n "$x_libraries"; then
43577    X_LIBS="$X_LIBS -L$x_libraries"
43578    # For Solaris; some versions of Sun CC require a space after -R and
43579    # others require no space.  Words are not sufficient . . . .
43580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43581$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43582    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43583    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43584    ac_cxx_werror_flag=yes
43585    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43586/* end confdefs.h.  */
43587
43588int
43589main ()
43590{
43591
43592  ;
43593  return 0;
43594}
43595_ACEOF
43596if ac_fn_cxx_try_link "$LINENO"; then :
43597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43598$as_echo "no" >&6; }
43599       X_LIBS="$X_LIBS -R$x_libraries"
43600else
43601  LIBS="$ac_xsave_LIBS -R $x_libraries"
43602       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43603/* end confdefs.h.  */
43604
43605int
43606main ()
43607{
43608
43609  ;
43610  return 0;
43611}
43612_ACEOF
43613if ac_fn_cxx_try_link "$LINENO"; then :
43614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43615$as_echo "yes" >&6; }
43616	  X_LIBS="$X_LIBS -R $x_libraries"
43617else
43618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43619$as_echo "neither works" >&6; }
43620fi
43621rm -f core conftest.err conftest.$ac_objext \
43622    conftest$ac_exeext conftest.$ac_ext
43623fi
43624rm -f core conftest.err conftest.$ac_objext \
43625    conftest$ac_exeext conftest.$ac_ext
43626    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43627    LIBS=$ac_xsave_LIBS
43628  fi
43629
43630  # Check for system-dependent libraries X programs must link with.
43631  # Do this before checking for the system-independent R6 libraries
43632  # (-lICE), since we may need -lsocket or whatever for X linking.
43633
43634  if test "$ISC" = yes; then
43635    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43636  else
43637    # Martyn Johnson says this is needed for Ultrix, if the X
43638    # libraries were built with DECnet support.  And Karl Berry says
43639    # the Alpha needs dnet_stub (dnet does not exist).
43640    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43641    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43642/* end confdefs.h.  */
43643
43644/* Override any GCC internal prototype to avoid an error.
43645   Use char because int might match the return type of a GCC
43646   builtin and then its argument prototype would still apply.  */
43647#ifdef __cplusplus
43648extern "C"
43649#endif
43650char XOpenDisplay ();
43651int
43652main ()
43653{
43654return XOpenDisplay ();
43655  ;
43656  return 0;
43657}
43658_ACEOF
43659if ac_fn_cxx_try_link "$LINENO"; then :
43660
43661else
43662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43663$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43664if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43665  $as_echo_n "(cached) " >&6
43666else
43667  ac_check_lib_save_LIBS=$LIBS
43668LIBS="-ldnet  $LIBS"
43669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43670/* end confdefs.h.  */
43671
43672/* Override any GCC internal prototype to avoid an error.
43673   Use char because int might match the return type of a GCC
43674   builtin and then its argument prototype would still apply.  */
43675#ifdef __cplusplus
43676extern "C"
43677#endif
43678char dnet_ntoa ();
43679int
43680main ()
43681{
43682return dnet_ntoa ();
43683  ;
43684  return 0;
43685}
43686_ACEOF
43687if ac_fn_cxx_try_link "$LINENO"; then :
43688  ac_cv_lib_dnet_dnet_ntoa=yes
43689else
43690  ac_cv_lib_dnet_dnet_ntoa=no
43691fi
43692rm -f core conftest.err conftest.$ac_objext \
43693    conftest$ac_exeext conftest.$ac_ext
43694LIBS=$ac_check_lib_save_LIBS
43695fi
43696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43697$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43698if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43699  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43700fi
43701
43702    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43703      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43704$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43705if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43706  $as_echo_n "(cached) " >&6
43707else
43708  ac_check_lib_save_LIBS=$LIBS
43709LIBS="-ldnet_stub  $LIBS"
43710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43711/* end confdefs.h.  */
43712
43713/* Override any GCC internal prototype to avoid an error.
43714   Use char because int might match the return type of a GCC
43715   builtin and then its argument prototype would still apply.  */
43716#ifdef __cplusplus
43717extern "C"
43718#endif
43719char dnet_ntoa ();
43720int
43721main ()
43722{
43723return dnet_ntoa ();
43724  ;
43725  return 0;
43726}
43727_ACEOF
43728if ac_fn_cxx_try_link "$LINENO"; then :
43729  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43730else
43731  ac_cv_lib_dnet_stub_dnet_ntoa=no
43732fi
43733rm -f core conftest.err conftest.$ac_objext \
43734    conftest$ac_exeext conftest.$ac_ext
43735LIBS=$ac_check_lib_save_LIBS
43736fi
43737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43738$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43739if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43740  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43741fi
43742
43743    fi
43744fi
43745rm -f core conftest.err conftest.$ac_objext \
43746    conftest$ac_exeext conftest.$ac_ext
43747    LIBS="$ac_xsave_LIBS"
43748
43749    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43750    # to get the SysV transport functions.
43751    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43752    # needs -lnsl.
43753    # The nsl library prevents programs from opening the X display
43754    # on Irix 5.2, according to T.E. Dickey.
43755    # The functions gethostbyname, getservbyname, and inet_addr are
43756    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43757    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43758if test "x$ac_cv_func_gethostbyname" = xyes; then :
43759
43760fi
43761
43762    if test $ac_cv_func_gethostbyname = no; then
43763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43764$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43765if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43766  $as_echo_n "(cached) " >&6
43767else
43768  ac_check_lib_save_LIBS=$LIBS
43769LIBS="-lnsl  $LIBS"
43770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43771/* end confdefs.h.  */
43772
43773/* Override any GCC internal prototype to avoid an error.
43774   Use char because int might match the return type of a GCC
43775   builtin and then its argument prototype would still apply.  */
43776#ifdef __cplusplus
43777extern "C"
43778#endif
43779char gethostbyname ();
43780int
43781main ()
43782{
43783return gethostbyname ();
43784  ;
43785  return 0;
43786}
43787_ACEOF
43788if ac_fn_cxx_try_link "$LINENO"; then :
43789  ac_cv_lib_nsl_gethostbyname=yes
43790else
43791  ac_cv_lib_nsl_gethostbyname=no
43792fi
43793rm -f core conftest.err conftest.$ac_objext \
43794    conftest$ac_exeext conftest.$ac_ext
43795LIBS=$ac_check_lib_save_LIBS
43796fi
43797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43798$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43799if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43800  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43801fi
43802
43803      if test $ac_cv_lib_nsl_gethostbyname = no; then
43804	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43805$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43806if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43807  $as_echo_n "(cached) " >&6
43808else
43809  ac_check_lib_save_LIBS=$LIBS
43810LIBS="-lbsd  $LIBS"
43811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43812/* end confdefs.h.  */
43813
43814/* Override any GCC internal prototype to avoid an error.
43815   Use char because int might match the return type of a GCC
43816   builtin and then its argument prototype would still apply.  */
43817#ifdef __cplusplus
43818extern "C"
43819#endif
43820char gethostbyname ();
43821int
43822main ()
43823{
43824return gethostbyname ();
43825  ;
43826  return 0;
43827}
43828_ACEOF
43829if ac_fn_cxx_try_link "$LINENO"; then :
43830  ac_cv_lib_bsd_gethostbyname=yes
43831else
43832  ac_cv_lib_bsd_gethostbyname=no
43833fi
43834rm -f core conftest.err conftest.$ac_objext \
43835    conftest$ac_exeext conftest.$ac_ext
43836LIBS=$ac_check_lib_save_LIBS
43837fi
43838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43839$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43840if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43841  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43842fi
43843
43844      fi
43845    fi
43846
43847    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43848    # socket/setsockopt and other routines are undefined under SCO ODT
43849    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43850    # on later versions), says Simon Leinen: it contains gethostby*
43851    # variants that don't use the name server (or something).  -lsocket
43852    # must be given before -lnsl if both are needed.  We assume that
43853    # if connect needs -lnsl, so does gethostbyname.
43854    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43855if test "x$ac_cv_func_connect" = xyes; then :
43856
43857fi
43858
43859    if test $ac_cv_func_connect = no; then
43860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43861$as_echo_n "checking for connect in -lsocket... " >&6; }
43862if ${ac_cv_lib_socket_connect+:} false; then :
43863  $as_echo_n "(cached) " >&6
43864else
43865  ac_check_lib_save_LIBS=$LIBS
43866LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43868/* end confdefs.h.  */
43869
43870/* Override any GCC internal prototype to avoid an error.
43871   Use char because int might match the return type of a GCC
43872   builtin and then its argument prototype would still apply.  */
43873#ifdef __cplusplus
43874extern "C"
43875#endif
43876char connect ();
43877int
43878main ()
43879{
43880return connect ();
43881  ;
43882  return 0;
43883}
43884_ACEOF
43885if ac_fn_cxx_try_link "$LINENO"; then :
43886  ac_cv_lib_socket_connect=yes
43887else
43888  ac_cv_lib_socket_connect=no
43889fi
43890rm -f core conftest.err conftest.$ac_objext \
43891    conftest$ac_exeext conftest.$ac_ext
43892LIBS=$ac_check_lib_save_LIBS
43893fi
43894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43895$as_echo "$ac_cv_lib_socket_connect" >&6; }
43896if test "x$ac_cv_lib_socket_connect" = xyes; then :
43897  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43898fi
43899
43900    fi
43901
43902    # Guillermo Gomez says -lposix is necessary on A/UX.
43903    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43904if test "x$ac_cv_func_remove" = xyes; then :
43905
43906fi
43907
43908    if test $ac_cv_func_remove = no; then
43909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43910$as_echo_n "checking for remove in -lposix... " >&6; }
43911if ${ac_cv_lib_posix_remove+:} false; then :
43912  $as_echo_n "(cached) " >&6
43913else
43914  ac_check_lib_save_LIBS=$LIBS
43915LIBS="-lposix  $LIBS"
43916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43917/* end confdefs.h.  */
43918
43919/* Override any GCC internal prototype to avoid an error.
43920   Use char because int might match the return type of a GCC
43921   builtin and then its argument prototype would still apply.  */
43922#ifdef __cplusplus
43923extern "C"
43924#endif
43925char remove ();
43926int
43927main ()
43928{
43929return remove ();
43930  ;
43931  return 0;
43932}
43933_ACEOF
43934if ac_fn_cxx_try_link "$LINENO"; then :
43935  ac_cv_lib_posix_remove=yes
43936else
43937  ac_cv_lib_posix_remove=no
43938fi
43939rm -f core conftest.err conftest.$ac_objext \
43940    conftest$ac_exeext conftest.$ac_ext
43941LIBS=$ac_check_lib_save_LIBS
43942fi
43943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43944$as_echo "$ac_cv_lib_posix_remove" >&6; }
43945if test "x$ac_cv_lib_posix_remove" = xyes; then :
43946  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43947fi
43948
43949    fi
43950
43951    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43952    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43953if test "x$ac_cv_func_shmat" = xyes; then :
43954
43955fi
43956
43957    if test $ac_cv_func_shmat = no; then
43958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43959$as_echo_n "checking for shmat in -lipc... " >&6; }
43960if ${ac_cv_lib_ipc_shmat+:} false; then :
43961  $as_echo_n "(cached) " >&6
43962else
43963  ac_check_lib_save_LIBS=$LIBS
43964LIBS="-lipc  $LIBS"
43965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43966/* end confdefs.h.  */
43967
43968/* Override any GCC internal prototype to avoid an error.
43969   Use char because int might match the return type of a GCC
43970   builtin and then its argument prototype would still apply.  */
43971#ifdef __cplusplus
43972extern "C"
43973#endif
43974char shmat ();
43975int
43976main ()
43977{
43978return shmat ();
43979  ;
43980  return 0;
43981}
43982_ACEOF
43983if ac_fn_cxx_try_link "$LINENO"; then :
43984  ac_cv_lib_ipc_shmat=yes
43985else
43986  ac_cv_lib_ipc_shmat=no
43987fi
43988rm -f core conftest.err conftest.$ac_objext \
43989    conftest$ac_exeext conftest.$ac_ext
43990LIBS=$ac_check_lib_save_LIBS
43991fi
43992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43993$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43994if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43995  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43996fi
43997
43998    fi
43999  fi
44000
44001  # Check for libraries that X11R6 Xt/Xaw programs need.
44002  ac_save_LDFLAGS=$LDFLAGS
44003  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44004  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44005  # check for ICE first), but we must link in the order -lSM -lICE or
44006  # we get undefined symbols.  So assume we have SM if we have ICE.
44007  # These have to be linked with before -lX11, unlike the other
44008  # libraries we check for below, so use a different variable.
44009  # John Interrante, Karl Berry
44010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44011$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44012if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44013  $as_echo_n "(cached) " >&6
44014else
44015  ac_check_lib_save_LIBS=$LIBS
44016LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44018/* end confdefs.h.  */
44019
44020/* Override any GCC internal prototype to avoid an error.
44021   Use char because int might match the return type of a GCC
44022   builtin and then its argument prototype would still apply.  */
44023#ifdef __cplusplus
44024extern "C"
44025#endif
44026char IceConnectionNumber ();
44027int
44028main ()
44029{
44030return IceConnectionNumber ();
44031  ;
44032  return 0;
44033}
44034_ACEOF
44035if ac_fn_cxx_try_link "$LINENO"; then :
44036  ac_cv_lib_ICE_IceConnectionNumber=yes
44037else
44038  ac_cv_lib_ICE_IceConnectionNumber=no
44039fi
44040rm -f core conftest.err conftest.$ac_objext \
44041    conftest$ac_exeext conftest.$ac_ext
44042LIBS=$ac_check_lib_save_LIBS
44043fi
44044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44045$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44046if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44047  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44048fi
44049
44050  LDFLAGS=$ac_save_LDFLAGS
44051
44052fi
44053
44054
44055    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44056    # this doesn't make sense so we remove it.
44057    if test "x$COMPILE_TYPE" = xcross; then
44058      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44059    fi
44060
44061    if test "x$no_x" = xyes; then
44062
44063  # Print a helpful message on how to acquire the necessary build dependency.
44064  # x11 is the help tag: freetype, cups, pulse, alsa etc
44065  MISSING_DEPENDENCY=x11
44066
44067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44068    cygwin_help $MISSING_DEPENDENCY
44069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44070    msys_help $MISSING_DEPENDENCY
44071  else
44072    PKGHANDLER_COMMAND=
44073
44074    case $PKGHANDLER in
44075      apt-get)
44076        apt_help     $MISSING_DEPENDENCY ;;
44077      yum)
44078        yum_help     $MISSING_DEPENDENCY ;;
44079      port)
44080        port_help    $MISSING_DEPENDENCY ;;
44081      pkgutil)
44082        pkgutil_help $MISSING_DEPENDENCY ;;
44083      pkgadd)
44084        pkgadd_help  $MISSING_DEPENDENCY ;;
44085    esac
44086
44087    if test "x$PKGHANDLER_COMMAND" != x; then
44088      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44089    fi
44090  fi
44091
44092      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44093    fi
44094
44095    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44096      OPENWIN_HOME="/usr/openwin"
44097      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44098      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44099          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44100          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44101          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44102    fi
44103
44104    ac_ext=c
44105ac_cpp='$CPP $CPPFLAGS'
44106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44107ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44108ac_compiler_gnu=$ac_cv_c_compiler_gnu
44109
44110    OLD_CFLAGS="$CFLAGS"
44111    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44112
44113    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44114    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44115do :
44116  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44117ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44118          # include <X11/Xlib.h>
44119          # include <X11/Xutil.h>
44120
44121
44122"
44123if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44124  cat >>confdefs.h <<_ACEOF
44125#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44126_ACEOF
44127 X11_HEADERS_OK=yes
44128else
44129  X11_HEADERS_OK=no; break
44130fi
44131
44132done
44133
44134
44135    if test "x$X11_HEADERS_OK" = xno; then
44136
44137  # Print a helpful message on how to acquire the necessary build dependency.
44138  # x11 is the help tag: freetype, cups, pulse, alsa etc
44139  MISSING_DEPENDENCY=x11
44140
44141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44142    cygwin_help $MISSING_DEPENDENCY
44143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44144    msys_help $MISSING_DEPENDENCY
44145  else
44146    PKGHANDLER_COMMAND=
44147
44148    case $PKGHANDLER in
44149      apt-get)
44150        apt_help     $MISSING_DEPENDENCY ;;
44151      yum)
44152        yum_help     $MISSING_DEPENDENCY ;;
44153      port)
44154        port_help    $MISSING_DEPENDENCY ;;
44155      pkgutil)
44156        pkgutil_help $MISSING_DEPENDENCY ;;
44157      pkgadd)
44158        pkgadd_help  $MISSING_DEPENDENCY ;;
44159    esac
44160
44161    if test "x$PKGHANDLER_COMMAND" != x; then
44162      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44163    fi
44164  fi
44165
44166      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44167    fi
44168
44169    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44170    # defined in libawt_xawt.
44171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44172$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44173    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44174/* end confdefs.h.  */
44175#include <X11/extensions/Xrender.h>
44176int
44177main ()
44178{
44179XLinearGradient x;
44180  ;
44181  return 0;
44182}
44183_ACEOF
44184if ac_fn_c_try_compile "$LINENO"; then :
44185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44186$as_echo "yes" >&6; }
44187else
44188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44189$as_echo "no" >&6; }
44190         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44191fi
44192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44193
44194    CFLAGS="$OLD_CFLAGS"
44195    ac_ext=cpp
44196ac_cpp='$CXXCPP $CPPFLAGS'
44197ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44198ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44199ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44200
44201  fi # X11_NOT_NEEDED
44202
44203
44204
44205
44206
44207
44208  ###############################################################################
44209  #
44210  # The common unix printing system cups is used to print from java.
44211  #
44212
44213# Check whether --with-cups was given.
44214if test "${with_cups+set}" = set; then :
44215  withval=$with_cups;
44216fi
44217
44218
44219# Check whether --with-cups-include was given.
44220if test "${with_cups_include+set}" = set; then :
44221  withval=$with_cups_include;
44222fi
44223
44224
44225  if test "x$CUPS_NOT_NEEDED" = xyes; then
44226    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44227      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44228$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44229    fi
44230    CUPS_CFLAGS=
44231  else
44232    CUPS_FOUND=no
44233
44234    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44235      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44236    fi
44237
44238    if test "x${with_cups}" != x; then
44239      CUPS_CFLAGS="-I${with_cups}/include"
44240      CUPS_FOUND=yes
44241    fi
44242    if test "x${with_cups_include}" != x; then
44243      CUPS_CFLAGS="-I${with_cups_include}"
44244      CUPS_FOUND=yes
44245    fi
44246    if test "x$CUPS_FOUND" = xno; then
44247
44248
44249  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44250    # Source the builddeps file again, to make sure it uses the latest variables!
44251    . $builddepsfile
44252    # Look for a target and build machine specific resource!
44253    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44254    if test "x$resource" = x; then
44255      # Ok, lets instead look for a target specific resource
44256      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44257    fi
44258    if test "x$resource" = x; then
44259      # Ok, lets instead look for a build specific resource
44260      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44261    fi
44262    if test "x$resource" = x; then
44263      # Ok, lets instead look for a generic resource
44264      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44265      resource=${builddep_cups}
44266    fi
44267    if test "x$resource" != x; then
44268      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44269$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44270      # If the resource in the builddeps.conf file is an existing directory,
44271      # for example /java/linux/cups
44272      if test -d ${resource}; then
44273        depdir=${resource}
44274      else
44275
44276  # cups is for example mymodule
44277  # $resource is for example libs/general/libmymod_1_2_3.zip
44278  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44279  # $with_builddeps_dir is for example /localhome/builddeps
44280  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44281  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44282  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44283  filename=`basename $resource`
44284  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44285  filebase=${filename%%.*}
44286  extension=${filename#*.}
44287  installdir=$with_builddeps_dir/$filebase
44288  if test ! -f $installdir/$filename.unpacked; then
44289    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44290$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44291    if test ! -d $installdir; then
44292      mkdir -p $installdir
44293    fi
44294    if test ! -d $installdir; then
44295      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44296    fi
44297    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44298    touch $tmpfile
44299    if test ! -f $tmpfile; then
44300      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44301    fi
44302
44303  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44304  # $tmpfile is the local file name for the downloaded file.
44305  VALID_TOOL=no
44306  if test "x$BDEPS_FTP" = xwget; then
44307    VALID_TOOL=yes
44308    wget -O $tmpfile $with_builddeps_server/$resource
44309  fi
44310  if test "x$BDEPS_FTP" = xlftp; then
44311    VALID_TOOL=yes
44312    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44313  fi
44314  if test "x$BDEPS_FTP" = xftp; then
44315    VALID_TOOL=yes
44316    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44317    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44318    FTPUSERPWD=${FTPSERVER%%@*}
44319    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44320      FTPUSER=${userpwd%%:*}
44321      FTPPWD=${userpwd#*@}
44322      FTPSERVER=${FTPSERVER#*@}
44323    else
44324      FTPUSER=ftp
44325      FTPPWD=ftp
44326    fi
44327    # the "pass" command does not work on some
44328    # ftp clients (read ftp.exe) but if it works,
44329    # passive mode is better!
44330    ( \
44331        echo "user $FTPUSER $FTPPWD"        ; \
44332        echo "pass"                         ; \
44333        echo "bin"                          ; \
44334        echo "get $FTPPATH $tmpfile"              ; \
44335    ) | ftp -in $FTPSERVER
44336  fi
44337  if test "x$VALID_TOOL" != xyes; then
44338    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44339  fi
44340
44341    mv $tmpfile $installdir/$filename
44342    if test ! -s $installdir/$filename; then
44343      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44344    fi
44345    case "$extension" in
44346      zip)  echo "Unzipping $installdir/$filename..."
44347        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44348        ;;
44349      tar.gz) echo "Untaring $installdir/$filename..."
44350        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44351        ;;
44352      tgz) echo "Untaring $installdir/$filename..."
44353        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44354        ;;
44355      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44356        ;;
44357    esac
44358  fi
44359  if test -f $installdir/$filename.unpacked; then
44360    depdir=$installdir
44361  fi
44362
44363      fi
44364      # Source the builddeps file again, because in the previous command, the depdir
44365      # was updated to point at the current build dependency install directory.
44366      . $builddepsfile
44367      # Now extract variables from the builddeps.conf files.
44368      theroot=${builddep_cups_ROOT}
44369      thecflags=${builddep_cups_CFLAGS}
44370      thelibs=${builddep_cups_LIBS}
44371      if test "x$depdir" = x; then
44372        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44373      fi
44374      CUPS=$depdir
44375      if test "x$theroot" != x; then
44376        CUPS="$theroot"
44377      fi
44378      if test "x$thecflags" != x; then
44379        CUPS_CFLAGS="$thecflags"
44380      fi
44381      if test "x$thelibs" != x; then
44382        CUPS_LIBS="$thelibs"
44383      fi
44384      CUPS_FOUND=yes
44385
44386    fi
44387
44388  fi
44389
44390    fi
44391    if test "x$CUPS_FOUND" = xno; then
44392      # Are the cups headers installed in the default /usr/include location?
44393      for ac_header in cups/cups.h cups/ppd.h
44394do :
44395  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44396ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44397if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44398  cat >>confdefs.h <<_ACEOF
44399#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44400_ACEOF
44401
44402            CUPS_FOUND=yes
44403            CUPS_CFLAGS=
44404            DEFAULT_CUPS=yes
44405
44406
44407fi
44408
44409done
44410
44411    fi
44412    if test "x$CUPS_FOUND" = xno; then
44413      # Getting nervous now? Lets poke around for standard Solaris third-party
44414      # package installation locations.
44415      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44416$as_echo_n "checking for cups headers... " >&6; }
44417      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44418        # An SFW package seems to be installed!
44419        CUPS_FOUND=yes
44420        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44421      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44422        # A CSW package seems to be installed!
44423        CUPS_FOUND=yes
44424        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44425      fi
44426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44427$as_echo "$CUPS_FOUND" >&6; }
44428    fi
44429    if test "x$CUPS_FOUND" = xno; then
44430
44431  # Print a helpful message on how to acquire the necessary build dependency.
44432  # cups is the help tag: freetype, cups, pulse, alsa etc
44433  MISSING_DEPENDENCY=cups
44434
44435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44436    cygwin_help $MISSING_DEPENDENCY
44437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438    msys_help $MISSING_DEPENDENCY
44439  else
44440    PKGHANDLER_COMMAND=
44441
44442    case $PKGHANDLER in
44443      apt-get)
44444        apt_help     $MISSING_DEPENDENCY ;;
44445      yum)
44446        yum_help     $MISSING_DEPENDENCY ;;
44447      port)
44448        port_help    $MISSING_DEPENDENCY ;;
44449      pkgutil)
44450        pkgutil_help $MISSING_DEPENDENCY ;;
44451      pkgadd)
44452        pkgadd_help  $MISSING_DEPENDENCY ;;
44453    esac
44454
44455    if test "x$PKGHANDLER_COMMAND" != x; then
44456      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44457    fi
44458  fi
44459
44460      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44461    fi
44462  fi
44463
44464
44465
44466
44467
44468
44469  ###############################################################################
44470  #
44471  # The ubiquitous freetype library is used to render fonts.
44472  #
44473
44474# Check whether --with-freetype was given.
44475if test "${with_freetype+set}" = set; then :
44476  withval=$with_freetype;
44477fi
44478
44479
44480# Check whether --with-freetype-include was given.
44481if test "${with_freetype_include+set}" = set; then :
44482  withval=$with_freetype_include;
44483fi
44484
44485
44486# Check whether --with-freetype-lib was given.
44487if test "${with_freetype_lib+set}" = set; then :
44488  withval=$with_freetype_lib;
44489fi
44490
44491
44492# Check whether --with-freetype-src was given.
44493if test "${with_freetype_src+set}" = set; then :
44494  withval=$with_freetype_src;
44495fi
44496
44497  # Check whether --enable-freetype-bundling was given.
44498if test "${enable_freetype_bundling+set}" = set; then :
44499  enableval=$enable_freetype_bundling;
44500fi
44501
44502
44503  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44504  FREETYPE_BASE_NAME=freetype
44505  FREETYPE_CFLAGS=
44506  FREETYPE_LIBS=
44507  FREETYPE_BUNDLE_LIB_PATH=
44508
44509  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44510    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
44511      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44512$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44513    fi
44514    if test "x$enable_freetype_bundling" != x; then
44515      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44516$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44517    fi
44518  else
44519    # freetype is needed to build; go get it!
44520
44521    BUNDLE_FREETYPE="$enable_freetype_bundling"
44522
44523    if  test "x$with_freetype_src" != x; then
44524      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44525        # Try to build freetype if --with-freetype-src was given on Windows
44526
44527  FREETYPE_SRC_PATH="$with_freetype_src"
44528  BUILD_FREETYPE=yes
44529
44530  # Check if the freetype sources are acessible..
44531  if ! test -d $FREETYPE_SRC_PATH; then
44532    { $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
44533$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44534    BUILD_FREETYPE=no
44535  fi
44536  # ..and contain a vc2010 project file
44537  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44538  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44539    { $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
44540$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44541    BUILD_FREETYPE=no
44542  fi
44543  # Now check if configure found a version of 'msbuild.exe'
44544  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44545    { $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
44546$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;}
44547    BUILD_FREETYPE=no
44548  fi
44549
44550  # Ready to go..
44551  if test "x$BUILD_FREETYPE" = xyes; then
44552
44553    # msbuild requires trailing slashes for output directories
44554    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44555    freetype_lib_path_unix="$freetype_lib_path"
44556    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44557
44558  unix_path="$vcxproj_path"
44559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44560    windows_path=`$CYGPATH -m "$unix_path"`
44561    vcxproj_path="$windows_path"
44562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44563    windows_path=`cmd //c echo $unix_path`
44564    vcxproj_path="$windows_path"
44565  fi
44566
44567
44568  unix_path="$freetype_lib_path"
44569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44570    windows_path=`$CYGPATH -m "$unix_path"`
44571    freetype_lib_path="$windows_path"
44572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44573    windows_path=`cmd //c echo $unix_path`
44574    freetype_lib_path="$windows_path"
44575  fi
44576
44577
44578  unix_path="$freetype_obj_path"
44579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44580    windows_path=`$CYGPATH -m "$unix_path"`
44581    freetype_obj_path="$windows_path"
44582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44583    windows_path=`cmd //c echo $unix_path`
44584    freetype_obj_path="$windows_path"
44585  fi
44586
44587    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44588      freetype_platform=x64
44589    else
44590      freetype_platform=win32
44591    fi
44592
44593    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44594    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44595    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44596    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44597    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44598$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44599
44600    # First we try to build the freetype.dll
44601    $ECHO -e "@echo off\n"\
44602	     "$MSBUILD $vcxproj_path "\
44603		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44604		       "/p:Configuration=\"Release Multithreaded\" "\
44605		       "/p:Platform=$freetype_platform "\
44606		       "/p:ConfigurationType=DynamicLibrary "\
44607		       "/p:TargetName=freetype "\
44608		       "/p:OutDir=\"$freetype_lib_path\" "\
44609		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44610    cmd /c freetype.bat
44611
44612    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44613      # If that succeeds we also build freetype.lib
44614      $ECHO -e "@echo off\n"\
44615	       "$MSBUILD $vcxproj_path "\
44616			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44617			 "/p:Configuration=\"Release Multithreaded\" "\
44618			 "/p:Platform=$freetype_platform "\
44619			 "/p:ConfigurationType=StaticLibrary "\
44620			 "/p:TargetName=freetype "\
44621			 "/p:OutDir=\"$freetype_lib_path\" "\
44622			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44623      cmd /c freetype.bat
44624
44625      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44626	# Once we build both, lib and dll, set freetype lib and include path appropriately
44627	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44628	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44629	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44630$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44631      else
44632	BUILD_FREETYPE=no
44633      fi
44634    else
44635      BUILD_FREETYPE=no
44636    fi
44637  fi
44638
44639        if test "x$BUILD_FREETYPE" = xyes; then
44640          # Okay, we built it. Check that it works.
44641
44642  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44643  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44644  METHOD="--with-freetype-src"
44645
44646  # Let's start with an optimistic view of the world :-)
44647  FOUND_FREETYPE=yes
44648
44649  # First look for the canonical freetype main include file ft2build.h.
44650  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44651    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44652    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44653    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44654      # Fail.
44655      FOUND_FREETYPE=no
44656    fi
44657  fi
44658
44659  if test "x$FOUND_FREETYPE" = xyes; then
44660    # Include file found, let's continue the sanity check.
44661    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44662$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44663
44664    # Reset to default value
44665    FREETYPE_BASE_NAME=freetype
44666    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44667    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44668      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44669          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44670        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44671        # for the .6 version explicitly.
44672        FREETYPE_BASE_NAME=freetype.6
44673        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44674        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44675$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44676      else
44677        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44678$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44679        FOUND_FREETYPE=no
44680      fi
44681    else
44682      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44683        # On Windows, we will need both .lib and .dll file.
44684        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44685          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44686$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44687          FOUND_FREETYPE=no
44688        fi
44689      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44690          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44691        # Found lib in isa dir, use that instead.
44692        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44693        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44694$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44695      fi
44696    fi
44697  fi
44698
44699  if test "x$FOUND_FREETYPE" = xyes; then
44700
44701  # Only process if variable expands to non-empty
44702
44703  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44705
44706  # Input might be given as Windows format, start by converting to
44707  # unix format.
44708  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44709  new_path=`$CYGPATH -u "$path"`
44710
44711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44714  # "foo.exe" is OK but "foo" is an error.
44715  #
44716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44717  # It is also a way to make sure we got the proper file name for the real test later on.
44718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44719  if test "x$test_shortpath" = x; then
44720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44721$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44722    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44723  fi
44724
44725  # Call helper function which possibly converts this using DOS-style short mode.
44726  # If so, the updated path is stored in $new_path.
44727
44728  input_path="$new_path"
44729  # Check if we need to convert this using DOS-style short mode. If the path
44730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44731  # take no chances and rewrite it.
44732  # Note: m4 eats our [], so we need to use [ and ] instead.
44733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44734  if test "x$has_forbidden_chars" != x; then
44735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44739      # Going to short mode and back again did indeed matter. Since short mode is
44740      # case insensitive, let's make it lowercase to improve readability.
44741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44742      # Now convert it back to Unix-stile (cygpath)
44743      input_path=`$CYGPATH -u "$shortmode_path"`
44744      new_path="$input_path"
44745    fi
44746  fi
44747
44748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44749  if test "x$test_cygdrive_prefix" = x; then
44750    # As a simple fix, exclude /usr/bin since it's not a real path.
44751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44753      # a path prefixed by /cygdrive for fixpath to work.
44754      new_path="$CYGWIN_ROOT_PATH$input_path"
44755    fi
44756  fi
44757
44758
44759  if test "x$path" != "x$new_path"; then
44760    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44762$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44763  fi
44764
44765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44766
44767  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44768  has_colon=`$ECHO $path | $GREP ^.:`
44769  new_path="$path"
44770  if test "x$has_colon" = x; then
44771    # Not in mixed or Windows style, start by that.
44772    new_path=`cmd //c echo $path`
44773  fi
44774
44775
44776  input_path="$new_path"
44777  # Check if we need to convert this using DOS-style short mode. If the path
44778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44779  # take no chances and rewrite it.
44780  # Note: m4 eats our [], so we need to use [ and ] instead.
44781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44782  if test "x$has_forbidden_chars" != x; then
44783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44785  fi
44786
44787
44788  windows_path="$new_path"
44789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44790    unix_path=`$CYGPATH -u "$windows_path"`
44791    new_path="$unix_path"
44792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44794    new_path="$unix_path"
44795  fi
44796
44797  if test "x$path" != "x$new_path"; then
44798    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44801  fi
44802
44803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44805
44806    else
44807      # We're on a unix platform. Hooray! :)
44808      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44809      has_space=`$ECHO "$path" | $GREP " "`
44810      if test "x$has_space" != x; then
44811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44812$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44814      fi
44815
44816      # Use eval to expand a potential ~
44817      eval path="$path"
44818      if test ! -f "$path" && test ! -d "$path"; then
44819        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44820      fi
44821
44822      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44823    fi
44824  fi
44825
44826
44827  # Only process if variable expands to non-empty
44828
44829  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44831
44832  # Input might be given as Windows format, start by converting to
44833  # unix format.
44834  path="$POTENTIAL_FREETYPE_LIB_PATH"
44835  new_path=`$CYGPATH -u "$path"`
44836
44837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44840  # "foo.exe" is OK but "foo" is an error.
44841  #
44842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44843  # It is also a way to make sure we got the proper file name for the real test later on.
44844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44845  if test "x$test_shortpath" = x; then
44846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44847$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44848    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44849  fi
44850
44851  # Call helper function which possibly converts this using DOS-style short mode.
44852  # If so, the updated path is stored in $new_path.
44853
44854  input_path="$new_path"
44855  # Check if we need to convert this using DOS-style short mode. If the path
44856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44857  # take no chances and rewrite it.
44858  # Note: m4 eats our [], so we need to use [ and ] instead.
44859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44860  if test "x$has_forbidden_chars" != x; then
44861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44865      # Going to short mode and back again did indeed matter. Since short mode is
44866      # case insensitive, let's make it lowercase to improve readability.
44867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44868      # Now convert it back to Unix-stile (cygpath)
44869      input_path=`$CYGPATH -u "$shortmode_path"`
44870      new_path="$input_path"
44871    fi
44872  fi
44873
44874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44875  if test "x$test_cygdrive_prefix" = x; then
44876    # As a simple fix, exclude /usr/bin since it's not a real path.
44877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44879      # a path prefixed by /cygdrive for fixpath to work.
44880      new_path="$CYGWIN_ROOT_PATH$input_path"
44881    fi
44882  fi
44883
44884
44885  if test "x$path" != "x$new_path"; then
44886    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44889  fi
44890
44891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44892
44893  path="$POTENTIAL_FREETYPE_LIB_PATH"
44894  has_colon=`$ECHO $path | $GREP ^.:`
44895  new_path="$path"
44896  if test "x$has_colon" = x; then
44897    # Not in mixed or Windows style, start by that.
44898    new_path=`cmd //c echo $path`
44899  fi
44900
44901
44902  input_path="$new_path"
44903  # Check if we need to convert this using DOS-style short mode. If the path
44904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44905  # take no chances and rewrite it.
44906  # Note: m4 eats our [], so we need to use [ and ] instead.
44907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44908  if test "x$has_forbidden_chars" != x; then
44909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44911  fi
44912
44913
44914  windows_path="$new_path"
44915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44916    unix_path=`$CYGPATH -u "$windows_path"`
44917    new_path="$unix_path"
44918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44920    new_path="$unix_path"
44921  fi
44922
44923  if test "x$path" != "x$new_path"; then
44924    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44926$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44927  fi
44928
44929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44931
44932    else
44933      # We're on a unix platform. Hooray! :)
44934      path="$POTENTIAL_FREETYPE_LIB_PATH"
44935      has_space=`$ECHO "$path" | $GREP " "`
44936      if test "x$has_space" != x; then
44937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44938$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44940      fi
44941
44942      # Use eval to expand a potential ~
44943      eval path="$path"
44944      if test ! -f "$path" && test ! -d "$path"; then
44945        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44946      fi
44947
44948      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44949    fi
44950  fi
44951
44952
44953    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44955$as_echo_n "checking for freetype includes... " >&6; }
44956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44957$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44958    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44960$as_echo_n "checking for freetype libraries... " >&6; }
44961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44962$as_echo "$FREETYPE_LIB_PATH" >&6; }
44963  fi
44964
44965          if test "x$FOUND_FREETYPE" != xyes; then
44966            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44967          fi
44968        else
44969          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44970$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44971          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44972        fi
44973      else
44974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44975$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44976      fi
44977    fi
44978
44979    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44980      # User has specified settings
44981
44982      if test "x$BUNDLE_FREETYPE" = x; then
44983        # If not specified, default is to bundle freetype
44984        BUNDLE_FREETYPE=yes
44985      fi
44986
44987      if test "x$with_freetype" != x; then
44988        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44989        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44990      fi
44991
44992      # Allow --with-freetype-lib and --with-freetype-include to override
44993      if test "x$with_freetype_include" != x; then
44994        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44995      fi
44996      if test "x$with_freetype_lib" != x; then
44997        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44998      fi
44999
45000      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45001        # Okay, we got it. Check that it works.
45002
45003  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45004  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45005  METHOD="--with-freetype"
45006
45007  # Let's start with an optimistic view of the world :-)
45008  FOUND_FREETYPE=yes
45009
45010  # First look for the canonical freetype main include file ft2build.h.
45011  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45012    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45013    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45014    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45015      # Fail.
45016      FOUND_FREETYPE=no
45017    fi
45018  fi
45019
45020  if test "x$FOUND_FREETYPE" = xyes; then
45021    # Include file found, let's continue the sanity check.
45022    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45023$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45024
45025    # Reset to default value
45026    FREETYPE_BASE_NAME=freetype
45027    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45028    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45029      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45030          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45031        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45032        # for the .6 version explicitly.
45033        FREETYPE_BASE_NAME=freetype.6
45034        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45035        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45036$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45037      else
45038        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45039$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45040        FOUND_FREETYPE=no
45041      fi
45042    else
45043      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45044        # On Windows, we will need both .lib and .dll file.
45045        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45046          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45047$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45048          FOUND_FREETYPE=no
45049        fi
45050      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45051          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45052        # Found lib in isa dir, use that instead.
45053        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45054        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45055$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45056      fi
45057    fi
45058  fi
45059
45060  if test "x$FOUND_FREETYPE" = xyes; then
45061
45062  # Only process if variable expands to non-empty
45063
45064  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45066
45067  # Input might be given as Windows format, start by converting to
45068  # unix format.
45069  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45070  new_path=`$CYGPATH -u "$path"`
45071
45072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45075  # "foo.exe" is OK but "foo" is an error.
45076  #
45077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45078  # It is also a way to make sure we got the proper file name for the real test later on.
45079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45080  if test "x$test_shortpath" = x; then
45081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45084  fi
45085
45086  # Call helper function which possibly converts this using DOS-style short mode.
45087  # If so, the updated path is stored in $new_path.
45088
45089  input_path="$new_path"
45090  # Check if we need to convert this using DOS-style short mode. If the path
45091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45092  # take no chances and rewrite it.
45093  # Note: m4 eats our [], so we need to use [ and ] instead.
45094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45095  if test "x$has_forbidden_chars" != x; then
45096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45100      # Going to short mode and back again did indeed matter. Since short mode is
45101      # case insensitive, let's make it lowercase to improve readability.
45102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45103      # Now convert it back to Unix-stile (cygpath)
45104      input_path=`$CYGPATH -u "$shortmode_path"`
45105      new_path="$input_path"
45106    fi
45107  fi
45108
45109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45110  if test "x$test_cygdrive_prefix" = x; then
45111    # As a simple fix, exclude /usr/bin since it's not a real path.
45112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45114      # a path prefixed by /cygdrive for fixpath to work.
45115      new_path="$CYGWIN_ROOT_PATH$input_path"
45116    fi
45117  fi
45118
45119
45120  if test "x$path" != "x$new_path"; then
45121    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45124  fi
45125
45126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45127
45128  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45129  has_colon=`$ECHO $path | $GREP ^.:`
45130  new_path="$path"
45131  if test "x$has_colon" = x; then
45132    # Not in mixed or Windows style, start by that.
45133    new_path=`cmd //c echo $path`
45134  fi
45135
45136
45137  input_path="$new_path"
45138  # Check if we need to convert this using DOS-style short mode. If the path
45139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45140  # take no chances and rewrite it.
45141  # Note: m4 eats our [], so we need to use [ and ] instead.
45142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45143  if test "x$has_forbidden_chars" != x; then
45144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45146  fi
45147
45148
45149  windows_path="$new_path"
45150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45151    unix_path=`$CYGPATH -u "$windows_path"`
45152    new_path="$unix_path"
45153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45155    new_path="$unix_path"
45156  fi
45157
45158  if test "x$path" != "x$new_path"; then
45159    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45162  fi
45163
45164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45166
45167    else
45168      # We're on a unix platform. Hooray! :)
45169      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45170      has_space=`$ECHO "$path" | $GREP " "`
45171      if test "x$has_space" != x; then
45172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45175      fi
45176
45177      # Use eval to expand a potential ~
45178      eval path="$path"
45179      if test ! -f "$path" && test ! -d "$path"; then
45180        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45181      fi
45182
45183      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45184    fi
45185  fi
45186
45187
45188  # Only process if variable expands to non-empty
45189
45190  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45192
45193  # Input might be given as Windows format, start by converting to
45194  # unix format.
45195  path="$POTENTIAL_FREETYPE_LIB_PATH"
45196  new_path=`$CYGPATH -u "$path"`
45197
45198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45201  # "foo.exe" is OK but "foo" is an error.
45202  #
45203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45204  # It is also a way to make sure we got the proper file name for the real test later on.
45205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45206  if test "x$test_shortpath" = x; then
45207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45209    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45210  fi
45211
45212  # Call helper function which possibly converts this using DOS-style short mode.
45213  # If so, the updated path is stored in $new_path.
45214
45215  input_path="$new_path"
45216  # Check if we need to convert this using DOS-style short mode. If the path
45217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45218  # take no chances and rewrite it.
45219  # Note: m4 eats our [], so we need to use [ and ] instead.
45220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45221  if test "x$has_forbidden_chars" != x; then
45222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45226      # Going to short mode and back again did indeed matter. Since short mode is
45227      # case insensitive, let's make it lowercase to improve readability.
45228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45229      # Now convert it back to Unix-stile (cygpath)
45230      input_path=`$CYGPATH -u "$shortmode_path"`
45231      new_path="$input_path"
45232    fi
45233  fi
45234
45235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45236  if test "x$test_cygdrive_prefix" = x; then
45237    # As a simple fix, exclude /usr/bin since it's not a real path.
45238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45240      # a path prefixed by /cygdrive for fixpath to work.
45241      new_path="$CYGWIN_ROOT_PATH$input_path"
45242    fi
45243  fi
45244
45245
45246  if test "x$path" != "x$new_path"; then
45247    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45250  fi
45251
45252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45253
45254  path="$POTENTIAL_FREETYPE_LIB_PATH"
45255  has_colon=`$ECHO $path | $GREP ^.:`
45256  new_path="$path"
45257  if test "x$has_colon" = x; then
45258    # Not in mixed or Windows style, start by that.
45259    new_path=`cmd //c echo $path`
45260  fi
45261
45262
45263  input_path="$new_path"
45264  # Check if we need to convert this using DOS-style short mode. If the path
45265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45266  # take no chances and rewrite it.
45267  # Note: m4 eats our [], so we need to use [ and ] instead.
45268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45269  if test "x$has_forbidden_chars" != x; then
45270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45272  fi
45273
45274
45275  windows_path="$new_path"
45276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45277    unix_path=`$CYGPATH -u "$windows_path"`
45278    new_path="$unix_path"
45279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45281    new_path="$unix_path"
45282  fi
45283
45284  if test "x$path" != "x$new_path"; then
45285    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45288  fi
45289
45290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45292
45293    else
45294      # We're on a unix platform. Hooray! :)
45295      path="$POTENTIAL_FREETYPE_LIB_PATH"
45296      has_space=`$ECHO "$path" | $GREP " "`
45297      if test "x$has_space" != x; then
45298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45301      fi
45302
45303      # Use eval to expand a potential ~
45304      eval path="$path"
45305      if test ! -f "$path" && test ! -d "$path"; then
45306        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45307      fi
45308
45309      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45310    fi
45311  fi
45312
45313
45314    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45316$as_echo_n "checking for freetype includes... " >&6; }
45317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45318$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45319    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45321$as_echo_n "checking for freetype libraries... " >&6; }
45322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45323$as_echo "$FREETYPE_LIB_PATH" >&6; }
45324  fi
45325
45326        if test "x$FOUND_FREETYPE" != xyes; then
45327          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45328        fi
45329      else
45330        # User specified only one of lib or include. This is an error.
45331        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45332          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45333$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45334          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45335        else
45336          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45337$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45338          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45339        fi
45340      fi
45341    else
45342      # User did not specify settings, but we need freetype. Try to locate it.
45343
45344      if test "x$BUNDLE_FREETYPE" = x; then
45345        # If not specified, default is to bundle freetype only on windows
45346        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45347          BUNDLE_FREETYPE=yes
45348        else
45349          BUNDLE_FREETYPE=no
45350        fi
45351      fi
45352
45353      if test "x$FOUND_FREETYPE" != xyes; then
45354        # Check builddeps
45355
45356
45357  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45358    # Source the builddeps file again, to make sure it uses the latest variables!
45359    . $builddepsfile
45360    # Look for a target and build machine specific resource!
45361    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45362    if test "x$resource" = x; then
45363      # Ok, lets instead look for a target specific resource
45364      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45365    fi
45366    if test "x$resource" = x; then
45367      # Ok, lets instead look for a build specific resource
45368      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45369    fi
45370    if test "x$resource" = x; then
45371      # Ok, lets instead look for a generic resource
45372      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45373      resource=${builddep_freetype2}
45374    fi
45375    if test "x$resource" != x; then
45376      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45377$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45378      # If the resource in the builddeps.conf file is an existing directory,
45379      # for example /java/linux/cups
45380      if test -d ${resource}; then
45381        depdir=${resource}
45382      else
45383
45384  # freetype2 is for example mymodule
45385  # $resource is for example libs/general/libmymod_1_2_3.zip
45386  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45387  # $with_builddeps_dir is for example /localhome/builddeps
45388  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45389  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45390  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45391  filename=`basename $resource`
45392  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45393  filebase=${filename%%.*}
45394  extension=${filename#*.}
45395  installdir=$with_builddeps_dir/$filebase
45396  if test ! -f $installdir/$filename.unpacked; then
45397    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45398$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45399    if test ! -d $installdir; then
45400      mkdir -p $installdir
45401    fi
45402    if test ! -d $installdir; then
45403      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45404    fi
45405    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45406    touch $tmpfile
45407    if test ! -f $tmpfile; then
45408      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45409    fi
45410
45411  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45412  # $tmpfile is the local file name for the downloaded file.
45413  VALID_TOOL=no
45414  if test "x$BDEPS_FTP" = xwget; then
45415    VALID_TOOL=yes
45416    wget -O $tmpfile $with_builddeps_server/$resource
45417  fi
45418  if test "x$BDEPS_FTP" = xlftp; then
45419    VALID_TOOL=yes
45420    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45421  fi
45422  if test "x$BDEPS_FTP" = xftp; then
45423    VALID_TOOL=yes
45424    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45425    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45426    FTPUSERPWD=${FTPSERVER%%@*}
45427    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45428      FTPUSER=${userpwd%%:*}
45429      FTPPWD=${userpwd#*@}
45430      FTPSERVER=${FTPSERVER#*@}
45431    else
45432      FTPUSER=ftp
45433      FTPPWD=ftp
45434    fi
45435    # the "pass" command does not work on some
45436    # ftp clients (read ftp.exe) but if it works,
45437    # passive mode is better!
45438    ( \
45439        echo "user $FTPUSER $FTPPWD"        ; \
45440        echo "pass"                         ; \
45441        echo "bin"                          ; \
45442        echo "get $FTPPATH $tmpfile"              ; \
45443    ) | ftp -in $FTPSERVER
45444  fi
45445  if test "x$VALID_TOOL" != xyes; then
45446    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45447  fi
45448
45449    mv $tmpfile $installdir/$filename
45450    if test ! -s $installdir/$filename; then
45451      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45452    fi
45453    case "$extension" in
45454      zip)  echo "Unzipping $installdir/$filename..."
45455        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45456        ;;
45457      tar.gz) echo "Untaring $installdir/$filename..."
45458        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45459        ;;
45460      tgz) echo "Untaring $installdir/$filename..."
45461        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45462        ;;
45463      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45464        ;;
45465    esac
45466  fi
45467  if test -f $installdir/$filename.unpacked; then
45468    depdir=$installdir
45469  fi
45470
45471      fi
45472      # Source the builddeps file again, because in the previous command, the depdir
45473      # was updated to point at the current build dependency install directory.
45474      . $builddepsfile
45475      # Now extract variables from the builddeps.conf files.
45476      theroot=${builddep_freetype2_ROOT}
45477      thecflags=${builddep_freetype2_CFLAGS}
45478      thelibs=${builddep_freetype2_LIBS}
45479      if test "x$depdir" = x; then
45480        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45481      fi
45482      FREETYPE=$depdir
45483      if test "x$theroot" != x; then
45484        FREETYPE="$theroot"
45485      fi
45486      if test "x$thecflags" != x; then
45487        FREETYPE_CFLAGS="$thecflags"
45488      fi
45489      if test "x$thelibs" != x; then
45490        FREETYPE_LIBS="$thelibs"
45491      fi
45492      FOUND_FREETYPE=yes
45493      else FOUND_FREETYPE=no
45494
45495    fi
45496    else FOUND_FREETYPE=no
45497
45498  fi
45499
45500        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45501        if test "x$FOUND_FREETYPE" = xyes; then
45502          if test "x$BUNDLE_FREETYPE" = xyes; then
45503            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45504$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45505            FOUND_FREETYPE=no
45506          else
45507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45508$as_echo_n "checking for freetype... " >&6; }
45509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45510$as_echo "yes (using builddeps)" >&6; }
45511          fi
45512        fi
45513      fi
45514
45515      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45516      if test "x$SYSROOT" = x; then
45517        if test "x$FOUND_FREETYPE" != xyes; then
45518          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45519          if test "x$PKG_CONFIG" != x; then
45520
45521pkg_failed=no
45522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45523$as_echo_n "checking for FREETYPE... " >&6; }
45524
45525if test -n "$FREETYPE_CFLAGS"; then
45526    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45527 elif test -n "$PKG_CONFIG"; then
45528    if test -n "$PKG_CONFIG" && \
45529    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45530  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45531  ac_status=$?
45532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45533  test $ac_status = 0; }; then
45534  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45535else
45536  pkg_failed=yes
45537fi
45538 else
45539    pkg_failed=untried
45540fi
45541if test -n "$FREETYPE_LIBS"; then
45542    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45543 elif test -n "$PKG_CONFIG"; then
45544    if test -n "$PKG_CONFIG" && \
45545    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45546  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45547  ac_status=$?
45548  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45549  test $ac_status = 0; }; then
45550  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45551else
45552  pkg_failed=yes
45553fi
45554 else
45555    pkg_failed=untried
45556fi
45557
45558
45559
45560if test $pkg_failed = yes; then
45561
45562if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45563        _pkg_short_errors_supported=yes
45564else
45565        _pkg_short_errors_supported=no
45566fi
45567        if test $_pkg_short_errors_supported = yes; then
45568	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45569        else
45570	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45571        fi
45572	# Put the nasty error message in config.log where it belongs
45573	echo "$FREETYPE_PKG_ERRORS" >&5
45574
45575	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45576$as_echo "no" >&6; }
45577                FOUND_FREETYPE=no
45578elif test $pkg_failed = untried; then
45579	FOUND_FREETYPE=no
45580else
45581	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45582	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45584$as_echo "yes" >&6; }
45585	FOUND_FREETYPE=yes
45586fi
45587            if test "x$FOUND_FREETYPE" = xyes; then
45588              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45589              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45590              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45591              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45592                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45593              fi
45594              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45595              if test "x$BUNDLE_FREETYPE" = xyes; then
45596                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45597$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45598                FOUND_FREETYPE=no
45599              else
45600                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45601$as_echo_n "checking for freetype... " >&6; }
45602                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45603$as_echo "yes (using pkg-config)" >&6; }
45604              fi
45605            fi
45606          fi
45607        fi
45608      fi
45609
45610      if test "x$FOUND_FREETYPE" != xyes; then
45611        # Check in well-known locations
45612        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45613          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45614
45615  windows_path="$FREETYPE_BASE_DIR"
45616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45617    unix_path=`$CYGPATH -u "$windows_path"`
45618    FREETYPE_BASE_DIR="$unix_path"
45619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45621    FREETYPE_BASE_DIR="$unix_path"
45622  fi
45623
45624
45625  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45626  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45627  METHOD="well-known location"
45628
45629  # Let's start with an optimistic view of the world :-)
45630  FOUND_FREETYPE=yes
45631
45632  # First look for the canonical freetype main include file ft2build.h.
45633  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45634    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45635    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45636    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45637      # Fail.
45638      FOUND_FREETYPE=no
45639    fi
45640  fi
45641
45642  if test "x$FOUND_FREETYPE" = xyes; then
45643    # Include file found, let's continue the sanity check.
45644    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45645$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45646
45647    # Reset to default value
45648    FREETYPE_BASE_NAME=freetype
45649    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45650    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45651      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45652          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45653        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45654        # for the .6 version explicitly.
45655        FREETYPE_BASE_NAME=freetype.6
45656        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45657        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45658$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45659      else
45660        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45661$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45662        FOUND_FREETYPE=no
45663      fi
45664    else
45665      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45666        # On Windows, we will need both .lib and .dll file.
45667        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45668          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45669$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45670          FOUND_FREETYPE=no
45671        fi
45672      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45673          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45674        # Found lib in isa dir, use that instead.
45675        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45676        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45677$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45678      fi
45679    fi
45680  fi
45681
45682  if test "x$FOUND_FREETYPE" = xyes; then
45683
45684  # Only process if variable expands to non-empty
45685
45686  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45688
45689  # Input might be given as Windows format, start by converting to
45690  # unix format.
45691  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45692  new_path=`$CYGPATH -u "$path"`
45693
45694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45697  # "foo.exe" is OK but "foo" is an error.
45698  #
45699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45700  # It is also a way to make sure we got the proper file name for the real test later on.
45701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45702  if test "x$test_shortpath" = x; then
45703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45705    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45706  fi
45707
45708  # Call helper function which possibly converts this using DOS-style short mode.
45709  # If so, the updated path is stored in $new_path.
45710
45711  input_path="$new_path"
45712  # Check if we need to convert this using DOS-style short mode. If the path
45713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45714  # take no chances and rewrite it.
45715  # Note: m4 eats our [], so we need to use [ and ] instead.
45716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45717  if test "x$has_forbidden_chars" != x; then
45718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45722      # Going to short mode and back again did indeed matter. Since short mode is
45723      # case insensitive, let's make it lowercase to improve readability.
45724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45725      # Now convert it back to Unix-stile (cygpath)
45726      input_path=`$CYGPATH -u "$shortmode_path"`
45727      new_path="$input_path"
45728    fi
45729  fi
45730
45731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45732  if test "x$test_cygdrive_prefix" = x; then
45733    # As a simple fix, exclude /usr/bin since it's not a real path.
45734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45736      # a path prefixed by /cygdrive for fixpath to work.
45737      new_path="$CYGWIN_ROOT_PATH$input_path"
45738    fi
45739  fi
45740
45741
45742  if test "x$path" != "x$new_path"; then
45743    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45746  fi
45747
45748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45749
45750  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45751  has_colon=`$ECHO $path | $GREP ^.:`
45752  new_path="$path"
45753  if test "x$has_colon" = x; then
45754    # Not in mixed or Windows style, start by that.
45755    new_path=`cmd //c echo $path`
45756  fi
45757
45758
45759  input_path="$new_path"
45760  # Check if we need to convert this using DOS-style short mode. If the path
45761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45762  # take no chances and rewrite it.
45763  # Note: m4 eats our [], so we need to use [ and ] instead.
45764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45765  if test "x$has_forbidden_chars" != x; then
45766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45768  fi
45769
45770
45771  windows_path="$new_path"
45772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45773    unix_path=`$CYGPATH -u "$windows_path"`
45774    new_path="$unix_path"
45775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45777    new_path="$unix_path"
45778  fi
45779
45780  if test "x$path" != "x$new_path"; then
45781    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45783$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45784  fi
45785
45786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45788
45789    else
45790      # We're on a unix platform. Hooray! :)
45791      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45792      has_space=`$ECHO "$path" | $GREP " "`
45793      if test "x$has_space" != x; then
45794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45795$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45796        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45797      fi
45798
45799      # Use eval to expand a potential ~
45800      eval path="$path"
45801      if test ! -f "$path" && test ! -d "$path"; then
45802        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45803      fi
45804
45805      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45806    fi
45807  fi
45808
45809
45810  # Only process if variable expands to non-empty
45811
45812  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45814
45815  # Input might be given as Windows format, start by converting to
45816  # unix format.
45817  path="$POTENTIAL_FREETYPE_LIB_PATH"
45818  new_path=`$CYGPATH -u "$path"`
45819
45820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45823  # "foo.exe" is OK but "foo" is an error.
45824  #
45825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45826  # It is also a way to make sure we got the proper file name for the real test later on.
45827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45828  if test "x$test_shortpath" = x; then
45829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45831    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45832  fi
45833
45834  # Call helper function which possibly converts this using DOS-style short mode.
45835  # If so, the updated path is stored in $new_path.
45836
45837  input_path="$new_path"
45838  # Check if we need to convert this using DOS-style short mode. If the path
45839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45840  # take no chances and rewrite it.
45841  # Note: m4 eats our [], so we need to use [ and ] instead.
45842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45843  if test "x$has_forbidden_chars" != x; then
45844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45848      # Going to short mode and back again did indeed matter. Since short mode is
45849      # case insensitive, let's make it lowercase to improve readability.
45850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45851      # Now convert it back to Unix-stile (cygpath)
45852      input_path=`$CYGPATH -u "$shortmode_path"`
45853      new_path="$input_path"
45854    fi
45855  fi
45856
45857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45858  if test "x$test_cygdrive_prefix" = x; then
45859    # As a simple fix, exclude /usr/bin since it's not a real path.
45860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45862      # a path prefixed by /cygdrive for fixpath to work.
45863      new_path="$CYGWIN_ROOT_PATH$input_path"
45864    fi
45865  fi
45866
45867
45868  if test "x$path" != "x$new_path"; then
45869    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45871$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45872  fi
45873
45874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45875
45876  path="$POTENTIAL_FREETYPE_LIB_PATH"
45877  has_colon=`$ECHO $path | $GREP ^.:`
45878  new_path="$path"
45879  if test "x$has_colon" = x; then
45880    # Not in mixed or Windows style, start by that.
45881    new_path=`cmd //c echo $path`
45882  fi
45883
45884
45885  input_path="$new_path"
45886  # Check if we need to convert this using DOS-style short mode. If the path
45887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45888  # take no chances and rewrite it.
45889  # Note: m4 eats our [], so we need to use [ and ] instead.
45890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45891  if test "x$has_forbidden_chars" != x; then
45892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45894  fi
45895
45896
45897  windows_path="$new_path"
45898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45899    unix_path=`$CYGPATH -u "$windows_path"`
45900    new_path="$unix_path"
45901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45903    new_path="$unix_path"
45904  fi
45905
45906  if test "x$path" != "x$new_path"; then
45907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45910  fi
45911
45912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45914
45915    else
45916      # We're on a unix platform. Hooray! :)
45917      path="$POTENTIAL_FREETYPE_LIB_PATH"
45918      has_space=`$ECHO "$path" | $GREP " "`
45919      if test "x$has_space" != x; then
45920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45921$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45923      fi
45924
45925      # Use eval to expand a potential ~
45926      eval path="$path"
45927      if test ! -f "$path" && test ! -d "$path"; then
45928        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45929      fi
45930
45931      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45932    fi
45933  fi
45934
45935
45936    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45938$as_echo_n "checking for freetype includes... " >&6; }
45939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45940$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45941    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45943$as_echo_n "checking for freetype libraries... " >&6; }
45944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45945$as_echo "$FREETYPE_LIB_PATH" >&6; }
45946  fi
45947
45948          if test "x$FOUND_FREETYPE" != xyes; then
45949            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45950
45951  windows_path="$FREETYPE_BASE_DIR"
45952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45953    unix_path=`$CYGPATH -u "$windows_path"`
45954    FREETYPE_BASE_DIR="$unix_path"
45955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45957    FREETYPE_BASE_DIR="$unix_path"
45958  fi
45959
45960
45961  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45962  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45963  METHOD="well-known location"
45964
45965  # Let's start with an optimistic view of the world :-)
45966  FOUND_FREETYPE=yes
45967
45968  # First look for the canonical freetype main include file ft2build.h.
45969  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45970    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45971    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45972    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45973      # Fail.
45974      FOUND_FREETYPE=no
45975    fi
45976  fi
45977
45978  if test "x$FOUND_FREETYPE" = xyes; then
45979    # Include file found, let's continue the sanity check.
45980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45981$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45982
45983    # Reset to default value
45984    FREETYPE_BASE_NAME=freetype
45985    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45986    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45987      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45988          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45989        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45990        # for the .6 version explicitly.
45991        FREETYPE_BASE_NAME=freetype.6
45992        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45993        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45994$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45995      else
45996        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45997$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45998        FOUND_FREETYPE=no
45999      fi
46000    else
46001      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46002        # On Windows, we will need both .lib and .dll file.
46003        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46004          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46005$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46006          FOUND_FREETYPE=no
46007        fi
46008      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46009          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46010        # Found lib in isa dir, use that instead.
46011        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46012        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46013$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46014      fi
46015    fi
46016  fi
46017
46018  if test "x$FOUND_FREETYPE" = xyes; then
46019
46020  # Only process if variable expands to non-empty
46021
46022  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46024
46025  # Input might be given as Windows format, start by converting to
46026  # unix format.
46027  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46028  new_path=`$CYGPATH -u "$path"`
46029
46030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46033  # "foo.exe" is OK but "foo" is an error.
46034  #
46035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46036  # It is also a way to make sure we got the proper file name for the real test later on.
46037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46038  if test "x$test_shortpath" = x; then
46039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46041    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46042  fi
46043
46044  # Call helper function which possibly converts this using DOS-style short mode.
46045  # If so, the updated path is stored in $new_path.
46046
46047  input_path="$new_path"
46048  # Check if we need to convert this using DOS-style short mode. If the path
46049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46050  # take no chances and rewrite it.
46051  # Note: m4 eats our [], so we need to use [ and ] instead.
46052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46053  if test "x$has_forbidden_chars" != x; then
46054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46058      # Going to short mode and back again did indeed matter. Since short mode is
46059      # case insensitive, let's make it lowercase to improve readability.
46060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46061      # Now convert it back to Unix-stile (cygpath)
46062      input_path=`$CYGPATH -u "$shortmode_path"`
46063      new_path="$input_path"
46064    fi
46065  fi
46066
46067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46068  if test "x$test_cygdrive_prefix" = x; then
46069    # As a simple fix, exclude /usr/bin since it's not a real path.
46070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46072      # a path prefixed by /cygdrive for fixpath to work.
46073      new_path="$CYGWIN_ROOT_PATH$input_path"
46074    fi
46075  fi
46076
46077
46078  if test "x$path" != "x$new_path"; then
46079    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46081$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46082  fi
46083
46084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46085
46086  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46087  has_colon=`$ECHO $path | $GREP ^.:`
46088  new_path="$path"
46089  if test "x$has_colon" = x; then
46090    # Not in mixed or Windows style, start by that.
46091    new_path=`cmd //c echo $path`
46092  fi
46093
46094
46095  input_path="$new_path"
46096  # Check if we need to convert this using DOS-style short mode. If the path
46097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46098  # take no chances and rewrite it.
46099  # Note: m4 eats our [], so we need to use [ and ] instead.
46100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46101  if test "x$has_forbidden_chars" != x; then
46102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46104  fi
46105
46106
46107  windows_path="$new_path"
46108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46109    unix_path=`$CYGPATH -u "$windows_path"`
46110    new_path="$unix_path"
46111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46113    new_path="$unix_path"
46114  fi
46115
46116  if test "x$path" != "x$new_path"; then
46117    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46119$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46120  fi
46121
46122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46124
46125    else
46126      # We're on a unix platform. Hooray! :)
46127      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46128      has_space=`$ECHO "$path" | $GREP " "`
46129      if test "x$has_space" != x; then
46130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46133      fi
46134
46135      # Use eval to expand a potential ~
46136      eval path="$path"
46137      if test ! -f "$path" && test ! -d "$path"; then
46138        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46139      fi
46140
46141      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46142    fi
46143  fi
46144
46145
46146  # Only process if variable expands to non-empty
46147
46148  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46150
46151  # Input might be given as Windows format, start by converting to
46152  # unix format.
46153  path="$POTENTIAL_FREETYPE_LIB_PATH"
46154  new_path=`$CYGPATH -u "$path"`
46155
46156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46159  # "foo.exe" is OK but "foo" is an error.
46160  #
46161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46162  # It is also a way to make sure we got the proper file name for the real test later on.
46163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46164  if test "x$test_shortpath" = x; then
46165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46166$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46167    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46168  fi
46169
46170  # Call helper function which possibly converts this using DOS-style short mode.
46171  # If so, the updated path is stored in $new_path.
46172
46173  input_path="$new_path"
46174  # Check if we need to convert this using DOS-style short mode. If the path
46175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46176  # take no chances and rewrite it.
46177  # Note: m4 eats our [], so we need to use [ and ] instead.
46178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46179  if test "x$has_forbidden_chars" != x; then
46180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46184      # Going to short mode and back again did indeed matter. Since short mode is
46185      # case insensitive, let's make it lowercase to improve readability.
46186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46187      # Now convert it back to Unix-stile (cygpath)
46188      input_path=`$CYGPATH -u "$shortmode_path"`
46189      new_path="$input_path"
46190    fi
46191  fi
46192
46193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46194  if test "x$test_cygdrive_prefix" = x; then
46195    # As a simple fix, exclude /usr/bin since it's not a real path.
46196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46198      # a path prefixed by /cygdrive for fixpath to work.
46199      new_path="$CYGWIN_ROOT_PATH$input_path"
46200    fi
46201  fi
46202
46203
46204  if test "x$path" != "x$new_path"; then
46205    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46207$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46208  fi
46209
46210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46211
46212  path="$POTENTIAL_FREETYPE_LIB_PATH"
46213  has_colon=`$ECHO $path | $GREP ^.:`
46214  new_path="$path"
46215  if test "x$has_colon" = x; then
46216    # Not in mixed or Windows style, start by that.
46217    new_path=`cmd //c echo $path`
46218  fi
46219
46220
46221  input_path="$new_path"
46222  # Check if we need to convert this using DOS-style short mode. If the path
46223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46224  # take no chances and rewrite it.
46225  # Note: m4 eats our [], so we need to use [ and ] instead.
46226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46227  if test "x$has_forbidden_chars" != x; then
46228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46230  fi
46231
46232
46233  windows_path="$new_path"
46234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46235    unix_path=`$CYGPATH -u "$windows_path"`
46236    new_path="$unix_path"
46237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46239    new_path="$unix_path"
46240  fi
46241
46242  if test "x$path" != "x$new_path"; then
46243    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46246  fi
46247
46248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46250
46251    else
46252      # We're on a unix platform. Hooray! :)
46253      path="$POTENTIAL_FREETYPE_LIB_PATH"
46254      has_space=`$ECHO "$path" | $GREP " "`
46255      if test "x$has_space" != x; then
46256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46257$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46259      fi
46260
46261      # Use eval to expand a potential ~
46262      eval path="$path"
46263      if test ! -f "$path" && test ! -d "$path"; then
46264        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46265      fi
46266
46267      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46268    fi
46269  fi
46270
46271
46272    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46274$as_echo_n "checking for freetype includes... " >&6; }
46275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46276$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46277    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46279$as_echo_n "checking for freetype libraries... " >&6; }
46280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46281$as_echo "$FREETYPE_LIB_PATH" >&6; }
46282  fi
46283
46284          fi
46285        else
46286          FREETYPE_BASE_DIR="$SYSROOT/usr"
46287
46288  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46289  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46290  METHOD="well-known location"
46291
46292  # Let's start with an optimistic view of the world :-)
46293  FOUND_FREETYPE=yes
46294
46295  # First look for the canonical freetype main include file ft2build.h.
46296  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46297    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46298    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46299    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46300      # Fail.
46301      FOUND_FREETYPE=no
46302    fi
46303  fi
46304
46305  if test "x$FOUND_FREETYPE" = xyes; then
46306    # Include file found, let's continue the sanity check.
46307    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46308$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46309
46310    # Reset to default value
46311    FREETYPE_BASE_NAME=freetype
46312    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46313    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46314      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46315          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46316        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46317        # for the .6 version explicitly.
46318        FREETYPE_BASE_NAME=freetype.6
46319        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46320        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46321$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46322      else
46323        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46324$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46325        FOUND_FREETYPE=no
46326      fi
46327    else
46328      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46329        # On Windows, we will need both .lib and .dll file.
46330        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46331          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46332$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46333          FOUND_FREETYPE=no
46334        fi
46335      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46336          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46337        # Found lib in isa dir, use that instead.
46338        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46339        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46340$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46341      fi
46342    fi
46343  fi
46344
46345  if test "x$FOUND_FREETYPE" = xyes; then
46346
46347  # Only process if variable expands to non-empty
46348
46349  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46351
46352  # Input might be given as Windows format, start by converting to
46353  # unix format.
46354  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46355  new_path=`$CYGPATH -u "$path"`
46356
46357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46360  # "foo.exe" is OK but "foo" is an error.
46361  #
46362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46363  # It is also a way to make sure we got the proper file name for the real test later on.
46364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46365  if test "x$test_shortpath" = x; then
46366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46368    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46369  fi
46370
46371  # Call helper function which possibly converts this using DOS-style short mode.
46372  # If so, the updated path is stored in $new_path.
46373
46374  input_path="$new_path"
46375  # Check if we need to convert this using DOS-style short mode. If the path
46376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46377  # take no chances and rewrite it.
46378  # Note: m4 eats our [], so we need to use [ and ] instead.
46379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46380  if test "x$has_forbidden_chars" != x; then
46381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46385      # Going to short mode and back again did indeed matter. Since short mode is
46386      # case insensitive, let's make it lowercase to improve readability.
46387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46388      # Now convert it back to Unix-stile (cygpath)
46389      input_path=`$CYGPATH -u "$shortmode_path"`
46390      new_path="$input_path"
46391    fi
46392  fi
46393
46394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46395  if test "x$test_cygdrive_prefix" = x; then
46396    # As a simple fix, exclude /usr/bin since it's not a real path.
46397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46399      # a path prefixed by /cygdrive for fixpath to work.
46400      new_path="$CYGWIN_ROOT_PATH$input_path"
46401    fi
46402  fi
46403
46404
46405  if test "x$path" != "x$new_path"; then
46406    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46409  fi
46410
46411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46412
46413  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46414  has_colon=`$ECHO $path | $GREP ^.:`
46415  new_path="$path"
46416  if test "x$has_colon" = x; then
46417    # Not in mixed or Windows style, start by that.
46418    new_path=`cmd //c echo $path`
46419  fi
46420
46421
46422  input_path="$new_path"
46423  # Check if we need to convert this using DOS-style short mode. If the path
46424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46425  # take no chances and rewrite it.
46426  # Note: m4 eats our [], so we need to use [ and ] instead.
46427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46428  if test "x$has_forbidden_chars" != x; then
46429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46431  fi
46432
46433
46434  windows_path="$new_path"
46435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46436    unix_path=`$CYGPATH -u "$windows_path"`
46437    new_path="$unix_path"
46438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46440    new_path="$unix_path"
46441  fi
46442
46443  if test "x$path" != "x$new_path"; then
46444    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46447  fi
46448
46449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46451
46452    else
46453      # We're on a unix platform. Hooray! :)
46454      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46455      has_space=`$ECHO "$path" | $GREP " "`
46456      if test "x$has_space" != x; then
46457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46458$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46459        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46460      fi
46461
46462      # Use eval to expand a potential ~
46463      eval path="$path"
46464      if test ! -f "$path" && test ! -d "$path"; then
46465        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46466      fi
46467
46468      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46469    fi
46470  fi
46471
46472
46473  # Only process if variable expands to non-empty
46474
46475  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46477
46478  # Input might be given as Windows format, start by converting to
46479  # unix format.
46480  path="$POTENTIAL_FREETYPE_LIB_PATH"
46481  new_path=`$CYGPATH -u "$path"`
46482
46483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46486  # "foo.exe" is OK but "foo" is an error.
46487  #
46488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46489  # It is also a way to make sure we got the proper file name for the real test later on.
46490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46491  if test "x$test_shortpath" = x; then
46492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46493$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46494    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46495  fi
46496
46497  # Call helper function which possibly converts this using DOS-style short mode.
46498  # If so, the updated path is stored in $new_path.
46499
46500  input_path="$new_path"
46501  # Check if we need to convert this using DOS-style short mode. If the path
46502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46503  # take no chances and rewrite it.
46504  # Note: m4 eats our [], so we need to use [ and ] instead.
46505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46506  if test "x$has_forbidden_chars" != x; then
46507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46511      # Going to short mode and back again did indeed matter. Since short mode is
46512      # case insensitive, let's make it lowercase to improve readability.
46513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46514      # Now convert it back to Unix-stile (cygpath)
46515      input_path=`$CYGPATH -u "$shortmode_path"`
46516      new_path="$input_path"
46517    fi
46518  fi
46519
46520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46521  if test "x$test_cygdrive_prefix" = x; then
46522    # As a simple fix, exclude /usr/bin since it's not a real path.
46523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46525      # a path prefixed by /cygdrive for fixpath to work.
46526      new_path="$CYGWIN_ROOT_PATH$input_path"
46527    fi
46528  fi
46529
46530
46531  if test "x$path" != "x$new_path"; then
46532    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46534$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46535  fi
46536
46537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46538
46539  path="$POTENTIAL_FREETYPE_LIB_PATH"
46540  has_colon=`$ECHO $path | $GREP ^.:`
46541  new_path="$path"
46542  if test "x$has_colon" = x; then
46543    # Not in mixed or Windows style, start by that.
46544    new_path=`cmd //c echo $path`
46545  fi
46546
46547
46548  input_path="$new_path"
46549  # Check if we need to convert this using DOS-style short mode. If the path
46550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46551  # take no chances and rewrite it.
46552  # Note: m4 eats our [], so we need to use [ and ] instead.
46553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46554  if test "x$has_forbidden_chars" != x; then
46555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46557  fi
46558
46559
46560  windows_path="$new_path"
46561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46562    unix_path=`$CYGPATH -u "$windows_path"`
46563    new_path="$unix_path"
46564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46566    new_path="$unix_path"
46567  fi
46568
46569  if test "x$path" != "x$new_path"; then
46570    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46573  fi
46574
46575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46577
46578    else
46579      # We're on a unix platform. Hooray! :)
46580      path="$POTENTIAL_FREETYPE_LIB_PATH"
46581      has_space=`$ECHO "$path" | $GREP " "`
46582      if test "x$has_space" != x; then
46583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46584$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46585        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46586      fi
46587
46588      # Use eval to expand a potential ~
46589      eval path="$path"
46590      if test ! -f "$path" && test ! -d "$path"; then
46591        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46592      fi
46593
46594      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46595    fi
46596  fi
46597
46598
46599    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46601$as_echo_n "checking for freetype includes... " >&6; }
46602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46603$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46604    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46606$as_echo_n "checking for freetype libraries... " >&6; }
46607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46608$as_echo "$FREETYPE_LIB_PATH" >&6; }
46609  fi
46610
46611
46612          if test "x$FOUND_FREETYPE" != xyes; then
46613            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46614
46615  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46616  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46617  METHOD="well-known location"
46618
46619  # Let's start with an optimistic view of the world :-)
46620  FOUND_FREETYPE=yes
46621
46622  # First look for the canonical freetype main include file ft2build.h.
46623  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46624    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46625    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46626    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46627      # Fail.
46628      FOUND_FREETYPE=no
46629    fi
46630  fi
46631
46632  if test "x$FOUND_FREETYPE" = xyes; then
46633    # Include file found, let's continue the sanity check.
46634    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46635$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46636
46637    # Reset to default value
46638    FREETYPE_BASE_NAME=freetype
46639    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46640    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46641      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46642          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46643        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46644        # for the .6 version explicitly.
46645        FREETYPE_BASE_NAME=freetype.6
46646        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46647        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46648$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46649      else
46650        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46651$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46652        FOUND_FREETYPE=no
46653      fi
46654    else
46655      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46656        # On Windows, we will need both .lib and .dll file.
46657        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46658          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46659$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46660          FOUND_FREETYPE=no
46661        fi
46662      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46663          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46664        # Found lib in isa dir, use that instead.
46665        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46666        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46667$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46668      fi
46669    fi
46670  fi
46671
46672  if test "x$FOUND_FREETYPE" = xyes; then
46673
46674  # Only process if variable expands to non-empty
46675
46676  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46678
46679  # Input might be given as Windows format, start by converting to
46680  # unix format.
46681  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46682  new_path=`$CYGPATH -u "$path"`
46683
46684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46687  # "foo.exe" is OK but "foo" is an error.
46688  #
46689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46690  # It is also a way to make sure we got the proper file name for the real test later on.
46691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46692  if test "x$test_shortpath" = x; then
46693    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46694$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46695    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46696  fi
46697
46698  # Call helper function which possibly converts this using DOS-style short mode.
46699  # If so, the updated path is stored in $new_path.
46700
46701  input_path="$new_path"
46702  # Check if we need to convert this using DOS-style short mode. If the path
46703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46704  # take no chances and rewrite it.
46705  # Note: m4 eats our [], so we need to use [ and ] instead.
46706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46707  if test "x$has_forbidden_chars" != x; then
46708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46712      # Going to short mode and back again did indeed matter. Since short mode is
46713      # case insensitive, let's make it lowercase to improve readability.
46714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46715      # Now convert it back to Unix-stile (cygpath)
46716      input_path=`$CYGPATH -u "$shortmode_path"`
46717      new_path="$input_path"
46718    fi
46719  fi
46720
46721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46722  if test "x$test_cygdrive_prefix" = x; then
46723    # As a simple fix, exclude /usr/bin since it's not a real path.
46724    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46726      # a path prefixed by /cygdrive for fixpath to work.
46727      new_path="$CYGWIN_ROOT_PATH$input_path"
46728    fi
46729  fi
46730
46731
46732  if test "x$path" != "x$new_path"; then
46733    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46735$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46736  fi
46737
46738    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46739
46740  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46741  has_colon=`$ECHO $path | $GREP ^.:`
46742  new_path="$path"
46743  if test "x$has_colon" = x; then
46744    # Not in mixed or Windows style, start by that.
46745    new_path=`cmd //c echo $path`
46746  fi
46747
46748
46749  input_path="$new_path"
46750  # Check if we need to convert this using DOS-style short mode. If the path
46751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46752  # take no chances and rewrite it.
46753  # Note: m4 eats our [], so we need to use [ and ] instead.
46754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46755  if test "x$has_forbidden_chars" != x; then
46756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46758  fi
46759
46760
46761  windows_path="$new_path"
46762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46763    unix_path=`$CYGPATH -u "$windows_path"`
46764    new_path="$unix_path"
46765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46767    new_path="$unix_path"
46768  fi
46769
46770  if test "x$path" != "x$new_path"; then
46771    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46773$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46774  fi
46775
46776  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46777  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46778
46779    else
46780      # We're on a unix platform. Hooray! :)
46781      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46782      has_space=`$ECHO "$path" | $GREP " "`
46783      if test "x$has_space" != x; then
46784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46785$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46786        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46787      fi
46788
46789      # Use eval to expand a potential ~
46790      eval path="$path"
46791      if test ! -f "$path" && test ! -d "$path"; then
46792        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46793      fi
46794
46795      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46796    fi
46797  fi
46798
46799
46800  # Only process if variable expands to non-empty
46801
46802  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46804
46805  # Input might be given as Windows format, start by converting to
46806  # unix format.
46807  path="$POTENTIAL_FREETYPE_LIB_PATH"
46808  new_path=`$CYGPATH -u "$path"`
46809
46810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46813  # "foo.exe" is OK but "foo" is an error.
46814  #
46815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46816  # It is also a way to make sure we got the proper file name for the real test later on.
46817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46818  if test "x$test_shortpath" = x; then
46819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46821    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46822  fi
46823
46824  # Call helper function which possibly converts this using DOS-style short mode.
46825  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46838      # Going to short mode and back again did indeed matter. Since short mode is
46839      # case insensitive, let's make it lowercase to improve readability.
46840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46841      # Now convert it back to Unix-stile (cygpath)
46842      input_path=`$CYGPATH -u "$shortmode_path"`
46843      new_path="$input_path"
46844    fi
46845  fi
46846
46847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46848  if test "x$test_cygdrive_prefix" = x; then
46849    # As a simple fix, exclude /usr/bin since it's not a real path.
46850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46852      # a path prefixed by /cygdrive for fixpath to work.
46853      new_path="$CYGWIN_ROOT_PATH$input_path"
46854    fi
46855  fi
46856
46857
46858  if test "x$path" != "x$new_path"; then
46859    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46861$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46862  fi
46863
46864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46865
46866  path="$POTENTIAL_FREETYPE_LIB_PATH"
46867  has_colon=`$ECHO $path | $GREP ^.:`
46868  new_path="$path"
46869  if test "x$has_colon" = x; then
46870    # Not in mixed or Windows style, start by that.
46871    new_path=`cmd //c echo $path`
46872  fi
46873
46874
46875  input_path="$new_path"
46876  # Check if we need to convert this using DOS-style short mode. If the path
46877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46878  # take no chances and rewrite it.
46879  # Note: m4 eats our [], so we need to use [ and ] instead.
46880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46881  if test "x$has_forbidden_chars" != x; then
46882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46884  fi
46885
46886
46887  windows_path="$new_path"
46888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46889    unix_path=`$CYGPATH -u "$windows_path"`
46890    new_path="$unix_path"
46891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46893    new_path="$unix_path"
46894  fi
46895
46896  if test "x$path" != "x$new_path"; then
46897    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46900  fi
46901
46902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46904
46905    else
46906      # We're on a unix platform. Hooray! :)
46907      path="$POTENTIAL_FREETYPE_LIB_PATH"
46908      has_space=`$ECHO "$path" | $GREP " "`
46909      if test "x$has_space" != x; then
46910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46911$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46913      fi
46914
46915      # Use eval to expand a potential ~
46916      eval path="$path"
46917      if test ! -f "$path" && test ! -d "$path"; then
46918        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46919      fi
46920
46921      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46922    fi
46923  fi
46924
46925
46926    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46928$as_echo_n "checking for freetype includes... " >&6; }
46929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46930$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46931    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46933$as_echo_n "checking for freetype libraries... " >&6; }
46934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46935$as_echo "$FREETYPE_LIB_PATH" >&6; }
46936  fi
46937
46938          fi
46939
46940          if test "x$FOUND_FREETYPE" != xyes; then
46941            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46942
46943  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46944  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46945  METHOD="well-known location"
46946
46947  # Let's start with an optimistic view of the world :-)
46948  FOUND_FREETYPE=yes
46949
46950  # First look for the canonical freetype main include file ft2build.h.
46951  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46952    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46953    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46954    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46955      # Fail.
46956      FOUND_FREETYPE=no
46957    fi
46958  fi
46959
46960  if test "x$FOUND_FREETYPE" = xyes; then
46961    # Include file found, let's continue the sanity check.
46962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46963$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46964
46965    # Reset to default value
46966    FREETYPE_BASE_NAME=freetype
46967    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46968    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46969      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46970          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46971        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46972        # for the .6 version explicitly.
46973        FREETYPE_BASE_NAME=freetype.6
46974        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46975        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46976$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46977      else
46978        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46979$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46980        FOUND_FREETYPE=no
46981      fi
46982    else
46983      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46984        # On Windows, we will need both .lib and .dll file.
46985        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46986          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46987$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46988          FOUND_FREETYPE=no
46989        fi
46990      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46991          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46992        # Found lib in isa dir, use that instead.
46993        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46994        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46995$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46996      fi
46997    fi
46998  fi
46999
47000  if test "x$FOUND_FREETYPE" = xyes; then
47001
47002  # Only process if variable expands to non-empty
47003
47004  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47006
47007  # Input might be given as Windows format, start by converting to
47008  # unix format.
47009  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47010  new_path=`$CYGPATH -u "$path"`
47011
47012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47015  # "foo.exe" is OK but "foo" is an error.
47016  #
47017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47018  # It is also a way to make sure we got the proper file name for the real test later on.
47019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47020  if test "x$test_shortpath" = x; then
47021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47023    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47024  fi
47025
47026  # Call helper function which possibly converts this using DOS-style short mode.
47027  # If so, the updated path is stored in $new_path.
47028
47029  input_path="$new_path"
47030  # Check if we need to convert this using DOS-style short mode. If the path
47031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47032  # take no chances and rewrite it.
47033  # Note: m4 eats our [], so we need to use [ and ] instead.
47034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47035  if test "x$has_forbidden_chars" != x; then
47036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47040      # Going to short mode and back again did indeed matter. Since short mode is
47041      # case insensitive, let's make it lowercase to improve readability.
47042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47043      # Now convert it back to Unix-stile (cygpath)
47044      input_path=`$CYGPATH -u "$shortmode_path"`
47045      new_path="$input_path"
47046    fi
47047  fi
47048
47049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47050  if test "x$test_cygdrive_prefix" = x; then
47051    # As a simple fix, exclude /usr/bin since it's not a real path.
47052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47054      # a path prefixed by /cygdrive for fixpath to work.
47055      new_path="$CYGWIN_ROOT_PATH$input_path"
47056    fi
47057  fi
47058
47059
47060  if test "x$path" != "x$new_path"; then
47061    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47063$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47064  fi
47065
47066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47067
47068  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47069  has_colon=`$ECHO $path | $GREP ^.:`
47070  new_path="$path"
47071  if test "x$has_colon" = x; then
47072    # Not in mixed or Windows style, start by that.
47073    new_path=`cmd //c echo $path`
47074  fi
47075
47076
47077  input_path="$new_path"
47078  # Check if we need to convert this using DOS-style short mode. If the path
47079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47080  # take no chances and rewrite it.
47081  # Note: m4 eats our [], so we need to use [ and ] instead.
47082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47083  if test "x$has_forbidden_chars" != x; then
47084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47086  fi
47087
47088
47089  windows_path="$new_path"
47090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47091    unix_path=`$CYGPATH -u "$windows_path"`
47092    new_path="$unix_path"
47093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47095    new_path="$unix_path"
47096  fi
47097
47098  if test "x$path" != "x$new_path"; then
47099    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47102  fi
47103
47104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47106
47107    else
47108      # We're on a unix platform. Hooray! :)
47109      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47110      has_space=`$ECHO "$path" | $GREP " "`
47111      if test "x$has_space" != x; then
47112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47113$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47114        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47115      fi
47116
47117      # Use eval to expand a potential ~
47118      eval path="$path"
47119      if test ! -f "$path" && test ! -d "$path"; then
47120        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47121      fi
47122
47123      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47124    fi
47125  fi
47126
47127
47128  # Only process if variable expands to non-empty
47129
47130  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47132
47133  # Input might be given as Windows format, start by converting to
47134  # unix format.
47135  path="$POTENTIAL_FREETYPE_LIB_PATH"
47136  new_path=`$CYGPATH -u "$path"`
47137
47138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47141  # "foo.exe" is OK but "foo" is an error.
47142  #
47143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47144  # It is also a way to make sure we got the proper file name for the real test later on.
47145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47146  if test "x$test_shortpath" = x; then
47147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47149    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47150  fi
47151
47152  # Call helper function which possibly converts this using DOS-style short mode.
47153  # If so, the updated path is stored in $new_path.
47154
47155  input_path="$new_path"
47156  # Check if we need to convert this using DOS-style short mode. If the path
47157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47158  # take no chances and rewrite it.
47159  # Note: m4 eats our [], so we need to use [ and ] instead.
47160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47161  if test "x$has_forbidden_chars" != x; then
47162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47166      # Going to short mode and back again did indeed matter. Since short mode is
47167      # case insensitive, let's make it lowercase to improve readability.
47168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47169      # Now convert it back to Unix-stile (cygpath)
47170      input_path=`$CYGPATH -u "$shortmode_path"`
47171      new_path="$input_path"
47172    fi
47173  fi
47174
47175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47176  if test "x$test_cygdrive_prefix" = x; then
47177    # As a simple fix, exclude /usr/bin since it's not a real path.
47178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47180      # a path prefixed by /cygdrive for fixpath to work.
47181      new_path="$CYGWIN_ROOT_PATH$input_path"
47182    fi
47183  fi
47184
47185
47186  if test "x$path" != "x$new_path"; then
47187    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47190  fi
47191
47192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47193
47194  path="$POTENTIAL_FREETYPE_LIB_PATH"
47195  has_colon=`$ECHO $path | $GREP ^.:`
47196  new_path="$path"
47197  if test "x$has_colon" = x; then
47198    # Not in mixed or Windows style, start by that.
47199    new_path=`cmd //c echo $path`
47200  fi
47201
47202
47203  input_path="$new_path"
47204  # Check if we need to convert this using DOS-style short mode. If the path
47205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47206  # take no chances and rewrite it.
47207  # Note: m4 eats our [], so we need to use [ and ] instead.
47208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47209  if test "x$has_forbidden_chars" != x; then
47210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47212  fi
47213
47214
47215  windows_path="$new_path"
47216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47217    unix_path=`$CYGPATH -u "$windows_path"`
47218    new_path="$unix_path"
47219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47221    new_path="$unix_path"
47222  fi
47223
47224  if test "x$path" != "x$new_path"; then
47225    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47228  fi
47229
47230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47232
47233    else
47234      # We're on a unix platform. Hooray! :)
47235      path="$POTENTIAL_FREETYPE_LIB_PATH"
47236      has_space=`$ECHO "$path" | $GREP " "`
47237      if test "x$has_space" != x; then
47238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47239$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47241      fi
47242
47243      # Use eval to expand a potential ~
47244      eval path="$path"
47245      if test ! -f "$path" && test ! -d "$path"; then
47246        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47247      fi
47248
47249      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47250    fi
47251  fi
47252
47253
47254    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47256$as_echo_n "checking for freetype includes... " >&6; }
47257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47258$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47259    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47261$as_echo_n "checking for freetype libraries... " >&6; }
47262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47263$as_echo "$FREETYPE_LIB_PATH" >&6; }
47264  fi
47265
47266          fi
47267
47268          if test "x$FOUND_FREETYPE" != xyes; then
47269            FREETYPE_BASE_DIR="$SYSROOT/usr"
47270            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47271
47272  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47273  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47274  METHOD="well-known location"
47275
47276  # Let's start with an optimistic view of the world :-)
47277  FOUND_FREETYPE=yes
47278
47279  # First look for the canonical freetype main include file ft2build.h.
47280  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47281    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47282    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47283    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47284      # Fail.
47285      FOUND_FREETYPE=no
47286    fi
47287  fi
47288
47289  if test "x$FOUND_FREETYPE" = xyes; then
47290    # Include file found, let's continue the sanity check.
47291    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47292$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47293
47294    # Reset to default value
47295    FREETYPE_BASE_NAME=freetype
47296    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47297    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47298      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47299          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47300        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47301        # for the .6 version explicitly.
47302        FREETYPE_BASE_NAME=freetype.6
47303        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47304        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47305$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47306      else
47307        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47308$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47309        FOUND_FREETYPE=no
47310      fi
47311    else
47312      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47313        # On Windows, we will need both .lib and .dll file.
47314        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47315          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47316$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47317          FOUND_FREETYPE=no
47318        fi
47319      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47320          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47321        # Found lib in isa dir, use that instead.
47322        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47323        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47324$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47325      fi
47326    fi
47327  fi
47328
47329  if test "x$FOUND_FREETYPE" = xyes; then
47330
47331  # Only process if variable expands to non-empty
47332
47333  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47335
47336  # Input might be given as Windows format, start by converting to
47337  # unix format.
47338  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47339  new_path=`$CYGPATH -u "$path"`
47340
47341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47344  # "foo.exe" is OK but "foo" is an error.
47345  #
47346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47347  # It is also a way to make sure we got the proper file name for the real test later on.
47348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47349  if test "x$test_shortpath" = x; then
47350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47351$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47352    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47353  fi
47354
47355  # Call helper function which possibly converts this using DOS-style short mode.
47356  # If so, the updated path is stored in $new_path.
47357
47358  input_path="$new_path"
47359  # Check if we need to convert this using DOS-style short mode. If the path
47360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47361  # take no chances and rewrite it.
47362  # Note: m4 eats our [], so we need to use [ and ] instead.
47363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47364  if test "x$has_forbidden_chars" != x; then
47365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47369      # Going to short mode and back again did indeed matter. Since short mode is
47370      # case insensitive, let's make it lowercase to improve readability.
47371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47372      # Now convert it back to Unix-stile (cygpath)
47373      input_path=`$CYGPATH -u "$shortmode_path"`
47374      new_path="$input_path"
47375    fi
47376  fi
47377
47378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47379  if test "x$test_cygdrive_prefix" = x; then
47380    # As a simple fix, exclude /usr/bin since it's not a real path.
47381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47383      # a path prefixed by /cygdrive for fixpath to work.
47384      new_path="$CYGWIN_ROOT_PATH$input_path"
47385    fi
47386  fi
47387
47388
47389  if test "x$path" != "x$new_path"; then
47390    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47392$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47393  fi
47394
47395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47396
47397  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47398  has_colon=`$ECHO $path | $GREP ^.:`
47399  new_path="$path"
47400  if test "x$has_colon" = x; then
47401    # Not in mixed or Windows style, start by that.
47402    new_path=`cmd //c echo $path`
47403  fi
47404
47405
47406  input_path="$new_path"
47407  # Check if we need to convert this using DOS-style short mode. If the path
47408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47409  # take no chances and rewrite it.
47410  # Note: m4 eats our [], so we need to use [ and ] instead.
47411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47412  if test "x$has_forbidden_chars" != x; then
47413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47415  fi
47416
47417
47418  windows_path="$new_path"
47419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47420    unix_path=`$CYGPATH -u "$windows_path"`
47421    new_path="$unix_path"
47422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47424    new_path="$unix_path"
47425  fi
47426
47427  if test "x$path" != "x$new_path"; then
47428    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47431  fi
47432
47433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47435
47436    else
47437      # We're on a unix platform. Hooray! :)
47438      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47439      has_space=`$ECHO "$path" | $GREP " "`
47440      if test "x$has_space" != x; then
47441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47442$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47444      fi
47445
47446      # Use eval to expand a potential ~
47447      eval path="$path"
47448      if test ! -f "$path" && test ! -d "$path"; then
47449        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47450      fi
47451
47452      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47453    fi
47454  fi
47455
47456
47457  # Only process if variable expands to non-empty
47458
47459  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47461
47462  # Input might be given as Windows format, start by converting to
47463  # unix format.
47464  path="$POTENTIAL_FREETYPE_LIB_PATH"
47465  new_path=`$CYGPATH -u "$path"`
47466
47467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47470  # "foo.exe" is OK but "foo" is an error.
47471  #
47472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47473  # It is also a way to make sure we got the proper file name for the real test later on.
47474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47475  if test "x$test_shortpath" = x; then
47476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47477$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47478    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47479  fi
47480
47481  # Call helper function which possibly converts this using DOS-style short mode.
47482  # If so, the updated path is stored in $new_path.
47483
47484  input_path="$new_path"
47485  # Check if we need to convert this using DOS-style short mode. If the path
47486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47487  # take no chances and rewrite it.
47488  # Note: m4 eats our [], so we need to use [ and ] instead.
47489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47490  if test "x$has_forbidden_chars" != x; then
47491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47495      # Going to short mode and back again did indeed matter. Since short mode is
47496      # case insensitive, let's make it lowercase to improve readability.
47497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47498      # Now convert it back to Unix-stile (cygpath)
47499      input_path=`$CYGPATH -u "$shortmode_path"`
47500      new_path="$input_path"
47501    fi
47502  fi
47503
47504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47505  if test "x$test_cygdrive_prefix" = x; then
47506    # As a simple fix, exclude /usr/bin since it's not a real path.
47507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47509      # a path prefixed by /cygdrive for fixpath to work.
47510      new_path="$CYGWIN_ROOT_PATH$input_path"
47511    fi
47512  fi
47513
47514
47515  if test "x$path" != "x$new_path"; then
47516    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47518$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47519  fi
47520
47521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47522
47523  path="$POTENTIAL_FREETYPE_LIB_PATH"
47524  has_colon=`$ECHO $path | $GREP ^.:`
47525  new_path="$path"
47526  if test "x$has_colon" = x; then
47527    # Not in mixed or Windows style, start by that.
47528    new_path=`cmd //c echo $path`
47529  fi
47530
47531
47532  input_path="$new_path"
47533  # Check if we need to convert this using DOS-style short mode. If the path
47534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47535  # take no chances and rewrite it.
47536  # Note: m4 eats our [], so we need to use [ and ] instead.
47537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47538  if test "x$has_forbidden_chars" != x; then
47539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47541  fi
47542
47543
47544  windows_path="$new_path"
47545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47546    unix_path=`$CYGPATH -u "$windows_path"`
47547    new_path="$unix_path"
47548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47550    new_path="$unix_path"
47551  fi
47552
47553  if test "x$path" != "x$new_path"; then
47554    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47556$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47557  fi
47558
47559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47561
47562    else
47563      # We're on a unix platform. Hooray! :)
47564      path="$POTENTIAL_FREETYPE_LIB_PATH"
47565      has_space=`$ECHO "$path" | $GREP " "`
47566      if test "x$has_space" != x; then
47567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47568$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47569        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47570      fi
47571
47572      # Use eval to expand a potential ~
47573      eval path="$path"
47574      if test ! -f "$path" && test ! -d "$path"; then
47575        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47576      fi
47577
47578      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47579    fi
47580  fi
47581
47582
47583    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47585$as_echo_n "checking for freetype includes... " >&6; }
47586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47587$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47588    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47590$as_echo_n "checking for freetype libraries... " >&6; }
47591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47592$as_echo "$FREETYPE_LIB_PATH" >&6; }
47593  fi
47594
47595            else
47596
47597  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47598  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47599  METHOD="well-known location"
47600
47601  # Let's start with an optimistic view of the world :-)
47602  FOUND_FREETYPE=yes
47603
47604  # First look for the canonical freetype main include file ft2build.h.
47605  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47606    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47607    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47608    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47609      # Fail.
47610      FOUND_FREETYPE=no
47611    fi
47612  fi
47613
47614  if test "x$FOUND_FREETYPE" = xyes; then
47615    # Include file found, let's continue the sanity check.
47616    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47617$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47618
47619    # Reset to default value
47620    FREETYPE_BASE_NAME=freetype
47621    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47622    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47623      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47624          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47625        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47626        # for the .6 version explicitly.
47627        FREETYPE_BASE_NAME=freetype.6
47628        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47629        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47630$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47631      else
47632        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47633$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47634        FOUND_FREETYPE=no
47635      fi
47636    else
47637      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47638        # On Windows, we will need both .lib and .dll file.
47639        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47640          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47641$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47642          FOUND_FREETYPE=no
47643        fi
47644      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47645          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47646        # Found lib in isa dir, use that instead.
47647        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47648        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47649$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47650      fi
47651    fi
47652  fi
47653
47654  if test "x$FOUND_FREETYPE" = xyes; then
47655
47656  # Only process if variable expands to non-empty
47657
47658  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47660
47661  # Input might be given as Windows format, start by converting to
47662  # unix format.
47663  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47664  new_path=`$CYGPATH -u "$path"`
47665
47666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47669  # "foo.exe" is OK but "foo" is an error.
47670  #
47671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47672  # It is also a way to make sure we got the proper file name for the real test later on.
47673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47674  if test "x$test_shortpath" = x; then
47675    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47676$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47677    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47678  fi
47679
47680  # Call helper function which possibly converts this using DOS-style short mode.
47681  # If so, the updated path is stored in $new_path.
47682
47683  input_path="$new_path"
47684  # Check if we need to convert this using DOS-style short mode. If the path
47685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47686  # take no chances and rewrite it.
47687  # Note: m4 eats our [], so we need to use [ and ] instead.
47688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47689  if test "x$has_forbidden_chars" != x; then
47690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47694      # Going to short mode and back again did indeed matter. Since short mode is
47695      # case insensitive, let's make it lowercase to improve readability.
47696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47697      # Now convert it back to Unix-stile (cygpath)
47698      input_path=`$CYGPATH -u "$shortmode_path"`
47699      new_path="$input_path"
47700    fi
47701  fi
47702
47703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47704  if test "x$test_cygdrive_prefix" = x; then
47705    # As a simple fix, exclude /usr/bin since it's not a real path.
47706    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47708      # a path prefixed by /cygdrive for fixpath to work.
47709      new_path="$CYGWIN_ROOT_PATH$input_path"
47710    fi
47711  fi
47712
47713
47714  if test "x$path" != "x$new_path"; then
47715    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47717$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47718  fi
47719
47720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47721
47722  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47723  has_colon=`$ECHO $path | $GREP ^.:`
47724  new_path="$path"
47725  if test "x$has_colon" = x; then
47726    # Not in mixed or Windows style, start by that.
47727    new_path=`cmd //c echo $path`
47728  fi
47729
47730
47731  input_path="$new_path"
47732  # Check if we need to convert this using DOS-style short mode. If the path
47733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47734  # take no chances and rewrite it.
47735  # Note: m4 eats our [], so we need to use [ and ] instead.
47736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47737  if test "x$has_forbidden_chars" != x; then
47738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47740  fi
47741
47742
47743  windows_path="$new_path"
47744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47745    unix_path=`$CYGPATH -u "$windows_path"`
47746    new_path="$unix_path"
47747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47749    new_path="$unix_path"
47750  fi
47751
47752  if test "x$path" != "x$new_path"; then
47753    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47755$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47756  fi
47757
47758  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47759  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47760
47761    else
47762      # We're on a unix platform. Hooray! :)
47763      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47764      has_space=`$ECHO "$path" | $GREP " "`
47765      if test "x$has_space" != x; then
47766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47767$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47768        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47769      fi
47770
47771      # Use eval to expand a potential ~
47772      eval path="$path"
47773      if test ! -f "$path" && test ! -d "$path"; then
47774        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47775      fi
47776
47777      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47778    fi
47779  fi
47780
47781
47782  # Only process if variable expands to non-empty
47783
47784  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47786
47787  # Input might be given as Windows format, start by converting to
47788  # unix format.
47789  path="$POTENTIAL_FREETYPE_LIB_PATH"
47790  new_path=`$CYGPATH -u "$path"`
47791
47792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47795  # "foo.exe" is OK but "foo" is an error.
47796  #
47797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47798  # It is also a way to make sure we got the proper file name for the real test later on.
47799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47800  if test "x$test_shortpath" = x; then
47801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47802$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47803    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47804  fi
47805
47806  # Call helper function which possibly converts this using DOS-style short mode.
47807  # If so, the updated path is stored in $new_path.
47808
47809  input_path="$new_path"
47810  # Check if we need to convert this using DOS-style short mode. If the path
47811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47812  # take no chances and rewrite it.
47813  # Note: m4 eats our [], so we need to use [ and ] instead.
47814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47815  if test "x$has_forbidden_chars" != x; then
47816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47820      # Going to short mode and back again did indeed matter. Since short mode is
47821      # case insensitive, let's make it lowercase to improve readability.
47822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47823      # Now convert it back to Unix-stile (cygpath)
47824      input_path=`$CYGPATH -u "$shortmode_path"`
47825      new_path="$input_path"
47826    fi
47827  fi
47828
47829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47830  if test "x$test_cygdrive_prefix" = x; then
47831    # As a simple fix, exclude /usr/bin since it's not a real path.
47832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47834      # a path prefixed by /cygdrive for fixpath to work.
47835      new_path="$CYGWIN_ROOT_PATH$input_path"
47836    fi
47837  fi
47838
47839
47840  if test "x$path" != "x$new_path"; then
47841    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47843$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47844  fi
47845
47846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47847
47848  path="$POTENTIAL_FREETYPE_LIB_PATH"
47849  has_colon=`$ECHO $path | $GREP ^.:`
47850  new_path="$path"
47851  if test "x$has_colon" = x; then
47852    # Not in mixed or Windows style, start by that.
47853    new_path=`cmd //c echo $path`
47854  fi
47855
47856
47857  input_path="$new_path"
47858  # Check if we need to convert this using DOS-style short mode. If the path
47859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47860  # take no chances and rewrite it.
47861  # Note: m4 eats our [], so we need to use [ and ] instead.
47862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47863  if test "x$has_forbidden_chars" != x; then
47864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47866  fi
47867
47868
47869  windows_path="$new_path"
47870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47871    unix_path=`$CYGPATH -u "$windows_path"`
47872    new_path="$unix_path"
47873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47875    new_path="$unix_path"
47876  fi
47877
47878  if test "x$path" != "x$new_path"; then
47879    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47881$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47882  fi
47883
47884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47886
47887    else
47888      # We're on a unix platform. Hooray! :)
47889      path="$POTENTIAL_FREETYPE_LIB_PATH"
47890      has_space=`$ECHO "$path" | $GREP " "`
47891      if test "x$has_space" != x; then
47892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47893$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47895      fi
47896
47897      # Use eval to expand a potential ~
47898      eval path="$path"
47899      if test ! -f "$path" && test ! -d "$path"; then
47900        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47901      fi
47902
47903      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47904    fi
47905  fi
47906
47907
47908    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47910$as_echo_n "checking for freetype includes... " >&6; }
47911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47912$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47913    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47915$as_echo_n "checking for freetype libraries... " >&6; }
47916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47917$as_echo "$FREETYPE_LIB_PATH" >&6; }
47918  fi
47919
47920              if test "x$FOUND_FREETYPE" != xyes; then
47921
47922  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47923  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47924  METHOD="well-known location"
47925
47926  # Let's start with an optimistic view of the world :-)
47927  FOUND_FREETYPE=yes
47928
47929  # First look for the canonical freetype main include file ft2build.h.
47930  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47931    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47932    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47933    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47934      # Fail.
47935      FOUND_FREETYPE=no
47936    fi
47937  fi
47938
47939  if test "x$FOUND_FREETYPE" = xyes; then
47940    # Include file found, let's continue the sanity check.
47941    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47942$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47943
47944    # Reset to default value
47945    FREETYPE_BASE_NAME=freetype
47946    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47947    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47948      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47949          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47950        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47951        # for the .6 version explicitly.
47952        FREETYPE_BASE_NAME=freetype.6
47953        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47954        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47955$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47956      else
47957        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47958$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47959        FOUND_FREETYPE=no
47960      fi
47961    else
47962      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47963        # On Windows, we will need both .lib and .dll file.
47964        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47965          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47966$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47967          FOUND_FREETYPE=no
47968        fi
47969      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47970          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47971        # Found lib in isa dir, use that instead.
47972        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47973        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47974$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47975      fi
47976    fi
47977  fi
47978
47979  if test "x$FOUND_FREETYPE" = xyes; then
47980
47981  # Only process if variable expands to non-empty
47982
47983  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47984    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47985
47986  # Input might be given as Windows format, start by converting to
47987  # unix format.
47988  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47989  new_path=`$CYGPATH -u "$path"`
47990
47991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47994  # "foo.exe" is OK but "foo" is an error.
47995  #
47996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47997  # It is also a way to make sure we got the proper file name for the real test later on.
47998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47999  if test "x$test_shortpath" = x; then
48000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48001$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48002    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48003  fi
48004
48005  # Call helper function which possibly converts this using DOS-style short mode.
48006  # If so, the updated path is stored in $new_path.
48007
48008  input_path="$new_path"
48009  # Check if we need to convert this using DOS-style short mode. If the path
48010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48011  # take no chances and rewrite it.
48012  # Note: m4 eats our [], so we need to use [ and ] instead.
48013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48014  if test "x$has_forbidden_chars" != x; then
48015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48019      # Going to short mode and back again did indeed matter. Since short mode is
48020      # case insensitive, let's make it lowercase to improve readability.
48021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48022      # Now convert it back to Unix-stile (cygpath)
48023      input_path=`$CYGPATH -u "$shortmode_path"`
48024      new_path="$input_path"
48025    fi
48026  fi
48027
48028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48029  if test "x$test_cygdrive_prefix" = x; then
48030    # As a simple fix, exclude /usr/bin since it's not a real path.
48031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48033      # a path prefixed by /cygdrive for fixpath to work.
48034      new_path="$CYGWIN_ROOT_PATH$input_path"
48035    fi
48036  fi
48037
48038
48039  if test "x$path" != "x$new_path"; then
48040    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48042$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48043  fi
48044
48045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48046
48047  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48048  has_colon=`$ECHO $path | $GREP ^.:`
48049  new_path="$path"
48050  if test "x$has_colon" = x; then
48051    # Not in mixed or Windows style, start by that.
48052    new_path=`cmd //c echo $path`
48053  fi
48054
48055
48056  input_path="$new_path"
48057  # Check if we need to convert this using DOS-style short mode. If the path
48058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48059  # take no chances and rewrite it.
48060  # Note: m4 eats our [], so we need to use [ and ] instead.
48061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48062  if test "x$has_forbidden_chars" != x; then
48063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48065  fi
48066
48067
48068  windows_path="$new_path"
48069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48070    unix_path=`$CYGPATH -u "$windows_path"`
48071    new_path="$unix_path"
48072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48074    new_path="$unix_path"
48075  fi
48076
48077  if test "x$path" != "x$new_path"; then
48078    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48080$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48081  fi
48082
48083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48085
48086    else
48087      # We're on a unix platform. Hooray! :)
48088      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48089      has_space=`$ECHO "$path" | $GREP " "`
48090      if test "x$has_space" != x; then
48091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48092$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48093        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48094      fi
48095
48096      # Use eval to expand a potential ~
48097      eval path="$path"
48098      if test ! -f "$path" && test ! -d "$path"; then
48099        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48100      fi
48101
48102      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48103    fi
48104  fi
48105
48106
48107  # Only process if variable expands to non-empty
48108
48109  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48111
48112  # Input might be given as Windows format, start by converting to
48113  # unix format.
48114  path="$POTENTIAL_FREETYPE_LIB_PATH"
48115  new_path=`$CYGPATH -u "$path"`
48116
48117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48120  # "foo.exe" is OK but "foo" is an error.
48121  #
48122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48123  # It is also a way to make sure we got the proper file name for the real test later on.
48124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48125  if test "x$test_shortpath" = x; then
48126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48127$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48128    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48129  fi
48130
48131  # Call helper function which possibly converts this using DOS-style short mode.
48132  # If so, the updated path is stored in $new_path.
48133
48134  input_path="$new_path"
48135  # Check if we need to convert this using DOS-style short mode. If the path
48136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48137  # take no chances and rewrite it.
48138  # Note: m4 eats our [], so we need to use [ and ] instead.
48139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48140  if test "x$has_forbidden_chars" != x; then
48141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48145      # Going to short mode and back again did indeed matter. Since short mode is
48146      # case insensitive, let's make it lowercase to improve readability.
48147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48148      # Now convert it back to Unix-stile (cygpath)
48149      input_path=`$CYGPATH -u "$shortmode_path"`
48150      new_path="$input_path"
48151    fi
48152  fi
48153
48154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48155  if test "x$test_cygdrive_prefix" = x; then
48156    # As a simple fix, exclude /usr/bin since it's not a real path.
48157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48159      # a path prefixed by /cygdrive for fixpath to work.
48160      new_path="$CYGWIN_ROOT_PATH$input_path"
48161    fi
48162  fi
48163
48164
48165  if test "x$path" != "x$new_path"; then
48166    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48168$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48169  fi
48170
48171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48172
48173  path="$POTENTIAL_FREETYPE_LIB_PATH"
48174  has_colon=`$ECHO $path | $GREP ^.:`
48175  new_path="$path"
48176  if test "x$has_colon" = x; then
48177    # Not in mixed or Windows style, start by that.
48178    new_path=`cmd //c echo $path`
48179  fi
48180
48181
48182  input_path="$new_path"
48183  # Check if we need to convert this using DOS-style short mode. If the path
48184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48185  # take no chances and rewrite it.
48186  # Note: m4 eats our [], so we need to use [ and ] instead.
48187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48188  if test "x$has_forbidden_chars" != x; then
48189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48191  fi
48192
48193
48194  windows_path="$new_path"
48195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48196    unix_path=`$CYGPATH -u "$windows_path"`
48197    new_path="$unix_path"
48198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48200    new_path="$unix_path"
48201  fi
48202
48203  if test "x$path" != "x$new_path"; then
48204    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48207  fi
48208
48209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48211
48212    else
48213      # We're on a unix platform. Hooray! :)
48214      path="$POTENTIAL_FREETYPE_LIB_PATH"
48215      has_space=`$ECHO "$path" | $GREP " "`
48216      if test "x$has_space" != x; then
48217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48220      fi
48221
48222      # Use eval to expand a potential ~
48223      eval path="$path"
48224      if test ! -f "$path" && test ! -d "$path"; then
48225        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48226      fi
48227
48228      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48229    fi
48230  fi
48231
48232
48233    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48235$as_echo_n "checking for freetype includes... " >&6; }
48236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48237$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48238    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48240$as_echo_n "checking for freetype libraries... " >&6; }
48241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48242$as_echo "$FREETYPE_LIB_PATH" >&6; }
48243  fi
48244
48245              fi
48246            fi
48247          fi
48248        fi
48249      fi # end check in well-known locations
48250
48251      if test "x$FOUND_FREETYPE" != xyes; then
48252
48253  # Print a helpful message on how to acquire the necessary build dependency.
48254  # freetype is the help tag: freetype, cups, pulse, alsa etc
48255  MISSING_DEPENDENCY=freetype
48256
48257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48258    cygwin_help $MISSING_DEPENDENCY
48259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48260    msys_help $MISSING_DEPENDENCY
48261  else
48262    PKGHANDLER_COMMAND=
48263
48264    case $PKGHANDLER in
48265      apt-get)
48266        apt_help     $MISSING_DEPENDENCY ;;
48267      yum)
48268        yum_help     $MISSING_DEPENDENCY ;;
48269      port)
48270        port_help    $MISSING_DEPENDENCY ;;
48271      pkgutil)
48272        pkgutil_help $MISSING_DEPENDENCY ;;
48273      pkgadd)
48274        pkgadd_help  $MISSING_DEPENDENCY ;;
48275    esac
48276
48277    if test "x$PKGHANDLER_COMMAND" != x; then
48278      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48279    fi
48280  fi
48281
48282        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48283      fi
48284    fi # end user specified settings
48285
48286    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48287    if test "x$FREETYPE_CFLAGS" = x; then
48288
48289  # Only process if variable expands to non-empty
48290
48291  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48293
48294  # Input might be given as Windows format, start by converting to
48295  # unix format.
48296  path="$FREETYPE_INCLUDE_PATH"
48297  new_path=`$CYGPATH -u "$path"`
48298
48299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48302  # "foo.exe" is OK but "foo" is an error.
48303  #
48304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48305  # It is also a way to make sure we got the proper file name for the real test later on.
48306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48307  if test "x$test_shortpath" = x; then
48308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48309$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48310    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48311  fi
48312
48313  # Call helper function which possibly converts this using DOS-style short mode.
48314  # If so, the updated path is stored in $new_path.
48315
48316  input_path="$new_path"
48317  # Check if we need to convert this using DOS-style short mode. If the path
48318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48319  # take no chances and rewrite it.
48320  # Note: m4 eats our [], so we need to use [ and ] instead.
48321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48322  if test "x$has_forbidden_chars" != x; then
48323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48327      # Going to short mode and back again did indeed matter. Since short mode is
48328      # case insensitive, let's make it lowercase to improve readability.
48329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48330      # Now convert it back to Unix-stile (cygpath)
48331      input_path=`$CYGPATH -u "$shortmode_path"`
48332      new_path="$input_path"
48333    fi
48334  fi
48335
48336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48337  if test "x$test_cygdrive_prefix" = x; then
48338    # As a simple fix, exclude /usr/bin since it's not a real path.
48339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48341      # a path prefixed by /cygdrive for fixpath to work.
48342      new_path="$CYGWIN_ROOT_PATH$input_path"
48343    fi
48344  fi
48345
48346
48347  if test "x$path" != "x$new_path"; then
48348    FREETYPE_INCLUDE_PATH="$new_path"
48349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48350$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48351  fi
48352
48353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48354
48355  path="$FREETYPE_INCLUDE_PATH"
48356  has_colon=`$ECHO $path | $GREP ^.:`
48357  new_path="$path"
48358  if test "x$has_colon" = x; then
48359    # Not in mixed or Windows style, start by that.
48360    new_path=`cmd //c echo $path`
48361  fi
48362
48363
48364  input_path="$new_path"
48365  # Check if we need to convert this using DOS-style short mode. If the path
48366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48367  # take no chances and rewrite it.
48368  # Note: m4 eats our [], so we need to use [ and ] instead.
48369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48370  if test "x$has_forbidden_chars" != x; then
48371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48373  fi
48374
48375
48376  windows_path="$new_path"
48377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48378    unix_path=`$CYGPATH -u "$windows_path"`
48379    new_path="$unix_path"
48380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48382    new_path="$unix_path"
48383  fi
48384
48385  if test "x$path" != "x$new_path"; then
48386    FREETYPE_INCLUDE_PATH="$new_path"
48387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48388$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48389  fi
48390
48391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48393
48394    else
48395      # We're on a unix platform. Hooray! :)
48396      path="$FREETYPE_INCLUDE_PATH"
48397      has_space=`$ECHO "$path" | $GREP " "`
48398      if test "x$has_space" != x; then
48399        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48400$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48401        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48402      fi
48403
48404      # Use eval to expand a potential ~
48405      eval path="$path"
48406      if test ! -f "$path" && test ! -d "$path"; then
48407        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48408      fi
48409
48410      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48411    fi
48412  fi
48413
48414      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48415        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48416      else
48417        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48418      fi
48419    fi
48420
48421    if test "x$FREETYPE_LIBS" = x; then
48422
48423  # Only process if variable expands to non-empty
48424
48425  if test "x$FREETYPE_LIB_PATH" != x; then
48426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48427
48428  # Input might be given as Windows format, start by converting to
48429  # unix format.
48430  path="$FREETYPE_LIB_PATH"
48431  new_path=`$CYGPATH -u "$path"`
48432
48433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48436  # "foo.exe" is OK but "foo" is an error.
48437  #
48438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48439  # It is also a way to make sure we got the proper file name for the real test later on.
48440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48441  if test "x$test_shortpath" = x; then
48442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48443$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48444    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48445  fi
48446
48447  # Call helper function which possibly converts this using DOS-style short mode.
48448  # If so, the updated path is stored in $new_path.
48449
48450  input_path="$new_path"
48451  # Check if we need to convert this using DOS-style short mode. If the path
48452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48453  # take no chances and rewrite it.
48454  # Note: m4 eats our [], so we need to use [ and ] instead.
48455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48456  if test "x$has_forbidden_chars" != x; then
48457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48461      # Going to short mode and back again did indeed matter. Since short mode is
48462      # case insensitive, let's make it lowercase to improve readability.
48463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48464      # Now convert it back to Unix-stile (cygpath)
48465      input_path=`$CYGPATH -u "$shortmode_path"`
48466      new_path="$input_path"
48467    fi
48468  fi
48469
48470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48471  if test "x$test_cygdrive_prefix" = x; then
48472    # As a simple fix, exclude /usr/bin since it's not a real path.
48473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48475      # a path prefixed by /cygdrive for fixpath to work.
48476      new_path="$CYGWIN_ROOT_PATH$input_path"
48477    fi
48478  fi
48479
48480
48481  if test "x$path" != "x$new_path"; then
48482    FREETYPE_LIB_PATH="$new_path"
48483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48484$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48485  fi
48486
48487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48488
48489  path="$FREETYPE_LIB_PATH"
48490  has_colon=`$ECHO $path | $GREP ^.:`
48491  new_path="$path"
48492  if test "x$has_colon" = x; then
48493    # Not in mixed or Windows style, start by that.
48494    new_path=`cmd //c echo $path`
48495  fi
48496
48497
48498  input_path="$new_path"
48499  # Check if we need to convert this using DOS-style short mode. If the path
48500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48501  # take no chances and rewrite it.
48502  # Note: m4 eats our [], so we need to use [ and ] instead.
48503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48504  if test "x$has_forbidden_chars" != x; then
48505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48507  fi
48508
48509
48510  windows_path="$new_path"
48511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48512    unix_path=`$CYGPATH -u "$windows_path"`
48513    new_path="$unix_path"
48514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48516    new_path="$unix_path"
48517  fi
48518
48519  if test "x$path" != "x$new_path"; then
48520    FREETYPE_LIB_PATH="$new_path"
48521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48522$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48523  fi
48524
48525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48527
48528    else
48529      # We're on a unix platform. Hooray! :)
48530      path="$FREETYPE_LIB_PATH"
48531      has_space=`$ECHO "$path" | $GREP " "`
48532      if test "x$has_space" != x; then
48533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48534$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48536      fi
48537
48538      # Use eval to expand a potential ~
48539      eval path="$path"
48540      if test ! -f "$path" && test ! -d "$path"; then
48541        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48542      fi
48543
48544      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48545    fi
48546  fi
48547
48548      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48549        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48550      else
48551        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48552      fi
48553    fi
48554
48555    # Try to compile it
48556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48557$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48558    ac_ext=cpp
48559ac_cpp='$CXXCPP $CPPFLAGS'
48560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48563
48564    PREV_CXXCFLAGS="$CXXFLAGS"
48565    PREV_LIBS="$LIBS"
48566    PREV_CXX="$CXX"
48567    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48568    LIBS="$LIBS $FREETYPE_LIBS"
48569    CXX="$FIXPATH $CXX"
48570    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48571/* end confdefs.h.  */
48572
48573          #include<ft2build.h>
48574          #include FT_FREETYPE_H
48575          int main () {
48576            FT_Init_FreeType(NULL);
48577            return 0;
48578          }
48579
48580_ACEOF
48581if ac_fn_cxx_try_link "$LINENO"; then :
48582
48583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48584$as_echo "yes" >&6; }
48585
48586else
48587
48588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48589$as_echo "no" >&6; }
48590          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48591$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48592          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48593$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48594
48595
48596  # Print a helpful message on how to acquire the necessary build dependency.
48597  # freetype is the help tag: freetype, cups, pulse, alsa etc
48598  MISSING_DEPENDENCY=freetype
48599
48600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48601    cygwin_help $MISSING_DEPENDENCY
48602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48603    msys_help $MISSING_DEPENDENCY
48604  else
48605    PKGHANDLER_COMMAND=
48606
48607    case $PKGHANDLER in
48608      apt-get)
48609        apt_help     $MISSING_DEPENDENCY ;;
48610      yum)
48611        yum_help     $MISSING_DEPENDENCY ;;
48612      port)
48613        port_help    $MISSING_DEPENDENCY ;;
48614      pkgutil)
48615        pkgutil_help $MISSING_DEPENDENCY ;;
48616      pkgadd)
48617        pkgadd_help  $MISSING_DEPENDENCY ;;
48618    esac
48619
48620    if test "x$PKGHANDLER_COMMAND" != x; then
48621      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48622    fi
48623  fi
48624
48625
48626          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48627
48628
48629fi
48630rm -f core conftest.err conftest.$ac_objext \
48631    conftest$ac_exeext conftest.$ac_ext
48632    CXXCFLAGS="$PREV_CXXFLAGS"
48633    LIBS="$PREV_LIBS"
48634    CXX="$PREV_CXX"
48635    ac_ext=cpp
48636ac_cpp='$CXXCPP $CPPFLAGS'
48637ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48638ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48639ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48640
48641
48642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48643$as_echo_n "checking if we should bundle freetype... " >&6; }
48644    if test "x$BUNDLE_FREETYPE" = xyes; then
48645      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48646    fi
48647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48648$as_echo "$BUNDLE_FREETYPE" >&6; }
48649
48650  fi # end freetype needed
48651
48652
48653
48654
48655
48656
48657
48658  ###############################################################################
48659  #
48660  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48661  #
48662
48663# Check whether --with-alsa was given.
48664if test "${with_alsa+set}" = set; then :
48665  withval=$with_alsa;
48666fi
48667
48668
48669# Check whether --with-alsa-include was given.
48670if test "${with_alsa_include+set}" = set; then :
48671  withval=$with_alsa_include;
48672fi
48673
48674
48675# Check whether --with-alsa-lib was given.
48676if test "${with_alsa_lib+set}" = set; then :
48677  withval=$with_alsa_lib;
48678fi
48679
48680
48681  if test "x$ALSA_NOT_NEEDED" = xyes; then
48682    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48683      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48684$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48685    fi
48686    ALSA_CFLAGS=
48687    ALSA_LIBS=
48688  else
48689    ALSA_FOUND=no
48690
48691    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48692      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48693    fi
48694
48695    if test "x${with_alsa}" != x; then
48696      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48697      ALSA_CFLAGS="-I${with_alsa}/include"
48698      ALSA_FOUND=yes
48699    fi
48700    if test "x${with_alsa_include}" != x; then
48701      ALSA_CFLAGS="-I${with_alsa_include}"
48702      ALSA_FOUND=yes
48703    fi
48704    if test "x${with_alsa_lib}" != x; then
48705      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48706      ALSA_FOUND=yes
48707    fi
48708    if test "x$ALSA_FOUND" = xno; then
48709
48710
48711  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48712    # Source the builddeps file again, to make sure it uses the latest variables!
48713    . $builddepsfile
48714    # Look for a target and build machine specific resource!
48715    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48716    if test "x$resource" = x; then
48717      # Ok, lets instead look for a target specific resource
48718      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48719    fi
48720    if test "x$resource" = x; then
48721      # Ok, lets instead look for a build specific resource
48722      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48723    fi
48724    if test "x$resource" = x; then
48725      # Ok, lets instead look for a generic resource
48726      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48727      resource=${builddep_alsa}
48728    fi
48729    if test "x$resource" != x; then
48730      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48731$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48732      # If the resource in the builddeps.conf file is an existing directory,
48733      # for example /java/linux/cups
48734      if test -d ${resource}; then
48735        depdir=${resource}
48736      else
48737
48738  # alsa is for example mymodule
48739  # $resource is for example libs/general/libmymod_1_2_3.zip
48740  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48741  # $with_builddeps_dir is for example /localhome/builddeps
48742  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48743  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48744  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48745  filename=`basename $resource`
48746  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48747  filebase=${filename%%.*}
48748  extension=${filename#*.}
48749  installdir=$with_builddeps_dir/$filebase
48750  if test ! -f $installdir/$filename.unpacked; then
48751    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48752$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48753    if test ! -d $installdir; then
48754      mkdir -p $installdir
48755    fi
48756    if test ! -d $installdir; then
48757      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48758    fi
48759    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48760    touch $tmpfile
48761    if test ! -f $tmpfile; then
48762      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48763    fi
48764
48765  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48766  # $tmpfile is the local file name for the downloaded file.
48767  VALID_TOOL=no
48768  if test "x$BDEPS_FTP" = xwget; then
48769    VALID_TOOL=yes
48770    wget -O $tmpfile $with_builddeps_server/$resource
48771  fi
48772  if test "x$BDEPS_FTP" = xlftp; then
48773    VALID_TOOL=yes
48774    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48775  fi
48776  if test "x$BDEPS_FTP" = xftp; then
48777    VALID_TOOL=yes
48778    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48779    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48780    FTPUSERPWD=${FTPSERVER%%@*}
48781    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48782      FTPUSER=${userpwd%%:*}
48783      FTPPWD=${userpwd#*@}
48784      FTPSERVER=${FTPSERVER#*@}
48785    else
48786      FTPUSER=ftp
48787      FTPPWD=ftp
48788    fi
48789    # the "pass" command does not work on some
48790    # ftp clients (read ftp.exe) but if it works,
48791    # passive mode is better!
48792    ( \
48793        echo "user $FTPUSER $FTPPWD"        ; \
48794        echo "pass"                         ; \
48795        echo "bin"                          ; \
48796        echo "get $FTPPATH $tmpfile"              ; \
48797    ) | ftp -in $FTPSERVER
48798  fi
48799  if test "x$VALID_TOOL" != xyes; then
48800    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48801  fi
48802
48803    mv $tmpfile $installdir/$filename
48804    if test ! -s $installdir/$filename; then
48805      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48806    fi
48807    case "$extension" in
48808      zip)  echo "Unzipping $installdir/$filename..."
48809        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48810        ;;
48811      tar.gz) echo "Untaring $installdir/$filename..."
48812        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48813        ;;
48814      tgz) echo "Untaring $installdir/$filename..."
48815        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48816        ;;
48817      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48818        ;;
48819    esac
48820  fi
48821  if test -f $installdir/$filename.unpacked; then
48822    depdir=$installdir
48823  fi
48824
48825      fi
48826      # Source the builddeps file again, because in the previous command, the depdir
48827      # was updated to point at the current build dependency install directory.
48828      . $builddepsfile
48829      # Now extract variables from the builddeps.conf files.
48830      theroot=${builddep_alsa_ROOT}
48831      thecflags=${builddep_alsa_CFLAGS}
48832      thelibs=${builddep_alsa_LIBS}
48833      if test "x$depdir" = x; then
48834        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48835      fi
48836      ALSA=$depdir
48837      if test "x$theroot" != x; then
48838        ALSA="$theroot"
48839      fi
48840      if test "x$thecflags" != x; then
48841        ALSA_CFLAGS="$thecflags"
48842      fi
48843      if test "x$thelibs" != x; then
48844        ALSA_LIBS="$thelibs"
48845      fi
48846      ALSA_FOUND=yes
48847      else ALSA_FOUND=no
48848
48849    fi
48850    else ALSA_FOUND=no
48851
48852  fi
48853
48854    fi
48855    # Do not try pkg-config if we have a sysroot set.
48856    if test "x$SYSROOT" = x; then
48857      if test "x$ALSA_FOUND" = xno; then
48858
48859pkg_failed=no
48860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48861$as_echo_n "checking for ALSA... " >&6; }
48862
48863if test -n "$ALSA_CFLAGS"; then
48864    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48865 elif test -n "$PKG_CONFIG"; then
48866    if test -n "$PKG_CONFIG" && \
48867    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48868  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48869  ac_status=$?
48870  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48871  test $ac_status = 0; }; then
48872  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48873else
48874  pkg_failed=yes
48875fi
48876 else
48877    pkg_failed=untried
48878fi
48879if test -n "$ALSA_LIBS"; then
48880    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48881 elif test -n "$PKG_CONFIG"; then
48882    if test -n "$PKG_CONFIG" && \
48883    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48884  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48885  ac_status=$?
48886  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48887  test $ac_status = 0; }; then
48888  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48889else
48890  pkg_failed=yes
48891fi
48892 else
48893    pkg_failed=untried
48894fi
48895
48896
48897
48898if test $pkg_failed = yes; then
48899
48900if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48901        _pkg_short_errors_supported=yes
48902else
48903        _pkg_short_errors_supported=no
48904fi
48905        if test $_pkg_short_errors_supported = yes; then
48906	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48907        else
48908	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48909        fi
48910	# Put the nasty error message in config.log where it belongs
48911	echo "$ALSA_PKG_ERRORS" >&5
48912
48913	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48914$as_echo "no" >&6; }
48915                ALSA_FOUND=no
48916elif test $pkg_failed = untried; then
48917	ALSA_FOUND=no
48918else
48919	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48920	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48922$as_echo "yes" >&6; }
48923	ALSA_FOUND=yes
48924fi
48925      fi
48926    fi
48927    if test "x$ALSA_FOUND" = xno; then
48928      for ac_header in alsa/asoundlib.h
48929do :
48930  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48931if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48932  cat >>confdefs.h <<_ACEOF
48933#define HAVE_ALSA_ASOUNDLIB_H 1
48934_ACEOF
48935
48936            ALSA_FOUND=yes
48937            ALSA_CFLAGS=-Iignoreme
48938            ALSA_LIBS=-lasound
48939            DEFAULT_ALSA=yes
48940
48941else
48942  ALSA_FOUND=no
48943fi
48944
48945done
48946
48947    fi
48948    if test "x$ALSA_FOUND" = xno; then
48949
48950  # Print a helpful message on how to acquire the necessary build dependency.
48951  # alsa is the help tag: freetype, cups, pulse, alsa etc
48952  MISSING_DEPENDENCY=alsa
48953
48954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48955    cygwin_help $MISSING_DEPENDENCY
48956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48957    msys_help $MISSING_DEPENDENCY
48958  else
48959    PKGHANDLER_COMMAND=
48960
48961    case $PKGHANDLER in
48962      apt-get)
48963        apt_help     $MISSING_DEPENDENCY ;;
48964      yum)
48965        yum_help     $MISSING_DEPENDENCY ;;
48966      port)
48967        port_help    $MISSING_DEPENDENCY ;;
48968      pkgutil)
48969        pkgutil_help $MISSING_DEPENDENCY ;;
48970      pkgadd)
48971        pkgadd_help  $MISSING_DEPENDENCY ;;
48972    esac
48973
48974    if test "x$PKGHANDLER_COMMAND" != x; then
48975      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48976    fi
48977  fi
48978
48979      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48980    fi
48981  fi
48982
48983
48984
48985
48986
48987
48988  ###############################################################################
48989  #
48990  # Check for the jpeg library
48991  #
48992
48993
48994# Check whether --with-libjpeg was given.
48995if test "${with_libjpeg+set}" = set; then :
48996  withval=$with_libjpeg;
48997fi
48998
48999
49000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49001$as_echo_n "checking for which libjpeg to use... " >&6; }
49002
49003  # default is bundled
49004  DEFAULT_LIBJPEG=bundled
49005
49006  #
49007  # if user didn't specify, use DEFAULT_LIBJPEG
49008  #
49009  if test "x${with_libjpeg}" = "x"; then
49010    with_libjpeg=${DEFAULT_LIBJPEG}
49011  fi
49012
49013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49014$as_echo "${with_libjpeg}" >&6; }
49015
49016  if test "x${with_libjpeg}" = "xbundled"; then
49017    USE_EXTERNAL_LIBJPEG=false
49018  elif test "x${with_libjpeg}" = "xsystem"; then
49019    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49020if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49021
49022else
49023   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49024fi
49025
49026
49027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49028$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49029if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49030  $as_echo_n "(cached) " >&6
49031else
49032  ac_check_lib_save_LIBS=$LIBS
49033LIBS="-ljpeg  $LIBS"
49034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49035/* end confdefs.h.  */
49036
49037/* Override any GCC internal prototype to avoid an error.
49038   Use char because int might match the return type of a GCC
49039   builtin and then its argument prototype would still apply.  */
49040#ifdef __cplusplus
49041extern "C"
49042#endif
49043char jpeg_CreateDecompress ();
49044int
49045main ()
49046{
49047return jpeg_CreateDecompress ();
49048  ;
49049  return 0;
49050}
49051_ACEOF
49052if ac_fn_cxx_try_link "$LINENO"; then :
49053  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49054else
49055  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49056fi
49057rm -f core conftest.err conftest.$ac_objext \
49058    conftest$ac_exeext conftest.$ac_ext
49059LIBS=$ac_check_lib_save_LIBS
49060fi
49061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49062$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49063if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49064  cat >>confdefs.h <<_ACEOF
49065#define HAVE_LIBJPEG 1
49066_ACEOF
49067
49068  LIBS="-ljpeg $LIBS"
49069
49070else
49071   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49072fi
49073
49074
49075    USE_EXTERNAL_LIBJPEG=true
49076  else
49077    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49078  fi
49079
49080
49081
49082  ###############################################################################
49083  #
49084  # Check for the gif library
49085  #
49086
49087
49088# Check whether --with-giflib was given.
49089if test "${with_giflib+set}" = set; then :
49090  withval=$with_giflib;
49091fi
49092
49093
49094
49095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49096$as_echo_n "checking for which giflib to use... " >&6; }
49097
49098  # default is bundled
49099  DEFAULT_GIFLIB=bundled
49100
49101  #
49102  # if user didn't specify, use DEFAULT_GIFLIB
49103  #
49104  if test "x${with_giflib}" = "x"; then
49105    with_giflib=${DEFAULT_GIFLIB}
49106  fi
49107
49108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49109$as_echo "${with_giflib}" >&6; }
49110
49111  if test "x${with_giflib}" = "xbundled"; then
49112    USE_EXTERNAL_LIBGIF=false
49113  elif test "x${with_giflib}" = "xsystem"; then
49114    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49115if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49116
49117else
49118   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49119fi
49120
49121
49122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49123$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49124if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49125  $as_echo_n "(cached) " >&6
49126else
49127  ac_check_lib_save_LIBS=$LIBS
49128LIBS="-lgif  $LIBS"
49129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49130/* end confdefs.h.  */
49131
49132/* Override any GCC internal prototype to avoid an error.
49133   Use char because int might match the return type of a GCC
49134   builtin and then its argument prototype would still apply.  */
49135#ifdef __cplusplus
49136extern "C"
49137#endif
49138char DGifGetCode ();
49139int
49140main ()
49141{
49142return DGifGetCode ();
49143  ;
49144  return 0;
49145}
49146_ACEOF
49147if ac_fn_cxx_try_link "$LINENO"; then :
49148  ac_cv_lib_gif_DGifGetCode=yes
49149else
49150  ac_cv_lib_gif_DGifGetCode=no
49151fi
49152rm -f core conftest.err conftest.$ac_objext \
49153    conftest$ac_exeext conftest.$ac_ext
49154LIBS=$ac_check_lib_save_LIBS
49155fi
49156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49157$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49158if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49159  cat >>confdefs.h <<_ACEOF
49160#define HAVE_LIBGIF 1
49161_ACEOF
49162
49163  LIBS="-lgif $LIBS"
49164
49165else
49166   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49167fi
49168
49169
49170    USE_EXTERNAL_LIBGIF=true
49171  else
49172    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49173  fi
49174
49175
49176  ###############################################################################
49177  #
49178  # Check for the lcms2 library
49179  #
49180
49181
49182# Check whether --with-lcms was given.
49183if test "${with_lcms+set}" = set; then :
49184  withval=$with_lcms;
49185fi
49186
49187
49188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49189$as_echo_n "checking for which lcms to use... " >&6; }
49190
49191  DEFAULT_LCMS=bundled
49192
49193  #
49194  # If user didn't specify, use DEFAULT_LCMS
49195  #
49196  if test "x${with_lcms}" = "x"; then
49197      with_lcms=${DEFAULT_LCMS}
49198  fi
49199
49200  if test "x${with_lcms}" = "xbundled"; then
49201    USE_EXTERNAL_LCMS=false
49202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49203$as_echo "bundled" >&6; }
49204  elif test "x${with_lcms}" = "xsystem"; then
49205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49206$as_echo "system" >&6; }
49207
49208pkg_failed=no
49209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49210$as_echo_n "checking for LCMS... " >&6; }
49211
49212if test -n "$LCMS_CFLAGS"; then
49213    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49214 elif test -n "$PKG_CONFIG"; then
49215    if test -n "$PKG_CONFIG" && \
49216    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49217  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49218  ac_status=$?
49219  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49220  test $ac_status = 0; }; then
49221  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49222else
49223  pkg_failed=yes
49224fi
49225 else
49226    pkg_failed=untried
49227fi
49228if test -n "$LCMS_LIBS"; then
49229    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49230 elif test -n "$PKG_CONFIG"; then
49231    if test -n "$PKG_CONFIG" && \
49232    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49233  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49234  ac_status=$?
49235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49236  test $ac_status = 0; }; then
49237  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49238else
49239  pkg_failed=yes
49240fi
49241 else
49242    pkg_failed=untried
49243fi
49244
49245
49246
49247if test $pkg_failed = yes; then
49248
49249if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49250        _pkg_short_errors_supported=yes
49251else
49252        _pkg_short_errors_supported=no
49253fi
49254        if test $_pkg_short_errors_supported = yes; then
49255	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49256        else
49257	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49258        fi
49259	# Put the nasty error message in config.log where it belongs
49260	echo "$LCMS_PKG_ERRORS" >&5
49261
49262	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49263$as_echo "no" >&6; }
49264                LCMS_FOUND=no
49265elif test $pkg_failed = untried; then
49266	LCMS_FOUND=no
49267else
49268	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49269	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49271$as_echo "yes" >&6; }
49272	LCMS_FOUND=yes
49273fi
49274    if test "x${LCMS_FOUND}" = "xyes"; then
49275      USE_EXTERNAL_LCMS=true
49276    else
49277      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49278    fi
49279  else
49280    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49281  fi
49282
49283
49284
49285  ###############################################################################
49286  #
49287  # Check for the png library
49288  #
49289
49290
49291# Check whether --with-libpng was given.
49292if test "${with_libpng+set}" = set; then :
49293  withval=$with_libpng;
49294fi
49295
49296
49297
49298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49299$as_echo_n "checking for which libpng to use... " >&6; }
49300
49301  # default is bundled
49302  DEFAULT_LIBPNG=bundled
49303
49304  #
49305  # if user didn't specify, use DEFAULT_LIBPNG
49306  #
49307  if test "x${with_libpng}" = "x"; then
49308      with_libpng=${DEFAULT_LIBPNG}
49309  fi
49310
49311  if test "x${with_libpng}" = "xbundled"; then
49312      USE_EXTERNAL_LIBPNG=false
49313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49314$as_echo "bundled" >&6; }
49315  elif test "x${with_libpng}" = "xsystem"; then
49316
49317pkg_failed=no
49318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49319$as_echo_n "checking for PNG... " >&6; }
49320
49321if test -n "$PNG_CFLAGS"; then
49322    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49323 elif test -n "$PKG_CONFIG"; then
49324    if test -n "$PKG_CONFIG" && \
49325    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49326  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49327  ac_status=$?
49328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49329  test $ac_status = 0; }; then
49330  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49331else
49332  pkg_failed=yes
49333fi
49334 else
49335    pkg_failed=untried
49336fi
49337if test -n "$PNG_LIBS"; then
49338    pkg_cv_PNG_LIBS="$PNG_LIBS"
49339 elif test -n "$PKG_CONFIG"; then
49340    if test -n "$PKG_CONFIG" && \
49341    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49342  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49343  ac_status=$?
49344  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49345  test $ac_status = 0; }; then
49346  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49347else
49348  pkg_failed=yes
49349fi
49350 else
49351    pkg_failed=untried
49352fi
49353
49354
49355
49356if test $pkg_failed = yes; then
49357
49358if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49359        _pkg_short_errors_supported=yes
49360else
49361        _pkg_short_errors_supported=no
49362fi
49363        if test $_pkg_short_errors_supported = yes; then
49364	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49365        else
49366	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49367        fi
49368	# Put the nasty error message in config.log where it belongs
49369	echo "$PNG_PKG_ERRORS" >&5
49370
49371	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49372$as_echo "no" >&6; }
49373                 LIBPNG_FOUND=no
49374elif test $pkg_failed = untried; then
49375	 LIBPNG_FOUND=no
49376else
49377	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49378	PNG_LIBS=$pkg_cv_PNG_LIBS
49379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49380$as_echo "yes" >&6; }
49381	 LIBPNG_FOUND=yes
49382fi
49383      if test "x${LIBPNG_FOUND}" = "xyes"; then
49384          USE_EXTERNAL_LIBPNG=true
49385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49386$as_echo "system" >&6; }
49387      else
49388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49389$as_echo "system not found" >&6; }
49390          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49391      fi
49392  else
49393      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49394  fi
49395
49396
49397  ###############################################################################
49398  #
49399  # Check for the zlib library
49400  #
49401
49402
49403# Check whether --with-zlib was given.
49404if test "${with_zlib+set}" = set; then :
49405  withval=$with_zlib;
49406fi
49407
49408
49409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49410$as_echo_n "checking for compress in -lz... " >&6; }
49411if ${ac_cv_lib_z_compress+:} false; then :
49412  $as_echo_n "(cached) " >&6
49413else
49414  ac_check_lib_save_LIBS=$LIBS
49415LIBS="-lz  $LIBS"
49416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49417/* end confdefs.h.  */
49418
49419/* Override any GCC internal prototype to avoid an error.
49420   Use char because int might match the return type of a GCC
49421   builtin and then its argument prototype would still apply.  */
49422#ifdef __cplusplus
49423extern "C"
49424#endif
49425char compress ();
49426int
49427main ()
49428{
49429return compress ();
49430  ;
49431  return 0;
49432}
49433_ACEOF
49434if ac_fn_cxx_try_link "$LINENO"; then :
49435  ac_cv_lib_z_compress=yes
49436else
49437  ac_cv_lib_z_compress=no
49438fi
49439rm -f core conftest.err conftest.$ac_objext \
49440    conftest$ac_exeext conftest.$ac_ext
49441LIBS=$ac_check_lib_save_LIBS
49442fi
49443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49444$as_echo "$ac_cv_lib_z_compress" >&6; }
49445if test "x$ac_cv_lib_z_compress" = xyes; then :
49446   ZLIB_FOUND=yes
49447else
49448   ZLIB_FOUND=no
49449fi
49450
49451
49452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49453$as_echo_n "checking for which zlib to use... " >&6; }
49454
49455  DEFAULT_ZLIB=bundled
49456  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49457    #
49458    # On macosx default is system...on others default is
49459    #
49460    DEFAULT_ZLIB=system
49461  fi
49462
49463  if test "x${ZLIB_FOUND}" != "xyes"; then
49464    #
49465    # If we don't find any system...set default to bundled
49466    #
49467    DEFAULT_ZLIB=bundled
49468  fi
49469
49470  #
49471  # If user didn't specify, use DEFAULT_ZLIB
49472  #
49473  if test "x${with_zlib}" = "x"; then
49474    with_zlib=${DEFAULT_ZLIB}
49475  fi
49476
49477  if test "x${with_zlib}" = "xbundled"; then
49478    USE_EXTERNAL_LIBZ=false
49479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49480$as_echo "bundled" >&6; }
49481  elif test "x${with_zlib}" = "xsystem"; then
49482    if test "x${ZLIB_FOUND}" = "xyes"; then
49483      USE_EXTERNAL_LIBZ=true
49484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49485$as_echo "system" >&6; }
49486    else
49487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49488$as_echo "system not found" >&6; }
49489      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49490    fi
49491  else
49492    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49493  fi
49494
49495
49496
49497  ###############################################################################
49498  LIBZIP_CAN_USE_MMAP=true
49499
49500
49501
49502  ###############################################################################
49503  #
49504  # Check if altzone exists in time.h
49505  #
49506
49507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49508/* end confdefs.h.  */
49509#include <time.h>
49510int
49511main ()
49512{
49513return (int)altzone;
49514  ;
49515  return 0;
49516}
49517_ACEOF
49518if ac_fn_cxx_try_link "$LINENO"; then :
49519  has_altzone=yes
49520else
49521  has_altzone=no
49522fi
49523rm -f core conftest.err conftest.$ac_objext \
49524    conftest$ac_exeext conftest.$ac_ext
49525  if test "x$has_altzone" = xyes; then
49526
49527$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49528
49529  fi
49530
49531  ###############################################################################
49532  #
49533  # Check the maths library
49534  #
49535
49536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49537$as_echo_n "checking for cos in -lm... " >&6; }
49538if ${ac_cv_lib_m_cos+:} false; then :
49539  $as_echo_n "(cached) " >&6
49540else
49541  ac_check_lib_save_LIBS=$LIBS
49542LIBS="-lm  $LIBS"
49543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49544/* end confdefs.h.  */
49545
49546/* Override any GCC internal prototype to avoid an error.
49547   Use char because int might match the return type of a GCC
49548   builtin and then its argument prototype would still apply.  */
49549#ifdef __cplusplus
49550extern "C"
49551#endif
49552char cos ();
49553int
49554main ()
49555{
49556return cos ();
49557  ;
49558  return 0;
49559}
49560_ACEOF
49561if ac_fn_cxx_try_link "$LINENO"; then :
49562  ac_cv_lib_m_cos=yes
49563else
49564  ac_cv_lib_m_cos=no
49565fi
49566rm -f core conftest.err conftest.$ac_objext \
49567    conftest$ac_exeext conftest.$ac_ext
49568LIBS=$ac_check_lib_save_LIBS
49569fi
49570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49571$as_echo "$ac_cv_lib_m_cos" >&6; }
49572if test "x$ac_cv_lib_m_cos" = xyes; then :
49573  cat >>confdefs.h <<_ACEOF
49574#define HAVE_LIBM 1
49575_ACEOF
49576
49577  LIBS="-lm $LIBS"
49578
49579else
49580
49581        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49582$as_echo "$as_me: Maths library was not found" >&6;}
49583
49584
49585fi
49586
49587
49588
49589  ###############################################################################
49590  #
49591  # Check for libdl.so
49592
49593  save_LIBS="$LIBS"
49594  LIBS=""
49595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49596$as_echo_n "checking for dlopen in -ldl... " >&6; }
49597if ${ac_cv_lib_dl_dlopen+:} false; then :
49598  $as_echo_n "(cached) " >&6
49599else
49600  ac_check_lib_save_LIBS=$LIBS
49601LIBS="-ldl  $LIBS"
49602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49603/* end confdefs.h.  */
49604
49605/* Override any GCC internal prototype to avoid an error.
49606   Use char because int might match the return type of a GCC
49607   builtin and then its argument prototype would still apply.  */
49608#ifdef __cplusplus
49609extern "C"
49610#endif
49611char dlopen ();
49612int
49613main ()
49614{
49615return dlopen ();
49616  ;
49617  return 0;
49618}
49619_ACEOF
49620if ac_fn_cxx_try_link "$LINENO"; then :
49621  ac_cv_lib_dl_dlopen=yes
49622else
49623  ac_cv_lib_dl_dlopen=no
49624fi
49625rm -f core conftest.err conftest.$ac_objext \
49626    conftest$ac_exeext conftest.$ac_ext
49627LIBS=$ac_check_lib_save_LIBS
49628fi
49629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49630$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49631if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49632  cat >>confdefs.h <<_ACEOF
49633#define HAVE_LIBDL 1
49634_ACEOF
49635
49636  LIBS="-ldl $LIBS"
49637
49638fi
49639
49640  LIBDL="$LIBS"
49641
49642  LIBS="$save_LIBS"
49643
49644
49645  ###############################################################################
49646  #
49647  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49648  # dynamic build is configured on command line.
49649  #
49650
49651# Check whether --with-stdc++lib was given.
49652if test "${with_stdc__lib+set}" = set; then :
49653  withval=$with_stdc__lib;
49654        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49655                && test "x$with_stdc__lib" != xdefault; then
49656          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49657        fi
49658
49659else
49660  with_stdc__lib=default
49661
49662fi
49663
49664
49665  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49666    # Test if -lstdc++ works.
49667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49668$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49669    ac_ext=cpp
49670ac_cpp='$CXXCPP $CPPFLAGS'
49671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49674
49675    OLD_CXXFLAGS="$CXXFLAGS"
49676    CXXFLAGS="$CXXFLAGS -lstdc++"
49677    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49678/* end confdefs.h.  */
49679
49680int
49681main ()
49682{
49683return 0;
49684  ;
49685  return 0;
49686}
49687_ACEOF
49688if ac_fn_cxx_try_link "$LINENO"; then :
49689  has_dynamic_libstdcxx=yes
49690else
49691  has_dynamic_libstdcxx=no
49692fi
49693rm -f core conftest.err conftest.$ac_objext \
49694    conftest$ac_exeext conftest.$ac_ext
49695    CXXFLAGS="$OLD_CXXFLAGS"
49696    ac_ext=cpp
49697ac_cpp='$CXXCPP $CPPFLAGS'
49698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49701
49702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49703$as_echo "$has_dynamic_libstdcxx" >&6; }
49704
49705    # Test if stdc++ can be linked statically.
49706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49707$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49708    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49709    ac_ext=cpp
49710ac_cpp='$CXXCPP $CPPFLAGS'
49711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49714
49715    OLD_LIBS="$LIBS"
49716    OLD_CXX="$CXX"
49717    LIBS="$STATIC_STDCXX_FLAGS"
49718    CXX="$CC"
49719    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49720/* end confdefs.h.  */
49721
49722int
49723main ()
49724{
49725return 0;
49726  ;
49727  return 0;
49728}
49729_ACEOF
49730if ac_fn_cxx_try_link "$LINENO"; then :
49731  has_static_libstdcxx=yes
49732else
49733  has_static_libstdcxx=no
49734fi
49735rm -f core conftest.err conftest.$ac_objext \
49736    conftest$ac_exeext conftest.$ac_ext
49737    LIBS="$OLD_LIBS"
49738    CXX="$OLD_CXX"
49739    ac_ext=cpp
49740ac_cpp='$CXXCPP $CPPFLAGS'
49741ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49742ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49743ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49744
49745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49746$as_echo "$has_static_libstdcxx" >&6; }
49747
49748    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49749      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49750    fi
49751
49752    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49753      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49754    fi
49755
49756    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49757      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49758    fi
49759
49760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49761$as_echo_n "checking how to link with libstdc++... " >&6; }
49762    # If dynamic was requested, it's available since it would fail above otherwise.
49763    # If dynamic wasn't requested, go with static unless it isn't available.
49764    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49765      LIBCXX="$LIBCXX -lstdc++"
49766      LDCXX="$CXX"
49767      STATIC_CXX_SETTING="STATIC_CXX=false"
49768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49769$as_echo "dynamic" >&6; }
49770    else
49771      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49772      LDCXX="$CC"
49773      STATIC_CXX_SETTING="STATIC_CXX=true"
49774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49775$as_echo "static" >&6; }
49776    fi
49777  fi
49778
49779
49780  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49781    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49782
49783pkg_failed=no
49784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49785$as_echo_n "checking for LIBFFI... " >&6; }
49786
49787if test -n "$LIBFFI_CFLAGS"; then
49788    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49789 elif test -n "$PKG_CONFIG"; then
49790    if test -n "$PKG_CONFIG" && \
49791    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49792  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49793  ac_status=$?
49794  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49795  test $ac_status = 0; }; then
49796  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49797else
49798  pkg_failed=yes
49799fi
49800 else
49801    pkg_failed=untried
49802fi
49803if test -n "$LIBFFI_LIBS"; then
49804    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49805 elif test -n "$PKG_CONFIG"; then
49806    if test -n "$PKG_CONFIG" && \
49807    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49808  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49809  ac_status=$?
49810  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49811  test $ac_status = 0; }; then
49812  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49813else
49814  pkg_failed=yes
49815fi
49816 else
49817    pkg_failed=untried
49818fi
49819
49820
49821
49822if test $pkg_failed = yes; then
49823
49824if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49825        _pkg_short_errors_supported=yes
49826else
49827        _pkg_short_errors_supported=no
49828fi
49829        if test $_pkg_short_errors_supported = yes; then
49830	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49831        else
49832	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49833        fi
49834	# Put the nasty error message in config.log where it belongs
49835	echo "$LIBFFI_PKG_ERRORS" >&5
49836
49837	as_fn_error $? "Package requirements (libffi) were not met:
49838
49839$LIBFFI_PKG_ERRORS
49840
49841Consider adjusting the PKG_CONFIG_PATH environment variable if you
49842installed software in a non-standard prefix.
49843
49844Alternatively, you may set the environment variables LIBFFI_CFLAGS
49845and LIBFFI_LIBS to avoid the need to call pkg-config.
49846See the pkg-config man page for more details.
49847" "$LINENO" 5
49848elif test $pkg_failed = untried; then
49849	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49851as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49852is in your PATH or set the PKG_CONFIG environment variable to the full
49853path to pkg-config.
49854
49855Alternatively, you may set the environment variables LIBFFI_CFLAGS
49856and LIBFFI_LIBS to avoid the need to call pkg-config.
49857See the pkg-config man page for more details.
49858
49859To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49860See \`config.log' for more details" "$LINENO" 5; }
49861else
49862	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49863	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49865$as_echo "yes" >&6; }
49866	:
49867fi
49868
49869  fi
49870
49871  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49872    # Extract the first word of "llvm-config", so it can be a program name with args.
49873set dummy llvm-config; ac_word=$2
49874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49875$as_echo_n "checking for $ac_word... " >&6; }
49876if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49877  $as_echo_n "(cached) " >&6
49878else
49879  if test -n "$LLVM_CONFIG"; then
49880  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49881else
49882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49883for as_dir in $PATH
49884do
49885  IFS=$as_save_IFS
49886  test -z "$as_dir" && as_dir=.
49887    for ac_exec_ext in '' $ac_executable_extensions; do
49888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49889    ac_cv_prog_LLVM_CONFIG="llvm-config"
49890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49891    break 2
49892  fi
49893done
49894  done
49895IFS=$as_save_IFS
49896
49897fi
49898fi
49899LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49900if test -n "$LLVM_CONFIG"; then
49901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49902$as_echo "$LLVM_CONFIG" >&6; }
49903else
49904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49905$as_echo "no" >&6; }
49906fi
49907
49908
49909
49910    if test "x$LLVM_CONFIG" != xllvm-config; then
49911      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49912    fi
49913
49914    llvm_components="jit mcjit engine nativecodegen native"
49915    unset LLVM_CFLAGS
49916    for flag in $("$LLVM_CONFIG" --cxxflags); do
49917      if echo "${flag}" | grep -q '^-[ID]'; then
49918        if test "${flag}" != "-D_DEBUG" ; then
49919          if test "${LLVM_CFLAGS}" != "" ; then
49920            LLVM_CFLAGS="${LLVM_CFLAGS} "
49921          fi
49922          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49923        fi
49924      fi
49925    done
49926    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49927    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49928
49929    unset LLVM_LDFLAGS
49930    for flag in $("${LLVM_CONFIG}" --ldflags); do
49931      if echo "${flag}" | grep -q '^-L'; then
49932        if test "${LLVM_LDFLAGS}" != ""; then
49933          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49934        fi
49935        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49936      fi
49937    done
49938
49939    unset LLVM_LIBS
49940    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49941      if echo "${flag}" | grep -q '^-l'; then
49942        if test "${LLVM_LIBS}" != ""; then
49943          LLVM_LIBS="${LLVM_LIBS} "
49944        fi
49945        LLVM_LIBS="${LLVM_LIBS}${flag}"
49946      fi
49947    done
49948
49949
49950
49951
49952  fi
49953
49954  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49955  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49956    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49957  fi
49958
49959  # TODO better (platform agnostic) test
49960  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49961    LIBCXX="-lstdc++"
49962  fi
49963
49964
49965
49966
49967  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49968
49969
49970# Check whether --with-msvcr-dll was given.
49971if test "${with_msvcr_dll+set}" = set; then :
49972  withval=$with_msvcr_dll;
49973fi
49974
49975
49976  if test "x$with_msvcr_dll" != x; then
49977    # If given explicitely by user, do not probe. If not present, fail directly.
49978
49979  DLL_NAME="$DLL_NAME"
49980  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49981  METHOD="--with-msvcr-dll"
49982  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49983    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49984$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49985
49986    # Need to check if the found msvcr is correct architecture
49987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49988$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49989    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49991      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49992      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49993      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49994        CORRECT_MSVCR_ARCH="PE32 executable"
49995      else
49996        CORRECT_MSVCR_ARCH="PE32+ executable"
49997      fi
49998    else
49999      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50000        CORRECT_MSVCR_ARCH=386
50001      else
50002        CORRECT_MSVCR_ARCH=x86-64
50003      fi
50004    fi
50005    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50007$as_echo "ok" >&6; }
50008      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50009      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50010$as_echo_n "checking for $DLL_NAME... " >&6; }
50011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50012$as_echo "$MSVC_DLL" >&6; }
50013    else
50014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50015$as_echo "incorrect, ignoring" >&6; }
50016      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50017$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50018    fi
50019  fi
50020
50021    if test "x$MSVC_DLL" = x; then
50022      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50023    fi
50024  else
50025
50026  VAR_NAME="MSVCR_DLL"
50027  DLL_NAME="${MSVCR_NAME}"
50028  MSVC_DLL=
50029
50030  if test "x$MSVC_DLL" = x; then
50031    # Probe: Using well-known location from Visual Studio 10.0
50032    if test "x$VCINSTALLDIR" != x; then
50033      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50034
50035  windows_path="$CYGWIN_VC_INSTALL_DIR"
50036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50037    unix_path=`$CYGPATH -u "$windows_path"`
50038    CYGWIN_VC_INSTALL_DIR="$unix_path"
50039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50041    CYGWIN_VC_INSTALL_DIR="$unix_path"
50042  fi
50043
50044      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50045        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50046      else
50047        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50048      fi
50049      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50050
50051  DLL_NAME="$DLL_NAME"
50052  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50053  METHOD="well-known location in VCINSTALLDIR"
50054  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50055    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50056$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50057
50058    # Need to check if the found msvcr is correct architecture
50059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50060$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50061    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50063      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50064      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50065      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50066        CORRECT_MSVCR_ARCH="PE32 executable"
50067      else
50068        CORRECT_MSVCR_ARCH="PE32+ executable"
50069      fi
50070    else
50071      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50072        CORRECT_MSVCR_ARCH=386
50073      else
50074        CORRECT_MSVCR_ARCH=x86-64
50075      fi
50076    fi
50077    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50079$as_echo "ok" >&6; }
50080      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50081      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50082$as_echo_n "checking for $DLL_NAME... " >&6; }
50083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50084$as_echo "$MSVC_DLL" >&6; }
50085    else
50086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50087$as_echo "incorrect, ignoring" >&6; }
50088      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50089$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50090    fi
50091  fi
50092
50093    fi
50094  fi
50095
50096  if test "x$MSVC_DLL" = x; then
50097    # Probe: Check in the Boot JDK directory.
50098    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50099
50100  DLL_NAME="$DLL_NAME"
50101  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50102  METHOD="well-known location in Boot JDK"
50103  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50104    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50105$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50106
50107    # Need to check if the found msvcr is correct architecture
50108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50109$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50110    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50112      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50113      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50114      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50115        CORRECT_MSVCR_ARCH="PE32 executable"
50116      else
50117        CORRECT_MSVCR_ARCH="PE32+ executable"
50118      fi
50119    else
50120      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50121        CORRECT_MSVCR_ARCH=386
50122      else
50123        CORRECT_MSVCR_ARCH=x86-64
50124      fi
50125    fi
50126    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50128$as_echo "ok" >&6; }
50129      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50131$as_echo_n "checking for $DLL_NAME... " >&6; }
50132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50133$as_echo "$MSVC_DLL" >&6; }
50134    else
50135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50136$as_echo "incorrect, ignoring" >&6; }
50137      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50138$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50139    fi
50140  fi
50141
50142  fi
50143
50144  if test "x$MSVC_DLL" = x; then
50145    # Probe: Look in the Windows system32 directory
50146    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50147
50148  windows_path="$CYGWIN_SYSTEMROOT"
50149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50150    unix_path=`$CYGPATH -u "$windows_path"`
50151    CYGWIN_SYSTEMROOT="$unix_path"
50152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50154    CYGWIN_SYSTEMROOT="$unix_path"
50155  fi
50156
50157    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50158
50159  DLL_NAME="$DLL_NAME"
50160  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50161  METHOD="well-known location in SYSTEMROOT"
50162  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50163    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50164$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50165
50166    # Need to check if the found msvcr is correct architecture
50167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50168$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50169    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50171      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50172      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50173      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50174        CORRECT_MSVCR_ARCH="PE32 executable"
50175      else
50176        CORRECT_MSVCR_ARCH="PE32+ executable"
50177      fi
50178    else
50179      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50180        CORRECT_MSVCR_ARCH=386
50181      else
50182        CORRECT_MSVCR_ARCH=x86-64
50183      fi
50184    fi
50185    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50187$as_echo "ok" >&6; }
50188      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50190$as_echo_n "checking for $DLL_NAME... " >&6; }
50191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50192$as_echo "$MSVC_DLL" >&6; }
50193    else
50194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50195$as_echo "incorrect, ignoring" >&6; }
50196      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50197$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50198    fi
50199  fi
50200
50201  fi
50202
50203  if test "x$MSVC_DLL" = x; then
50204    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50205    if test "x$VS100COMNTOOLS" != x; then
50206      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50207
50208  windows_path="$CYGWIN_VS_TOOLS_DIR"
50209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50210    unix_path=`$CYGPATH -u "$windows_path"`
50211    CYGWIN_VS_TOOLS_DIR="$unix_path"
50212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50214    CYGWIN_VS_TOOLS_DIR="$unix_path"
50215  fi
50216
50217      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50218        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50219	    | $GREP -i /x64/ | $HEAD --lines 1`
50220      else
50221        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50222	    | $GREP -i /x86/ | $HEAD --lines 1`
50223      fi
50224
50225  DLL_NAME="$DLL_NAME"
50226  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50227  METHOD="search of VS100COMNTOOLS"
50228  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50229    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50230$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50231
50232    # Need to check if the found msvcr is correct architecture
50233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50234$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50235    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50237      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50238      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50239      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50240        CORRECT_MSVCR_ARCH="PE32 executable"
50241      else
50242        CORRECT_MSVCR_ARCH="PE32+ executable"
50243      fi
50244    else
50245      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50246        CORRECT_MSVCR_ARCH=386
50247      else
50248        CORRECT_MSVCR_ARCH=x86-64
50249      fi
50250    fi
50251    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50253$as_echo "ok" >&6; }
50254      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50256$as_echo_n "checking for $DLL_NAME... " >&6; }
50257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50258$as_echo "$MSVC_DLL" >&6; }
50259    else
50260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50261$as_echo "incorrect, ignoring" >&6; }
50262      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50263$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50264    fi
50265  fi
50266
50267    fi
50268  fi
50269
50270  if test "x$MSVC_DLL" = x; then
50271    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50272    # (This was the original behaviour; kept since it might turn something up)
50273    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50274      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50275        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50276	    | $GREP x64 | $HEAD --lines 1`
50277      else
50278        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50279	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50280        if test "x$POSSIBLE_MSVC_DLL" = x; then
50281          # We're grasping at straws now...
50282          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50283	      | $HEAD --lines 1`
50284        fi
50285      fi
50286
50287
50288  DLL_NAME="$DLL_NAME"
50289  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50290  METHOD="search of VCINSTALLDIR"
50291  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50292    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50293$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50294
50295    # Need to check if the found msvcr is correct architecture
50296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50297$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50298    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50300      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50301      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50302      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50303        CORRECT_MSVCR_ARCH="PE32 executable"
50304      else
50305        CORRECT_MSVCR_ARCH="PE32+ executable"
50306      fi
50307    else
50308      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50309        CORRECT_MSVCR_ARCH=386
50310      else
50311        CORRECT_MSVCR_ARCH=x86-64
50312      fi
50313    fi
50314    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50315      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50316$as_echo "ok" >&6; }
50317      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50319$as_echo_n "checking for $DLL_NAME... " >&6; }
50320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50321$as_echo "$MSVC_DLL" >&6; }
50322    else
50323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50324$as_echo "incorrect, ignoring" >&6; }
50325      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50326$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50327    fi
50328  fi
50329
50330    fi
50331  fi
50332
50333  if test "x$MSVC_DLL" = x; then
50334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50335$as_echo_n "checking for $DLL_NAME... " >&6; }
50336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50337$as_echo "no" >&6; }
50338    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50339  fi
50340
50341  MSVCR_DLL=$MSVC_DLL
50342
50343  # Only process if variable expands to non-empty
50344
50345  if test "x$MSVCR_DLL" != x; then
50346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50347
50348  # Input might be given as Windows format, start by converting to
50349  # unix format.
50350  path="$MSVCR_DLL"
50351  new_path=`$CYGPATH -u "$path"`
50352
50353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50356  # "foo.exe" is OK but "foo" is an error.
50357  #
50358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50359  # It is also a way to make sure we got the proper file name for the real test later on.
50360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50361  if test "x$test_shortpath" = x; then
50362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50363$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50364    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50365  fi
50366
50367  # Call helper function which possibly converts this using DOS-style short mode.
50368  # If so, the updated path is stored in $new_path.
50369
50370  input_path="$new_path"
50371  # Check if we need to convert this using DOS-style short mode. If the path
50372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50373  # take no chances and rewrite it.
50374  # Note: m4 eats our [], so we need to use [ and ] instead.
50375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50376  if test "x$has_forbidden_chars" != x; then
50377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50381      # Going to short mode and back again did indeed matter. Since short mode is
50382      # case insensitive, let's make it lowercase to improve readability.
50383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50384      # Now convert it back to Unix-stile (cygpath)
50385      input_path=`$CYGPATH -u "$shortmode_path"`
50386      new_path="$input_path"
50387    fi
50388  fi
50389
50390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50391  if test "x$test_cygdrive_prefix" = x; then
50392    # As a simple fix, exclude /usr/bin since it's not a real path.
50393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50395      # a path prefixed by /cygdrive for fixpath to work.
50396      new_path="$CYGWIN_ROOT_PATH$input_path"
50397    fi
50398  fi
50399
50400
50401  if test "x$path" != "x$new_path"; then
50402    MSVCR_DLL="$new_path"
50403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50404$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50405  fi
50406
50407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50408
50409  path="$MSVCR_DLL"
50410  has_colon=`$ECHO $path | $GREP ^.:`
50411  new_path="$path"
50412  if test "x$has_colon" = x; then
50413    # Not in mixed or Windows style, start by that.
50414    new_path=`cmd //c echo $path`
50415  fi
50416
50417
50418  input_path="$new_path"
50419  # Check if we need to convert this using DOS-style short mode. If the path
50420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50421  # take no chances and rewrite it.
50422  # Note: m4 eats our [], so we need to use [ and ] instead.
50423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50424  if test "x$has_forbidden_chars" != x; then
50425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50427  fi
50428
50429
50430  windows_path="$new_path"
50431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50432    unix_path=`$CYGPATH -u "$windows_path"`
50433    new_path="$unix_path"
50434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50436    new_path="$unix_path"
50437  fi
50438
50439  if test "x$path" != "x$new_path"; then
50440    MSVCR_DLL="$new_path"
50441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50442$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50443  fi
50444
50445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50447
50448    else
50449      # We're on a unix platform. Hooray! :)
50450      path="$MSVCR_DLL"
50451      has_space=`$ECHO "$path" | $GREP " "`
50452      if test "x$has_space" != x; then
50453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50454$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50456      fi
50457
50458      # Use eval to expand a potential ~
50459      eval path="$path"
50460      if test ! -f "$path" && test ! -d "$path"; then
50461        as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50462      fi
50463
50464      MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50465    fi
50466  fi
50467
50468  MSVCR_DLL=$MSVCR_DLL
50469
50470
50471  fi
50472
50473
50474# Check whether --with-msvcp-dll was given.
50475if test "${with_msvcp_dll+set}" = set; then :
50476  withval=$with_msvcp_dll;
50477fi
50478
50479
50480  if test "x$MSVCP_NAME" != "x"; then
50481    if test "x$with_msvcp_dll" != x; then
50482      # If given explicitely by user, do not probe. If not present, fail directly.
50483
50484  DLL_NAME="$DLL_NAME"
50485  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50486  METHOD="--with-msvcp-dll"
50487  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50488    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50489$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50490
50491    # Need to check if the found msvcr is correct architecture
50492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50493$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50494    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50496      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50497      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50498      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50499        CORRECT_MSVCR_ARCH="PE32 executable"
50500      else
50501        CORRECT_MSVCR_ARCH="PE32+ executable"
50502      fi
50503    else
50504      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50505        CORRECT_MSVCR_ARCH=386
50506      else
50507        CORRECT_MSVCR_ARCH=x86-64
50508      fi
50509    fi
50510    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50511      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50512$as_echo "ok" >&6; }
50513      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50515$as_echo_n "checking for $DLL_NAME... " >&6; }
50516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50517$as_echo "$MSVC_DLL" >&6; }
50518    else
50519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50520$as_echo "incorrect, ignoring" >&6; }
50521      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50522$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50523    fi
50524  fi
50525
50526      if test "x$MSVC_DLL" = x; then
50527        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50528      fi
50529    else
50530
50531  VAR_NAME="MSVCP_DLL"
50532  DLL_NAME="${MSVCP_NAME}"
50533  MSVC_DLL=
50534
50535  if test "x$MSVC_DLL" = x; then
50536    # Probe: Using well-known location from Visual Studio 10.0
50537    if test "x$VCINSTALLDIR" != x; then
50538      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50539
50540  windows_path="$CYGWIN_VC_INSTALL_DIR"
50541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50542    unix_path=`$CYGPATH -u "$windows_path"`
50543    CYGWIN_VC_INSTALL_DIR="$unix_path"
50544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50546    CYGWIN_VC_INSTALL_DIR="$unix_path"
50547  fi
50548
50549      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50550        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50551      else
50552        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50553      fi
50554      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50555
50556  DLL_NAME="$DLL_NAME"
50557  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50558  METHOD="well-known location in VCINSTALLDIR"
50559  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50560    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50561$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50562
50563    # Need to check if the found msvcr is correct architecture
50564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50565$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50566    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50568      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50569      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50570      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50571        CORRECT_MSVCR_ARCH="PE32 executable"
50572      else
50573        CORRECT_MSVCR_ARCH="PE32+ executable"
50574      fi
50575    else
50576      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50577        CORRECT_MSVCR_ARCH=386
50578      else
50579        CORRECT_MSVCR_ARCH=x86-64
50580      fi
50581    fi
50582    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50584$as_echo "ok" >&6; }
50585      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50587$as_echo_n "checking for $DLL_NAME... " >&6; }
50588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50589$as_echo "$MSVC_DLL" >&6; }
50590    else
50591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50592$as_echo "incorrect, ignoring" >&6; }
50593      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50594$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50595    fi
50596  fi
50597
50598    fi
50599  fi
50600
50601  if test "x$MSVC_DLL" = x; then
50602    # Probe: Check in the Boot JDK directory.
50603    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50604
50605  DLL_NAME="$DLL_NAME"
50606  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50607  METHOD="well-known location in Boot JDK"
50608  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50609    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50610$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50611
50612    # Need to check if the found msvcr is correct architecture
50613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50614$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50615    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50617      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50618      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50619      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50620        CORRECT_MSVCR_ARCH="PE32 executable"
50621      else
50622        CORRECT_MSVCR_ARCH="PE32+ executable"
50623      fi
50624    else
50625      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50626        CORRECT_MSVCR_ARCH=386
50627      else
50628        CORRECT_MSVCR_ARCH=x86-64
50629      fi
50630    fi
50631    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50633$as_echo "ok" >&6; }
50634      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50636$as_echo_n "checking for $DLL_NAME... " >&6; }
50637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50638$as_echo "$MSVC_DLL" >&6; }
50639    else
50640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50641$as_echo "incorrect, ignoring" >&6; }
50642      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50643$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50644    fi
50645  fi
50646
50647  fi
50648
50649  if test "x$MSVC_DLL" = x; then
50650    # Probe: Look in the Windows system32 directory
50651    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50652
50653  windows_path="$CYGWIN_SYSTEMROOT"
50654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50655    unix_path=`$CYGPATH -u "$windows_path"`
50656    CYGWIN_SYSTEMROOT="$unix_path"
50657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50659    CYGWIN_SYSTEMROOT="$unix_path"
50660  fi
50661
50662    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50663
50664  DLL_NAME="$DLL_NAME"
50665  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50666  METHOD="well-known location in SYSTEMROOT"
50667  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50668    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50669$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50670
50671    # Need to check if the found msvcr is correct architecture
50672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50673$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50674    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50676      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50677      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50678      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50679        CORRECT_MSVCR_ARCH="PE32 executable"
50680      else
50681        CORRECT_MSVCR_ARCH="PE32+ executable"
50682      fi
50683    else
50684      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50685        CORRECT_MSVCR_ARCH=386
50686      else
50687        CORRECT_MSVCR_ARCH=x86-64
50688      fi
50689    fi
50690    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50692$as_echo "ok" >&6; }
50693      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50695$as_echo_n "checking for $DLL_NAME... " >&6; }
50696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50697$as_echo "$MSVC_DLL" >&6; }
50698    else
50699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50700$as_echo "incorrect, ignoring" >&6; }
50701      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50702$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50703    fi
50704  fi
50705
50706  fi
50707
50708  if test "x$MSVC_DLL" = x; then
50709    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50710    if test "x$VS100COMNTOOLS" != x; then
50711      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50712
50713  windows_path="$CYGWIN_VS_TOOLS_DIR"
50714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50715    unix_path=`$CYGPATH -u "$windows_path"`
50716    CYGWIN_VS_TOOLS_DIR="$unix_path"
50717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50719    CYGWIN_VS_TOOLS_DIR="$unix_path"
50720  fi
50721
50722      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50723        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50724	    | $GREP -i /x64/ | $HEAD --lines 1`
50725      else
50726        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50727	    | $GREP -i /x86/ | $HEAD --lines 1`
50728      fi
50729
50730  DLL_NAME="$DLL_NAME"
50731  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50732  METHOD="search of VS100COMNTOOLS"
50733  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50734    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50735$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50736
50737    # Need to check if the found msvcr is correct architecture
50738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50739$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50740    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50742      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50743      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50744      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50745        CORRECT_MSVCR_ARCH="PE32 executable"
50746      else
50747        CORRECT_MSVCR_ARCH="PE32+ executable"
50748      fi
50749    else
50750      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50751        CORRECT_MSVCR_ARCH=386
50752      else
50753        CORRECT_MSVCR_ARCH=x86-64
50754      fi
50755    fi
50756    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50758$as_echo "ok" >&6; }
50759      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50760      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50761$as_echo_n "checking for $DLL_NAME... " >&6; }
50762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50763$as_echo "$MSVC_DLL" >&6; }
50764    else
50765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50766$as_echo "incorrect, ignoring" >&6; }
50767      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50768$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50769    fi
50770  fi
50771
50772    fi
50773  fi
50774
50775  if test "x$MSVC_DLL" = x; then
50776    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50777    # (This was the original behaviour; kept since it might turn something up)
50778    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50779      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50780        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50781	    | $GREP x64 | $HEAD --lines 1`
50782      else
50783        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50784	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50785        if test "x$POSSIBLE_MSVC_DLL" = x; then
50786          # We're grasping at straws now...
50787          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50788	      | $HEAD --lines 1`
50789        fi
50790      fi
50791
50792
50793  DLL_NAME="$DLL_NAME"
50794  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50795  METHOD="search of VCINSTALLDIR"
50796  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50797    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50798$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50799
50800    # Need to check if the found msvcr is correct architecture
50801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50802$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50803    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50805      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50806      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50807      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50808        CORRECT_MSVCR_ARCH="PE32 executable"
50809      else
50810        CORRECT_MSVCR_ARCH="PE32+ executable"
50811      fi
50812    else
50813      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50814        CORRECT_MSVCR_ARCH=386
50815      else
50816        CORRECT_MSVCR_ARCH=x86-64
50817      fi
50818    fi
50819    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50821$as_echo "ok" >&6; }
50822      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50823      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50824$as_echo_n "checking for $DLL_NAME... " >&6; }
50825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50826$as_echo "$MSVC_DLL" >&6; }
50827    else
50828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50829$as_echo "incorrect, ignoring" >&6; }
50830      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50831$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50832    fi
50833  fi
50834
50835    fi
50836  fi
50837
50838  if test "x$MSVC_DLL" = x; then
50839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50840$as_echo_n "checking for $DLL_NAME... " >&6; }
50841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50842$as_echo "no" >&6; }
50843    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50844  fi
50845
50846  MSVCP_DLL=$MSVC_DLL
50847
50848  # Only process if variable expands to non-empty
50849
50850  if test "x$MSVCP_DLL" != x; then
50851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50852
50853  # Input might be given as Windows format, start by converting to
50854  # unix format.
50855  path="$MSVCP_DLL"
50856  new_path=`$CYGPATH -u "$path"`
50857
50858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50861  # "foo.exe" is OK but "foo" is an error.
50862  #
50863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50864  # It is also a way to make sure we got the proper file name for the real test later on.
50865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50866  if test "x$test_shortpath" = x; then
50867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50868$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50869    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50870  fi
50871
50872  # Call helper function which possibly converts this using DOS-style short mode.
50873  # If so, the updated path is stored in $new_path.
50874
50875  input_path="$new_path"
50876  # Check if we need to convert this using DOS-style short mode. If the path
50877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50878  # take no chances and rewrite it.
50879  # Note: m4 eats our [], so we need to use [ and ] instead.
50880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50881  if test "x$has_forbidden_chars" != x; then
50882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50886      # Going to short mode and back again did indeed matter. Since short mode is
50887      # case insensitive, let's make it lowercase to improve readability.
50888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50889      # Now convert it back to Unix-stile (cygpath)
50890      input_path=`$CYGPATH -u "$shortmode_path"`
50891      new_path="$input_path"
50892    fi
50893  fi
50894
50895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50896  if test "x$test_cygdrive_prefix" = x; then
50897    # As a simple fix, exclude /usr/bin since it's not a real path.
50898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50900      # a path prefixed by /cygdrive for fixpath to work.
50901      new_path="$CYGWIN_ROOT_PATH$input_path"
50902    fi
50903  fi
50904
50905
50906  if test "x$path" != "x$new_path"; then
50907    MSVCP_DLL="$new_path"
50908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50909$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50910  fi
50911
50912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50913
50914  path="$MSVCP_DLL"
50915  has_colon=`$ECHO $path | $GREP ^.:`
50916  new_path="$path"
50917  if test "x$has_colon" = x; then
50918    # Not in mixed or Windows style, start by that.
50919    new_path=`cmd //c echo $path`
50920  fi
50921
50922
50923  input_path="$new_path"
50924  # Check if we need to convert this using DOS-style short mode. If the path
50925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50926  # take no chances and rewrite it.
50927  # Note: m4 eats our [], so we need to use [ and ] instead.
50928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50929  if test "x$has_forbidden_chars" != x; then
50930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50932  fi
50933
50934
50935  windows_path="$new_path"
50936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50937    unix_path=`$CYGPATH -u "$windows_path"`
50938    new_path="$unix_path"
50939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50941    new_path="$unix_path"
50942  fi
50943
50944  if test "x$path" != "x$new_path"; then
50945    MSVCP_DLL="$new_path"
50946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50947$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50948  fi
50949
50950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50952
50953    else
50954      # We're on a unix platform. Hooray! :)
50955      path="$MSVCP_DLL"
50956      has_space=`$ECHO "$path" | $GREP " "`
50957      if test "x$has_space" != x; then
50958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50959$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50961      fi
50962
50963      # Use eval to expand a potential ~
50964      eval path="$path"
50965      if test ! -f "$path" && test ! -d "$path"; then
50966        as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50967      fi
50968
50969      MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50970    fi
50971  fi
50972
50973  MSVCP_DLL=$MSVCP_DLL
50974
50975
50976    fi
50977  fi
50978
50979
50980
50981# Check whether --with-dxsdk was given.
50982if test "${with_dxsdk+set}" = set; then :
50983  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50984$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50985fi
50986
50987
50988
50989
50990# Check whether --with-dxsdk-lib was given.
50991if test "${with_dxsdk_lib+set}" = set; then :
50992  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50993$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50994fi
50995
50996
50997
50998
50999# Check whether --with-dxsdk-include was given.
51000if test "${with_dxsdk_include+set}" = set; then :
51001  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
51002$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
51003fi
51004
51005
51006  fi
51007
51008
51009###############################################################################
51010#
51011# We need to do some final tweaking, when everything else is done.
51012#
51013###############################################################################
51014
51015
51016  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
51017
51018
51019  # The name of the Service Agent jar.
51020  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
51021  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
51022    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
51023  fi
51024
51025
51026
51027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
51028$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
51029
51030    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
51031      ENABLE_INTREE_EC=yes
51032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51033$as_echo "yes" >&6; }
51034    else
51035      ENABLE_INTREE_EC=no
51036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51037$as_echo "no" >&6; }
51038    fi
51039
51040
51041
51042
51043###############################################################################
51044#
51045# Configure parts of the build that only affect the build performance,
51046# not the result.
51047#
51048###############################################################################
51049
51050
51051  # How many cores do we have on this build system?
51052
51053# Check whether --with-num-cores was given.
51054if test "${with_num_cores+set}" = set; then :
51055  withval=$with_num_cores;
51056fi
51057
51058  if test "x$with_num_cores" = x; then
51059    # The number of cores were not specified, try to probe them.
51060
51061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
51062$as_echo_n "checking for number of cores... " >&6; }
51063  NUM_CORES=1
51064  FOUND_CORES=no
51065
51066  if test -f /proc/cpuinfo; then
51067    # Looks like a Linux (or cygwin) system
51068    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
51069    FOUND_CORES=yes
51070  elif test -x /usr/sbin/psrinfo; then
51071    # Looks like a Solaris system
51072    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
51073    FOUND_CORES=yes
51074  elif test -x /usr/sbin/system_profiler; then
51075    # Looks like a MacOSX system
51076    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
51077    FOUND_CORES=yes
51078  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
51079    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
51080    FOUND_CORES=yes
51081  elif test -n "$NUMBER_OF_PROCESSORS"; then
51082    # On windows, look in the env
51083    NUM_CORES=$NUMBER_OF_PROCESSORS
51084    FOUND_CORES=yes
51085  fi
51086
51087  if test "x$FOUND_CORES" = xyes; then
51088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
51089$as_echo "$NUM_CORES" >&6; }
51090  else
51091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
51092$as_echo "could not detect number of cores, defaulting to 1" >&6; }
51093    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
51094$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
51095  fi
51096
51097  else
51098    NUM_CORES=$with_num_cores
51099  fi
51100
51101
51102
51103  # How much memory do we have on this build system?
51104
51105# Check whether --with-memory-size was given.
51106if test "${with_memory_size+set}" = set; then :
51107  withval=$with_memory_size;
51108fi
51109
51110  if test "x$with_memory_size" = x; then
51111    # The memory size was not specified, try to probe it.
51112
51113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
51114$as_echo_n "checking for memory size... " >&6; }
51115  # Default to 1024 MB
51116  MEMORY_SIZE=1024
51117  FOUND_MEM=no
51118
51119  if test -f /proc/meminfo; then
51120    # Looks like a Linux (or cygwin) system
51121    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51122    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51123    FOUND_MEM=yes
51124  elif test -x /usr/sbin/prtconf; then
51125    # Looks like a Solaris or AIX system
51126    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51127    FOUND_MEM=yes
51128  elif test -x /usr/sbin/system_profiler; then
51129    # Looks like a MacOSX system
51130    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51131    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51132    FOUND_MEM=yes
51133  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51134    # Windows, but without cygwin
51135    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51136    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51137    FOUND_MEM=yes
51138  fi
51139
51140  if test "x$FOUND_MEM" = xyes; then
51141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51142$as_echo "$MEMORY_SIZE MB" >&6; }
51143  else
51144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
51145$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
51146    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51147$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51148  fi
51149
51150  else
51151    MEMORY_SIZE=$with_memory_size
51152  fi
51153
51154
51155
51156  # Provide a decent default number of parallel jobs for make depending on
51157  # number of cores, amount of memory and machine architecture.
51158
51159# Check whether --with-jobs was given.
51160if test "${with_jobs+set}" = set; then :
51161  withval=$with_jobs;
51162fi
51163
51164  if test "x$with_jobs" = x; then
51165    # Number of jobs was not specified, calculate.
51166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51167$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51168    # Approximate memory in GB.
51169    memory_gb=`expr $MEMORY_SIZE / 1024`
51170    # Pick the lowest of memory in gb and number of cores.
51171    if test "$memory_gb" -lt "$NUM_CORES"; then
51172      JOBS="$memory_gb"
51173    else
51174      JOBS="$NUM_CORES"
51175      # On bigger machines, leave some room for other processes to run
51176      if test "$JOBS" -gt "4"; then
51177        JOBS=`expr $JOBS '*' 90 / 100`
51178      fi
51179    fi
51180    # Cap number of jobs to 16
51181    if test "$JOBS" -gt "16"; then
51182      JOBS=16
51183    fi
51184    if test "$JOBS" -eq "0"; then
51185      JOBS=1
51186    fi
51187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51188$as_echo "$JOBS" >&6; }
51189  else
51190    JOBS=$with_jobs
51191  fi
51192
51193
51194
51195# Setup arguments for the boot jdk (after cores and memory have been setup)
51196
51197  ##############################################################################
51198  #
51199  # Specify jvm options for anything that is run with the Boot JDK.
51200  # Not all JVM:s accept the same arguments on the command line.
51201  #
51202
51203# Check whether --with-boot-jdk-jvmargs was given.
51204if test "${with_boot_jdk_jvmargs+set}" = set; then :
51205  withval=$with_boot_jdk_jvmargs;
51206fi
51207
51208
51209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51210$as_echo_n "checking flags for boot jdk java command ... " >&6; }
51211
51212  # Disable special log output when a debug build is used as Boot JDK...
51213
51214  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51215  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51216  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51217  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51218  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51219  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51220    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51221    JVM_ARG_OK=true
51222  else
51223    $ECHO "Arg failed:" >&5
51224    $ECHO "$OUTPUT" >&5
51225    JVM_ARG_OK=false
51226  fi
51227
51228
51229  # Apply user provided options.
51230
51231  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51232  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51233  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51234  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51235  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51236  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51237    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51238    JVM_ARG_OK=true
51239  else
51240    $ECHO "Arg failed:" >&5
51241    $ECHO "$OUTPUT" >&5
51242    JVM_ARG_OK=false
51243  fi
51244
51245
51246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51247$as_echo "$boot_jdk_jvmargs" >&6; }
51248
51249  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51250  JAVA_FLAGS=$boot_jdk_jvmargs
51251
51252
51253
51254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51255$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51256
51257  # Starting amount of heap memory.
51258
51259  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51260  $ECHO "Command: $JAVA -Xms64M -version" >&5
51261  OUTPUT=`$JAVA -Xms64M -version 2>&1`
51262  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51263  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51264  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51265    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51266    JVM_ARG_OK=true
51267  else
51268    $ECHO "Arg failed:" >&5
51269    $ECHO "$OUTPUT" >&5
51270    JVM_ARG_OK=false
51271  fi
51272
51273
51274  # Maximum amount of heap memory.
51275  # Maximum stack size.
51276  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51277  if test "x$BUILD_NUM_BITS" = x32; then
51278    if test "$JVM_MAX_HEAP" -gt "1100"; then
51279      JVM_MAX_HEAP=1100
51280    elif test "$JVM_MAX_HEAP" -lt "512"; then
51281      JVM_MAX_HEAP=512
51282    fi
51283    STACK_SIZE=768
51284  else
51285    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51286    # pointers are used. Apparently, we need to increase the heap and stack
51287    # space for the jvm. More specifically, when running javac to build huge
51288    # jdk batch
51289    if test "$JVM_MAX_HEAP" -gt "1600"; then
51290      JVM_MAX_HEAP=1600
51291    elif test "$JVM_MAX_HEAP" -lt "512"; then
51292      JVM_MAX_HEAP=512
51293    fi
51294    STACK_SIZE=1536
51295  fi
51296
51297  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51298  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51299  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51300  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51301  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51302  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51303    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51304    JVM_ARG_OK=true
51305  else
51306    $ECHO "Arg failed:" >&5
51307    $ECHO "$OUTPUT" >&5
51308    JVM_ARG_OK=false
51309  fi
51310
51311
51312  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51313  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51314  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51315  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51316  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51317  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51318    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51319    JVM_ARG_OK=true
51320  else
51321    $ECHO "Arg failed:" >&5
51322    $ECHO "$OUTPUT" >&5
51323    JVM_ARG_OK=false
51324  fi
51325
51326
51327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51328$as_echo "$boot_jdk_jvmargs_big" >&6; }
51329
51330  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51331
51332
51333
51334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51335$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51336
51337  # Use serial gc for small short lived tools if possible
51338
51339  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51340  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51341  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51342  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51343  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51344  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51345    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51346    JVM_ARG_OK=true
51347  else
51348    $ECHO "Arg failed:" >&5
51349    $ECHO "$OUTPUT" >&5
51350    JVM_ARG_OK=false
51351  fi
51352
51353
51354  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51355  $ECHO "Command: $JAVA -Xms32M -version" >&5
51356  OUTPUT=`$JAVA -Xms32M -version 2>&1`
51357  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51358  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51359  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51360    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51361    JVM_ARG_OK=true
51362  else
51363    $ECHO "Arg failed:" >&5
51364    $ECHO "$OUTPUT" >&5
51365    JVM_ARG_OK=false
51366  fi
51367
51368
51369  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51370  $ECHO "Command: $JAVA -Xmx512M -version" >&5
51371  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51372  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51373  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51374  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51375    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51376    JVM_ARG_OK=true
51377  else
51378    $ECHO "Arg failed:" >&5
51379    $ECHO "$OUTPUT" >&5
51380    JVM_ARG_OK=false
51381  fi
51382
51383
51384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51385$as_echo "$boot_jdk_jvmargs_small" >&6; }
51386
51387  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51388
51389
51390  JAVA_TOOL_FLAGS_SMALL=""
51391  for f in $JAVA_FLAGS_SMALL; do
51392    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51393  done
51394
51395
51396
51397# Setup smart javac (after cores and memory have been setup)
51398
51399
51400# Check whether --with-sjavac-server-java was given.
51401if test "${with_sjavac_server_java+set}" = set; then :
51402  withval=$with_sjavac_server_java;
51403fi
51404
51405
51406  if test "x$with_sjavac_server_java" != x; then
51407    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51408    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51409    if test "x$FOUND_VERSION" = x; then
51410      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51411    fi
51412  else
51413    SJAVAC_SERVER_JAVA="$JAVA"
51414  fi
51415
51416
51417  if test "$MEMORY_SIZE" -gt "3000"; then
51418
51419  $ECHO "Check if jvm arg is ok: -d64" >&5
51420  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51421  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51422  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51423  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51424  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51425    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51426    JVM_ARG_OK=true
51427  else
51428    $ECHO "Arg failed:" >&5
51429    $ECHO "$OUTPUT" >&5
51430    JVM_ARG_OK=false
51431  fi
51432
51433    if test "$JVM_ARG_OK" = true; then
51434      JVM_64BIT=true
51435      JVM_ARG_OK=false
51436    fi
51437  fi
51438
51439  MX_VALUE=`expr $MEMORY_SIZE / 2`
51440  if test "$JVM_64BIT" = true; then
51441    # Set ms lower than mx since more than one instance of the server might
51442    # get launched at the same time before they figure out which instance won.
51443    MS_VALUE=512
51444    if test "$MX_VALUE" -gt "2048"; then
51445      MX_VALUE=2048
51446    fi
51447  else
51448    MS_VALUE=256
51449    if test "$MX_VALUE" -gt "1500"; then
51450      MX_VALUE=1500
51451    fi
51452  fi
51453  if test "$MX_VALUE" -lt "512"; then
51454    MX_VALUE=512
51455  fi
51456
51457  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51458  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51459  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51460  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51461  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51462  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51463    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51464    JVM_ARG_OK=true
51465  else
51466    $ECHO "Arg failed:" >&5
51467    $ECHO "$OUTPUT" >&5
51468    JVM_ARG_OK=false
51469  fi
51470
51471
51472
51473  # Check whether --enable-sjavac was given.
51474if test "${enable_sjavac+set}" = set; then :
51475  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51476else
51477  ENABLE_SJAVAC='no'
51478fi
51479
51480  if test "x$JVM_ARG_OK" = "xfalse"; then
51481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51482$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51483    ENABLE_SJAVAC=no;
51484  fi
51485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51486$as_echo_n "checking whether to use sjavac... " >&6; }
51487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51488$as_echo "$ENABLE_SJAVAC" >&6; }
51489
51490
51491
51492# Can the C/C++ compiler use precompiled headers?
51493
51494
51495  ###############################################################################
51496  #
51497  # Can the C/C++ compiler use precompiled headers?
51498  #
51499  # Check whether --enable-precompiled-headers was given.
51500if test "${enable_precompiled_headers+set}" = set; then :
51501  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51502else
51503  ENABLE_PRECOMPH=yes
51504fi
51505
51506
51507  USE_PRECOMPILED_HEADER=1
51508  if test "x$ENABLE_PRECOMPH" = xno; then
51509    USE_PRECOMPILED_HEADER=0
51510  fi
51511
51512  if test "x$ENABLE_PRECOMPH" = xyes; then
51513    # Check that the compiler actually supports precomp headers.
51514    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51516$as_echo_n "checking that precompiled headers work... " >&6; }
51517      echo "int alfa();" > conftest.h
51518      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51519      if test ! -f conftest.hpp.gch; then
51520        USE_PRECOMPILED_HEADER=0
51521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51522$as_echo "no" >&6; }
51523      else
51524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51525$as_echo "yes" >&6; }
51526      fi
51527      rm -f conftest.h conftest.hpp.gch
51528    fi
51529  fi
51530
51531
51532
51533
51534# Setup use of ccache, if available
51535
51536  # Check whether --enable-ccache was given.
51537if test "${enable_ccache+set}" = set; then :
51538  enableval=$enable_ccache;
51539fi
51540
51541
51542  CCACHE=
51543  CCACHE_STATUS=
51544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51545$as_echo_n "checking is ccache enabled... " >&6; }
51546  if test "x$enable_ccache" = xyes; then
51547    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
51548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51549$as_echo "yes" >&6; }
51550      OLD_PATH="$PATH"
51551      if test "x$TOOLCHAIN_PATH" != x; then
51552        PATH=$TOOLCHAIN_PATH:$PATH
51553      fi
51554
51555
51556
51557  # Publish this variable in the help.
51558
51559
51560  if test "x$CCACHE" = x; then
51561    # The variable is not set by user, try to locate tool using the code snippet
51562    for ac_prog in ccache
51563do
51564  # Extract the first word of "$ac_prog", so it can be a program name with args.
51565set dummy $ac_prog; ac_word=$2
51566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51567$as_echo_n "checking for $ac_word... " >&6; }
51568if ${ac_cv_path_CCACHE+:} false; then :
51569  $as_echo_n "(cached) " >&6
51570else
51571  case $CCACHE in
51572  [\\/]* | ?:[\\/]*)
51573  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51574  ;;
51575  *)
51576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51577for as_dir in $PATH
51578do
51579  IFS=$as_save_IFS
51580  test -z "$as_dir" && as_dir=.
51581    for ac_exec_ext in '' $ac_executable_extensions; do
51582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51583    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51585    break 2
51586  fi
51587done
51588  done
51589IFS=$as_save_IFS
51590
51591  ;;
51592esac
51593fi
51594CCACHE=$ac_cv_path_CCACHE
51595if test -n "$CCACHE"; then
51596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51597$as_echo "$CCACHE" >&6; }
51598else
51599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51600$as_echo "no" >&6; }
51601fi
51602
51603
51604  test -n "$CCACHE" && break
51605done
51606
51607  else
51608    # The variable is set, but is it from the command line or the environment?
51609
51610    # Try to remove the string !CCACHE! from our list.
51611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51613      # If it failed, the variable was not from the command line. Ignore it,
51614      # but warn the user (except for BASH, which is always set by the calling BASH).
51615      if test "xCCACHE" != xBASH; then
51616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51617$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51618      fi
51619      # Try to locate tool using the code snippet
51620      for ac_prog in ccache
51621do
51622  # Extract the first word of "$ac_prog", so it can be a program name with args.
51623set dummy $ac_prog; ac_word=$2
51624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51625$as_echo_n "checking for $ac_word... " >&6; }
51626if ${ac_cv_path_CCACHE+:} false; then :
51627  $as_echo_n "(cached) " >&6
51628else
51629  case $CCACHE in
51630  [\\/]* | ?:[\\/]*)
51631  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51632  ;;
51633  *)
51634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51635for as_dir in $PATH
51636do
51637  IFS=$as_save_IFS
51638  test -z "$as_dir" && as_dir=.
51639    for ac_exec_ext in '' $ac_executable_extensions; do
51640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51641    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51643    break 2
51644  fi
51645done
51646  done
51647IFS=$as_save_IFS
51648
51649  ;;
51650esac
51651fi
51652CCACHE=$ac_cv_path_CCACHE
51653if test -n "$CCACHE"; then
51654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51655$as_echo "$CCACHE" >&6; }
51656else
51657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51658$as_echo "no" >&6; }
51659fi
51660
51661
51662  test -n "$CCACHE" && break
51663done
51664
51665    else
51666      # If it succeeded, then it was overridden by the user. We will use it
51667      # for the tool.
51668
51669      # First remove it from the list of overridden variables, so we can test
51670      # for unknown variables in the end.
51671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51672
51673      # Check if the provided tool contains a complete path.
51674      tool_specified="$CCACHE"
51675      tool_basename="${tool_specified##*/}"
51676      if test "x$tool_basename" = "x$tool_specified"; then
51677        # A command without a complete path is provided, search $PATH.
51678        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51679$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51680        # Extract the first word of "$tool_basename", so it can be a program name with args.
51681set dummy $tool_basename; ac_word=$2
51682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51683$as_echo_n "checking for $ac_word... " >&6; }
51684if ${ac_cv_path_CCACHE+:} false; then :
51685  $as_echo_n "(cached) " >&6
51686else
51687  case $CCACHE in
51688  [\\/]* | ?:[\\/]*)
51689  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51690  ;;
51691  *)
51692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51693for as_dir in $PATH
51694do
51695  IFS=$as_save_IFS
51696  test -z "$as_dir" && as_dir=.
51697    for ac_exec_ext in '' $ac_executable_extensions; do
51698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51699    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51701    break 2
51702  fi
51703done
51704  done
51705IFS=$as_save_IFS
51706
51707  ;;
51708esac
51709fi
51710CCACHE=$ac_cv_path_CCACHE
51711if test -n "$CCACHE"; then
51712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51713$as_echo "$CCACHE" >&6; }
51714else
51715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51716$as_echo "no" >&6; }
51717fi
51718
51719
51720        if test "x$CCACHE" = x; then
51721          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51722        fi
51723      else
51724        # Otherwise we believe it is a complete path. Use it as it is.
51725        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51726$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51728$as_echo_n "checking for CCACHE... " >&6; }
51729        if test ! -x "$tool_specified"; then
51730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51731$as_echo "not found" >&6; }
51732          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51733        fi
51734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51735$as_echo "$tool_specified" >&6; }
51736      fi
51737    fi
51738  fi
51739
51740
51741
51742  if test "x$CCACHE" = x; then
51743    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51744  fi
51745
51746
51747      PATH="$OLD_PATH"
51748      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
51749      CCACHE_STATUS="Active ($CCACHE_VERSION)"
51750    else
51751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51752$as_echo "no" >&6; }
51753      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
51754$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
51755    fi
51756  elif test "x$enable_ccache" = xno; then
51757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51758$as_echo "no, explicitly disabled" >&6; }
51759    CCACHE_STATUS="Disabled"
51760  elif test "x$enable_ccache" = x; then
51761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51762$as_echo "no" >&6; }
51763  else
51764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51765$as_echo "unknown" >&6; }
51766    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51767  fi
51768
51769
51770
51771# Check whether --with-ccache-dir was given.
51772if test "${with_ccache_dir+set}" = set; then :
51773  withval=$with_ccache_dir;
51774fi
51775
51776
51777  if test "x$with_ccache_dir" != x; then
51778    # When using a non home ccache directory, assume the use is to share ccache files
51779    # with other users. Thus change the umask.
51780    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51781    if test "x$CCACHE" = x; then
51782      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51783$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51784    fi
51785  fi
51786
51787  if test "x$CCACHE" != x; then
51788
51789  if test "x$CCACHE" != x; then
51790    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
51791      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
51792          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
51793      if test "x$HAS_BAD_CCACHE" != "x"; then
51794        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
51795      fi
51796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51797$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51798      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
51799      PUSHED_FLAGS="$CXXFLAGS"
51800      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
51801      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51802/* end confdefs.h.  */
51803
51804int
51805main ()
51806{
51807
51808  ;
51809  return 0;
51810}
51811_ACEOF
51812if ac_fn_cxx_try_compile "$LINENO"; then :
51813  CC_KNOWS_CCACHE_TRICK=yes
51814else
51815  CC_KNOWS_CCACHE_TRICK=no
51816fi
51817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51818      CXXFLAGS="$PUSHED_FLAGS"
51819      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51821$as_echo "yes" >&6; }
51822        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
51823
51824        CCACHE_SLOPPINESS=pch_defines,time_macros
51825      else
51826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51827$as_echo "no" >&6; }
51828        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
51829      fi
51830    fi
51831
51832    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
51833        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
51834
51835    if test "x$SET_CCACHE_DIR" != x; then
51836      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51837      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51838    fi
51839  fi
51840
51841  fi
51842
51843
51844###############################################################################
51845#
51846# And now the finish...
51847#
51848###############################################################################
51849
51850# Check for some common pitfalls
51851
51852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51853    file_to_test="$SRC_ROOT/LICENSE"
51854    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51855      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
51856    fi
51857  fi
51858
51859
51860  # Did user specify any unknown variables?
51861
51862  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51863    # Replace the separating ! with spaces before presenting for end user.
51864    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51865    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51866$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51867  fi
51868
51869
51870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51871$as_echo_n "checking if build directory is on local disk... " >&6; }
51872
51873  # df -l lists only local disks; if the given directory is not found then
51874  # a non-zero exit code is given
51875  if test "x$DF" = x; then
51876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51877      # msys does not have df; use Windows "net use" instead.
51878      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51879      if test "x$IS_NETWORK_DISK" = x; then
51880        OUTPUT_DIR_IS_LOCAL="yes"
51881      else
51882        OUTPUT_DIR_IS_LOCAL="no"
51883      fi
51884    else
51885      # No df here, say it's local
51886      OUTPUT_DIR_IS_LOCAL="yes"
51887    fi
51888  else
51889    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51890      OUTPUT_DIR_IS_LOCAL="yes"
51891    else
51892      OUTPUT_DIR_IS_LOCAL="no"
51893    fi
51894  fi
51895
51896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51897$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51898
51899
51900
51901  # Check if the user has any old-style ALT_ variables set.
51902  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51903
51904  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51905  # Since we can't properly handle the dependencies for this, warn the user about the situation
51906  if test -e $OUTPUT_ROOT/spec.gmk; then
51907    IS_RECONFIGURE=yes
51908  else
51909    IS_RECONFIGURE=no
51910  fi
51911
51912
51913# At the end, call the custom hook. (Dummy macro if no custom sources available)
51914
51915
51916# We're messing a bit with internal autoconf variables to put the config.status
51917# in the output directory instead of the current directory.
51918CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
51919
51920# Create the actual output files. Now the main work of configure is done.
51921cat >confcache <<\_ACEOF
51922# This file is a shell script that caches the results of configure
51923# tests run on this system so they can be shared between configure
51924# scripts and configure runs, see configure's option --config-cache.
51925# It is not useful on other systems.  If it contains results you don't
51926# want to keep, you may remove or edit it.
51927#
51928# config.status only pays attention to the cache file if you give it
51929# the --recheck option to rerun configure.
51930#
51931# `ac_cv_env_foo' variables (set or unset) will be overridden when
51932# loading this file, other *unset* `ac_cv_foo' will be assigned the
51933# following values.
51934
51935_ACEOF
51936
51937# The following way of writing the cache mishandles newlines in values,
51938# but we know of no workaround that is simple, portable, and efficient.
51939# So, we kill variables containing newlines.
51940# Ultrix sh set writes to stderr and can't be redirected directly,
51941# and sets the high bit in the cache file unless we assign to the vars.
51942(
51943  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51944    eval ac_val=\$$ac_var
51945    case $ac_val in #(
51946    *${as_nl}*)
51947      case $ac_var in #(
51948      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51949$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51950      esac
51951      case $ac_var in #(
51952      _ | IFS | as_nl) ;; #(
51953      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51954      *) { eval $ac_var=; unset $ac_var;} ;;
51955      esac ;;
51956    esac
51957  done
51958
51959  (set) 2>&1 |
51960    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51961    *${as_nl}ac_space=\ *)
51962      # `set' does not quote correctly, so add quotes: double-quote
51963      # substitution turns \\\\ into \\, and sed turns \\ into \.
51964      sed -n \
51965	"s/'/'\\\\''/g;
51966	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51967      ;; #(
51968    *)
51969      # `set' quotes correctly as required by POSIX, so do not add quotes.
51970      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51971      ;;
51972    esac |
51973    sort
51974) |
51975  sed '
51976     /^ac_cv_env_/b end
51977     t clear
51978     :clear
51979     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51980     t end
51981     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51982     :end' >>confcache
51983if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51984  if test -w "$cache_file"; then
51985    if test "x$cache_file" != "x/dev/null"; then
51986      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51987$as_echo "$as_me: updating cache $cache_file" >&6;}
51988      if test ! -f "$cache_file" || test -h "$cache_file"; then
51989	cat confcache >"$cache_file"
51990      else
51991        case $cache_file in #(
51992        */* | ?:*)
51993	  mv -f confcache "$cache_file"$$ &&
51994	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51995        *)
51996	  mv -f confcache "$cache_file" ;;
51997	esac
51998      fi
51999    fi
52000  else
52001    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
52002$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
52003  fi
52004fi
52005rm -f confcache
52006
52007test "x$prefix" = xNONE && prefix=$ac_default_prefix
52008# Let make expand exec_prefix.
52009test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
52010
52011# Transform confdefs.h into DEFS.
52012# Protect against shell expansion while executing Makefile rules.
52013# Protect against Makefile macro expansion.
52014#
52015# If the first sed substitution is executed (which looks for macros that
52016# take arguments), then branch to the quote section.  Otherwise,
52017# look for a macro that doesn't take arguments.
52018ac_script='
52019:mline
52020/\\$/{
52021 N
52022 s,\\\n,,
52023 b mline
52024}
52025t clear
52026:clear
52027s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
52028t quote
52029s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
52030t quote
52031b any
52032:quote
52033s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
52034s/\[/\\&/g
52035s/\]/\\&/g
52036s/\$/$$/g
52037H
52038:any
52039${
52040	g
52041	s/^\n//
52042	s/\n/ /g
52043	p
52044}
52045'
52046DEFS=`sed -n "$ac_script" confdefs.h`
52047
52048
52049ac_libobjs=
52050ac_ltlibobjs=
52051U=
52052for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
52053  # 1. Remove the extension, and $U if already installed.
52054  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
52055  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
52056  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
52057  #    will be set to the directory where LIBOBJS objects are built.
52058  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
52059  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
52060done
52061LIBOBJS=$ac_libobjs
52062
52063LTLIBOBJS=$ac_ltlibobjs
52064
52065
52066
52067: "${CONFIG_STATUS=./config.status}"
52068ac_write_fail=0
52069ac_clean_files_save=$ac_clean_files
52070ac_clean_files="$ac_clean_files $CONFIG_STATUS"
52071{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
52072$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
52073as_write_fail=0
52074cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
52075#! $SHELL
52076# Generated by $as_me.
52077# Run this file to recreate the current configuration.
52078# Compiler output produced by configure, useful for debugging
52079# configure, is in config.log if it exists.
52080
52081debug=false
52082ac_cs_recheck=false
52083ac_cs_silent=false
52084
52085SHELL=\${CONFIG_SHELL-$SHELL}
52086export SHELL
52087_ASEOF
52088cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
52089## -------------------- ##
52090## M4sh Initialization. ##
52091## -------------------- ##
52092
52093# Be more Bourne compatible
52094DUALCASE=1; export DUALCASE # for MKS sh
52095if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
52096  emulate sh
52097  NULLCMD=:
52098  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
52099  # is contrary to our usage.  Disable this feature.
52100  alias -g '${1+"$@"}'='"$@"'
52101  setopt NO_GLOB_SUBST
52102else
52103  case `(set -o) 2>/dev/null` in #(
52104  *posix*) :
52105    set -o posix ;; #(
52106  *) :
52107     ;;
52108esac
52109fi
52110
52111
52112as_nl='
52113'
52114export as_nl
52115# Printing a long string crashes Solaris 7 /usr/bin/printf.
52116as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52117as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52118as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52119# Prefer a ksh shell builtin over an external printf program on Solaris,
52120# but without wasting forks for bash or zsh.
52121if test -z "$BASH_VERSION$ZSH_VERSION" \
52122    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52123  as_echo='print -r --'
52124  as_echo_n='print -rn --'
52125elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52126  as_echo='printf %s\n'
52127  as_echo_n='printf %s'
52128else
52129  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52130    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52131    as_echo_n='/usr/ucb/echo -n'
52132  else
52133    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52134    as_echo_n_body='eval
52135      arg=$1;
52136      case $arg in #(
52137      *"$as_nl"*)
52138	expr "X$arg" : "X\\(.*\\)$as_nl";
52139	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52140      esac;
52141      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52142    '
52143    export as_echo_n_body
52144    as_echo_n='sh -c $as_echo_n_body as_echo'
52145  fi
52146  export as_echo_body
52147  as_echo='sh -c $as_echo_body as_echo'
52148fi
52149
52150# The user is always right.
52151if test "${PATH_SEPARATOR+set}" != set; then
52152  PATH_SEPARATOR=:
52153  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52154    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52155      PATH_SEPARATOR=';'
52156  }
52157fi
52158
52159
52160# IFS
52161# We need space, tab and new line, in precisely that order.  Quoting is
52162# there to prevent editors from complaining about space-tab.
52163# (If _AS_PATH_WALK were called with IFS unset, it would disable word
52164# splitting by setting IFS to empty value.)
52165IFS=" ""	$as_nl"
52166
52167# Find who we are.  Look in the path if we contain no directory separator.
52168as_myself=
52169case $0 in #((
52170  *[\\/]* ) as_myself=$0 ;;
52171  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52172for as_dir in $PATH
52173do
52174  IFS=$as_save_IFS
52175  test -z "$as_dir" && as_dir=.
52176    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52177  done
52178IFS=$as_save_IFS
52179
52180     ;;
52181esac
52182# We did not find ourselves, most probably we were run as `sh COMMAND'
52183# in which case we are not to be found in the path.
52184if test "x$as_myself" = x; then
52185  as_myself=$0
52186fi
52187if test ! -f "$as_myself"; then
52188  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52189  exit 1
52190fi
52191
52192# Unset variables that we do not need and which cause bugs (e.g. in
52193# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52194# suppresses any "Segmentation fault" message there.  '((' could
52195# trigger a bug in pdksh 5.2.14.
52196for as_var in BASH_ENV ENV MAIL MAILPATH
52197do eval test x\${$as_var+set} = xset \
52198  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52199done
52200PS1='$ '
52201PS2='> '
52202PS4='+ '
52203
52204# NLS nuisances.
52205LC_ALL=C
52206export LC_ALL
52207LANGUAGE=C
52208export LANGUAGE
52209
52210# CDPATH.
52211(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52212
52213
52214# as_fn_error STATUS ERROR [LINENO LOG_FD]
52215# ----------------------------------------
52216# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52217# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52218# script with STATUS, using 1 if that was 0.
52219as_fn_error ()
52220{
52221  as_status=$1; test $as_status -eq 0 && as_status=1
52222  if test "$4"; then
52223    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52224    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52225  fi
52226  $as_echo "$as_me: error: $2" >&2
52227  as_fn_exit $as_status
52228} # as_fn_error
52229
52230
52231# as_fn_set_status STATUS
52232# -----------------------
52233# Set $? to STATUS, without forking.
52234as_fn_set_status ()
52235{
52236  return $1
52237} # as_fn_set_status
52238
52239# as_fn_exit STATUS
52240# -----------------
52241# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52242as_fn_exit ()
52243{
52244  set +e
52245  as_fn_set_status $1
52246  exit $1
52247} # as_fn_exit
52248
52249# as_fn_unset VAR
52250# ---------------
52251# Portably unset VAR.
52252as_fn_unset ()
52253{
52254  { eval $1=; unset $1;}
52255}
52256as_unset=as_fn_unset
52257# as_fn_append VAR VALUE
52258# ----------------------
52259# Append the text in VALUE to the end of the definition contained in VAR. Take
52260# advantage of any shell optimizations that allow amortized linear growth over
52261# repeated appends, instead of the typical quadratic growth present in naive
52262# implementations.
52263if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52264  eval 'as_fn_append ()
52265  {
52266    eval $1+=\$2
52267  }'
52268else
52269  as_fn_append ()
52270  {
52271    eval $1=\$$1\$2
52272  }
52273fi # as_fn_append
52274
52275# as_fn_arith ARG...
52276# ------------------
52277# Perform arithmetic evaluation on the ARGs, and store the result in the
52278# global $as_val. Take advantage of shells that can avoid forks. The arguments
52279# must be portable across $(()) and expr.
52280if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52281  eval 'as_fn_arith ()
52282  {
52283    as_val=$(( $* ))
52284  }'
52285else
52286  as_fn_arith ()
52287  {
52288    as_val=`expr "$@" || test $? -eq 1`
52289  }
52290fi # as_fn_arith
52291
52292
52293if expr a : '\(a\)' >/dev/null 2>&1 &&
52294   test "X`expr 00001 : '.*\(...\)'`" = X001; then
52295  as_expr=expr
52296else
52297  as_expr=false
52298fi
52299
52300if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52301  as_basename=basename
52302else
52303  as_basename=false
52304fi
52305
52306if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52307  as_dirname=dirname
52308else
52309  as_dirname=false
52310fi
52311
52312as_me=`$as_basename -- "$0" ||
52313$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52314	 X"$0" : 'X\(//\)$' \| \
52315	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52316$as_echo X/"$0" |
52317    sed '/^.*\/\([^/][^/]*\)\/*$/{
52318	    s//\1/
52319	    q
52320	  }
52321	  /^X\/\(\/\/\)$/{
52322	    s//\1/
52323	    q
52324	  }
52325	  /^X\/\(\/\).*/{
52326	    s//\1/
52327	    q
52328	  }
52329	  s/.*/./; q'`
52330
52331# Avoid depending upon Character Ranges.
52332as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52333as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52334as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52335as_cr_digits='0123456789'
52336as_cr_alnum=$as_cr_Letters$as_cr_digits
52337
52338ECHO_C= ECHO_N= ECHO_T=
52339case `echo -n x` in #(((((
52340-n*)
52341  case `echo 'xy\c'` in
52342  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
52343  xy)  ECHO_C='\c';;
52344  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52345       ECHO_T='	';;
52346  esac;;
52347*)
52348  ECHO_N='-n';;
52349esac
52350
52351rm -f conf$$ conf$$.exe conf$$.file
52352if test -d conf$$.dir; then
52353  rm -f conf$$.dir/conf$$.file
52354else
52355  rm -f conf$$.dir
52356  mkdir conf$$.dir 2>/dev/null
52357fi
52358if (echo >conf$$.file) 2>/dev/null; then
52359  if ln -s conf$$.file conf$$ 2>/dev/null; then
52360    as_ln_s='ln -s'
52361    # ... but there are two gotchas:
52362    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52363    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52364    # In both cases, we have to default to `cp -pR'.
52365    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52366      as_ln_s='cp -pR'
52367  elif ln conf$$.file conf$$ 2>/dev/null; then
52368    as_ln_s=ln
52369  else
52370    as_ln_s='cp -pR'
52371  fi
52372else
52373  as_ln_s='cp -pR'
52374fi
52375rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52376rmdir conf$$.dir 2>/dev/null
52377
52378
52379# as_fn_mkdir_p
52380# -------------
52381# Create "$as_dir" as a directory, including parents if necessary.
52382as_fn_mkdir_p ()
52383{
52384
52385  case $as_dir in #(
52386  -*) as_dir=./$as_dir;;
52387  esac
52388  test -d "$as_dir" || eval $as_mkdir_p || {
52389    as_dirs=
52390    while :; do
52391      case $as_dir in #(
52392      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52393      *) as_qdir=$as_dir;;
52394      esac
52395      as_dirs="'$as_qdir' $as_dirs"
52396      as_dir=`$as_dirname -- "$as_dir" ||
52397$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52398	 X"$as_dir" : 'X\(//\)[^/]' \| \
52399	 X"$as_dir" : 'X\(//\)$' \| \
52400	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52401$as_echo X"$as_dir" |
52402    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52403	    s//\1/
52404	    q
52405	  }
52406	  /^X\(\/\/\)[^/].*/{
52407	    s//\1/
52408	    q
52409	  }
52410	  /^X\(\/\/\)$/{
52411	    s//\1/
52412	    q
52413	  }
52414	  /^X\(\/\).*/{
52415	    s//\1/
52416	    q
52417	  }
52418	  s/.*/./; q'`
52419      test -d "$as_dir" && break
52420    done
52421    test -z "$as_dirs" || eval "mkdir $as_dirs"
52422  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52423
52424
52425} # as_fn_mkdir_p
52426if mkdir -p . 2>/dev/null; then
52427  as_mkdir_p='mkdir -p "$as_dir"'
52428else
52429  test -d ./-p && rmdir ./-p
52430  as_mkdir_p=false
52431fi
52432
52433
52434# as_fn_executable_p FILE
52435# -----------------------
52436# Test if FILE is an executable regular file.
52437as_fn_executable_p ()
52438{
52439  test -f "$1" && test -x "$1"
52440} # as_fn_executable_p
52441as_test_x='test -x'
52442as_executable_p=as_fn_executable_p
52443
52444# Sed expression to map a string onto a valid CPP name.
52445as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52446
52447# Sed expression to map a string onto a valid variable name.
52448as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52449
52450
52451exec 6>&1
52452## ----------------------------------- ##
52453## Main body of $CONFIG_STATUS script. ##
52454## ----------------------------------- ##
52455_ASEOF
52456test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52457
52458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52459# Save the log message, to keep $0 and so on meaningful, and to
52460# report actual input values of CONFIG_FILES etc. instead of their
52461# values after options handling.
52462ac_log="
52463This file was extended by OpenJDK $as_me jdk9, which was
52464generated by GNU Autoconf 2.69.  Invocation command line was
52465
52466  CONFIG_FILES    = $CONFIG_FILES
52467  CONFIG_HEADERS  = $CONFIG_HEADERS
52468  CONFIG_LINKS    = $CONFIG_LINKS
52469  CONFIG_COMMANDS = $CONFIG_COMMANDS
52470  $ $0 $@
52471
52472on `(hostname || uname -n) 2>/dev/null | sed 1q`
52473"
52474
52475_ACEOF
52476
52477case $ac_config_files in *"
52478"*) set x $ac_config_files; shift; ac_config_files=$*;;
52479esac
52480
52481
52482
52483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52484# Files that config.status was made for.
52485config_files="$ac_config_files"
52486
52487_ACEOF
52488
52489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52490ac_cs_usage="\
52491\`$as_me' instantiates files and other configuration actions
52492from templates according to the current configuration.  Unless the files
52493and actions are specified as TAGs, all are instantiated by default.
52494
52495Usage: $0 [OPTION]... [TAG]...
52496
52497  -h, --help       print this help, then exit
52498  -V, --version    print version number and configuration settings, then exit
52499      --config     print configuration, then exit
52500  -q, --quiet, --silent
52501                   do not print progress messages
52502  -d, --debug      don't remove temporary files
52503      --recheck    update $as_me by reconfiguring in the same conditions
52504      --file=FILE[:TEMPLATE]
52505                   instantiate the configuration file FILE
52506
52507Configuration files:
52508$config_files
52509
52510Report bugs to <build-dev@openjdk.java.net>.
52511OpenJDK home page: <http://openjdk.java.net>."
52512
52513_ACEOF
52514cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52515ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52516ac_cs_version="\\
52517OpenJDK config.status jdk9
52518configured by $0, generated by GNU Autoconf 2.69,
52519  with options \\"\$ac_cs_config\\"
52520
52521Copyright (C) 2012 Free Software Foundation, Inc.
52522This config.status script is free software; the Free Software Foundation
52523gives unlimited permission to copy, distribute and modify it."
52524
52525ac_pwd='$ac_pwd'
52526srcdir='$srcdir'
52527AWK='$AWK'
52528test -n "\$AWK" || AWK=awk
52529_ACEOF
52530
52531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52532# The default lists apply if the user does not specify any file.
52533ac_need_defaults=:
52534while test $# != 0
52535do
52536  case $1 in
52537  --*=?*)
52538    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52539    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52540    ac_shift=:
52541    ;;
52542  --*=)
52543    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52544    ac_optarg=
52545    ac_shift=:
52546    ;;
52547  *)
52548    ac_option=$1
52549    ac_optarg=$2
52550    ac_shift=shift
52551    ;;
52552  esac
52553
52554  case $ac_option in
52555  # Handling of the options.
52556  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52557    ac_cs_recheck=: ;;
52558  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52559    $as_echo "$ac_cs_version"; exit ;;
52560  --config | --confi | --conf | --con | --co | --c )
52561    $as_echo "$ac_cs_config"; exit ;;
52562  --debug | --debu | --deb | --de | --d | -d )
52563    debug=: ;;
52564  --file | --fil | --fi | --f )
52565    $ac_shift
52566    case $ac_optarg in
52567    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52568    '') as_fn_error $? "missing file argument" ;;
52569    esac
52570    as_fn_append CONFIG_FILES " '$ac_optarg'"
52571    ac_need_defaults=false;;
52572  --he | --h |  --help | --hel | -h )
52573    $as_echo "$ac_cs_usage"; exit ;;
52574  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52575  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52576    ac_cs_silent=: ;;
52577
52578  # This is an error.
52579  -*) as_fn_error $? "unrecognized option: \`$1'
52580Try \`$0 --help' for more information." ;;
52581
52582  *) as_fn_append ac_config_targets " $1"
52583     ac_need_defaults=false ;;
52584
52585  esac
52586  shift
52587done
52588
52589ac_configure_extra_args=
52590
52591if $ac_cs_silent; then
52592  exec 6>/dev/null
52593  ac_configure_extra_args="$ac_configure_extra_args --silent"
52594fi
52595
52596_ACEOF
52597cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52598if \$ac_cs_recheck; then
52599  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52600  shift
52601  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52602  CONFIG_SHELL='$SHELL'
52603  export CONFIG_SHELL
52604  exec "\$@"
52605fi
52606
52607_ACEOF
52608cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52609exec 5>>config.log
52610{
52611  echo
52612  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52613## Running $as_me. ##
52614_ASBOX
52615  $as_echo "$ac_log"
52616} >&5
52617
52618_ACEOF
52619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52620_ACEOF
52621
52622cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52623
52624# Handling of arguments.
52625for ac_config_target in $ac_config_targets
52626do
52627  case $ac_config_target in
52628    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52629    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52630    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52631    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52632    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52633
52634  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52635  esac
52636done
52637
52638
52639# If the user did not use the arguments to specify the items to instantiate,
52640# then the envvar interface is used.  Set only those that are not.
52641# We use the long form for the default assignment because of an extremely
52642# bizarre bug on SunOS 4.1.3.
52643if $ac_need_defaults; then
52644  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52645fi
52646
52647# Have a temporary directory for convenience.  Make it in the build tree
52648# simply because there is no reason against having it here, and in addition,
52649# creating and moving files from /tmp can sometimes cause problems.
52650# Hook for its removal unless debugging.
52651# Note that there is a small window in which the directory will not be cleaned:
52652# after its creation but before its name has been assigned to `$tmp'.
52653$debug ||
52654{
52655  tmp= ac_tmp=
52656  trap 'exit_status=$?
52657  : "${ac_tmp:=$tmp}"
52658  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52659' 0
52660  trap 'as_fn_exit 1' 1 2 13 15
52661}
52662# Create a (secure) tmp directory for tmp files.
52663
52664{
52665  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52666  test -d "$tmp"
52667}  ||
52668{
52669  tmp=./conf$$-$RANDOM
52670  (umask 077 && mkdir "$tmp")
52671} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52672ac_tmp=$tmp
52673
52674# Set up the scripts for CONFIG_FILES section.
52675# No need to generate them if there are no CONFIG_FILES.
52676# This happens for instance with `./config.status config.h'.
52677if test -n "$CONFIG_FILES"; then
52678
52679
52680ac_cr=`echo X | tr X '\015'`
52681# On cygwin, bash can eat \r inside `` if the user requested igncr.
52682# But we know of no other shell where ac_cr would be empty at this
52683# point, so we can use a bashism as a fallback.
52684if test "x$ac_cr" = x; then
52685  eval ac_cr=\$\'\\r\'
52686fi
52687ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52688if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52689  ac_cs_awk_cr='\\r'
52690else
52691  ac_cs_awk_cr=$ac_cr
52692fi
52693
52694echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52695_ACEOF
52696
52697
52698{
52699  echo "cat >conf$$subs.awk <<_ACEOF" &&
52700  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52701  echo "_ACEOF"
52702} >conf$$subs.sh ||
52703  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52704ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52705ac_delim='%!_!# '
52706for ac_last_try in false false false false false :; do
52707  . ./conf$$subs.sh ||
52708    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52709
52710  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52711  if test $ac_delim_n = $ac_delim_num; then
52712    break
52713  elif $ac_last_try; then
52714    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52715  else
52716    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52717  fi
52718done
52719rm -f conf$$subs.sh
52720
52721cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52722cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52723_ACEOF
52724sed -n '
52725h
52726s/^/S["/; s/!.*/"]=/
52727p
52728g
52729s/^[^!]*!//
52730:repl
52731t repl
52732s/'"$ac_delim"'$//
52733t delim
52734:nl
52735h
52736s/\(.\{148\}\)..*/\1/
52737t more1
52738s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52739p
52740n
52741b repl
52742:more1
52743s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52744p
52745g
52746s/.\{148\}//
52747t nl
52748:delim
52749h
52750s/\(.\{148\}\)..*/\1/
52751t more2
52752s/["\\]/\\&/g; s/^/"/; s/$/"/
52753p
52754b
52755:more2
52756s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52757p
52758g
52759s/.\{148\}//
52760t delim
52761' <conf$$subs.awk | sed '
52762/^[^""]/{
52763  N
52764  s/\n//
52765}
52766' >>$CONFIG_STATUS || ac_write_fail=1
52767rm -f conf$$subs.awk
52768cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52769_ACAWK
52770cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52771  for (key in S) S_is_set[key] = 1
52772  FS = ""
52773
52774}
52775{
52776  line = $ 0
52777  nfields = split(line, field, "@")
52778  substed = 0
52779  len = length(field[1])
52780  for (i = 2; i < nfields; i++) {
52781    key = field[i]
52782    keylen = length(key)
52783    if (S_is_set[key]) {
52784      value = S[key]
52785      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52786      len += length(value) + length(field[++i])
52787      substed = 1
52788    } else
52789      len += 1 + keylen
52790  }
52791
52792  print line
52793}
52794
52795_ACAWK
52796_ACEOF
52797cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52798if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52799  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52800else
52801  cat
52802fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52803  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52804_ACEOF
52805
52806# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52807# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52808# trailing colons and then remove the whole line if VPATH becomes empty
52809# (actually we leave an empty line to preserve line numbers).
52810if test "x$srcdir" = x.; then
52811  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52812h
52813s///
52814s/^/:/
52815s/[	 ]*$/:/
52816s/:\$(srcdir):/:/g
52817s/:\${srcdir}:/:/g
52818s/:@srcdir@:/:/g
52819s/^:*//
52820s/:*$//
52821x
52822s/\(=[	 ]*\).*/\1/
52823G
52824s/\n//
52825s/^[^=]*=[	 ]*$//
52826}'
52827fi
52828
52829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52830fi # test -n "$CONFIG_FILES"
52831
52832
52833eval set X "  :F $CONFIG_FILES      "
52834shift
52835for ac_tag
52836do
52837  case $ac_tag in
52838  :[FHLC]) ac_mode=$ac_tag; continue;;
52839  esac
52840  case $ac_mode$ac_tag in
52841  :[FHL]*:*);;
52842  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52843  :[FH]-) ac_tag=-:-;;
52844  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52845  esac
52846  ac_save_IFS=$IFS
52847  IFS=:
52848  set x $ac_tag
52849  IFS=$ac_save_IFS
52850  shift
52851  ac_file=$1
52852  shift
52853
52854  case $ac_mode in
52855  :L) ac_source=$1;;
52856  :[FH])
52857    ac_file_inputs=
52858    for ac_f
52859    do
52860      case $ac_f in
52861      -) ac_f="$ac_tmp/stdin";;
52862      *) # Look for the file first in the build tree, then in the source tree
52863	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52864	 # because $ac_f cannot contain `:'.
52865	 test -f "$ac_f" ||
52866	   case $ac_f in
52867	   [\\/$]*) false;;
52868	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52869	   esac ||
52870	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52871      esac
52872      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52873      as_fn_append ac_file_inputs " '$ac_f'"
52874    done
52875
52876    # Let's still pretend it is `configure' which instantiates (i.e., don't
52877    # use $as_me), people would be surprised to read:
52878    #    /* config.h.  Generated by config.status.  */
52879    configure_input='Generated from '`
52880	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52881	`' by configure.'
52882    if test x"$ac_file" != x-; then
52883      configure_input="$ac_file.  $configure_input"
52884      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52885$as_echo "$as_me: creating $ac_file" >&6;}
52886    fi
52887    # Neutralize special characters interpreted by sed in replacement strings.
52888    case $configure_input in #(
52889    *\&* | *\|* | *\\* )
52890       ac_sed_conf_input=`$as_echo "$configure_input" |
52891       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52892    *) ac_sed_conf_input=$configure_input;;
52893    esac
52894
52895    case $ac_tag in
52896    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52897      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52898    esac
52899    ;;
52900  esac
52901
52902  ac_dir=`$as_dirname -- "$ac_file" ||
52903$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52904	 X"$ac_file" : 'X\(//\)[^/]' \| \
52905	 X"$ac_file" : 'X\(//\)$' \| \
52906	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52907$as_echo X"$ac_file" |
52908    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52909	    s//\1/
52910	    q
52911	  }
52912	  /^X\(\/\/\)[^/].*/{
52913	    s//\1/
52914	    q
52915	  }
52916	  /^X\(\/\/\)$/{
52917	    s//\1/
52918	    q
52919	  }
52920	  /^X\(\/\).*/{
52921	    s//\1/
52922	    q
52923	  }
52924	  s/.*/./; q'`
52925  as_dir="$ac_dir"; as_fn_mkdir_p
52926  ac_builddir=.
52927
52928case "$ac_dir" in
52929.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52930*)
52931  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52932  # A ".." for each directory in $ac_dir_suffix.
52933  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52934  case $ac_top_builddir_sub in
52935  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52936  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52937  esac ;;
52938esac
52939ac_abs_top_builddir=$ac_pwd
52940ac_abs_builddir=$ac_pwd$ac_dir_suffix
52941# for backward compatibility:
52942ac_top_builddir=$ac_top_build_prefix
52943
52944case $srcdir in
52945  .)  # We are building in place.
52946    ac_srcdir=.
52947    ac_top_srcdir=$ac_top_builddir_sub
52948    ac_abs_top_srcdir=$ac_pwd ;;
52949  [\\/]* | ?:[\\/]* )  # Absolute name.
52950    ac_srcdir=$srcdir$ac_dir_suffix;
52951    ac_top_srcdir=$srcdir
52952    ac_abs_top_srcdir=$srcdir ;;
52953  *) # Relative name.
52954    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52955    ac_top_srcdir=$ac_top_build_prefix$srcdir
52956    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52957esac
52958ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52959
52960
52961  case $ac_mode in
52962  :F)
52963  #
52964  # CONFIG_FILE
52965  #
52966
52967_ACEOF
52968
52969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52970# If the template does not know about datarootdir, expand it.
52971# FIXME: This hack should be removed a few years after 2.60.
52972ac_datarootdir_hack=; ac_datarootdir_seen=
52973ac_sed_dataroot='
52974/datarootdir/ {
52975  p
52976  q
52977}
52978/@datadir@/p
52979/@docdir@/p
52980/@infodir@/p
52981/@localedir@/p
52982/@mandir@/p'
52983case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52984*datarootdir*) ac_datarootdir_seen=yes;;
52985*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52986  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52987$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52988_ACEOF
52989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52990  ac_datarootdir_hack='
52991  s&@datadir@&$datadir&g
52992  s&@docdir@&$docdir&g
52993  s&@infodir@&$infodir&g
52994  s&@localedir@&$localedir&g
52995  s&@mandir@&$mandir&g
52996  s&\\\${datarootdir}&$datarootdir&g' ;;
52997esac
52998_ACEOF
52999
53000# Neutralize VPATH when `$srcdir' = `.'.
53001# Shell code in configure.ac might set extrasub.
53002# FIXME: do we really want to maintain this feature?
53003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53004ac_sed_extra="$ac_vpsub
53005$extrasub
53006_ACEOF
53007cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53008:t
53009/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
53010s|@configure_input@|$ac_sed_conf_input|;t t
53011s&@top_builddir@&$ac_top_builddir_sub&;t t
53012s&@top_build_prefix@&$ac_top_build_prefix&;t t
53013s&@srcdir@&$ac_srcdir&;t t
53014s&@abs_srcdir@&$ac_abs_srcdir&;t t
53015s&@top_srcdir@&$ac_top_srcdir&;t t
53016s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
53017s&@builddir@&$ac_builddir&;t t
53018s&@abs_builddir@&$ac_abs_builddir&;t t
53019s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
53020$ac_datarootdir_hack
53021"
53022eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
53023  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53024
53025test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
53026  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
53027  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
53028      "$ac_tmp/out"`; test -z "$ac_out"; } &&
53029  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53030which seems to be undefined.  Please make sure it is defined" >&5
53031$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53032which seems to be undefined.  Please make sure it is defined" >&2;}
53033
53034  rm -f "$ac_tmp/stdin"
53035  case $ac_file in
53036  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
53037  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
53038  esac \
53039  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53040 ;;
53041
53042
53043
53044  esac
53045
53046done # for ac_tag
53047
53048
53049as_fn_exit 0
53050_ACEOF
53051ac_clean_files=$ac_clean_files_save
53052
53053test $ac_write_fail = 0 ||
53054  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
53055
53056
53057# configure is writing to config.log, and then calls config.status.
53058# config.status does its own redirection, appending to config.log.
53059# Unfortunately, on DOS this fails, as config.log is still kept open
53060# by configure, so config.status won't be able to write to it; its
53061# output is simply discarded.  So we exec the FD to /dev/null,
53062# effectively closing config.log, so it can be properly (re)opened and
53063# appended to by config.status.  When coming back to configure, we
53064# need to make the FD available again.
53065if test "$no_create" != yes; then
53066  ac_cs_success=:
53067  ac_config_status_args=
53068  test "$silent" = yes &&
53069    ac_config_status_args="$ac_config_status_args --quiet"
53070  exec 5>/dev/null
53071  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53072  exec 5>>config.log
53073  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53074  # would make configure fail if this is the last instruction.
53075  $ac_cs_success || as_fn_exit 1
53076fi
53077if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53078  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53079$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53080fi
53081
53082
53083
53084# Try to move the config.log file to the output directory.
53085if test -e ./config.log; then
53086  $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
53087fi
53088
53089# Make the compare script executable
53090$CHMOD +x $OUTPUT_ROOT/compare.sh
53091
53092# Finally output some useful information to the user
53093
53094  # Finally output some useful information to the user
53095
53096  printf "\n"
53097  printf "====================================================\n"
53098  if test "x$no_create" != "xyes"; then
53099    if test "x$IS_RECONFIGURE" != "xyes"; then
53100      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
53101    else
53102      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
53103    fi
53104  else
53105    if test "x$IS_RECONFIGURE" != "xyes"; then
53106      printf "A configuration has been successfully checked but not created\n"
53107    else
53108      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
53109    fi
53110  fi
53111  if test "x$CONFIGURE_COMMAND_LINE" != x; then
53112    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53113  else
53114    printf "using default settings.\n"
53115  fi
53116
53117  printf "\n"
53118  printf "Configuration summary:\n"
53119  printf "* Debug level:    $DEBUG_LEVEL\n"
53120  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
53121  printf "* JDK variant:    $JDK_VARIANT\n"
53122  printf "* JVM variants:   $with_jvm_variants\n"
53123  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53124
53125  printf "\n"
53126  printf "Tools summary:\n"
53127  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53128    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53129  fi
53130  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53131  if test "x$TOOLCHAIN_VERSION" != "x"; then
53132    print_version=" $TOOLCHAIN_VERSION"
53133  fi
53134  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
53135  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53136  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53137
53138  printf "\n"
53139  printf "Build performance summary:\n"
53140  printf "* Cores to use:   $JOBS\n"
53141  printf "* Memory limit:   $MEMORY_SIZE MB\n"
53142  if test "x$CCACHE_STATUS" != "x"; then
53143    printf "* ccache status:  $CCACHE_STATUS\n"
53144  fi
53145  printf "\n"
53146
53147  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53148    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53149    printf "will result in longer build times.\n"
53150    printf "\n"
53151  fi
53152
53153  if test "x$FOUND_ALT_VARIABLES" != "x"; then
53154    printf "WARNING: You have old-style ALT_ environment variables set.\n"
53155    printf "These are not respected, and will be ignored. It is recommended\n"
53156    printf "that you clean your environment. The following variables are set:\n"
53157    printf "$FOUND_ALT_VARIABLES\n"
53158    printf "\n"
53159  fi
53160
53161  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53162    printf "WARNING: Your build output directory is not on a local disk.\n"
53163    printf "This will severely degrade build performance!\n"
53164    printf "It is recommended that you create an output directory on a local disk,\n"
53165    printf "and run the configure script again from that directory.\n"
53166    printf "\n"
53167  fi
53168
53169  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
53170    printf "WARNING: The result of this configuration has overridden an older\n"
53171    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53172    printf "proper build. Failure to do so might result in strange build problems.\n"
53173    printf "\n"
53174  fi
53175
53176  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
53177    printf "WARNING: The result of this configuration was not saved.\n"
53178    printf "You should run without '--no-create | -n' to create the configuration.\n"
53179    printf "\n"
53180  fi
53181
53182
53183
53184if test -e "$OUTPUT_ROOT/config.log"; then
53185  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
53186  if test $? -eq 0; then
53187    printf "The following warnings were produced. Repeated here for convenience:\n"
53188    # We must quote sed expression (using []) to stop m4 from eating the [].
53189    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
53190    printf "\n"
53191  fi
53192fi
53193
53194
53195