generated-configure.sh revision 1758:b0f70258d774
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
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826VERSION_SHORT
827VERSION_STRING
828VERSION_NUMBER_FOUR_POSITIONS
829VERSION_NUMBER
830VERSION_OPT
831VERSION_BUILD
832VERSION_PRE
833VERSION_PATCH
834VERSION_SECURITY
835VERSION_MINOR
836VERSION_MAJOR
837MACOSX_BUNDLE_ID_BASE
838MACOSX_BUNDLE_NAME_BASE
839COMPANY_NAME
840JDK_RC_PLATFORM_NAME
841PRODUCT_SUFFIX
842PRODUCT_NAME
843LAUNCHER_NAME
844COPYRIGHT_YEAR
845COMPRESS_JARS
846RMICONNECTOR_IIOP
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853BDEPS_FTP
854BDEPS_UNZIP
855OS_VERSION_MICRO
856OS_VERSION_MINOR
857OS_VERSION_MAJOR
858PKG_CONFIG
859BASH_ARGS
860CODESIGN
861XATTR
862DSYMUTIL
863IS_GNU_TIME
864TIME
865STAT
866HG
867READELF
868OTOOL
869LDD
870ZIP
871UNZIP
872FIND_DELETE
873OUTPUT_SYNC
874OUTPUT_SYNC_SUPPORTED
875MAKE
876CHECK_TOOLSDIR_MAKE
877CHECK_TOOLSDIR_GMAKE
878CHECK_MAKE
879CHECK_GMAKE
880PKGHANDLER
881CONFIGURESUPPORT_OUTPUTDIR
882OUTPUT_ROOT
883CONF_NAME
884SPEC
885SDKROOT
886XCODEBUILD
887BUILD_VARIANT_RELEASE
888DEBUG_CLASSFILES
889FASTDEBUG
890VARIANT
891DEBUG_LEVEL
892MACOSX_UNIVERSAL
893INCLUDE_SA
894JVM_VARIANT_CORE
895JVM_VARIANT_ZEROSHARK
896JVM_VARIANT_ZERO
897JVM_VARIANT_KERNEL
898JVM_VARIANT_MINIMAL1
899JVM_VARIANT_CLIENT
900JVM_VARIANT_SERVER
901JVM_VARIANTS
902JVM_INTERPRETER
903JDK_VARIANT
904SET_OPENJDK
905CANONICAL_TOPDIR
906ORIGINAL_TOPDIR
907TOPDIR
908PATH_SEP
909ZERO_ARCHDEF
910DEFINE_CROSS_COMPILE_ARCH
911LP64
912OPENJDK_TARGET_OS_EXPORT_DIR
913OPENJDK_TARGET_CPU_JLI_CFLAGS
914OPENJDK_TARGET_CPU_OSARCH
915OPENJDK_TARGET_CPU_ISADIR
916OPENJDK_TARGET_CPU_LIBDIR
917OPENJDK_TARGET_CPU_LEGACY_LIB
918OPENJDK_TARGET_CPU_LEGACY
919REQUIRED_OS_VERSION
920REQUIRED_OS_NAME
921COMPILE_TYPE
922OPENJDK_TARGET_CPU_ENDIAN
923OPENJDK_TARGET_CPU_BITS
924OPENJDK_TARGET_CPU_ARCH
925OPENJDK_TARGET_CPU
926OPENJDK_TARGET_OS_ENV
927OPENJDK_TARGET_OS_TYPE
928OPENJDK_TARGET_OS
929OPENJDK_BUILD_CPU_ENDIAN
930OPENJDK_BUILD_CPU_BITS
931OPENJDK_BUILD_CPU_ARCH
932OPENJDK_BUILD_CPU
933OPENJDK_BUILD_OS_ENV
934OPENJDK_BUILD_OS_TYPE
935OPENJDK_BUILD_OS
936OPENJDK_BUILD_AUTOCONF_NAME
937OPENJDK_TARGET_AUTOCONF_NAME
938target_os
939target_vendor
940target_cpu
941target
942host_os
943host_vendor
944host_cpu
945host
946build_os
947build_vendor
948build_cpu
949build
950CPIO
951SETFILE
952DF
953READLINK
954CYGPATH
955SED
956FGREP
957EGREP
958GREP
959AWK
960XARGS
961WHICH
962WC
963UNIQ
964UNAME
965TR
966TOUCH
967TEE
968TAR
969TAIL
970SORT
971SH
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057with_builddeps_conf
1058with_builddeps_server
1059with_builddeps_dir
1060with_builddeps_group
1061enable_headful
1062enable_hotspot_test_in_build
1063with_cacerts_file
1064enable_unlimited_crypto
1065enable_rmiconnector_iiop
1066with_copyright_year
1067with_milestone
1068with_update_version
1069with_user_release_suffix
1070with_build_number
1071with_version_string
1072with_version_pre
1073with_version_opt_base
1074with_version_opt_debuglevel
1075with_version_build
1076with_version_major
1077with_version_minor
1078with_version_security
1079with_version_patch
1080with_boot_jdk
1081with_add_source_root
1082with_override_source_root
1083with_adds_and_overrides
1084with_override_langtools
1085with_override_corba
1086with_override_jaxp
1087with_override_jaxws
1088with_override_hotspot
1089with_override_nashorn
1090with_override_jdk
1091with_import_hotspot
1092with_toolchain_type
1093with_toolchain_version
1094with_jtreg
1095with_extra_cflags
1096with_extra_cxxflags
1097with_extra_ldflags
1098enable_warnings_as_errors
1099enable_debug_symbols
1100enable_zip_debug_info
1101enable_native_coverage
1102with_x
1103with_cups
1104with_cups_include
1105with_freetype
1106with_freetype_include
1107with_freetype_lib
1108with_freetype_src
1109enable_freetype_bundling
1110with_alsa
1111with_alsa_include
1112with_alsa_lib
1113with_libjpeg
1114with_giflib
1115with_lcms
1116with_libpng
1117with_zlib
1118with_stdc__lib
1119with_msvcr_dll
1120with_msvcp_dll
1121with_dxsdk
1122with_dxsdk_lib
1123with_dxsdk_include
1124with_num_cores
1125with_memory_size
1126with_jobs
1127with_boot_jdk_jvmargs
1128with_sjavac_server_java
1129enable_sjavac
1130enable_precompiled_headers
1131enable_ccache
1132with_ccache_dir
1133'
1134      ac_precious_vars='build_alias
1135host_alias
1136target_alias
1137BASENAME
1138BASH
1139CAT
1140CHMOD
1141CMP
1142COMM
1143CP
1144CUT
1145DATE
1146DIFF
1147DIRNAME
1148ECHO
1149EXPR
1150FILE
1151FIND
1152HEAD
1153LN
1154LS
1155MKDIR
1156MKTEMP
1157MV
1158NAWK
1159PRINTF
1160RM
1161SH
1162SORT
1163TAIL
1164TAR
1165TEE
1166TOUCH
1167TR
1168UNAME
1169UNIQ
1170WC
1171WHICH
1172XARGS
1173AWK
1174GREP
1175EGREP
1176FGREP
1177SED
1178CYGPATH
1179READLINK
1180DF
1181SETFILE
1182CPIO
1183UNZIP
1184ZIP
1185LDD
1186OTOOL
1187READELF
1188HG
1189STAT
1190TIME
1191DSYMUTIL
1192XATTR
1193CODESIGN
1194PKG_CONFIG
1195JAVA
1196JAVAC
1197JAVAH
1198JAR
1199JARSIGNER
1200CC
1201CFLAGS
1202LDFLAGS
1203LIBS
1204CPPFLAGS
1205CXX
1206CXXFLAGS
1207CCC
1208CPP
1209CXXCPP
1210AS
1211AR
1212LIPO
1213STRIP
1214NM
1215GNM
1216OBJCOPY
1217OBJDUMP
1218BUILD_CC
1219BUILD_CXX
1220BUILD_LD
1221JTREGEXE
1222XMKMF
1223FREETYPE_CFLAGS
1224FREETYPE_LIBS
1225ALSA_CFLAGS
1226ALSA_LIBS
1227LCMS_CFLAGS
1228LCMS_LIBS
1229PNG_CFLAGS
1230PNG_LIBS
1231LIBFFI_CFLAGS
1232LIBFFI_LIBS
1233CCACHE'
1234
1235
1236# Initialize some variables set by options.
1237ac_init_help=
1238ac_init_version=false
1239ac_unrecognized_opts=
1240ac_unrecognized_sep=
1241# The variables have the same names as the options, with
1242# dashes changed to underlines.
1243cache_file=/dev/null
1244exec_prefix=NONE
1245no_create=
1246no_recursion=
1247prefix=NONE
1248program_prefix=NONE
1249program_suffix=NONE
1250program_transform_name=s,x,x,
1251silent=
1252site=
1253srcdir=
1254verbose=
1255x_includes=NONE
1256x_libraries=NONE
1257
1258# Installation directory options.
1259# These are left unexpanded so users can "make install exec_prefix=/foo"
1260# and all the variables that are supposed to be based on exec_prefix
1261# by default will actually change.
1262# Use braces instead of parens because sh, perl, etc. also accept them.
1263# (The list follows the same order as the GNU Coding Standards.)
1264bindir='${exec_prefix}/bin'
1265sbindir='${exec_prefix}/sbin'
1266libexecdir='${exec_prefix}/libexec'
1267datarootdir='${prefix}/share'
1268datadir='${datarootdir}'
1269sysconfdir='${prefix}/etc'
1270sharedstatedir='${prefix}/com'
1271localstatedir='${prefix}/var'
1272includedir='${prefix}/include'
1273oldincludedir='/usr/include'
1274docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1275infodir='${datarootdir}/info'
1276htmldir='${docdir}'
1277dvidir='${docdir}'
1278pdfdir='${docdir}'
1279psdir='${docdir}'
1280libdir='${exec_prefix}/lib'
1281localedir='${datarootdir}/locale'
1282mandir='${datarootdir}/man'
1283
1284ac_prev=
1285ac_dashdash=
1286for ac_option
1287do
1288  # If the previous option needs an argument, assign it.
1289  if test -n "$ac_prev"; then
1290    eval $ac_prev=\$ac_option
1291    ac_prev=
1292    continue
1293  fi
1294
1295  case $ac_option in
1296  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1297  *=)   ac_optarg= ;;
1298  *)    ac_optarg=yes ;;
1299  esac
1300
1301  # Accept the important Cygnus configure options, so we can diagnose typos.
1302
1303  case $ac_dashdash$ac_option in
1304  --)
1305    ac_dashdash=yes ;;
1306
1307  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1308    ac_prev=bindir ;;
1309  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1310    bindir=$ac_optarg ;;
1311
1312  -build | --build | --buil | --bui | --bu)
1313    ac_prev=build_alias ;;
1314  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1315    build_alias=$ac_optarg ;;
1316
1317  -cache-file | --cache-file | --cache-fil | --cache-fi \
1318  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1319    ac_prev=cache_file ;;
1320  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1321  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1322    cache_file=$ac_optarg ;;
1323
1324  --config-cache | -C)
1325    cache_file=config.cache ;;
1326
1327  -datadir | --datadir | --datadi | --datad)
1328    ac_prev=datadir ;;
1329  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1330    datadir=$ac_optarg ;;
1331
1332  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1333  | --dataroo | --dataro | --datar)
1334    ac_prev=datarootdir ;;
1335  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1336  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1337    datarootdir=$ac_optarg ;;
1338
1339  -disable-* | --disable-*)
1340    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1341    # Reject names that are not valid shell variable names.
1342    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1343      as_fn_error $? "invalid feature name: $ac_useropt"
1344    ac_useropt_orig=$ac_useropt
1345    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1346    case $ac_user_opts in
1347      *"
1348"enable_$ac_useropt"
1349"*) ;;
1350      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1351	 ac_unrecognized_sep=', ';;
1352    esac
1353    eval enable_$ac_useropt=no ;;
1354
1355  -docdir | --docdir | --docdi | --doc | --do)
1356    ac_prev=docdir ;;
1357  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1358    docdir=$ac_optarg ;;
1359
1360  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1361    ac_prev=dvidir ;;
1362  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1363    dvidir=$ac_optarg ;;
1364
1365  -enable-* | --enable-*)
1366    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1367    # Reject names that are not valid shell variable names.
1368    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1369      as_fn_error $? "invalid feature name: $ac_useropt"
1370    ac_useropt_orig=$ac_useropt
1371    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1372    case $ac_user_opts in
1373      *"
1374"enable_$ac_useropt"
1375"*) ;;
1376      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1377	 ac_unrecognized_sep=', ';;
1378    esac
1379    eval enable_$ac_useropt=\$ac_optarg ;;
1380
1381  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1382  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1383  | --exec | --exe | --ex)
1384    ac_prev=exec_prefix ;;
1385  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1386  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1387  | --exec=* | --exe=* | --ex=*)
1388    exec_prefix=$ac_optarg ;;
1389
1390  -gas | --gas | --ga | --g)
1391    # Obsolete; use --with-gas.
1392    with_gas=yes ;;
1393
1394  -help | --help | --hel | --he | -h)
1395    ac_init_help=long ;;
1396  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1397    ac_init_help=recursive ;;
1398  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1399    ac_init_help=short ;;
1400
1401  -host | --host | --hos | --ho)
1402    ac_prev=host_alias ;;
1403  -host=* | --host=* | --hos=* | --ho=*)
1404    host_alias=$ac_optarg ;;
1405
1406  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1407    ac_prev=htmldir ;;
1408  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1409  | --ht=*)
1410    htmldir=$ac_optarg ;;
1411
1412  -includedir | --includedir | --includedi | --included | --include \
1413  | --includ | --inclu | --incl | --inc)
1414    ac_prev=includedir ;;
1415  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1416  | --includ=* | --inclu=* | --incl=* | --inc=*)
1417    includedir=$ac_optarg ;;
1418
1419  -infodir | --infodir | --infodi | --infod | --info | --inf)
1420    ac_prev=infodir ;;
1421  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1422    infodir=$ac_optarg ;;
1423
1424  -libdir | --libdir | --libdi | --libd)
1425    ac_prev=libdir ;;
1426  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1427    libdir=$ac_optarg ;;
1428
1429  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1430  | --libexe | --libex | --libe)
1431    ac_prev=libexecdir ;;
1432  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1433  | --libexe=* | --libex=* | --libe=*)
1434    libexecdir=$ac_optarg ;;
1435
1436  -localedir | --localedir | --localedi | --localed | --locale)
1437    ac_prev=localedir ;;
1438  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1439    localedir=$ac_optarg ;;
1440
1441  -localstatedir | --localstatedir | --localstatedi | --localstated \
1442  | --localstate | --localstat | --localsta | --localst | --locals)
1443    ac_prev=localstatedir ;;
1444  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1445  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1446    localstatedir=$ac_optarg ;;
1447
1448  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1449    ac_prev=mandir ;;
1450  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1451    mandir=$ac_optarg ;;
1452
1453  -nfp | --nfp | --nf)
1454    # Obsolete; use --without-fp.
1455    with_fp=no ;;
1456
1457  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1458  | --no-cr | --no-c | -n)
1459    no_create=yes ;;
1460
1461  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1462  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1463    no_recursion=yes ;;
1464
1465  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1466  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1467  | --oldin | --oldi | --old | --ol | --o)
1468    ac_prev=oldincludedir ;;
1469  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1470  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1471  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1472    oldincludedir=$ac_optarg ;;
1473
1474  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1475    ac_prev=prefix ;;
1476  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1477    prefix=$ac_optarg ;;
1478
1479  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1480  | --program-pre | --program-pr | --program-p)
1481    ac_prev=program_prefix ;;
1482  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1483  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1484    program_prefix=$ac_optarg ;;
1485
1486  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1487  | --program-suf | --program-su | --program-s)
1488    ac_prev=program_suffix ;;
1489  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1490  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1491    program_suffix=$ac_optarg ;;
1492
1493  -program-transform-name | --program-transform-name \
1494  | --program-transform-nam | --program-transform-na \
1495  | --program-transform-n | --program-transform- \
1496  | --program-transform | --program-transfor \
1497  | --program-transfo | --program-transf \
1498  | --program-trans | --program-tran \
1499  | --progr-tra | --program-tr | --program-t)
1500    ac_prev=program_transform_name ;;
1501  -program-transform-name=* | --program-transform-name=* \
1502  | --program-transform-nam=* | --program-transform-na=* \
1503  | --program-transform-n=* | --program-transform-=* \
1504  | --program-transform=* | --program-transfor=* \
1505  | --program-transfo=* | --program-transf=* \
1506  | --program-trans=* | --program-tran=* \
1507  | --progr-tra=* | --program-tr=* | --program-t=*)
1508    program_transform_name=$ac_optarg ;;
1509
1510  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1511    ac_prev=pdfdir ;;
1512  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1513    pdfdir=$ac_optarg ;;
1514
1515  -psdir | --psdir | --psdi | --psd | --ps)
1516    ac_prev=psdir ;;
1517  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1518    psdir=$ac_optarg ;;
1519
1520  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1521  | -silent | --silent | --silen | --sile | --sil)
1522    silent=yes ;;
1523
1524  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1525    ac_prev=sbindir ;;
1526  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1527  | --sbi=* | --sb=*)
1528    sbindir=$ac_optarg ;;
1529
1530  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1531  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1532  | --sharedst | --shareds | --shared | --share | --shar \
1533  | --sha | --sh)
1534    ac_prev=sharedstatedir ;;
1535  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1536  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1537  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1538  | --sha=* | --sh=*)
1539    sharedstatedir=$ac_optarg ;;
1540
1541  -site | --site | --sit)
1542    ac_prev=site ;;
1543  -site=* | --site=* | --sit=*)
1544    site=$ac_optarg ;;
1545
1546  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1547    ac_prev=srcdir ;;
1548  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1549    srcdir=$ac_optarg ;;
1550
1551  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1552  | --syscon | --sysco | --sysc | --sys | --sy)
1553    ac_prev=sysconfdir ;;
1554  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1555  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1556    sysconfdir=$ac_optarg ;;
1557
1558  -target | --target | --targe | --targ | --tar | --ta | --t)
1559    ac_prev=target_alias ;;
1560  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1561    target_alias=$ac_optarg ;;
1562
1563  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1564    verbose=yes ;;
1565
1566  -version | --version | --versio | --versi | --vers | -V)
1567    ac_init_version=: ;;
1568
1569  -with-* | --with-*)
1570    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1571    # Reject names that are not valid shell variable names.
1572    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1573      as_fn_error $? "invalid package name: $ac_useropt"
1574    ac_useropt_orig=$ac_useropt
1575    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1576    case $ac_user_opts in
1577      *"
1578"with_$ac_useropt"
1579"*) ;;
1580      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1581	 ac_unrecognized_sep=', ';;
1582    esac
1583    eval with_$ac_useropt=\$ac_optarg ;;
1584
1585  -without-* | --without-*)
1586    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1587    # Reject names that are not valid shell variable names.
1588    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1589      as_fn_error $? "invalid package name: $ac_useropt"
1590    ac_useropt_orig=$ac_useropt
1591    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1592    case $ac_user_opts in
1593      *"
1594"with_$ac_useropt"
1595"*) ;;
1596      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1597	 ac_unrecognized_sep=', ';;
1598    esac
1599    eval with_$ac_useropt=no ;;
1600
1601  --x)
1602    # Obsolete; use --with-x.
1603    with_x=yes ;;
1604
1605  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1606  | --x-incl | --x-inc | --x-in | --x-i)
1607    ac_prev=x_includes ;;
1608  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1609  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1610    x_includes=$ac_optarg ;;
1611
1612  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1613  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1614    ac_prev=x_libraries ;;
1615  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1616  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1617    x_libraries=$ac_optarg ;;
1618
1619  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1620Try \`$0 --help' for more information"
1621    ;;
1622
1623  *=*)
1624    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1625    # Reject names that are not valid shell variable names.
1626    case $ac_envvar in #(
1627      '' | [0-9]* | *[!_$as_cr_alnum]* )
1628      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1629    esac
1630    eval $ac_envvar=\$ac_optarg
1631    export $ac_envvar ;;
1632
1633  *)
1634    # FIXME: should be removed in autoconf 3.0.
1635    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1636    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1637      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1638    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1639    ;;
1640
1641  esac
1642done
1643
1644if test -n "$ac_prev"; then
1645  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1646  as_fn_error $? "missing argument to $ac_option"
1647fi
1648
1649if test -n "$ac_unrecognized_opts"; then
1650  case $enable_option_checking in
1651    no) ;;
1652    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1653    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1654  esac
1655fi
1656
1657# Check all directory arguments for consistency.
1658for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1659		datadir sysconfdir sharedstatedir localstatedir includedir \
1660		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1661		libdir localedir mandir
1662do
1663  eval ac_val=\$$ac_var
1664  # Remove trailing slashes.
1665  case $ac_val in
1666    */ )
1667      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1668      eval $ac_var=\$ac_val;;
1669  esac
1670  # Be sure to have absolute directory names.
1671  case $ac_val in
1672    [\\/$]* | ?:[\\/]* )  continue;;
1673    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1674  esac
1675  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1676done
1677
1678# There might be people who depend on the old broken behavior: `$host'
1679# used to hold the argument of --host etc.
1680# FIXME: To remove some day.
1681build=$build_alias
1682host=$host_alias
1683target=$target_alias
1684
1685# FIXME: To remove some day.
1686if test "x$host_alias" != x; then
1687  if test "x$build_alias" = x; then
1688    cross_compiling=maybe
1689  elif test "x$build_alias" != "x$host_alias"; then
1690    cross_compiling=yes
1691  fi
1692fi
1693
1694ac_tool_prefix=
1695test -n "$host_alias" && ac_tool_prefix=$host_alias-
1696
1697test "$silent" = yes && exec 6>/dev/null
1698
1699
1700ac_pwd=`pwd` && test -n "$ac_pwd" &&
1701ac_ls_di=`ls -di .` &&
1702ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1703  as_fn_error $? "working directory cannot be determined"
1704test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1705  as_fn_error $? "pwd does not report name of working directory"
1706
1707
1708# Find the source files, if location was not specified.
1709if test -z "$srcdir"; then
1710  ac_srcdir_defaulted=yes
1711  # Try the directory containing this script, then the parent directory.
1712  ac_confdir=`$as_dirname -- "$as_myself" ||
1713$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1714	 X"$as_myself" : 'X\(//\)[^/]' \| \
1715	 X"$as_myself" : 'X\(//\)$' \| \
1716	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1717$as_echo X"$as_myself" |
1718    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1719	    s//\1/
1720	    q
1721	  }
1722	  /^X\(\/\/\)[^/].*/{
1723	    s//\1/
1724	    q
1725	  }
1726	  /^X\(\/\/\)$/{
1727	    s//\1/
1728	    q
1729	  }
1730	  /^X\(\/\).*/{
1731	    s//\1/
1732	    q
1733	  }
1734	  s/.*/./; q'`
1735  srcdir=$ac_confdir
1736  if test ! -r "$srcdir/$ac_unique_file"; then
1737    srcdir=..
1738  fi
1739else
1740  ac_srcdir_defaulted=no
1741fi
1742if test ! -r "$srcdir/$ac_unique_file"; then
1743  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1744  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1745fi
1746ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1747ac_abs_confdir=`(
1748	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1749	pwd)`
1750# When building in place, set srcdir=.
1751if test "$ac_abs_confdir" = "$ac_pwd"; then
1752  srcdir=.
1753fi
1754# Remove unnecessary trailing slashes from srcdir.
1755# Double slashes in file names in object file debugging info
1756# mess up M-x gdb in Emacs.
1757case $srcdir in
1758*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1759esac
1760for ac_var in $ac_precious_vars; do
1761  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1762  eval ac_env_${ac_var}_value=\$${ac_var}
1763  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1764  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1765done
1766
1767#
1768# Report the --help message.
1769#
1770if test "$ac_init_help" = "long"; then
1771  # Omit some internal or obsolete options to make the list less imposing.
1772  # This message is too long to be a string in the A/UX 3.1 sh.
1773  cat <<_ACEOF
1774\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1775
1776Usage: $0 [OPTION]... [VAR=VALUE]...
1777
1778To assign environment variables (e.g., CC, CFLAGS...), specify them as
1779VAR=VALUE.  See below for descriptions of some of the useful variables.
1780
1781Defaults for the options are specified in brackets.
1782
1783Configuration:
1784  -h, --help              display this help and exit
1785      --help=short        display options specific to this package
1786      --help=recursive    display the short help of all the included packages
1787  -V, --version           display version information and exit
1788  -q, --quiet, --silent   do not print \`checking ...' messages
1789      --cache-file=FILE   cache test results in FILE [disabled]
1790  -C, --config-cache      alias for \`--cache-file=config.cache'
1791  -n, --no-create         do not create output files
1792      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1793
1794Installation directories:
1795  --prefix=PREFIX         install architecture-independent files in PREFIX
1796                          [$ac_default_prefix]
1797  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1798                          [PREFIX]
1799
1800By default, \`make install' will install all the files in
1801\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1802an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1803for instance \`--prefix=\$HOME'.
1804
1805For better control, use the options below.
1806
1807Fine tuning of the installation directories:
1808  --bindir=DIR            user executables [EPREFIX/bin]
1809  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1810  --libexecdir=DIR        program executables [EPREFIX/libexec]
1811  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1812  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1813  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1814  --libdir=DIR            object code libraries [EPREFIX/lib]
1815  --includedir=DIR        C header files [PREFIX/include]
1816  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1817  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1818  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1819  --infodir=DIR           info documentation [DATAROOTDIR/info]
1820  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1821  --mandir=DIR            man documentation [DATAROOTDIR/man]
1822  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1823  --htmldir=DIR           html documentation [DOCDIR]
1824  --dvidir=DIR            dvi documentation [DOCDIR]
1825  --pdfdir=DIR            pdf documentation [DOCDIR]
1826  --psdir=DIR             ps documentation [DOCDIR]
1827_ACEOF
1828
1829  cat <<\_ACEOF
1830
1831X features:
1832  --x-includes=DIR    X include files are in DIR
1833  --x-libraries=DIR   X library files are in DIR
1834
1835System types:
1836  --build=BUILD     configure for building on BUILD [guessed]
1837  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1838  --target=TARGET   configure for building compilers for TARGET [HOST]
1839_ACEOF
1840fi
1841
1842if test -n "$ac_init_help"; then
1843  case $ac_init_help in
1844     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1845   esac
1846  cat <<\_ACEOF
1847
1848Optional Features:
1849  --disable-option-checking  ignore unrecognized --enable/--with options
1850  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1851  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1852  --enable-openjdk-only   suppress building custom source even if present
1853                          [disabled]
1854  --enable-debug          set the debug level to fastdebug (shorthand for
1855                          --with-debug-level=fastdebug) [disabled]
1856  --disable-headful       disable building headful support (graphical UI
1857                          support) [enabled]
1858  --enable-hotspot-test-in-build
1859                          run the Queens test after Hotspot build [disabled]
1860  --enable-unlimited-crypto
1861                          Enable unlimited crypto policy [disabled]
1862  --enable-rmiconnector-iiop
1863                          enable the JMX RMIConnector iiop transport
1864                          [disabled]
1865  --disable-warnings-as-errors
1866                          do not consider native warnings to be an error
1867                          [enabled]
1868  --disable-debug-symbols disable generation of debug symbols [enabled]
1869  --disable-zip-debug-info
1870                          disable zipping of debug-info files [enabled]
1871  --enable-native-coverage
1872                          enable native compilation with code coverage
1873                          data[disabled]
1874  --disable-freetype-bundling
1875                          disable bundling of the freetype library with the
1876                          build result [enabled on Windows or when using
1877                          --with-freetype, disabled otherwise]
1878  --enable-sjavac         use sjavac to do fast incremental compiles
1879                          [disabled]
1880  --disable-precompiled-headers
1881                          disable using precompiled headers when compiling C++
1882                          [enabled]
1883  --enable-ccache         enable using ccache to speed up recompilations
1884                          [disabled]
1885
1886Optional Packages:
1887  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1888  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1889  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1890                          support it), e.g. --with-target-bits=32 [guessed]
1891  --with-custom-make-dir  Deprecated. Option is kept for backwards
1892                          compatibility and is ignored
1893  --with-jdk-variant      JDK variant to build (normal) [normal]
1894  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1895  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1896                          client, minimal1, kernel, zero, zeroshark, core)
1897                          [server]
1898  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1899                          optimized (HotSpot build only)) [release]
1900  --with-devkit           use this devkit for compilers, tools and resources
1901  --with-sys-root         alias for --with-sysroot for backwards compatability
1902  --with-sysroot          use this directory as sysroot
1903  --with-tools-dir        alias for --with-toolchain-path for backwards
1904                          compatibility
1905  --with-toolchain-path   prepend these directories when searching for
1906                          toolchain binaries (compilers etc)
1907  --with-extra-path       prepend these directories to the default path
1908  --with-sdk-name         use the platform SDK of the given name. [macosx]
1909  --with-conf-name        use this as the name of the configuration [generated
1910                          from important configuration options]
1911  --with-output-sync      set make output sync type if supported by make.
1912                          [recurse]
1913  --with-builddeps-conf   use this configuration file for the builddeps
1914  --with-builddeps-server download and use build dependencies from this server
1915                          url
1916  --with-builddeps-dir    store downloaded build dependencies here
1917                          [/localhome/builddeps]
1918  --with-builddeps-group  chgrp the downloaded build dependencies to this
1919                          group
1920  --with-cacerts-file     specify alternative cacerts file
1921  --with-copyright-year   Set copyright year value for build [current year]
1922  --with-milestone        Deprecated. Option is kept for backwards
1923                          compatibility and is ignored
1924  --with-update-version   Deprecated. Option is kept for backwards
1925                          compatibility and is ignored
1926  --with-user-release-suffix
1927                          Deprecated. Option is kept for backwards
1928                          compatibility and is ignored
1929  --with-build-number     Deprecated. Option is kept for backwards
1930                          compatibility and is ignored
1931  --with-version-string   Set version string [calculated]
1932  --with-version-pre      Set the base part of the version 'PRE' field
1933                          (pre-release identifier) ['internal']
1934  --with-version-opt-base Set version 'OPT' base field. Debug level will be
1935                          appended. (build metadata)
1936                          [<timestamp>.<user>.<dirname>]
1937  --with-version-opt-debuglevel
1938                          Set version 'OPT' field (build metadata)
1939                          [<timestamp>.<user>.<dirname>]
1940  --with-version-build    Set version 'BUILD' field (build number) [not
1941                          specified]
1942  --with-version-major    Set version 'MAJOR' field (first number) [current
1943                          source value]
1944  --with-version-minor    Set version 'MINOR' field (second number) [current
1945                          source value]
1946  --with-version-security Set version 'SECURITY' field (third number) [current
1947                          source value]
1948  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1949                          specified]
1950  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1951  --with-add-source-root  for each and every source directory, look in this
1952                          additional source root for the same directory; if it
1953                          exists and have files in it, include it in the build
1954  --with-override-source-root
1955                          for each and every source directory, look in this
1956                          override source root for the same directory; if it
1957                          exists, use that directory instead and ignore the
1958                          directory in the original source root
1959  --with-adds-and-overrides
1960                          use the subdirs 'adds' and 'overrides' in the
1961                          specified directory as add-source-root and
1962                          override-source-root
1963  --with-override-langtools
1964                          use this langtools dir for the build
1965  --with-override-corba   use this corba dir for the build
1966  --with-override-jaxp    use this jaxp dir for the build
1967  --with-override-jaxws   use this jaxws dir for the build
1968  --with-override-hotspot use this hotspot dir for the build
1969  --with-override-nashorn use this nashorn dir for the build
1970  --with-override-jdk     use this jdk dir for the build
1971  --with-import-hotspot   import hotspot binaries from this jdk image or
1972                          hotspot build dist dir instead of building from
1973                          source
1974  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1975                          to show possible values [platform dependent]
1976  --with-toolchain-version
1977                          the version of the toolchain to look for, use
1978                          '--help' to show possible values [platform
1979                          dependent]
1980  --with-jtreg            Regression Test Harness [probed]
1981  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1982  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1983  --with-extra-ldflags    extra flags to be used when linking jdk
1984  --with-x                use the X Window System
1985  --with-cups             specify prefix directory for the cups package
1986                          (expecting the headers under PATH/include)
1987  --with-cups-include     specify directory for the cups include files
1988  --with-freetype         specify prefix directory for the freetype package
1989                          (expecting the libraries under PATH/lib and the
1990                          headers under PATH/include)
1991  --with-freetype-include specify directory for the freetype include files
1992  --with-freetype-lib     specify directory for the freetype library
1993  --with-freetype-src     specify directory with freetype sources to
1994                          automatically build the library (experimental,
1995                          Windows-only)
1996  --with-alsa             specify prefix directory for the alsa package
1997                          (expecting the libraries under PATH/lib and the
1998                          headers under PATH/include)
1999  --with-alsa-include     specify directory for the alsa include files
2000  --with-alsa-lib         specify directory for the alsa library
2001  --with-libjpeg          use libjpeg from build system or OpenJDK source
2002                          (system, bundled) [bundled]
2003  --with-giflib           use giflib from build system or OpenJDK source
2004                          (system, bundled) [bundled]
2005  --with-lcms             use lcms2 from build system or OpenJDK source
2006                          (system, bundled) [bundled]
2007  --with-libpng           use libpng from build system or OpenJDK source
2008                          (system, bundled) [bundled]
2009  --with-zlib             use zlib from build system or OpenJDK source
2010                          (system, bundled) [bundled]
2011  --with-stdc++lib=<static>,<dynamic>,<default>
2012                          force linking of the C++ runtime on Linux to either
2013                          static or dynamic, default is static with dynamic as
2014                          fallback
2015  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2016                          (Windows only) [probed]
2017  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2018                          (Windows only) [probed]
2019  --with-dxsdk            Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2022                          compatibility and is ignored
2023  --with-dxsdk-include    Deprecated. Option is kept for backwards
2024                          compatibility and is ignored
2025  --with-num-cores        number of cores in the build system, e.g.
2026                          --with-num-cores=8 [probed]
2027  --with-memory-size      memory (in MB) available in the build system, e.g.
2028                          --with-memory-size=1024 [probed]
2029  --with-jobs             number of parallel jobs to let make run [calculated
2030                          based on cores and memory]
2031  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2032                          invocations of boot JDK, overriding the default
2033                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2034                          -enableassertions"
2035  --with-sjavac-server-java
2036                          use this java binary for running the sjavac
2037                          background server [Boot JDK java]
2038  --with-ccache-dir       where to store ccache files [~/.ccache]
2039
2040Some influential environment variables:
2041  BASENAME    Override default value for BASENAME
2042  BASH        Override default value for BASH
2043  CAT         Override default value for CAT
2044  CHMOD       Override default value for CHMOD
2045  CMP         Override default value for CMP
2046  COMM        Override default value for COMM
2047  CP          Override default value for CP
2048  CUT         Override default value for CUT
2049  DATE        Override default value for DATE
2050  DIFF        Override default value for DIFF
2051  DIRNAME     Override default value for DIRNAME
2052  ECHO        Override default value for ECHO
2053  EXPR        Override default value for EXPR
2054  FILE        Override default value for FILE
2055  FIND        Override default value for FIND
2056  HEAD        Override default value for HEAD
2057  LN          Override default value for LN
2058  LS          Override default value for LS
2059  MKDIR       Override default value for MKDIR
2060  MKTEMP      Override default value for MKTEMP
2061  MV          Override default value for MV
2062  NAWK        Override default value for NAWK
2063  PRINTF      Override default value for PRINTF
2064  RM          Override default value for RM
2065  SH          Override default value for SH
2066  SORT        Override default value for SORT
2067  TAIL        Override default value for TAIL
2068  TAR         Override default value for TAR
2069  TEE         Override default value for TEE
2070  TOUCH       Override default value for TOUCH
2071  TR          Override default value for TR
2072  UNAME       Override default value for UNAME
2073  UNIQ        Override default value for UNIQ
2074  WC          Override default value for WC
2075  WHICH       Override default value for WHICH
2076  XARGS       Override default value for XARGS
2077  AWK         Override default value for AWK
2078  GREP        Override default value for GREP
2079  EGREP       Override default value for EGREP
2080  FGREP       Override default value for FGREP
2081  SED         Override default value for SED
2082  CYGPATH     Override default value for CYGPATH
2083  READLINK    Override default value for READLINK
2084  DF          Override default value for DF
2085  SETFILE     Override default value for SETFILE
2086  CPIO        Override default value for CPIO
2087  UNZIP       Override default value for UNZIP
2088  ZIP         Override default value for ZIP
2089  LDD         Override default value for LDD
2090  OTOOL       Override default value for OTOOL
2091  READELF     Override default value for READELF
2092  HG          Override default value for HG
2093  STAT        Override default value for STAT
2094  TIME        Override default value for TIME
2095  DSYMUTIL    Override default value for DSYMUTIL
2096  XATTR       Override default value for XATTR
2097  CODESIGN    Override default value for CODESIGN
2098  PKG_CONFIG  path to pkg-config utility
2099  JAVA        Override default value for JAVA
2100  JAVAC       Override default value for JAVAC
2101  JAVAH       Override default value for JAVAH
2102  JAR         Override default value for JAR
2103  JARSIGNER   Override default value for JARSIGNER
2104  CC          C compiler command
2105  CFLAGS      C compiler flags
2106  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2107              nonstandard directory <lib dir>
2108  LIBS        libraries to pass to the linker, e.g. -l<library>
2109  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2110              you have headers in a nonstandard directory <include dir>
2111  CXX         C++ compiler command
2112  CXXFLAGS    C++ compiler flags
2113  CPP         C preprocessor
2114  CXXCPP      C++ preprocessor
2115  AS          Override default value for AS
2116  AR          Override default value for AR
2117  LIPO        Override default value for LIPO
2118  STRIP       Override default value for STRIP
2119  NM          Override default value for NM
2120  GNM         Override default value for GNM
2121  OBJCOPY     Override default value for OBJCOPY
2122  OBJDUMP     Override default value for OBJDUMP
2123  BUILD_CC    Override default value for BUILD_CC
2124  BUILD_CXX   Override default value for BUILD_CXX
2125  BUILD_LD    Override default value for BUILD_LD
2126  JTREGEXE    Override default value for JTREGEXE
2127  XMKMF       Path to xmkmf, Makefile generator for X Window System
2128  FREETYPE_CFLAGS
2129              C compiler flags for FREETYPE, overriding pkg-config
2130  FREETYPE_LIBS
2131              linker flags for FREETYPE, overriding pkg-config
2132  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2133  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2134  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2135  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2136  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2137  PNG_LIBS    linker flags for PNG, overriding pkg-config
2138  LIBFFI_CFLAGS
2139              C compiler flags for LIBFFI, overriding pkg-config
2140  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2141  CCACHE      Override default value for CCACHE
2142
2143Use these variables to override the choices made by `configure' or to help
2144it to find libraries and programs with nonstandard names/locations.
2145
2146Report bugs to <build-dev@openjdk.java.net>.
2147OpenJDK home page: <http://openjdk.java.net>.
2148_ACEOF
2149ac_status=$?
2150fi
2151
2152if test "$ac_init_help" = "recursive"; then
2153  # If there are subdirs, report their specific --help.
2154  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2155    test -d "$ac_dir" ||
2156      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2157      continue
2158    ac_builddir=.
2159
2160case "$ac_dir" in
2161.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2162*)
2163  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2164  # A ".." for each directory in $ac_dir_suffix.
2165  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2166  case $ac_top_builddir_sub in
2167  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2168  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2169  esac ;;
2170esac
2171ac_abs_top_builddir=$ac_pwd
2172ac_abs_builddir=$ac_pwd$ac_dir_suffix
2173# for backward compatibility:
2174ac_top_builddir=$ac_top_build_prefix
2175
2176case $srcdir in
2177  .)  # We are building in place.
2178    ac_srcdir=.
2179    ac_top_srcdir=$ac_top_builddir_sub
2180    ac_abs_top_srcdir=$ac_pwd ;;
2181  [\\/]* | ?:[\\/]* )  # Absolute name.
2182    ac_srcdir=$srcdir$ac_dir_suffix;
2183    ac_top_srcdir=$srcdir
2184    ac_abs_top_srcdir=$srcdir ;;
2185  *) # Relative name.
2186    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2187    ac_top_srcdir=$ac_top_build_prefix$srcdir
2188    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2189esac
2190ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2191
2192    cd "$ac_dir" || { ac_status=$?; continue; }
2193    # Check for guested configure.
2194    if test -f "$ac_srcdir/configure.gnu"; then
2195      echo &&
2196      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2197    elif test -f "$ac_srcdir/configure"; then
2198      echo &&
2199      $SHELL "$ac_srcdir/configure" --help=recursive
2200    else
2201      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2202    fi || ac_status=$?
2203    cd "$ac_pwd" || { ac_status=$?; break; }
2204  done
2205fi
2206
2207test -n "$ac_init_help" && exit $ac_status
2208if $ac_init_version; then
2209  cat <<\_ACEOF
2210OpenJDK configure jdk9
2211generated by GNU Autoconf 2.69
2212
2213Copyright (C) 2012 Free Software Foundation, Inc.
2214This configure script is free software; the Free Software Foundation
2215gives unlimited permission to copy, distribute and modify it.
2216_ACEOF
2217  exit
2218fi
2219
2220## ------------------------ ##
2221## Autoconf initialization. ##
2222## ------------------------ ##
2223
2224# ac_fn_c_try_compile LINENO
2225# --------------------------
2226# Try to compile conftest.$ac_ext, and return whether this succeeded.
2227ac_fn_c_try_compile ()
2228{
2229  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230  rm -f conftest.$ac_objext
2231  if { { ac_try="$ac_compile"
2232case "(($ac_try" in
2233  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2234  *) ac_try_echo=$ac_try;;
2235esac
2236eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2237$as_echo "$ac_try_echo"; } >&5
2238  (eval "$ac_compile") 2>conftest.err
2239  ac_status=$?
2240  if test -s conftest.err; then
2241    grep -v '^ *+' conftest.err >conftest.er1
2242    cat conftest.er1 >&5
2243    mv -f conftest.er1 conftest.err
2244  fi
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; } && {
2247	 test -z "$ac_c_werror_flag" ||
2248	 test ! -s conftest.err
2249       } && test -s conftest.$ac_objext; then :
2250  ac_retval=0
2251else
2252  $as_echo "$as_me: failed program was:" >&5
2253sed 's/^/| /' conftest.$ac_ext >&5
2254
2255	ac_retval=1
2256fi
2257  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2258  as_fn_set_status $ac_retval
2259
2260} # ac_fn_c_try_compile
2261
2262# ac_fn_cxx_try_compile LINENO
2263# ----------------------------
2264# Try to compile conftest.$ac_ext, and return whether this succeeded.
2265ac_fn_cxx_try_compile ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  rm -f conftest.$ac_objext
2269  if { { ac_try="$ac_compile"
2270case "(($ac_try" in
2271  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2272  *) ac_try_echo=$ac_try;;
2273esac
2274eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2275$as_echo "$ac_try_echo"; } >&5
2276  (eval "$ac_compile") 2>conftest.err
2277  ac_status=$?
2278  if test -s conftest.err; then
2279    grep -v '^ *+' conftest.err >conftest.er1
2280    cat conftest.er1 >&5
2281    mv -f conftest.er1 conftest.err
2282  fi
2283  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2284  test $ac_status = 0; } && {
2285	 test -z "$ac_cxx_werror_flag" ||
2286	 test ! -s conftest.err
2287       } && test -s conftest.$ac_objext; then :
2288  ac_retval=0
2289else
2290  $as_echo "$as_me: failed program was:" >&5
2291sed 's/^/| /' conftest.$ac_ext >&5
2292
2293	ac_retval=1
2294fi
2295  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2296  as_fn_set_status $ac_retval
2297
2298} # ac_fn_cxx_try_compile
2299
2300# ac_fn_c_try_cpp LINENO
2301# ----------------------
2302# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2303ac_fn_c_try_cpp ()
2304{
2305  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306  if { { ac_try="$ac_cpp conftest.$ac_ext"
2307case "(($ac_try" in
2308  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2309  *) ac_try_echo=$ac_try;;
2310esac
2311eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2312$as_echo "$ac_try_echo"; } >&5
2313  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2314  ac_status=$?
2315  if test -s conftest.err; then
2316    grep -v '^ *+' conftest.err >conftest.er1
2317    cat conftest.er1 >&5
2318    mv -f conftest.er1 conftest.err
2319  fi
2320  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2321  test $ac_status = 0; } > conftest.i && {
2322	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2323	 test ! -s conftest.err
2324       }; then :
2325  ac_retval=0
2326else
2327  $as_echo "$as_me: failed program was:" >&5
2328sed 's/^/| /' conftest.$ac_ext >&5
2329
2330    ac_retval=1
2331fi
2332  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2333  as_fn_set_status $ac_retval
2334
2335} # ac_fn_c_try_cpp
2336
2337# ac_fn_cxx_try_cpp LINENO
2338# ------------------------
2339# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2340ac_fn_cxx_try_cpp ()
2341{
2342  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2343  if { { ac_try="$ac_cpp conftest.$ac_ext"
2344case "(($ac_try" in
2345  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2346  *) ac_try_echo=$ac_try;;
2347esac
2348eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2349$as_echo "$ac_try_echo"; } >&5
2350  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2351  ac_status=$?
2352  if test -s conftest.err; then
2353    grep -v '^ *+' conftest.err >conftest.er1
2354    cat conftest.er1 >&5
2355    mv -f conftest.er1 conftest.err
2356  fi
2357  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2358  test $ac_status = 0; } > conftest.i && {
2359	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2360	 test ! -s conftest.err
2361       }; then :
2362  ac_retval=0
2363else
2364  $as_echo "$as_me: failed program was:" >&5
2365sed 's/^/| /' conftest.$ac_ext >&5
2366
2367    ac_retval=1
2368fi
2369  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2370  as_fn_set_status $ac_retval
2371
2372} # ac_fn_cxx_try_cpp
2373
2374# ac_fn_c_try_link LINENO
2375# -----------------------
2376# Try to link conftest.$ac_ext, and return whether this succeeded.
2377ac_fn_c_try_link ()
2378{
2379  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380  rm -f conftest.$ac_objext conftest$ac_exeext
2381  if { { ac_try="$ac_link"
2382case "(($ac_try" in
2383  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2384  *) ac_try_echo=$ac_try;;
2385esac
2386eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2387$as_echo "$ac_try_echo"; } >&5
2388  (eval "$ac_link") 2>conftest.err
2389  ac_status=$?
2390  if test -s conftest.err; then
2391    grep -v '^ *+' conftest.err >conftest.er1
2392    cat conftest.er1 >&5
2393    mv -f conftest.er1 conftest.err
2394  fi
2395  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2396  test $ac_status = 0; } && {
2397	 test -z "$ac_c_werror_flag" ||
2398	 test ! -s conftest.err
2399       } && test -s conftest$ac_exeext && {
2400	 test "$cross_compiling" = yes ||
2401	 test -x conftest$ac_exeext
2402       }; then :
2403  ac_retval=0
2404else
2405  $as_echo "$as_me: failed program was:" >&5
2406sed 's/^/| /' conftest.$ac_ext >&5
2407
2408	ac_retval=1
2409fi
2410  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2411  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2412  # interfere with the next link command; also delete a directory that is
2413  # left behind by Apple's compiler.  We do this before executing the actions.
2414  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2415  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2416  as_fn_set_status $ac_retval
2417
2418} # ac_fn_c_try_link
2419
2420# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2421# ---------------------------------------------------------
2422# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2423# the include files in INCLUDES and setting the cache variable VAR
2424# accordingly.
2425ac_fn_cxx_check_header_mongrel ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  if eval \${$3+:} false; then :
2429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2430$as_echo_n "checking for $2... " >&6; }
2431if eval \${$3+:} false; then :
2432  $as_echo_n "(cached) " >&6
2433fi
2434eval ac_res=\$$3
2435	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2436$as_echo "$ac_res" >&6; }
2437else
2438  # Is the header compilable?
2439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2440$as_echo_n "checking $2 usability... " >&6; }
2441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2442/* end confdefs.h.  */
2443$4
2444#include <$2>
2445_ACEOF
2446if ac_fn_cxx_try_compile "$LINENO"; then :
2447  ac_header_compiler=yes
2448else
2449  ac_header_compiler=no
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2453$as_echo "$ac_header_compiler" >&6; }
2454
2455# Is the header present?
2456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2457$as_echo_n "checking $2 presence... " >&6; }
2458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2459/* end confdefs.h.  */
2460#include <$2>
2461_ACEOF
2462if ac_fn_cxx_try_cpp "$LINENO"; then :
2463  ac_header_preproc=yes
2464else
2465  ac_header_preproc=no
2466fi
2467rm -f conftest.err conftest.i conftest.$ac_ext
2468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2469$as_echo "$ac_header_preproc" >&6; }
2470
2471# So?  What about this header?
2472case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2473  yes:no: )
2474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2475$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2477$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2478    ;;
2479  no:yes:* )
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2481$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2483$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2485$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2487$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2489$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2490( $as_echo "## ----------------------------------------- ##
2491## Report this to build-dev@openjdk.java.net ##
2492## ----------------------------------------- ##"
2493     ) | sed "s/^/$as_me: WARNING:     /" >&2
2494    ;;
2495esac
2496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2497$as_echo_n "checking for $2... " >&6; }
2498if eval \${$3+:} false; then :
2499  $as_echo_n "(cached) " >&6
2500else
2501  eval "$3=\$ac_header_compiler"
2502fi
2503eval ac_res=\$$3
2504	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2505$as_echo "$ac_res" >&6; }
2506fi
2507  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2508
2509} # ac_fn_cxx_check_header_mongrel
2510
2511# ac_fn_cxx_try_run LINENO
2512# ------------------------
2513# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2514# that executables *can* be run.
2515ac_fn_cxx_try_run ()
2516{
2517  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2518  if { { ac_try="$ac_link"
2519case "(($ac_try" in
2520  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2521  *) ac_try_echo=$ac_try;;
2522esac
2523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2524$as_echo "$ac_try_echo"; } >&5
2525  (eval "$ac_link") 2>&5
2526  ac_status=$?
2527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2528  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2529  { { case "(($ac_try" in
2530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531  *) ac_try_echo=$ac_try;;
2532esac
2533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534$as_echo "$ac_try_echo"; } >&5
2535  (eval "$ac_try") 2>&5
2536  ac_status=$?
2537  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2538  test $ac_status = 0; }; }; then :
2539  ac_retval=0
2540else
2541  $as_echo "$as_me: program exited with status $ac_status" >&5
2542       $as_echo "$as_me: failed program was:" >&5
2543sed 's/^/| /' conftest.$ac_ext >&5
2544
2545       ac_retval=$ac_status
2546fi
2547  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2548  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2549  as_fn_set_status $ac_retval
2550
2551} # ac_fn_cxx_try_run
2552
2553# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2554# ---------------------------------------------------------
2555# Tests whether HEADER exists and can be compiled using the include files in
2556# INCLUDES, setting the cache variable VAR accordingly.
2557ac_fn_cxx_check_header_compile ()
2558{
2559  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2561$as_echo_n "checking for $2... " >&6; }
2562if eval \${$3+:} false; then :
2563  $as_echo_n "(cached) " >&6
2564else
2565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2566/* end confdefs.h.  */
2567$4
2568#include <$2>
2569_ACEOF
2570if ac_fn_cxx_try_compile "$LINENO"; then :
2571  eval "$3=yes"
2572else
2573  eval "$3=no"
2574fi
2575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2576fi
2577eval ac_res=\$$3
2578	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2579$as_echo "$ac_res" >&6; }
2580  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2581
2582} # ac_fn_cxx_check_header_compile
2583
2584# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2585# ----------------------------------------------
2586# Tries to find the compile-time value of EXPR in a program that includes
2587# INCLUDES, setting VAR accordingly. Returns whether the value could be
2588# computed
2589ac_fn_cxx_compute_int ()
2590{
2591  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2592  if test "$cross_compiling" = yes; then
2593    # Depending upon the size, compute the lo and hi bounds.
2594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2595/* end confdefs.h.  */
2596$4
2597int
2598main ()
2599{
2600static int test_array [1 - 2 * !(($2) >= 0)];
2601test_array [0] = 0;
2602return test_array [0];
2603
2604  ;
2605  return 0;
2606}
2607_ACEOF
2608if ac_fn_cxx_try_compile "$LINENO"; then :
2609  ac_lo=0 ac_mid=0
2610  while :; do
2611    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2612/* end confdefs.h.  */
2613$4
2614int
2615main ()
2616{
2617static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2618test_array [0] = 0;
2619return test_array [0];
2620
2621  ;
2622  return 0;
2623}
2624_ACEOF
2625if ac_fn_cxx_try_compile "$LINENO"; then :
2626  ac_hi=$ac_mid; break
2627else
2628  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2629			if test $ac_lo -le $ac_mid; then
2630			  ac_lo= ac_hi=
2631			  break
2632			fi
2633			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2634fi
2635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2636  done
2637else
2638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2639/* end confdefs.h.  */
2640$4
2641int
2642main ()
2643{
2644static int test_array [1 - 2 * !(($2) < 0)];
2645test_array [0] = 0;
2646return test_array [0];
2647
2648  ;
2649  return 0;
2650}
2651_ACEOF
2652if ac_fn_cxx_try_compile "$LINENO"; then :
2653  ac_hi=-1 ac_mid=-1
2654  while :; do
2655    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2656/* end confdefs.h.  */
2657$4
2658int
2659main ()
2660{
2661static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2662test_array [0] = 0;
2663return test_array [0];
2664
2665  ;
2666  return 0;
2667}
2668_ACEOF
2669if ac_fn_cxx_try_compile "$LINENO"; then :
2670  ac_lo=$ac_mid; break
2671else
2672  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2673			if test $ac_mid -le $ac_hi; then
2674			  ac_lo= ac_hi=
2675			  break
2676			fi
2677			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2678fi
2679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2680  done
2681else
2682  ac_lo= ac_hi=
2683fi
2684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2685fi
2686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687# Binary search between lo and hi bounds.
2688while test "x$ac_lo" != "x$ac_hi"; do
2689  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2691/* end confdefs.h.  */
2692$4
2693int
2694main ()
2695{
2696static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2697test_array [0] = 0;
2698return test_array [0];
2699
2700  ;
2701  return 0;
2702}
2703_ACEOF
2704if ac_fn_cxx_try_compile "$LINENO"; then :
2705  ac_hi=$ac_mid
2706else
2707  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2708fi
2709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2710done
2711case $ac_lo in #((
2712?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2713'') ac_retval=1 ;;
2714esac
2715  else
2716    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2717/* end confdefs.h.  */
2718$4
2719static long int longval () { return $2; }
2720static unsigned long int ulongval () { return $2; }
2721#include <stdio.h>
2722#include <stdlib.h>
2723int
2724main ()
2725{
2726
2727  FILE *f = fopen ("conftest.val", "w");
2728  if (! f)
2729    return 1;
2730  if (($2) < 0)
2731    {
2732      long int i = longval ();
2733      if (i != ($2))
2734	return 1;
2735      fprintf (f, "%ld", i);
2736    }
2737  else
2738    {
2739      unsigned long int i = ulongval ();
2740      if (i != ($2))
2741	return 1;
2742      fprintf (f, "%lu", i);
2743    }
2744  /* Do not output a trailing newline, as this causes \r\n confusion
2745     on some platforms.  */
2746  return ferror (f) || fclose (f) != 0;
2747
2748  ;
2749  return 0;
2750}
2751_ACEOF
2752if ac_fn_cxx_try_run "$LINENO"; then :
2753  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2754else
2755  ac_retval=1
2756fi
2757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2758  conftest.$ac_objext conftest.beam conftest.$ac_ext
2759rm -f conftest.val
2760
2761  fi
2762  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2763  as_fn_set_status $ac_retval
2764
2765} # ac_fn_cxx_compute_int
2766
2767# ac_fn_cxx_try_link LINENO
2768# -------------------------
2769# Try to link conftest.$ac_ext, and return whether this succeeded.
2770ac_fn_cxx_try_link ()
2771{
2772  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2773  rm -f conftest.$ac_objext conftest$ac_exeext
2774  if { { ac_try="$ac_link"
2775case "(($ac_try" in
2776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2777  *) ac_try_echo=$ac_try;;
2778esac
2779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2780$as_echo "$ac_try_echo"; } >&5
2781  (eval "$ac_link") 2>conftest.err
2782  ac_status=$?
2783  if test -s conftest.err; then
2784    grep -v '^ *+' conftest.err >conftest.er1
2785    cat conftest.er1 >&5
2786    mv -f conftest.er1 conftest.err
2787  fi
2788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2789  test $ac_status = 0; } && {
2790	 test -z "$ac_cxx_werror_flag" ||
2791	 test ! -s conftest.err
2792       } && test -s conftest$ac_exeext && {
2793	 test "$cross_compiling" = yes ||
2794	 test -x conftest$ac_exeext
2795       }; then :
2796  ac_retval=0
2797else
2798  $as_echo "$as_me: failed program was:" >&5
2799sed 's/^/| /' conftest.$ac_ext >&5
2800
2801	ac_retval=1
2802fi
2803  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2804  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2805  # interfere with the next link command; also delete a directory that is
2806  # left behind by Apple's compiler.  We do this before executing the actions.
2807  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2808  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2809  as_fn_set_status $ac_retval
2810
2811} # ac_fn_cxx_try_link
2812
2813# ac_fn_cxx_check_func LINENO FUNC VAR
2814# ------------------------------------
2815# Tests whether FUNC exists, setting the cache variable VAR accordingly
2816ac_fn_cxx_check_func ()
2817{
2818  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2820$as_echo_n "checking for $2... " >&6; }
2821if eval \${$3+:} false; then :
2822  $as_echo_n "(cached) " >&6
2823else
2824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2825/* end confdefs.h.  */
2826/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2827   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2828#define $2 innocuous_$2
2829
2830/* System header to define __stub macros and hopefully few prototypes,
2831    which can conflict with char $2 (); below.
2832    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2833    <limits.h> exists even on freestanding compilers.  */
2834
2835#ifdef __STDC__
2836# include <limits.h>
2837#else
2838# include <assert.h>
2839#endif
2840
2841#undef $2
2842
2843/* Override any GCC internal prototype to avoid an error.
2844   Use char because int might match the return type of a GCC
2845   builtin and then its argument prototype would still apply.  */
2846#ifdef __cplusplus
2847extern "C"
2848#endif
2849char $2 ();
2850/* The GNU C library defines this for functions which it implements
2851    to always fail with ENOSYS.  Some functions are actually named
2852    something starting with __ and the normal name is an alias.  */
2853#if defined __stub_$2 || defined __stub___$2
2854choke me
2855#endif
2856
2857int
2858main ()
2859{
2860return $2 ();
2861  ;
2862  return 0;
2863}
2864_ACEOF
2865if ac_fn_cxx_try_link "$LINENO"; then :
2866  eval "$3=yes"
2867else
2868  eval "$3=no"
2869fi
2870rm -f core conftest.err conftest.$ac_objext \
2871    conftest$ac_exeext conftest.$ac_ext
2872fi
2873eval ac_res=\$$3
2874	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2875$as_echo "$ac_res" >&6; }
2876  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2877
2878} # ac_fn_cxx_check_func
2879
2880# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2881# -------------------------------------------------------
2882# Tests whether HEADER exists and can be compiled using the include files in
2883# INCLUDES, setting the cache variable VAR accordingly.
2884ac_fn_c_check_header_compile ()
2885{
2886  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2888$as_echo_n "checking for $2... " >&6; }
2889if eval \${$3+:} false; then :
2890  $as_echo_n "(cached) " >&6
2891else
2892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2893/* end confdefs.h.  */
2894$4
2895#include <$2>
2896_ACEOF
2897if ac_fn_c_try_compile "$LINENO"; then :
2898  eval "$3=yes"
2899else
2900  eval "$3=no"
2901fi
2902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2903fi
2904eval ac_res=\$$3
2905	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2906$as_echo "$ac_res" >&6; }
2907  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2908
2909} # ac_fn_c_check_header_compile
2910cat >config.log <<_ACEOF
2911This file contains any messages produced by compilers while
2912running configure, to aid debugging if configure makes a mistake.
2913
2914It was created by OpenJDK $as_me jdk9, which was
2915generated by GNU Autoconf 2.69.  Invocation command line was
2916
2917  $ $0 $@
2918
2919_ACEOF
2920exec 5>>config.log
2921{
2922cat <<_ASUNAME
2923## --------- ##
2924## Platform. ##
2925## --------- ##
2926
2927hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2928uname -m = `(uname -m) 2>/dev/null || echo unknown`
2929uname -r = `(uname -r) 2>/dev/null || echo unknown`
2930uname -s = `(uname -s) 2>/dev/null || echo unknown`
2931uname -v = `(uname -v) 2>/dev/null || echo unknown`
2932
2933/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2934/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2935
2936/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2937/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2938/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2939/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2940/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2941/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2942/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2943
2944_ASUNAME
2945
2946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2947for as_dir in $PATH
2948do
2949  IFS=$as_save_IFS
2950  test -z "$as_dir" && as_dir=.
2951    $as_echo "PATH: $as_dir"
2952  done
2953IFS=$as_save_IFS
2954
2955} >&5
2956
2957cat >&5 <<_ACEOF
2958
2959
2960## ----------- ##
2961## Core tests. ##
2962## ----------- ##
2963
2964_ACEOF
2965
2966
2967# Keep a trace of the command line.
2968# Strip out --no-create and --no-recursion so they do not pile up.
2969# Strip out --silent because we don't want to record it for future runs.
2970# Also quote any args containing shell meta-characters.
2971# Make two passes to allow for proper duplicate-argument suppression.
2972ac_configure_args=
2973ac_configure_args0=
2974ac_configure_args1=
2975ac_must_keep_next=false
2976for ac_pass in 1 2
2977do
2978  for ac_arg
2979  do
2980    case $ac_arg in
2981    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2982    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2983    | -silent | --silent | --silen | --sile | --sil)
2984      continue ;;
2985    *\'*)
2986      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2987    esac
2988    case $ac_pass in
2989    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2990    2)
2991      as_fn_append ac_configure_args1 " '$ac_arg'"
2992      if test $ac_must_keep_next = true; then
2993	ac_must_keep_next=false # Got value, back to normal.
2994      else
2995	case $ac_arg in
2996	  *=* | --config-cache | -C | -disable-* | --disable-* \
2997	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2998	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2999	  | -with-* | --with-* | -without-* | --without-* | --x)
3000	    case "$ac_configure_args0 " in
3001	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3002	    esac
3003	    ;;
3004	  -* ) ac_must_keep_next=true ;;
3005	esac
3006      fi
3007      as_fn_append ac_configure_args " '$ac_arg'"
3008      ;;
3009    esac
3010  done
3011done
3012{ ac_configure_args0=; unset ac_configure_args0;}
3013{ ac_configure_args1=; unset ac_configure_args1;}
3014
3015# When interrupted or exit'd, cleanup temporary files, and complete
3016# config.log.  We remove comments because anyway the quotes in there
3017# would cause problems or look ugly.
3018# WARNING: Use '\'' to represent an apostrophe within the trap.
3019# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3020trap 'exit_status=$?
3021  # Save into config.log some information that might help in debugging.
3022  {
3023    echo
3024
3025    $as_echo "## ---------------- ##
3026## Cache variables. ##
3027## ---------------- ##"
3028    echo
3029    # The following way of writing the cache mishandles newlines in values,
3030(
3031  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3032    eval ac_val=\$$ac_var
3033    case $ac_val in #(
3034    *${as_nl}*)
3035      case $ac_var in #(
3036      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3037$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3038      esac
3039      case $ac_var in #(
3040      _ | IFS | as_nl) ;; #(
3041      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3042      *) { eval $ac_var=; unset $ac_var;} ;;
3043      esac ;;
3044    esac
3045  done
3046  (set) 2>&1 |
3047    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3048    *${as_nl}ac_space=\ *)
3049      sed -n \
3050	"s/'\''/'\''\\\\'\'''\''/g;
3051	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3052      ;; #(
3053    *)
3054      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3055      ;;
3056    esac |
3057    sort
3058)
3059    echo
3060
3061    $as_echo "## ----------------- ##
3062## Output variables. ##
3063## ----------------- ##"
3064    echo
3065    for ac_var in $ac_subst_vars
3066    do
3067      eval ac_val=\$$ac_var
3068      case $ac_val in
3069      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3070      esac
3071      $as_echo "$ac_var='\''$ac_val'\''"
3072    done | sort
3073    echo
3074
3075    if test -n "$ac_subst_files"; then
3076      $as_echo "## ------------------- ##
3077## File substitutions. ##
3078## ------------------- ##"
3079      echo
3080      for ac_var in $ac_subst_files
3081      do
3082	eval ac_val=\$$ac_var
3083	case $ac_val in
3084	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3085	esac
3086	$as_echo "$ac_var='\''$ac_val'\''"
3087      done | sort
3088      echo
3089    fi
3090
3091    if test -s confdefs.h; then
3092      $as_echo "## ----------- ##
3093## confdefs.h. ##
3094## ----------- ##"
3095      echo
3096      cat confdefs.h
3097      echo
3098    fi
3099    test "$ac_signal" != 0 &&
3100      $as_echo "$as_me: caught signal $ac_signal"
3101    $as_echo "$as_me: exit $exit_status"
3102  } >&5
3103  rm -f core *.core core.conftest.* &&
3104    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3105    exit $exit_status
3106' 0
3107for ac_signal in 1 2 13 15; do
3108  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3109done
3110ac_signal=0
3111
3112# confdefs.h avoids OS command line length limits that DEFS can exceed.
3113rm -f -r conftest* confdefs.h
3114
3115$as_echo "/* confdefs.h */" > confdefs.h
3116
3117# Predefined preprocessor variables.
3118
3119cat >>confdefs.h <<_ACEOF
3120#define PACKAGE_NAME "$PACKAGE_NAME"
3121_ACEOF
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_VERSION "$PACKAGE_VERSION"
3129_ACEOF
3130
3131cat >>confdefs.h <<_ACEOF
3132#define PACKAGE_STRING "$PACKAGE_STRING"
3133_ACEOF
3134
3135cat >>confdefs.h <<_ACEOF
3136#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3137_ACEOF
3138
3139cat >>confdefs.h <<_ACEOF
3140#define PACKAGE_URL "$PACKAGE_URL"
3141_ACEOF
3142
3143
3144# Let the site file select an alternate cache file if it wants to.
3145# Prefer an explicitly selected file to automatically selected ones.
3146ac_site_file1=NONE
3147ac_site_file2=NONE
3148if test -n "$CONFIG_SITE"; then
3149  # We do not want a PATH search for config.site.
3150  case $CONFIG_SITE in #((
3151    -*)  ac_site_file1=./$CONFIG_SITE;;
3152    */*) ac_site_file1=$CONFIG_SITE;;
3153    *)   ac_site_file1=./$CONFIG_SITE;;
3154  esac
3155elif test "x$prefix" != xNONE; then
3156  ac_site_file1=$prefix/share/config.site
3157  ac_site_file2=$prefix/etc/config.site
3158else
3159  ac_site_file1=$ac_default_prefix/share/config.site
3160  ac_site_file2=$ac_default_prefix/etc/config.site
3161fi
3162for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3163do
3164  test "x$ac_site_file" = xNONE && continue
3165  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3166    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3167$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3168    sed 's/^/| /' "$ac_site_file" >&5
3169    . "$ac_site_file" \
3170      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3172as_fn_error $? "failed to load site script $ac_site_file
3173See \`config.log' for more details" "$LINENO" 5; }
3174  fi
3175done
3176
3177if test -r "$cache_file"; then
3178  # Some versions of bash will fail to source /dev/null (special files
3179  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3180  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3181    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3182$as_echo "$as_me: loading cache $cache_file" >&6;}
3183    case $cache_file in
3184      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3185      *)                      . "./$cache_file";;
3186    esac
3187  fi
3188else
3189  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3190$as_echo "$as_me: creating cache $cache_file" >&6;}
3191  >$cache_file
3192fi
3193
3194# Check that the precious variables saved in the cache have kept the same
3195# value.
3196ac_cache_corrupted=false
3197for ac_var in $ac_precious_vars; do
3198  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3199  eval ac_new_set=\$ac_env_${ac_var}_set
3200  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3201  eval ac_new_val=\$ac_env_${ac_var}_value
3202  case $ac_old_set,$ac_new_set in
3203    set,)
3204      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3205$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3206      ac_cache_corrupted=: ;;
3207    ,set)
3208      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3209$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3210      ac_cache_corrupted=: ;;
3211    ,);;
3212    *)
3213      if test "x$ac_old_val" != "x$ac_new_val"; then
3214	# differences in whitespace do not lead to failure.
3215	ac_old_val_w=`echo x $ac_old_val`
3216	ac_new_val_w=`echo x $ac_new_val`
3217	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3218	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3219$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3220	  ac_cache_corrupted=:
3221	else
3222	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3223$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3224	  eval $ac_var=\$ac_old_val
3225	fi
3226	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3227$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3228	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3229$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3230      fi;;
3231  esac
3232  # Pass precious variables to config.status.
3233  if test "$ac_new_set" = set; then
3234    case $ac_new_val in
3235    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3236    *) ac_arg=$ac_var=$ac_new_val ;;
3237    esac
3238    case " $ac_configure_args " in
3239      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3240      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3241    esac
3242  fi
3243done
3244if $ac_cache_corrupted; then
3245  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3247  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3248$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3249  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3250fi
3251## -------------------- ##
3252## Main body of script. ##
3253## -------------------- ##
3254
3255ac_ext=c
3256ac_cpp='$CPP $CPPFLAGS'
3257ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3258ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3259ac_compiler_gnu=$ac_cv_c_compiler_gnu
3260
3261
3262
3263ac_aux_dir=
3264for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3265  if test -f "$ac_dir/install-sh"; then
3266    ac_aux_dir=$ac_dir
3267    ac_install_sh="$ac_aux_dir/install-sh -c"
3268    break
3269  elif test -f "$ac_dir/install.sh"; then
3270    ac_aux_dir=$ac_dir
3271    ac_install_sh="$ac_aux_dir/install.sh -c"
3272    break
3273  elif test -f "$ac_dir/shtool"; then
3274    ac_aux_dir=$ac_dir
3275    ac_install_sh="$ac_aux_dir/shtool install -c"
3276    break
3277  fi
3278done
3279if test -z "$ac_aux_dir"; then
3280  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
3281fi
3282
3283# These three variables are undocumented and unsupported,
3284# and are intended to be withdrawn in a future Autoconf release.
3285# They can cause serious problems if a builder's source tree is in a directory
3286# whose full name contains unusual characters.
3287ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3288ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3289ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3290
3291
3292# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3293
3294#
3295# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3296# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3297#
3298# This code is free software; you can redistribute it and/or modify it
3299# under the terms of the GNU General Public License version 2 only, as
3300# published by the Free Software Foundation.  Oracle designates this
3301# particular file as subject to the "Classpath" exception as provided
3302# by Oracle in the LICENSE file that accompanied this code.
3303#
3304# This code is distributed in the hope that it will be useful, but WITHOUT
3305# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3306# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3307# version 2 for more details (a copy is included in the LICENSE file that
3308# accompanied this code).
3309#
3310# You should have received a copy of the GNU General Public License version
3311# 2 along with this work; if not, write to the Free Software Foundation,
3312# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3313#
3314# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3315# or visit www.oracle.com if you need additional information or have any
3316# questions.
3317#
3318
3319#
3320# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3321#
3322# This program is free software; you can redistribute it and/or modify
3323# it under the terms of the GNU General Public License as published by
3324# the Free Software Foundation; either version 2 of the License, or
3325# (at your option) any later version.
3326#
3327# This program is distributed in the hope that it will be useful, but
3328# WITHOUT ANY WARRANTY; without even the implied warranty of
3329# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3330# General Public License for more details.
3331#
3332# You should have received a copy of the GNU General Public License
3333# along with this program; if not, write to the Free Software
3334# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3335#
3336# As a special exception to the GNU General Public License, if you
3337# distribute this file as part of a program that contains a
3338# configuration script generated by Autoconf, you may include it under
3339# the same distribution terms that you use for the rest of that program.
3340
3341# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3342# ----------------------------------
3343# PKG_PROG_PKG_CONFIG
3344
3345# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3346#
3347# Check to see whether a particular set of modules exists.  Similar
3348# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3349#
3350#
3351# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3352# this or PKG_CHECK_MODULES is called, or make sure to call
3353# PKG_CHECK_EXISTS manually
3354# --------------------------------------------------------------
3355
3356
3357
3358# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3359# ---------------------------------------------
3360# _PKG_CONFIG
3361
3362# _PKG_SHORT_ERRORS_SUPPORTED
3363# -----------------------------
3364# _PKG_SHORT_ERRORS_SUPPORTED
3365
3366
3367# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3368# [ACTION-IF-NOT-FOUND])
3369#
3370#
3371# Note that if there is a possibility the first call to
3372# PKG_CHECK_MODULES might not happen, you should be sure to include an
3373# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3374#
3375#
3376# --------------------------------------------------------------
3377# PKG_CHECK_MODULES
3378
3379
3380# Include these first...
3381#
3382# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3383# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3384#
3385# This code is free software; you can redistribute it and/or modify it
3386# under the terms of the GNU General Public License version 2 only, as
3387# published by the Free Software Foundation.  Oracle designates this
3388# particular file as subject to the "Classpath" exception as provided
3389# by Oracle in the LICENSE file that accompanied this code.
3390#
3391# This code is distributed in the hope that it will be useful, but WITHOUT
3392# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3393# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3394# version 2 for more details (a copy is included in the LICENSE file that
3395# accompanied this code).
3396#
3397# You should have received a copy of the GNU General Public License version
3398# 2 along with this work; if not, write to the Free Software Foundation,
3399# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3400#
3401# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3402# or visit www.oracle.com if you need additional information or have any
3403# questions.
3404#
3405
3406# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3407# If so, then append $1 to $2 \
3408# Also set JVM_ARG_OK to true/false depending on outcome.
3409
3410
3411# Appends a string to a path variable, only adding the : when needed.
3412
3413
3414# Prepends a string to a path variable, only adding the : when needed.
3415
3416
3417# This will make sure the given variable points to a full and proper
3418# path. This means:
3419# 1) There will be no spaces in the path. On unix platforms,
3420#    spaces in the path will result in an error. On Windows,
3421#    the path will be rewritten using short-style to be space-free.
3422# 2) The path will be absolute, and it will be in unix-style (on
3423#     cygwin).
3424# $1: The name of the variable to fix
3425
3426
3427# This will make sure the given variable points to a executable
3428# with a full and proper path. This means:
3429# 1) There will be no spaces in the path. On unix platforms,
3430#    spaces in the path will result in an error. On Windows,
3431#    the path will be rewritten using short-style to be space-free.
3432# 2) The path will be absolute, and it will be in unix-style (on
3433#     cygwin).
3434# Any arguments given to the executable is preserved.
3435# If the input variable does not have a directory specification, then
3436# it need to be in the PATH.
3437# $1: The name of the variable to fix
3438
3439
3440
3441
3442# Register a --with argument but mark it as deprecated
3443# $1: The name of the with argument to deprecate, not including --with-
3444
3445
3446# Register a --enable argument but mark it as deprecated
3447# $1: The name of the with argument to deprecate, not including --enable-
3448# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3449
3450
3451
3452
3453# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3454# $1: variable to check
3455
3456
3457# Check that there are no unprocessed overridden variables left.
3458# If so, they are an incorrect argument and we will exit with an error.
3459
3460
3461# Setup a tool for the given variable. If correctly specified by the user,
3462# use that value, otherwise search for the tool using the supplied code snippet.
3463# $1: variable to set
3464# $2: code snippet to call to look for the tool
3465
3466
3467# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3468# $1: variable to set
3469# $2: executable name (or list of names) to look for
3470
3471
3472# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3473# $1: variable to set
3474# $2: executable name (or list of names) to look for
3475
3476
3477# Like BASIC_PATH_PROGS but fails if no tool was found.
3478# $1: variable to set
3479# $2: executable name (or list of names) to look for
3480
3481
3482# Like BASIC_SETUP_TOOL but fails if no tool was found.
3483# $1: variable to set
3484# $2: autoconf macro to call to look for the special tool
3485
3486
3487# Setup the most fundamental tools that relies on not much else to set up,
3488# but is used by much of the early bootstrap code.
3489
3490
3491# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3492
3493
3494# Evaluates platform specific overrides for devkit variables.
3495# $1: Name of variable
3496
3497
3498
3499
3500
3501
3502#%%% Simple tools %%%
3503
3504# Check if we have found a usable version of make
3505# $1: the path to a potential make binary (or empty)
3506# $2: the description on how we found this
3507
3508
3509
3510
3511# Goes looking for a usable version of GNU make.
3512
3513
3514
3515
3516
3517
3518# Check if build directory is on local disk. If not possible to determine,
3519# we prefer to claim it's local.
3520# Argument 1: directory to test
3521# Argument 2: what to do if it is on local disk
3522# Argument 3: what to do otherwise (remote disk or failure)
3523
3524
3525# Check that source files have basic read permissions set. This might
3526# not be the case in cygwin in certain conditions.
3527
3528
3529
3530
3531# Check for support for specific options in bash
3532
3533
3534# Code to run after AC_OUTPUT
3535
3536
3537#
3538# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3539# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3540#
3541# This code is free software; you can redistribute it and/or modify it
3542# under the terms of the GNU General Public License version 2 only, as
3543# published by the Free Software Foundation.  Oracle designates this
3544# particular file as subject to the "Classpath" exception as provided
3545# by Oracle in the LICENSE file that accompanied this code.
3546#
3547# This code is distributed in the hope that it will be useful, but WITHOUT
3548# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3549# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3550# version 2 for more details (a copy is included in the LICENSE file that
3551# accompanied this code).
3552#
3553# You should have received a copy of the GNU General Public License version
3554# 2 along with this work; if not, write to the Free Software Foundation,
3555# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3556#
3557# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3558# or visit www.oracle.com if you need additional information or have any
3559# questions.
3560#
3561
3562
3563
3564
3565
3566# Helper function which possibly converts a path using DOS-style short mode.
3567# If so, the updated path is stored in $new_path.
3568# $1: The path to check
3569
3570
3571# Helper function which possibly converts a path using DOS-style short mode.
3572# If so, the updated path is stored in $new_path.
3573# $1: The path to check
3574
3575
3576# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3577# and could probably be heavily simplified. However, all changes in this
3578# area tend to need lot of testing in different scenarios, and in lack of
3579# proper unit testing, cleaning this up has not been deemed worth the effort
3580# at the moment.
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3591
3592
3593
3594
3595#
3596# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3597# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3598#
3599# This code is free software; you can redistribute it and/or modify it
3600# under the terms of the GNU General Public License version 2 only, as
3601# published by the Free Software Foundation.  Oracle designates this
3602# particular file as subject to the "Classpath" exception as provided
3603# by Oracle in the LICENSE file that accompanied this code.
3604#
3605# This code is distributed in the hope that it will be useful, but WITHOUT
3606# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3607# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3608# version 2 for more details (a copy is included in the LICENSE file that
3609# accompanied this code).
3610#
3611# You should have received a copy of the GNU General Public License version
3612# 2 along with this work; if not, write to the Free Software Foundation,
3613# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3614#
3615# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3616# or visit www.oracle.com if you need additional information or have any
3617# questions.
3618#
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630# ... then the rest
3631#
3632# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3633# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3634#
3635# This code is free software; you can redistribute it and/or modify it
3636# under the terms of the GNU General Public License version 2 only, as
3637# published by the Free Software Foundation.  Oracle designates this
3638# particular file as subject to the "Classpath" exception as provided
3639# by Oracle in the LICENSE file that accompanied this code.
3640#
3641# This code is distributed in the hope that it will be useful, but WITHOUT
3642# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3643# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3644# version 2 for more details (a copy is included in the LICENSE file that
3645# accompanied this code).
3646#
3647# You should have received a copy of the GNU General Public License version
3648# 2 along with this work; if not, write to the Free Software Foundation,
3649# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3650#
3651# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3652# or visit www.oracle.com if you need additional information or have any
3653# questions.
3654#
3655
3656########################################################################
3657# This file handles detection of the Boot JDK. The Boot JDK detection
3658# process has been developed as a response to solve a complex real-world
3659# problem. Initially, it was simple, but it has grown as platform after
3660# platform, idiosyncracy after idiosyncracy has been supported.
3661#
3662# The basic idea is this:
3663# 1) You need an acceptable *) JDK to use as a Boot JDK
3664# 2) There are several ways to locate a JDK, that are mostly platform
3665#    dependent **)
3666# 3) You can have multiple JDKs installed
3667# 4) If possible, configure should try to dig out an acceptable JDK
3668#    automatically, without having to resort to command-line options
3669#
3670# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3671#     javac) and not a JRE, etc.
3672#
3673# **) On Windows we typically use a well-known path.
3674#     On MacOSX we typically use the tool java_home.
3675#     On Linux we typically find javac in the $PATH, and then follow a
3676#     chain of symlinks that often ends up in a real JDK.
3677#
3678# This leads to the code where we check in different ways to locate a
3679# JDK, and if one is found, check if it is acceptable. If not, we print
3680# our reasons for rejecting it (useful when debugging non-working
3681# configure situations) and continue checking the next one.
3682########################################################################
3683
3684# Execute the check given as argument, and verify the result
3685# If the Boot JDK was previously found, do nothing
3686# $1 A command line (typically autoconf macro) to execute
3687
3688
3689# Test: Is bootjdk explicitely set by command line arguments?
3690
3691
3692# Test: Is bootjdk available from builddeps?
3693
3694
3695# Test: Is $JAVA_HOME set?
3696
3697
3698# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3699
3700
3701# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3702# $1: Argument to the java_home binary (optional)
3703
3704
3705# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3706
3707
3708# Look for a jdk in the given path. If there are multiple, try to select the newest.
3709# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3710# $1 = Path to directory containing jdk installations.
3711# $2 = String to append to the found JDK directory to get the proper JDK home
3712
3713
3714# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3715# environmental variable as base for where to look.
3716# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3717
3718
3719# Test: Is there a JDK installed in default, well-known locations?
3720
3721
3722# Check that a command-line tool in the Boot JDK is correct
3723# $1 = name of variable to assign
3724# $2 = name of binary
3725
3726
3727###############################################################################
3728#
3729# We need a Boot JDK to bootstrap the build.
3730#
3731
3732
3733
3734
3735
3736#
3737# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3738# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3739#
3740# This code is free software; you can redistribute it and/or modify it
3741# under the terms of the GNU General Public License version 2 only, as
3742# published by the Free Software Foundation.  Oracle designates this
3743# particular file as subject to the "Classpath" exception as provided
3744# by Oracle in the LICENSE file that accompanied this code.
3745#
3746# This code is distributed in the hope that it will be useful, but WITHOUT
3747# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3748# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3749# version 2 for more details (a copy is included in the LICENSE file that
3750# accompanied this code).
3751#
3752# You should have received a copy of the GNU General Public License version
3753# 2 along with this work; if not, write to the Free Software Foundation,
3754# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3755#
3756# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3757# or visit www.oracle.com if you need additional information or have any
3758# questions.
3759#
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780#
3781# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3782# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3783#
3784# This code is free software; you can redistribute it and/or modify it
3785# under the terms of the GNU General Public License version 2 only, as
3786# published by the Free Software Foundation.  Oracle designates this
3787# particular file as subject to the "Classpath" exception as provided
3788# by Oracle in the LICENSE file that accompanied this code.
3789#
3790# This code is distributed in the hope that it will be useful, but WITHOUT
3791# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3792# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3793# version 2 for more details (a copy is included in the LICENSE file that
3794# accompanied this code).
3795#
3796# You should have received a copy of the GNU General Public License version
3797# 2 along with this work; if not, write to the Free Software Foundation,
3798# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3799#
3800# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3801# or visit www.oracle.com if you need additional information or have any
3802# questions.
3803#
3804
3805
3806
3807
3808
3809# Documentation on common flags used for solstudio in HIGHEST.
3810#
3811# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3812#          done with care, there are some assumptions below that need to
3813#          be understood about the use of pointers, and IEEE behavior.
3814#
3815# -fns: Use non-standard floating point mode (not IEEE 754)
3816# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3817# -fsingle: Use single precision floating point with 'float'
3818# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3819#   (Source with excessing pointer casting and data access with mixed
3820#    pointer types are not recommended)
3821# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3822#   (If you expect perfect errno behavior, do not use this)
3823# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3824# -xrestrict: Pointer parameters to functions do not overlap
3825#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3826#    If you pass in multiple pointers to the same data, do not use this)
3827# -xlibmil: Inline some library routines
3828#   (If you expect perfect errno behavior, do not use this)
3829# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3830#   (If you expect perfect errno behavior, do not use this)
3831#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3832
3833    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3834    # Bug?
3835    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3836    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3837    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3838    #fi
3839
3840
3841
3842
3843
3844# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3845#                                   [RUN-IF-FALSE])
3846# ------------------------------------------------------------
3847# Check that the c and c++ compilers support an argument
3848
3849
3850# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3851#                                    [RUN-IF-FALSE])
3852# ------------------------------------------------------------
3853# Check that the linker support an argument
3854
3855
3856
3857
3858#
3859# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3860# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3861#
3862# This code is free software; you can redistribute it and/or modify it
3863# under the terms of the GNU General Public License version 2 only, as
3864# published by the Free Software Foundation.  Oracle designates this
3865# particular file as subject to the "Classpath" exception as provided
3866# by Oracle in the LICENSE file that accompanied this code.
3867#
3868# This code is distributed in the hope that it will be useful, but WITHOUT
3869# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3870# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3871# version 2 for more details (a copy is included in the LICENSE file that
3872# accompanied this code).
3873#
3874# You should have received a copy of the GNU General Public License version
3875# 2 along with this work; if not, write to the Free Software Foundation,
3876# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3877#
3878# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3879# or visit www.oracle.com if you need additional information or have any
3880# questions.
3881#
3882
3883
3884
3885
3886
3887cygwin_help() {
3888  case $1 in
3889    unzip)
3890      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3891      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3892      ;;
3893    zip)
3894      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3895      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3896      ;;
3897    make)
3898      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3899      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3900      ;;
3901    freetype)
3902      HELP_MSG="
3903The freetype library can now be build during the configure process.
3904Download the freetype sources and unpack them into an arbitrary directory:
3905
3906wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3907tar -xzf freetype-2.5.3.tar.gz
3908
3909Then run configure with '--with-freetype-src=<freetype_src>'. This will
3910automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3911builds or into '<freetype_src>/lib32' for 32-bit builds.
3912Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3913and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3914      ;;
3915  esac
3916}
3917
3918msys_help() {
3919  PKGHANDLER_COMMAND=""
3920}
3921
3922apt_help() {
3923  case $1 in
3924    devkit)
3925      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3926    openjdk)
3927      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3928    alsa)
3929      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3930    cups)
3931      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3932    freetype)
3933      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3934    pulse)
3935      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3936    x11)
3937      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3938    ccache)
3939      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3940  esac
3941}
3942
3943yum_help() {
3944  case $1 in
3945    devkit)
3946      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3947    openjdk)
3948      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3949    alsa)
3950      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3951    cups)
3952      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3953    freetype)
3954      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3955    pulse)
3956      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3957    x11)
3958      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3959    ccache)
3960      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3961  esac
3962}
3963
3964port_help() {
3965  PKGHANDLER_COMMAND=""
3966}
3967
3968pkgutil_help() {
3969  PKGHANDLER_COMMAND=""
3970}
3971
3972pkgadd_help() {
3973  PKGHANDLER_COMMAND=""
3974}
3975
3976# This function will check if we're called from the "configure" wrapper while
3977# printing --help. If so, we will print out additional information that can
3978# only be extracted within the autoconf script, and then exit. This must be
3979# called at the very beginning in configure.ac.
3980
3981
3982
3983
3984
3985
3986#
3987# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3988# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3989#
3990# This code is free software; you can redistribute it and/or modify it
3991# under the terms of the GNU General Public License version 2 only, as
3992# published by the Free Software Foundation.  Oracle designates this
3993# particular file as subject to the "Classpath" exception as provided
3994# by Oracle in the LICENSE file that accompanied this code.
3995#
3996# This code is distributed in the hope that it will be useful, but WITHOUT
3997# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3998# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3999# version 2 for more details (a copy is included in the LICENSE file that
4000# accompanied this code).
4001#
4002# You should have received a copy of the GNU General Public License version
4003# 2 along with this work; if not, write to the Free Software Foundation,
4004# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4005#
4006# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4007# or visit www.oracle.com if you need additional information or have any
4008# questions.
4009#
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020###############################################################################
4021#
4022# Should we build only OpenJDK even if closed sources are present?
4023#
4024
4025
4026
4027
4028
4029
4030###############################################################################
4031#
4032# Enable or disable the elliptic curve crypto implementation
4033#
4034
4035
4036
4037
4038
4039################################################################################
4040#
4041# Gcov coverage data for hotspot
4042#
4043
4044
4045#
4046# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4047# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4048#
4049# This code is free software; you can redistribute it and/or modify it
4050# under the terms of the GNU General Public License version 2 only, as
4051# published by the Free Software Foundation.  Oracle designates this
4052# particular file as subject to the "Classpath" exception as provided
4053# by Oracle in the LICENSE file that accompanied this code.
4054#
4055# This code is distributed in the hope that it will be useful, but WITHOUT
4056# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4057# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4058# version 2 for more details (a copy is included in the LICENSE file that
4059# accompanied this code).
4060#
4061# You should have received a copy of the GNU General Public License version
4062# 2 along with this work; if not, write to the Free Software Foundation,
4063# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4064#
4065# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4066# or visit www.oracle.com if you need additional information or have any
4067# questions.
4068#
4069
4070###############################################################################
4071#
4072# Setup version numbers
4073#
4074
4075# Verify that a given string represents a valid version number, and assign it
4076# to a variable.
4077
4078# Argument 1: the variable to assign to
4079# Argument 2: the value given by the user
4080
4081
4082
4083
4084#
4085# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4086# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4087#
4088# This code is free software; you can redistribute it and/or modify it
4089# under the terms of the GNU General Public License version 2 only, as
4090# published by the Free Software Foundation.  Oracle designates this
4091# particular file as subject to the "Classpath" exception as provided
4092# by Oracle in the LICENSE file that accompanied this code.
4093#
4094# This code is distributed in the hope that it will be useful, but WITHOUT
4095# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4096# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4097# version 2 for more details (a copy is included in the LICENSE file that
4098# accompanied this code).
4099#
4100# You should have received a copy of the GNU General Public License version
4101# 2 along with this work; if not, write to the Free Software Foundation,
4102# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4103#
4104# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4105# or visit www.oracle.com if you need additional information or have any
4106# questions.
4107#
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129#
4130# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4131# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4132#
4133# This code is free software; you can redistribute it and/or modify it
4134# under the terms of the GNU General Public License version 2 only, as
4135# published by the Free Software Foundation.  Oracle designates this
4136# particular file as subject to the "Classpath" exception as provided
4137# by Oracle in the LICENSE file that accompanied this code.
4138#
4139# This code is distributed in the hope that it will be useful, but WITHOUT
4140# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4141# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4142# version 2 for more details (a copy is included in the LICENSE file that
4143# accompanied this code).
4144#
4145# You should have received a copy of the GNU General Public License version
4146# 2 along with this work; if not, write to the Free Software Foundation,
4147# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4148#
4149# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4150# or visit www.oracle.com if you need additional information or have any
4151# questions.
4152#
4153
4154# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4155# Converts autoconf style CPU name to OpenJDK style, into
4156# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4157
4158
4159# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4160# Converts autoconf style OS name to OpenJDK style, into
4161# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4162
4163
4164# Expects $host_os $host_cpu $build_os and $build_cpu
4165# and $with_target_bits to have been setup!
4166#
4167# Translate the standard triplet(quadruplet) definition
4168# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4169# OPENJDK_BUILD_OS, etc.
4170
4171
4172# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4173# accordingly. Must be done after setting up build and target system, but before
4174# doing anything else with these values.
4175
4176
4177# Setup the legacy variables, for controlling the old makefiles.
4178#
4179
4180
4181
4182
4183#%%% Build and target systems %%%
4184
4185
4186
4187
4188# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4189# Add -mX to various FLAGS variables.
4190
4191
4192
4193
4194
4195
4196#
4197# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4198# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4199#
4200# This code is free software; you can redistribute it and/or modify it
4201# under the terms of the GNU General Public License version 2 only, as
4202# published by the Free Software Foundation.  Oracle designates this
4203# particular file as subject to the "Classpath" exception as provided
4204# by Oracle in the LICENSE file that accompanied this code.
4205#
4206# This code is distributed in the hope that it will be useful, but WITHOUT
4207# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4208# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4209# version 2 for more details (a copy is included in the LICENSE file that
4210# accompanied this code).
4211#
4212# You should have received a copy of the GNU General Public License version
4213# 2 along with this work; if not, write to the Free Software Foundation,
4214# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4215#
4216# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4217# or visit www.oracle.com if you need additional information or have any
4218# questions.
4219#
4220
4221
4222
4223
4224
4225
4226
4227
4228#
4229# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4230# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4231#
4232# This code is free software; you can redistribute it and/or modify it
4233# under the terms of the GNU General Public License version 2 only, as
4234# published by the Free Software Foundation.  Oracle designates this
4235# particular file as subject to the "Classpath" exception as provided
4236# by Oracle in the LICENSE file that accompanied this code.
4237#
4238# This code is distributed in the hope that it will be useful, but WITHOUT
4239# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4240# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4241# version 2 for more details (a copy is included in the LICENSE file that
4242# accompanied this code).
4243#
4244# You should have received a copy of the GNU General Public License version
4245# 2 along with this work; if not, write to the Free Software Foundation,
4246# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4247#
4248# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4249# or visit www.oracle.com if you need additional information or have any
4250# questions.
4251#
4252
4253########################################################################
4254# This file is responsible for detecting, verifying and setting up the
4255# toolchain, i.e. the compiler, linker and related utilities. It will setup
4256# proper paths to the binaries, but it will not setup any flags.
4257#
4258# The binaries used is determined by the toolchain type, which is the family of
4259# compilers and related tools that are used.
4260########################################################################
4261
4262
4263# All valid toolchains, regardless of platform (used by help.m4)
4264VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4265
4266# These toolchains are valid on different platforms
4267VALID_TOOLCHAINS_linux="gcc clang"
4268VALID_TOOLCHAINS_solaris="solstudio"
4269VALID_TOOLCHAINS_macosx="gcc clang"
4270VALID_TOOLCHAINS_aix="xlc"
4271VALID_TOOLCHAINS_windows="microsoft"
4272
4273# Toolchain descriptions
4274TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4275TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4276TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4277TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4278TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4279
4280# Setup a number of variables describing how native output files are
4281# named on this platform/toolchain.
4282
4283
4284# Determine which toolchain type to use, and make sure it is valid for this
4285# platform. Setup various information about the selected toolchain.
4286
4287
4288# Before we start detecting the toolchain executables, we might need some
4289# special setup, e.g. additional paths etc.
4290
4291
4292# Restore path, etc
4293
4294
4295# Check if a compiler is of the toolchain type we expect, and save the version
4296# information from it. If the compiler does not match the expected type,
4297# this function will abort using AC_MSG_ERROR. If it matches, the version will
4298# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4299# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4300#
4301# $1 = compiler to test (CC or CXX)
4302# $2 = human readable name of compiler (C or C++)
4303
4304
4305# Try to locate the given C or C++ compiler in the path, or otherwise.
4306#
4307# $1 = compiler to test (CC or CXX)
4308# $2 = human readable name of compiler (C or C++)
4309# $3 = list of compiler names to search for
4310
4311
4312# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4313# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4314# archiver (AR). Verify that the compilers are correct according to the
4315# toolchain type.
4316
4317
4318# Setup additional tools that is considered a part of the toolchain, but not the
4319# core part. Many of these are highly platform-specific and do not exist,
4320# and/or are not needed on all platforms.
4321
4322
4323# Setup the build tools (i.e, the compiler and linker used to build programs
4324# that should be run on the build platform, not the target platform, as a build
4325# helper). Since the non-cross-compile case uses the normal, target compilers
4326# for this, we can only do this after these have been setup.
4327
4328
4329# Setup legacy variables that are still needed as alternative ways to refer to
4330# parts of the toolchain.
4331
4332
4333# Do some additional checks on the detected tools.
4334
4335
4336# Setup the JTReg Regression Test Harness.
4337
4338
4339#
4340# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4341# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4342#
4343# This code is free software; you can redistribute it and/or modify it
4344# under the terms of the GNU General Public License version 2 only, as
4345# published by the Free Software Foundation.  Oracle designates this
4346# particular file as subject to the "Classpath" exception as provided
4347# by Oracle in the LICENSE file that accompanied this code.
4348#
4349# This code is distributed in the hope that it will be useful, but WITHOUT
4350# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4351# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4352# version 2 for more details (a copy is included in the LICENSE file that
4353# accompanied this code).
4354#
4355# You should have received a copy of the GNU General Public License version
4356# 2 along with this work; if not, write to the Free Software Foundation,
4357# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4358#
4359# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4360# or visit www.oracle.com if you need additional information or have any
4361# questions.
4362#
4363
4364################################################################################
4365# The order of these defines the priority by which we try to find them.
4366VALID_VS_VERSIONS="2013 2012 2010"
4367
4368VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4369VS_VERSION_INTERNAL_2010=100
4370VS_MSVCR_2010=msvcr100.dll
4371# We don't use msvcp on Visual Studio 2010
4372#VS_MSVCP_2010=msvcp100.dll
4373VS_ENVVAR_2010="VS100COMNTOOLS"
4374VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4375VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4376VS_VS_PLATFORM_NAME_2010="v100"
4377VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4378
4379VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4380VS_VERSION_INTERNAL_2012=110
4381VS_MSVCR_2012=msvcr110.dll
4382VS_MSVCP_2012=msvcp110.dll
4383VS_ENVVAR_2012="VS110COMNTOOLS"
4384VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4385VS_SDK_INSTALLDIR_2012=
4386VS_VS_PLATFORM_NAME_2012="v110"
4387VS_SDK_PLATFORM_NAME_2012=
4388
4389VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4390VS_VERSION_INTERNAL_2013=120
4391VS_MSVCR_2013=msvcr120.dll
4392VS_MSVCP_2013=msvcp120.dll
4393VS_ENVVAR_2013="VS120COMNTOOLS"
4394VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4395VS_SDK_INSTALLDIR_2013=
4396VS_VS_PLATFORM_NAME_2013="v120"
4397VS_SDK_PLATFORM_NAME_2013=
4398
4399################################################################################
4400
4401
4402
4403################################################################################
4404
4405
4406
4407################################################################################
4408# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4409# build environment and assigns it to VS_ENV_CMD
4410
4411
4412################################################################################
4413
4414
4415
4416################################################################################
4417# Check if the VS env variables were setup prior to running configure.
4418# If not, then find vcvarsall.bat and run it automatically, and integrate
4419# the set env variables into the spec file.
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434# This line needs to be here, verbatim, after all includes and the dummy hook
4435# definitions. It is replaced with custom functionality when building
4436# custom sources.
4437#CUSTOM_AUTOCONF_INCLUDE
4438
4439# Do not change or remove the following line, it is needed for consistency checks:
4440DATE_WHEN_GENERATED=1435305702
4441
4442###############################################################################
4443#
4444# Initialization / Boot-strapping
4445#
4446# The bootstrapping process needs to solve the "chicken or the egg" problem,
4447# thus it jumps back and forth, each time gaining something needed later on.
4448#
4449###############################################################################
4450
4451# If we are requested to print additional help, do that and then exit.
4452# This must be the very first call.
4453
4454  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4455    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4456    $PRINTF "Which are valid to use depends on the build platform.\n"
4457    for toolchain in $VALID_TOOLCHAINS_all; do
4458      # Use indirect variable referencing
4459      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4460      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4461      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4462    done
4463
4464    # And now exit directly
4465    exit 0
4466  fi
4467
4468
4469# Basic initialization that must happen first of all in the normal process.
4470
4471  # Save the original command line. This is passed to us by the wrapper configure script.
4472
4473  # Save the path variable before it gets changed
4474  ORIGINAL_PATH="$PATH"
4475
4476  DATE_WHEN_CONFIGURED=`LANG=C date`
4477
4478  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4479$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4481$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4482
4483
4484  # Start with tools that do not need have cross compilation support
4485  # and can be expected to be found in the default PATH. These tools are
4486  # used by configure. Nor are these tools expected to be found in the
4487  # devkit from the builddeps server either, since they are
4488  # needed to download the devkit.
4489
4490  # First are all the simple required tools.
4491
4492
4493
4494  # Publish this variable in the help.
4495
4496
4497  if test "x$BASENAME" = x; then
4498    # The variable is not set by user, try to locate tool using the code snippet
4499    for ac_prog in basename
4500do
4501  # Extract the first word of "$ac_prog", so it can be a program name with args.
4502set dummy $ac_prog; ac_word=$2
4503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4504$as_echo_n "checking for $ac_word... " >&6; }
4505if ${ac_cv_path_BASENAME+:} false; then :
4506  $as_echo_n "(cached) " >&6
4507else
4508  case $BASENAME in
4509  [\\/]* | ?:[\\/]*)
4510  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4511  ;;
4512  *)
4513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4514for as_dir in $PATH
4515do
4516  IFS=$as_save_IFS
4517  test -z "$as_dir" && as_dir=.
4518    for ac_exec_ext in '' $ac_executable_extensions; do
4519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4520    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4522    break 2
4523  fi
4524done
4525  done
4526IFS=$as_save_IFS
4527
4528  ;;
4529esac
4530fi
4531BASENAME=$ac_cv_path_BASENAME
4532if test -n "$BASENAME"; then
4533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4534$as_echo "$BASENAME" >&6; }
4535else
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4537$as_echo "no" >&6; }
4538fi
4539
4540
4541  test -n "$BASENAME" && break
4542done
4543
4544  else
4545    # The variable is set, but is it from the command line or the environment?
4546
4547    # Try to remove the string !BASENAME! from our list.
4548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4550      # If it failed, the variable was not from the command line. Ignore it,
4551      # but warn the user (except for BASH, which is always set by the calling BASH).
4552      if test "xBASENAME" != xBASH; then
4553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4554$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4555      fi
4556      # Try to locate tool using the code snippet
4557      for ac_prog in basename
4558do
4559  # Extract the first word of "$ac_prog", so it can be a program name with args.
4560set dummy $ac_prog; ac_word=$2
4561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4562$as_echo_n "checking for $ac_word... " >&6; }
4563if ${ac_cv_path_BASENAME+:} false; then :
4564  $as_echo_n "(cached) " >&6
4565else
4566  case $BASENAME in
4567  [\\/]* | ?:[\\/]*)
4568  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4569  ;;
4570  *)
4571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4572for as_dir in $PATH
4573do
4574  IFS=$as_save_IFS
4575  test -z "$as_dir" && as_dir=.
4576    for ac_exec_ext in '' $ac_executable_extensions; do
4577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4578    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4580    break 2
4581  fi
4582done
4583  done
4584IFS=$as_save_IFS
4585
4586  ;;
4587esac
4588fi
4589BASENAME=$ac_cv_path_BASENAME
4590if test -n "$BASENAME"; then
4591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4592$as_echo "$BASENAME" >&6; }
4593else
4594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4595$as_echo "no" >&6; }
4596fi
4597
4598
4599  test -n "$BASENAME" && break
4600done
4601
4602    else
4603      # If it succeeded, then it was overridden by the user. We will use it
4604      # for the tool.
4605
4606      # First remove it from the list of overridden variables, so we can test
4607      # for unknown variables in the end.
4608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4609
4610      # Check if the provided tool contains a complete path.
4611      tool_specified="$BASENAME"
4612      tool_basename="${tool_specified##*/}"
4613      if test "x$tool_basename" = "x$tool_specified"; then
4614        # A command without a complete path is provided, search $PATH.
4615        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4616$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4617        # Extract the first word of "$tool_basename", so it can be a program name with args.
4618set dummy $tool_basename; ac_word=$2
4619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4620$as_echo_n "checking for $ac_word... " >&6; }
4621if ${ac_cv_path_BASENAME+:} false; then :
4622  $as_echo_n "(cached) " >&6
4623else
4624  case $BASENAME in
4625  [\\/]* | ?:[\\/]*)
4626  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4627  ;;
4628  *)
4629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630for as_dir in $PATH
4631do
4632  IFS=$as_save_IFS
4633  test -z "$as_dir" && as_dir=.
4634    for ac_exec_ext in '' $ac_executable_extensions; do
4635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4636    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4638    break 2
4639  fi
4640done
4641  done
4642IFS=$as_save_IFS
4643
4644  ;;
4645esac
4646fi
4647BASENAME=$ac_cv_path_BASENAME
4648if test -n "$BASENAME"; then
4649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4650$as_echo "$BASENAME" >&6; }
4651else
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4653$as_echo "no" >&6; }
4654fi
4655
4656
4657        if test "x$BASENAME" = x; then
4658          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4659        fi
4660      else
4661        # Otherwise we believe it is a complete path. Use it as it is.
4662        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4663$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4665$as_echo_n "checking for BASENAME... " >&6; }
4666        if test ! -x "$tool_specified"; then
4667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4668$as_echo "not found" >&6; }
4669          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4670        fi
4671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4672$as_echo "$tool_specified" >&6; }
4673      fi
4674    fi
4675  fi
4676
4677
4678
4679  if test "x$BASENAME" = x; then
4680    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4681  fi
4682
4683
4684
4685
4686
4687  # Publish this variable in the help.
4688
4689
4690  if test "x$BASH" = x; then
4691    # The variable is not set by user, try to locate tool using the code snippet
4692    for ac_prog in bash
4693do
4694  # Extract the first word of "$ac_prog", so it can be a program name with args.
4695set dummy $ac_prog; ac_word=$2
4696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697$as_echo_n "checking for $ac_word... " >&6; }
4698if ${ac_cv_path_BASH+:} false; then :
4699  $as_echo_n "(cached) " >&6
4700else
4701  case $BASH in
4702  [\\/]* | ?:[\\/]*)
4703  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4704  ;;
4705  *)
4706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707for as_dir in $PATH
4708do
4709  IFS=$as_save_IFS
4710  test -z "$as_dir" && as_dir=.
4711    for ac_exec_ext in '' $ac_executable_extensions; do
4712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4713    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4715    break 2
4716  fi
4717done
4718  done
4719IFS=$as_save_IFS
4720
4721  ;;
4722esac
4723fi
4724BASH=$ac_cv_path_BASH
4725if test -n "$BASH"; then
4726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4727$as_echo "$BASH" >&6; }
4728else
4729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730$as_echo "no" >&6; }
4731fi
4732
4733
4734  test -n "$BASH" && break
4735done
4736
4737  else
4738    # The variable is set, but is it from the command line or the environment?
4739
4740    # Try to remove the string !BASH! from our list.
4741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4743      # If it failed, the variable was not from the command line. Ignore it,
4744      # but warn the user (except for BASH, which is always set by the calling BASH).
4745      if test "xBASH" != xBASH; then
4746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4747$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4748      fi
4749      # Try to locate tool using the code snippet
4750      for ac_prog in bash
4751do
4752  # Extract the first word of "$ac_prog", so it can be a program name with args.
4753set dummy $ac_prog; ac_word=$2
4754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755$as_echo_n "checking for $ac_word... " >&6; }
4756if ${ac_cv_path_BASH+:} false; then :
4757  $as_echo_n "(cached) " >&6
4758else
4759  case $BASH in
4760  [\\/]* | ?:[\\/]*)
4761  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4762  ;;
4763  *)
4764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4765for as_dir in $PATH
4766do
4767  IFS=$as_save_IFS
4768  test -z "$as_dir" && as_dir=.
4769    for ac_exec_ext in '' $ac_executable_extensions; do
4770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4771    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4773    break 2
4774  fi
4775done
4776  done
4777IFS=$as_save_IFS
4778
4779  ;;
4780esac
4781fi
4782BASH=$ac_cv_path_BASH
4783if test -n "$BASH"; then
4784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4785$as_echo "$BASH" >&6; }
4786else
4787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4788$as_echo "no" >&6; }
4789fi
4790
4791
4792  test -n "$BASH" && break
4793done
4794
4795    else
4796      # If it succeeded, then it was overridden by the user. We will use it
4797      # for the tool.
4798
4799      # First remove it from the list of overridden variables, so we can test
4800      # for unknown variables in the end.
4801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4802
4803      # Check if the provided tool contains a complete path.
4804      tool_specified="$BASH"
4805      tool_basename="${tool_specified##*/}"
4806      if test "x$tool_basename" = "x$tool_specified"; then
4807        # A command without a complete path is provided, search $PATH.
4808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4809$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4810        # Extract the first word of "$tool_basename", so it can be a program name with args.
4811set dummy $tool_basename; ac_word=$2
4812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813$as_echo_n "checking for $ac_word... " >&6; }
4814if ${ac_cv_path_BASH+:} false; then :
4815  $as_echo_n "(cached) " >&6
4816else
4817  case $BASH in
4818  [\\/]* | ?:[\\/]*)
4819  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4820  ;;
4821  *)
4822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4823for as_dir in $PATH
4824do
4825  IFS=$as_save_IFS
4826  test -z "$as_dir" && as_dir=.
4827    for ac_exec_ext in '' $ac_executable_extensions; do
4828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4829    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4831    break 2
4832  fi
4833done
4834  done
4835IFS=$as_save_IFS
4836
4837  ;;
4838esac
4839fi
4840BASH=$ac_cv_path_BASH
4841if test -n "$BASH"; then
4842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4843$as_echo "$BASH" >&6; }
4844else
4845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4846$as_echo "no" >&6; }
4847fi
4848
4849
4850        if test "x$BASH" = x; then
4851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4852        fi
4853      else
4854        # Otherwise we believe it is a complete path. Use it as it is.
4855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4856$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4858$as_echo_n "checking for BASH... " >&6; }
4859        if test ! -x "$tool_specified"; then
4860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4861$as_echo "not found" >&6; }
4862          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4863        fi
4864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4865$as_echo "$tool_specified" >&6; }
4866      fi
4867    fi
4868  fi
4869
4870
4871
4872  if test "x$BASH" = x; then
4873    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4874  fi
4875
4876
4877
4878
4879
4880  # Publish this variable in the help.
4881
4882
4883  if test "x$CAT" = x; then
4884    # The variable is not set by user, try to locate tool using the code snippet
4885    for ac_prog in cat
4886do
4887  # Extract the first word of "$ac_prog", so it can be a program name with args.
4888set dummy $ac_prog; ac_word=$2
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890$as_echo_n "checking for $ac_word... " >&6; }
4891if ${ac_cv_path_CAT+:} false; then :
4892  $as_echo_n "(cached) " >&6
4893else
4894  case $CAT in
4895  [\\/]* | ?:[\\/]*)
4896  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4897  ;;
4898  *)
4899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900for as_dir in $PATH
4901do
4902  IFS=$as_save_IFS
4903  test -z "$as_dir" && as_dir=.
4904    for ac_exec_ext in '' $ac_executable_extensions; do
4905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4906    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908    break 2
4909  fi
4910done
4911  done
4912IFS=$as_save_IFS
4913
4914  ;;
4915esac
4916fi
4917CAT=$ac_cv_path_CAT
4918if test -n "$CAT"; then
4919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4920$as_echo "$CAT" >&6; }
4921else
4922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923$as_echo "no" >&6; }
4924fi
4925
4926
4927  test -n "$CAT" && break
4928done
4929
4930  else
4931    # The variable is set, but is it from the command line or the environment?
4932
4933    # Try to remove the string !CAT! from our list.
4934    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4935    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4936      # If it failed, the variable was not from the command line. Ignore it,
4937      # but warn the user (except for BASH, which is always set by the calling BASH).
4938      if test "xCAT" != xBASH; then
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4940$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4941      fi
4942      # Try to locate tool using the code snippet
4943      for ac_prog in cat
4944do
4945  # Extract the first word of "$ac_prog", so it can be a program name with args.
4946set dummy $ac_prog; ac_word=$2
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4948$as_echo_n "checking for $ac_word... " >&6; }
4949if ${ac_cv_path_CAT+:} false; then :
4950  $as_echo_n "(cached) " >&6
4951else
4952  case $CAT in
4953  [\\/]* | ?:[\\/]*)
4954  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4955  ;;
4956  *)
4957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958for as_dir in $PATH
4959do
4960  IFS=$as_save_IFS
4961  test -z "$as_dir" && as_dir=.
4962    for ac_exec_ext in '' $ac_executable_extensions; do
4963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4964    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4966    break 2
4967  fi
4968done
4969  done
4970IFS=$as_save_IFS
4971
4972  ;;
4973esac
4974fi
4975CAT=$ac_cv_path_CAT
4976if test -n "$CAT"; then
4977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4978$as_echo "$CAT" >&6; }
4979else
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981$as_echo "no" >&6; }
4982fi
4983
4984
4985  test -n "$CAT" && break
4986done
4987
4988    else
4989      # If it succeeded, then it was overridden by the user. We will use it
4990      # for the tool.
4991
4992      # First remove it from the list of overridden variables, so we can test
4993      # for unknown variables in the end.
4994      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4995
4996      # Check if the provided tool contains a complete path.
4997      tool_specified="$CAT"
4998      tool_basename="${tool_specified##*/}"
4999      if test "x$tool_basename" = "x$tool_specified"; then
5000        # A command without a complete path is provided, search $PATH.
5001        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5002$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5003        # Extract the first word of "$tool_basename", so it can be a program name with args.
5004set dummy $tool_basename; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
5007if ${ac_cv_path_CAT+:} false; then :
5008  $as_echo_n "(cached) " >&6
5009else
5010  case $CAT in
5011  [\\/]* | ?:[\\/]*)
5012  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5013  ;;
5014  *)
5015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in $PATH
5017do
5018  IFS=$as_save_IFS
5019  test -z "$as_dir" && as_dir=.
5020    for ac_exec_ext in '' $ac_executable_extensions; do
5021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5022    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024    break 2
5025  fi
5026done
5027  done
5028IFS=$as_save_IFS
5029
5030  ;;
5031esac
5032fi
5033CAT=$ac_cv_path_CAT
5034if test -n "$CAT"; then
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5036$as_echo "$CAT" >&6; }
5037else
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
5040fi
5041
5042
5043        if test "x$CAT" = x; then
5044          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5045        fi
5046      else
5047        # Otherwise we believe it is a complete path. Use it as it is.
5048        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5049$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5051$as_echo_n "checking for CAT... " >&6; }
5052        if test ! -x "$tool_specified"; then
5053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5054$as_echo "not found" >&6; }
5055          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5056        fi
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5058$as_echo "$tool_specified" >&6; }
5059      fi
5060    fi
5061  fi
5062
5063
5064
5065  if test "x$CAT" = x; then
5066    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5067  fi
5068
5069
5070
5071
5072
5073  # Publish this variable in the help.
5074
5075
5076  if test "x$CHMOD" = x; then
5077    # The variable is not set by user, try to locate tool using the code snippet
5078    for ac_prog in chmod
5079do
5080  # Extract the first word of "$ac_prog", so it can be a program name with args.
5081set dummy $ac_prog; ac_word=$2
5082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083$as_echo_n "checking for $ac_word... " >&6; }
5084if ${ac_cv_path_CHMOD+:} false; then :
5085  $as_echo_n "(cached) " >&6
5086else
5087  case $CHMOD in
5088  [\\/]* | ?:[\\/]*)
5089  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5090  ;;
5091  *)
5092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093for as_dir in $PATH
5094do
5095  IFS=$as_save_IFS
5096  test -z "$as_dir" && as_dir=.
5097    for ac_exec_ext in '' $ac_executable_extensions; do
5098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5099    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5101    break 2
5102  fi
5103done
5104  done
5105IFS=$as_save_IFS
5106
5107  ;;
5108esac
5109fi
5110CHMOD=$ac_cv_path_CHMOD
5111if test -n "$CHMOD"; then
5112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5113$as_echo "$CHMOD" >&6; }
5114else
5115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116$as_echo "no" >&6; }
5117fi
5118
5119
5120  test -n "$CHMOD" && break
5121done
5122
5123  else
5124    # The variable is set, but is it from the command line or the environment?
5125
5126    # Try to remove the string !CHMOD! from our list.
5127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5129      # If it failed, the variable was not from the command line. Ignore it,
5130      # but warn the user (except for BASH, which is always set by the calling BASH).
5131      if test "xCHMOD" != xBASH; then
5132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5133$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5134      fi
5135      # Try to locate tool using the code snippet
5136      for ac_prog in chmod
5137do
5138  # Extract the first word of "$ac_prog", so it can be a program name with args.
5139set dummy $ac_prog; ac_word=$2
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5141$as_echo_n "checking for $ac_word... " >&6; }
5142if ${ac_cv_path_CHMOD+:} false; then :
5143  $as_echo_n "(cached) " >&6
5144else
5145  case $CHMOD in
5146  [\\/]* | ?:[\\/]*)
5147  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5148  ;;
5149  *)
5150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151for as_dir in $PATH
5152do
5153  IFS=$as_save_IFS
5154  test -z "$as_dir" && as_dir=.
5155    for ac_exec_ext in '' $ac_executable_extensions; do
5156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5157    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5159    break 2
5160  fi
5161done
5162  done
5163IFS=$as_save_IFS
5164
5165  ;;
5166esac
5167fi
5168CHMOD=$ac_cv_path_CHMOD
5169if test -n "$CHMOD"; then
5170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5171$as_echo "$CHMOD" >&6; }
5172else
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
5175fi
5176
5177
5178  test -n "$CHMOD" && break
5179done
5180
5181    else
5182      # If it succeeded, then it was overridden by the user. We will use it
5183      # for the tool.
5184
5185      # First remove it from the list of overridden variables, so we can test
5186      # for unknown variables in the end.
5187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5188
5189      # Check if the provided tool contains a complete path.
5190      tool_specified="$CHMOD"
5191      tool_basename="${tool_specified##*/}"
5192      if test "x$tool_basename" = "x$tool_specified"; then
5193        # A command without a complete path is provided, search $PATH.
5194        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5195$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5196        # Extract the first word of "$tool_basename", so it can be a program name with args.
5197set dummy $tool_basename; ac_word=$2
5198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5199$as_echo_n "checking for $ac_word... " >&6; }
5200if ${ac_cv_path_CHMOD+:} false; then :
5201  $as_echo_n "(cached) " >&6
5202else
5203  case $CHMOD in
5204  [\\/]* | ?:[\\/]*)
5205  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5206  ;;
5207  *)
5208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5209for as_dir in $PATH
5210do
5211  IFS=$as_save_IFS
5212  test -z "$as_dir" && as_dir=.
5213    for ac_exec_ext in '' $ac_executable_extensions; do
5214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5215    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5217    break 2
5218  fi
5219done
5220  done
5221IFS=$as_save_IFS
5222
5223  ;;
5224esac
5225fi
5226CHMOD=$ac_cv_path_CHMOD
5227if test -n "$CHMOD"; then
5228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5229$as_echo "$CHMOD" >&6; }
5230else
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5232$as_echo "no" >&6; }
5233fi
5234
5235
5236        if test "x$CHMOD" = x; then
5237          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5238        fi
5239      else
5240        # Otherwise we believe it is a complete path. Use it as it is.
5241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5242$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5244$as_echo_n "checking for CHMOD... " >&6; }
5245        if test ! -x "$tool_specified"; then
5246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5247$as_echo "not found" >&6; }
5248          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5249        fi
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5251$as_echo "$tool_specified" >&6; }
5252      fi
5253    fi
5254  fi
5255
5256
5257
5258  if test "x$CHMOD" = x; then
5259    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5260  fi
5261
5262
5263
5264
5265
5266  # Publish this variable in the help.
5267
5268
5269  if test "x$CMP" = x; then
5270    # The variable is not set by user, try to locate tool using the code snippet
5271    for ac_prog in cmp
5272do
5273  # Extract the first word of "$ac_prog", so it can be a program name with args.
5274set dummy $ac_prog; ac_word=$2
5275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5276$as_echo_n "checking for $ac_word... " >&6; }
5277if ${ac_cv_path_CMP+:} false; then :
5278  $as_echo_n "(cached) " >&6
5279else
5280  case $CMP in
5281  [\\/]* | ?:[\\/]*)
5282  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5283  ;;
5284  *)
5285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5286for as_dir in $PATH
5287do
5288  IFS=$as_save_IFS
5289  test -z "$as_dir" && as_dir=.
5290    for ac_exec_ext in '' $ac_executable_extensions; do
5291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5292    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5294    break 2
5295  fi
5296done
5297  done
5298IFS=$as_save_IFS
5299
5300  ;;
5301esac
5302fi
5303CMP=$ac_cv_path_CMP
5304if test -n "$CMP"; then
5305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5306$as_echo "$CMP" >&6; }
5307else
5308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5309$as_echo "no" >&6; }
5310fi
5311
5312
5313  test -n "$CMP" && break
5314done
5315
5316  else
5317    # The variable is set, but is it from the command line or the environment?
5318
5319    # Try to remove the string !CMP! from our list.
5320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5322      # If it failed, the variable was not from the command line. Ignore it,
5323      # but warn the user (except for BASH, which is always set by the calling BASH).
5324      if test "xCMP" != xBASH; then
5325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5326$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5327      fi
5328      # Try to locate tool using the code snippet
5329      for ac_prog in cmp
5330do
5331  # Extract the first word of "$ac_prog", so it can be a program name with args.
5332set dummy $ac_prog; ac_word=$2
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334$as_echo_n "checking for $ac_word... " >&6; }
5335if ${ac_cv_path_CMP+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  case $CMP in
5339  [\\/]* | ?:[\\/]*)
5340  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5341  ;;
5342  *)
5343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346  IFS=$as_save_IFS
5347  test -z "$as_dir" && as_dir=.
5348    for ac_exec_ext in '' $ac_executable_extensions; do
5349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352    break 2
5353  fi
5354done
5355  done
5356IFS=$as_save_IFS
5357
5358  ;;
5359esac
5360fi
5361CMP=$ac_cv_path_CMP
5362if test -n "$CMP"; then
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5364$as_echo "$CMP" >&6; }
5365else
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370
5371  test -n "$CMP" && break
5372done
5373
5374    else
5375      # If it succeeded, then it was overridden by the user. We will use it
5376      # for the tool.
5377
5378      # First remove it from the list of overridden variables, so we can test
5379      # for unknown variables in the end.
5380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5381
5382      # Check if the provided tool contains a complete path.
5383      tool_specified="$CMP"
5384      tool_basename="${tool_specified##*/}"
5385      if test "x$tool_basename" = "x$tool_specified"; then
5386        # A command without a complete path is provided, search $PATH.
5387        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5388$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5389        # Extract the first word of "$tool_basename", so it can be a program name with args.
5390set dummy $tool_basename; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_CMP+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $CMP in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419CMP=$ac_cv_path_CMP
5420if test -n "$CMP"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5422$as_echo "$CMP" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429        if test "x$CMP" = x; then
5430          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5431        fi
5432      else
5433        # Otherwise we believe it is a complete path. Use it as it is.
5434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5435$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5437$as_echo_n "checking for CMP... " >&6; }
5438        if test ! -x "$tool_specified"; then
5439          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5440$as_echo "not found" >&6; }
5441          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5442        fi
5443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5444$as_echo "$tool_specified" >&6; }
5445      fi
5446    fi
5447  fi
5448
5449
5450
5451  if test "x$CMP" = x; then
5452    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5453  fi
5454
5455
5456
5457
5458
5459  # Publish this variable in the help.
5460
5461
5462  if test "x$COMM" = x; then
5463    # The variable is not set by user, try to locate tool using the code snippet
5464    for ac_prog in comm
5465do
5466  # Extract the first word of "$ac_prog", so it can be a program name with args.
5467set dummy $ac_prog; ac_word=$2
5468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5469$as_echo_n "checking for $ac_word... " >&6; }
5470if ${ac_cv_path_COMM+:} false; then :
5471  $as_echo_n "(cached) " >&6
5472else
5473  case $COMM in
5474  [\\/]* | ?:[\\/]*)
5475  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5476  ;;
5477  *)
5478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5479for as_dir in $PATH
5480do
5481  IFS=$as_save_IFS
5482  test -z "$as_dir" && as_dir=.
5483    for ac_exec_ext in '' $ac_executable_extensions; do
5484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5485    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5487    break 2
5488  fi
5489done
5490  done
5491IFS=$as_save_IFS
5492
5493  ;;
5494esac
5495fi
5496COMM=$ac_cv_path_COMM
5497if test -n "$COMM"; then
5498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5499$as_echo "$COMM" >&6; }
5500else
5501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5502$as_echo "no" >&6; }
5503fi
5504
5505
5506  test -n "$COMM" && break
5507done
5508
5509  else
5510    # The variable is set, but is it from the command line or the environment?
5511
5512    # Try to remove the string !COMM! from our list.
5513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5515      # If it failed, the variable was not from the command line. Ignore it,
5516      # but warn the user (except for BASH, which is always set by the calling BASH).
5517      if test "xCOMM" != xBASH; then
5518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5519$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5520      fi
5521      # Try to locate tool using the code snippet
5522      for ac_prog in comm
5523do
5524  # Extract the first word of "$ac_prog", so it can be a program name with args.
5525set dummy $ac_prog; ac_word=$2
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5527$as_echo_n "checking for $ac_word... " >&6; }
5528if ${ac_cv_path_COMM+:} false; then :
5529  $as_echo_n "(cached) " >&6
5530else
5531  case $COMM in
5532  [\\/]* | ?:[\\/]*)
5533  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5534  ;;
5535  *)
5536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5537for as_dir in $PATH
5538do
5539  IFS=$as_save_IFS
5540  test -z "$as_dir" && as_dir=.
5541    for ac_exec_ext in '' $ac_executable_extensions; do
5542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5543    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5545    break 2
5546  fi
5547done
5548  done
5549IFS=$as_save_IFS
5550
5551  ;;
5552esac
5553fi
5554COMM=$ac_cv_path_COMM
5555if test -n "$COMM"; then
5556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5557$as_echo "$COMM" >&6; }
5558else
5559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5560$as_echo "no" >&6; }
5561fi
5562
5563
5564  test -n "$COMM" && break
5565done
5566
5567    else
5568      # If it succeeded, then it was overridden by the user. We will use it
5569      # for the tool.
5570
5571      # First remove it from the list of overridden variables, so we can test
5572      # for unknown variables in the end.
5573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5574
5575      # Check if the provided tool contains a complete path.
5576      tool_specified="$COMM"
5577      tool_basename="${tool_specified##*/}"
5578      if test "x$tool_basename" = "x$tool_specified"; then
5579        # A command without a complete path is provided, search $PATH.
5580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5581$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5582        # Extract the first word of "$tool_basename", so it can be a program name with args.
5583set dummy $tool_basename; ac_word=$2
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5585$as_echo_n "checking for $ac_word... " >&6; }
5586if ${ac_cv_path_COMM+:} false; then :
5587  $as_echo_n "(cached) " >&6
5588else
5589  case $COMM in
5590  [\\/]* | ?:[\\/]*)
5591  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5592  ;;
5593  *)
5594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5595for as_dir in $PATH
5596do
5597  IFS=$as_save_IFS
5598  test -z "$as_dir" && as_dir=.
5599    for ac_exec_ext in '' $ac_executable_extensions; do
5600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5601    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5603    break 2
5604  fi
5605done
5606  done
5607IFS=$as_save_IFS
5608
5609  ;;
5610esac
5611fi
5612COMM=$ac_cv_path_COMM
5613if test -n "$COMM"; then
5614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5615$as_echo "$COMM" >&6; }
5616else
5617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5618$as_echo "no" >&6; }
5619fi
5620
5621
5622        if test "x$COMM" = x; then
5623          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5624        fi
5625      else
5626        # Otherwise we believe it is a complete path. Use it as it is.
5627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5628$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5630$as_echo_n "checking for COMM... " >&6; }
5631        if test ! -x "$tool_specified"; then
5632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5633$as_echo "not found" >&6; }
5634          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5635        fi
5636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5637$as_echo "$tool_specified" >&6; }
5638      fi
5639    fi
5640  fi
5641
5642
5643
5644  if test "x$COMM" = x; then
5645    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5646  fi
5647
5648
5649
5650
5651
5652  # Publish this variable in the help.
5653
5654
5655  if test "x$CP" = x; then
5656    # The variable is not set by user, try to locate tool using the code snippet
5657    for ac_prog in cp
5658do
5659  # Extract the first word of "$ac_prog", so it can be a program name with args.
5660set dummy $ac_prog; ac_word=$2
5661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5662$as_echo_n "checking for $ac_word... " >&6; }
5663if ${ac_cv_path_CP+:} false; then :
5664  $as_echo_n "(cached) " >&6
5665else
5666  case $CP in
5667  [\\/]* | ?:[\\/]*)
5668  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5669  ;;
5670  *)
5671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5672for as_dir in $PATH
5673do
5674  IFS=$as_save_IFS
5675  test -z "$as_dir" && as_dir=.
5676    for ac_exec_ext in '' $ac_executable_extensions; do
5677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5678    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5680    break 2
5681  fi
5682done
5683  done
5684IFS=$as_save_IFS
5685
5686  ;;
5687esac
5688fi
5689CP=$ac_cv_path_CP
5690if test -n "$CP"; then
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5692$as_echo "$CP" >&6; }
5693else
5694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5695$as_echo "no" >&6; }
5696fi
5697
5698
5699  test -n "$CP" && break
5700done
5701
5702  else
5703    # The variable is set, but is it from the command line or the environment?
5704
5705    # Try to remove the string !CP! from our list.
5706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5708      # If it failed, the variable was not from the command line. Ignore it,
5709      # but warn the user (except for BASH, which is always set by the calling BASH).
5710      if test "xCP" != xBASH; then
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5712$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5713      fi
5714      # Try to locate tool using the code snippet
5715      for ac_prog in cp
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if ${ac_cv_path_CP+:} false; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $CP in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5736    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747CP=$ac_cv_path_CP
5748if test -n "$CP"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5750$as_echo "$CP" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$CP" && break
5758done
5759
5760    else
5761      # If it succeeded, then it was overridden by the user. We will use it
5762      # for the tool.
5763
5764      # First remove it from the list of overridden variables, so we can test
5765      # for unknown variables in the end.
5766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5767
5768      # Check if the provided tool contains a complete path.
5769      tool_specified="$CP"
5770      tool_basename="${tool_specified##*/}"
5771      if test "x$tool_basename" = "x$tool_specified"; then
5772        # A command without a complete path is provided, search $PATH.
5773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5774$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5775        # Extract the first word of "$tool_basename", so it can be a program name with args.
5776set dummy $tool_basename; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if ${ac_cv_path_CP+:} false; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  case $CP in
5783  [\\/]* | ?:[\\/]*)
5784  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5785  ;;
5786  *)
5787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788for as_dir in $PATH
5789do
5790  IFS=$as_save_IFS
5791  test -z "$as_dir" && as_dir=.
5792    for ac_exec_ext in '' $ac_executable_extensions; do
5793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5794    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796    break 2
5797  fi
5798done
5799  done
5800IFS=$as_save_IFS
5801
5802  ;;
5803esac
5804fi
5805CP=$ac_cv_path_CP
5806if test -n "$CP"; then
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5808$as_echo "$CP" >&6; }
5809else
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5811$as_echo "no" >&6; }
5812fi
5813
5814
5815        if test "x$CP" = x; then
5816          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5817        fi
5818      else
5819        # Otherwise we believe it is a complete path. Use it as it is.
5820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5821$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5823$as_echo_n "checking for CP... " >&6; }
5824        if test ! -x "$tool_specified"; then
5825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5826$as_echo "not found" >&6; }
5827          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5828        fi
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5830$as_echo "$tool_specified" >&6; }
5831      fi
5832    fi
5833  fi
5834
5835
5836
5837  if test "x$CP" = x; then
5838    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5839  fi
5840
5841
5842
5843
5844
5845  # Publish this variable in the help.
5846
5847
5848  if test "x$CUT" = x; then
5849    # The variable is not set by user, try to locate tool using the code snippet
5850    for ac_prog in cut
5851do
5852  # Extract the first word of "$ac_prog", so it can be a program name with args.
5853set dummy $ac_prog; ac_word=$2
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5855$as_echo_n "checking for $ac_word... " >&6; }
5856if ${ac_cv_path_CUT+:} false; then :
5857  $as_echo_n "(cached) " >&6
5858else
5859  case $CUT in
5860  [\\/]* | ?:[\\/]*)
5861  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5862  ;;
5863  *)
5864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5865for as_dir in $PATH
5866do
5867  IFS=$as_save_IFS
5868  test -z "$as_dir" && as_dir=.
5869    for ac_exec_ext in '' $ac_executable_extensions; do
5870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5871    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5873    break 2
5874  fi
5875done
5876  done
5877IFS=$as_save_IFS
5878
5879  ;;
5880esac
5881fi
5882CUT=$ac_cv_path_CUT
5883if test -n "$CUT"; then
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5885$as_echo "$CUT" >&6; }
5886else
5887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5888$as_echo "no" >&6; }
5889fi
5890
5891
5892  test -n "$CUT" && break
5893done
5894
5895  else
5896    # The variable is set, but is it from the command line or the environment?
5897
5898    # Try to remove the string !CUT! from our list.
5899    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5900    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5901      # If it failed, the variable was not from the command line. Ignore it,
5902      # but warn the user (except for BASH, which is always set by the calling BASH).
5903      if test "xCUT" != xBASH; then
5904        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5905$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5906      fi
5907      # Try to locate tool using the code snippet
5908      for ac_prog in cut
5909do
5910  # Extract the first word of "$ac_prog", so it can be a program name with args.
5911set dummy $ac_prog; ac_word=$2
5912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5913$as_echo_n "checking for $ac_word... " >&6; }
5914if ${ac_cv_path_CUT+:} false; then :
5915  $as_echo_n "(cached) " >&6
5916else
5917  case $CUT in
5918  [\\/]* | ?:[\\/]*)
5919  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5920  ;;
5921  *)
5922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923for as_dir in $PATH
5924do
5925  IFS=$as_save_IFS
5926  test -z "$as_dir" && as_dir=.
5927    for ac_exec_ext in '' $ac_executable_extensions; do
5928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5929    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5931    break 2
5932  fi
5933done
5934  done
5935IFS=$as_save_IFS
5936
5937  ;;
5938esac
5939fi
5940CUT=$ac_cv_path_CUT
5941if test -n "$CUT"; then
5942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5943$as_echo "$CUT" >&6; }
5944else
5945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5946$as_echo "no" >&6; }
5947fi
5948
5949
5950  test -n "$CUT" && break
5951done
5952
5953    else
5954      # If it succeeded, then it was overridden by the user. We will use it
5955      # for the tool.
5956
5957      # First remove it from the list of overridden variables, so we can test
5958      # for unknown variables in the end.
5959      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5960
5961      # Check if the provided tool contains a complete path.
5962      tool_specified="$CUT"
5963      tool_basename="${tool_specified##*/}"
5964      if test "x$tool_basename" = "x$tool_specified"; then
5965        # A command without a complete path is provided, search $PATH.
5966        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5967$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5968        # Extract the first word of "$tool_basename", so it can be a program name with args.
5969set dummy $tool_basename; ac_word=$2
5970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5971$as_echo_n "checking for $ac_word... " >&6; }
5972if ${ac_cv_path_CUT+:} false; then :
5973  $as_echo_n "(cached) " >&6
5974else
5975  case $CUT in
5976  [\\/]* | ?:[\\/]*)
5977  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5978  ;;
5979  *)
5980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5981for as_dir in $PATH
5982do
5983  IFS=$as_save_IFS
5984  test -z "$as_dir" && as_dir=.
5985    for ac_exec_ext in '' $ac_executable_extensions; do
5986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5987    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5989    break 2
5990  fi
5991done
5992  done
5993IFS=$as_save_IFS
5994
5995  ;;
5996esac
5997fi
5998CUT=$ac_cv_path_CUT
5999if test -n "$CUT"; then
6000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6001$as_echo "$CUT" >&6; }
6002else
6003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6004$as_echo "no" >&6; }
6005fi
6006
6007
6008        if test "x$CUT" = x; then
6009          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6010        fi
6011      else
6012        # Otherwise we believe it is a complete path. Use it as it is.
6013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6014$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6016$as_echo_n "checking for CUT... " >&6; }
6017        if test ! -x "$tool_specified"; then
6018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6019$as_echo "not found" >&6; }
6020          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6021        fi
6022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6023$as_echo "$tool_specified" >&6; }
6024      fi
6025    fi
6026  fi
6027
6028
6029
6030  if test "x$CUT" = x; then
6031    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6032  fi
6033
6034
6035
6036
6037
6038  # Publish this variable in the help.
6039
6040
6041  if test "x$DATE" = x; then
6042    # The variable is not set by user, try to locate tool using the code snippet
6043    for ac_prog in date
6044do
6045  # Extract the first word of "$ac_prog", so it can be a program name with args.
6046set dummy $ac_prog; ac_word=$2
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6048$as_echo_n "checking for $ac_word... " >&6; }
6049if ${ac_cv_path_DATE+:} false; then :
6050  $as_echo_n "(cached) " >&6
6051else
6052  case $DATE in
6053  [\\/]* | ?:[\\/]*)
6054  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6055  ;;
6056  *)
6057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060  IFS=$as_save_IFS
6061  test -z "$as_dir" && as_dir=.
6062    for ac_exec_ext in '' $ac_executable_extensions; do
6063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6064    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6066    break 2
6067  fi
6068done
6069  done
6070IFS=$as_save_IFS
6071
6072  ;;
6073esac
6074fi
6075DATE=$ac_cv_path_DATE
6076if test -n "$DATE"; then
6077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6078$as_echo "$DATE" >&6; }
6079else
6080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6081$as_echo "no" >&6; }
6082fi
6083
6084
6085  test -n "$DATE" && break
6086done
6087
6088  else
6089    # The variable is set, but is it from the command line or the environment?
6090
6091    # Try to remove the string !DATE! from our list.
6092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6094      # If it failed, the variable was not from the command line. Ignore it,
6095      # but warn the user (except for BASH, which is always set by the calling BASH).
6096      if test "xDATE" != xBASH; then
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6098$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6099      fi
6100      # Try to locate tool using the code snippet
6101      for ac_prog in date
6102do
6103  # Extract the first word of "$ac_prog", so it can be a program name with args.
6104set dummy $ac_prog; ac_word=$2
6105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6106$as_echo_n "checking for $ac_word... " >&6; }
6107if ${ac_cv_path_DATE+:} false; then :
6108  $as_echo_n "(cached) " >&6
6109else
6110  case $DATE in
6111  [\\/]* | ?:[\\/]*)
6112  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6113  ;;
6114  *)
6115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6116for as_dir in $PATH
6117do
6118  IFS=$as_save_IFS
6119  test -z "$as_dir" && as_dir=.
6120    for ac_exec_ext in '' $ac_executable_extensions; do
6121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6122    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6124    break 2
6125  fi
6126done
6127  done
6128IFS=$as_save_IFS
6129
6130  ;;
6131esac
6132fi
6133DATE=$ac_cv_path_DATE
6134if test -n "$DATE"; then
6135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6136$as_echo "$DATE" >&6; }
6137else
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6139$as_echo "no" >&6; }
6140fi
6141
6142
6143  test -n "$DATE" && break
6144done
6145
6146    else
6147      # If it succeeded, then it was overridden by the user. We will use it
6148      # for the tool.
6149
6150      # First remove it from the list of overridden variables, so we can test
6151      # for unknown variables in the end.
6152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6153
6154      # Check if the provided tool contains a complete path.
6155      tool_specified="$DATE"
6156      tool_basename="${tool_specified##*/}"
6157      if test "x$tool_basename" = "x$tool_specified"; then
6158        # A command without a complete path is provided, search $PATH.
6159        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6160$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6161        # Extract the first word of "$tool_basename", so it can be a program name with args.
6162set dummy $tool_basename; ac_word=$2
6163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6164$as_echo_n "checking for $ac_word... " >&6; }
6165if ${ac_cv_path_DATE+:} false; then :
6166  $as_echo_n "(cached) " >&6
6167else
6168  case $DATE in
6169  [\\/]* | ?:[\\/]*)
6170  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6171  ;;
6172  *)
6173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH
6175do
6176  IFS=$as_save_IFS
6177  test -z "$as_dir" && as_dir=.
6178    for ac_exec_ext in '' $ac_executable_extensions; do
6179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6180    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6182    break 2
6183  fi
6184done
6185  done
6186IFS=$as_save_IFS
6187
6188  ;;
6189esac
6190fi
6191DATE=$ac_cv_path_DATE
6192if test -n "$DATE"; then
6193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6194$as_echo "$DATE" >&6; }
6195else
6196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6197$as_echo "no" >&6; }
6198fi
6199
6200
6201        if test "x$DATE" = x; then
6202          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6203        fi
6204      else
6205        # Otherwise we believe it is a complete path. Use it as it is.
6206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6207$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6209$as_echo_n "checking for DATE... " >&6; }
6210        if test ! -x "$tool_specified"; then
6211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6212$as_echo "not found" >&6; }
6213          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6214        fi
6215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6216$as_echo "$tool_specified" >&6; }
6217      fi
6218    fi
6219  fi
6220
6221
6222
6223  if test "x$DATE" = x; then
6224    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6225  fi
6226
6227
6228
6229
6230
6231  # Publish this variable in the help.
6232
6233
6234  if test "x$DIFF" = x; then
6235    # The variable is not set by user, try to locate tool using the code snippet
6236    for ac_prog in gdiff diff
6237do
6238  # Extract the first word of "$ac_prog", so it can be a program name with args.
6239set dummy $ac_prog; ac_word=$2
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6241$as_echo_n "checking for $ac_word... " >&6; }
6242if ${ac_cv_path_DIFF+:} false; then :
6243  $as_echo_n "(cached) " >&6
6244else
6245  case $DIFF in
6246  [\\/]* | ?:[\\/]*)
6247  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6248  ;;
6249  *)
6250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6251for as_dir in $PATH
6252do
6253  IFS=$as_save_IFS
6254  test -z "$as_dir" && as_dir=.
6255    for ac_exec_ext in '' $ac_executable_extensions; do
6256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6257    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6259    break 2
6260  fi
6261done
6262  done
6263IFS=$as_save_IFS
6264
6265  ;;
6266esac
6267fi
6268DIFF=$ac_cv_path_DIFF
6269if test -n "$DIFF"; then
6270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6271$as_echo "$DIFF" >&6; }
6272else
6273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6274$as_echo "no" >&6; }
6275fi
6276
6277
6278  test -n "$DIFF" && break
6279done
6280
6281  else
6282    # The variable is set, but is it from the command line or the environment?
6283
6284    # Try to remove the string !DIFF! from our list.
6285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6287      # If it failed, the variable was not from the command line. Ignore it,
6288      # but warn the user (except for BASH, which is always set by the calling BASH).
6289      if test "xDIFF" != xBASH; then
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6291$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6292      fi
6293      # Try to locate tool using the code snippet
6294      for ac_prog in gdiff diff
6295do
6296  # Extract the first word of "$ac_prog", so it can be a program name with args.
6297set dummy $ac_prog; ac_word=$2
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6299$as_echo_n "checking for $ac_word... " >&6; }
6300if ${ac_cv_path_DIFF+:} false; then :
6301  $as_echo_n "(cached) " >&6
6302else
6303  case $DIFF in
6304  [\\/]* | ?:[\\/]*)
6305  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6306  ;;
6307  *)
6308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6309for as_dir in $PATH
6310do
6311  IFS=$as_save_IFS
6312  test -z "$as_dir" && as_dir=.
6313    for ac_exec_ext in '' $ac_executable_extensions; do
6314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6315    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6317    break 2
6318  fi
6319done
6320  done
6321IFS=$as_save_IFS
6322
6323  ;;
6324esac
6325fi
6326DIFF=$ac_cv_path_DIFF
6327if test -n "$DIFF"; then
6328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6329$as_echo "$DIFF" >&6; }
6330else
6331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332$as_echo "no" >&6; }
6333fi
6334
6335
6336  test -n "$DIFF" && break
6337done
6338
6339    else
6340      # If it succeeded, then it was overridden by the user. We will use it
6341      # for the tool.
6342
6343      # First remove it from the list of overridden variables, so we can test
6344      # for unknown variables in the end.
6345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6346
6347      # Check if the provided tool contains a complete path.
6348      tool_specified="$DIFF"
6349      tool_basename="${tool_specified##*/}"
6350      if test "x$tool_basename" = "x$tool_specified"; then
6351        # A command without a complete path is provided, search $PATH.
6352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6353$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6354        # Extract the first word of "$tool_basename", so it can be a program name with args.
6355set dummy $tool_basename; ac_word=$2
6356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6357$as_echo_n "checking for $ac_word... " >&6; }
6358if ${ac_cv_path_DIFF+:} false; then :
6359  $as_echo_n "(cached) " >&6
6360else
6361  case $DIFF in
6362  [\\/]* | ?:[\\/]*)
6363  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6364  ;;
6365  *)
6366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6367for as_dir in $PATH
6368do
6369  IFS=$as_save_IFS
6370  test -z "$as_dir" && as_dir=.
6371    for ac_exec_ext in '' $ac_executable_extensions; do
6372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6373    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6375    break 2
6376  fi
6377done
6378  done
6379IFS=$as_save_IFS
6380
6381  ;;
6382esac
6383fi
6384DIFF=$ac_cv_path_DIFF
6385if test -n "$DIFF"; then
6386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6387$as_echo "$DIFF" >&6; }
6388else
6389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390$as_echo "no" >&6; }
6391fi
6392
6393
6394        if test "x$DIFF" = x; then
6395          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6396        fi
6397      else
6398        # Otherwise we believe it is a complete path. Use it as it is.
6399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6400$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6402$as_echo_n "checking for DIFF... " >&6; }
6403        if test ! -x "$tool_specified"; then
6404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6405$as_echo "not found" >&6; }
6406          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6407        fi
6408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6409$as_echo "$tool_specified" >&6; }
6410      fi
6411    fi
6412  fi
6413
6414
6415
6416  if test "x$DIFF" = x; then
6417    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6418  fi
6419
6420
6421
6422
6423
6424  # Publish this variable in the help.
6425
6426
6427  if test "x$DIRNAME" = x; then
6428    # The variable is not set by user, try to locate tool using the code snippet
6429    for ac_prog in dirname
6430do
6431  # Extract the first word of "$ac_prog", so it can be a program name with args.
6432set dummy $ac_prog; ac_word=$2
6433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6434$as_echo_n "checking for $ac_word... " >&6; }
6435if ${ac_cv_path_DIRNAME+:} false; then :
6436  $as_echo_n "(cached) " >&6
6437else
6438  case $DIRNAME in
6439  [\\/]* | ?:[\\/]*)
6440  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6441  ;;
6442  *)
6443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6444for as_dir in $PATH
6445do
6446  IFS=$as_save_IFS
6447  test -z "$as_dir" && as_dir=.
6448    for ac_exec_ext in '' $ac_executable_extensions; do
6449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6450    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6452    break 2
6453  fi
6454done
6455  done
6456IFS=$as_save_IFS
6457
6458  ;;
6459esac
6460fi
6461DIRNAME=$ac_cv_path_DIRNAME
6462if test -n "$DIRNAME"; then
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6464$as_echo "$DIRNAME" >&6; }
6465else
6466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6467$as_echo "no" >&6; }
6468fi
6469
6470
6471  test -n "$DIRNAME" && break
6472done
6473
6474  else
6475    # The variable is set, but is it from the command line or the environment?
6476
6477    # Try to remove the string !DIRNAME! from our list.
6478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6480      # If it failed, the variable was not from the command line. Ignore it,
6481      # but warn the user (except for BASH, which is always set by the calling BASH).
6482      if test "xDIRNAME" != xBASH; then
6483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6484$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6485      fi
6486      # Try to locate tool using the code snippet
6487      for ac_prog in dirname
6488do
6489  # Extract the first word of "$ac_prog", so it can be a program name with args.
6490set dummy $ac_prog; ac_word=$2
6491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6492$as_echo_n "checking for $ac_word... " >&6; }
6493if ${ac_cv_path_DIRNAME+:} false; then :
6494  $as_echo_n "(cached) " >&6
6495else
6496  case $DIRNAME in
6497  [\\/]* | ?:[\\/]*)
6498  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6499  ;;
6500  *)
6501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6502for as_dir in $PATH
6503do
6504  IFS=$as_save_IFS
6505  test -z "$as_dir" && as_dir=.
6506    for ac_exec_ext in '' $ac_executable_extensions; do
6507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6508    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6510    break 2
6511  fi
6512done
6513  done
6514IFS=$as_save_IFS
6515
6516  ;;
6517esac
6518fi
6519DIRNAME=$ac_cv_path_DIRNAME
6520if test -n "$DIRNAME"; then
6521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6522$as_echo "$DIRNAME" >&6; }
6523else
6524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525$as_echo "no" >&6; }
6526fi
6527
6528
6529  test -n "$DIRNAME" && break
6530done
6531
6532    else
6533      # If it succeeded, then it was overridden by the user. We will use it
6534      # for the tool.
6535
6536      # First remove it from the list of overridden variables, so we can test
6537      # for unknown variables in the end.
6538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6539
6540      # Check if the provided tool contains a complete path.
6541      tool_specified="$DIRNAME"
6542      tool_basename="${tool_specified##*/}"
6543      if test "x$tool_basename" = "x$tool_specified"; then
6544        # A command without a complete path is provided, search $PATH.
6545        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6546$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6547        # Extract the first word of "$tool_basename", so it can be a program name with args.
6548set dummy $tool_basename; ac_word=$2
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6550$as_echo_n "checking for $ac_word... " >&6; }
6551if ${ac_cv_path_DIRNAME+:} false; then :
6552  $as_echo_n "(cached) " >&6
6553else
6554  case $DIRNAME in
6555  [\\/]* | ?:[\\/]*)
6556  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6557  ;;
6558  *)
6559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6560for as_dir in $PATH
6561do
6562  IFS=$as_save_IFS
6563  test -z "$as_dir" && as_dir=.
6564    for ac_exec_ext in '' $ac_executable_extensions; do
6565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6566    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6568    break 2
6569  fi
6570done
6571  done
6572IFS=$as_save_IFS
6573
6574  ;;
6575esac
6576fi
6577DIRNAME=$ac_cv_path_DIRNAME
6578if test -n "$DIRNAME"; then
6579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6580$as_echo "$DIRNAME" >&6; }
6581else
6582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583$as_echo "no" >&6; }
6584fi
6585
6586
6587        if test "x$DIRNAME" = x; then
6588          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6589        fi
6590      else
6591        # Otherwise we believe it is a complete path. Use it as it is.
6592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6593$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6595$as_echo_n "checking for DIRNAME... " >&6; }
6596        if test ! -x "$tool_specified"; then
6597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6598$as_echo "not found" >&6; }
6599          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6600        fi
6601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6602$as_echo "$tool_specified" >&6; }
6603      fi
6604    fi
6605  fi
6606
6607
6608
6609  if test "x$DIRNAME" = x; then
6610    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6611  fi
6612
6613
6614
6615
6616
6617  # Publish this variable in the help.
6618
6619
6620  if test "x$ECHO" = x; then
6621    # The variable is not set by user, try to locate tool using the code snippet
6622    for ac_prog in echo
6623do
6624  # Extract the first word of "$ac_prog", so it can be a program name with args.
6625set dummy $ac_prog; ac_word=$2
6626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6627$as_echo_n "checking for $ac_word... " >&6; }
6628if ${ac_cv_path_ECHO+:} false; then :
6629  $as_echo_n "(cached) " >&6
6630else
6631  case $ECHO in
6632  [\\/]* | ?:[\\/]*)
6633  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6634  ;;
6635  *)
6636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6637for as_dir in $PATH
6638do
6639  IFS=$as_save_IFS
6640  test -z "$as_dir" && as_dir=.
6641    for ac_exec_ext in '' $ac_executable_extensions; do
6642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6643    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6645    break 2
6646  fi
6647done
6648  done
6649IFS=$as_save_IFS
6650
6651  ;;
6652esac
6653fi
6654ECHO=$ac_cv_path_ECHO
6655if test -n "$ECHO"; then
6656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6657$as_echo "$ECHO" >&6; }
6658else
6659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6660$as_echo "no" >&6; }
6661fi
6662
6663
6664  test -n "$ECHO" && break
6665done
6666
6667  else
6668    # The variable is set, but is it from the command line or the environment?
6669
6670    # Try to remove the string !ECHO! from our list.
6671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6673      # If it failed, the variable was not from the command line. Ignore it,
6674      # but warn the user (except for BASH, which is always set by the calling BASH).
6675      if test "xECHO" != xBASH; then
6676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6677$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6678      fi
6679      # Try to locate tool using the code snippet
6680      for ac_prog in echo
6681do
6682  # Extract the first word of "$ac_prog", so it can be a program name with args.
6683set dummy $ac_prog; ac_word=$2
6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6685$as_echo_n "checking for $ac_word... " >&6; }
6686if ${ac_cv_path_ECHO+:} false; then :
6687  $as_echo_n "(cached) " >&6
6688else
6689  case $ECHO in
6690  [\\/]* | ?:[\\/]*)
6691  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6692  ;;
6693  *)
6694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6695for as_dir in $PATH
6696do
6697  IFS=$as_save_IFS
6698  test -z "$as_dir" && as_dir=.
6699    for ac_exec_ext in '' $ac_executable_extensions; do
6700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6701    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6703    break 2
6704  fi
6705done
6706  done
6707IFS=$as_save_IFS
6708
6709  ;;
6710esac
6711fi
6712ECHO=$ac_cv_path_ECHO
6713if test -n "$ECHO"; then
6714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6715$as_echo "$ECHO" >&6; }
6716else
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6718$as_echo "no" >&6; }
6719fi
6720
6721
6722  test -n "$ECHO" && break
6723done
6724
6725    else
6726      # If it succeeded, then it was overridden by the user. We will use it
6727      # for the tool.
6728
6729      # First remove it from the list of overridden variables, so we can test
6730      # for unknown variables in the end.
6731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6732
6733      # Check if the provided tool contains a complete path.
6734      tool_specified="$ECHO"
6735      tool_basename="${tool_specified##*/}"
6736      if test "x$tool_basename" = "x$tool_specified"; then
6737        # A command without a complete path is provided, search $PATH.
6738        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6739$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6740        # Extract the first word of "$tool_basename", so it can be a program name with args.
6741set dummy $tool_basename; ac_word=$2
6742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743$as_echo_n "checking for $ac_word... " >&6; }
6744if ${ac_cv_path_ECHO+:} false; then :
6745  $as_echo_n "(cached) " >&6
6746else
6747  case $ECHO in
6748  [\\/]* | ?:[\\/]*)
6749  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6750  ;;
6751  *)
6752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753for as_dir in $PATH
6754do
6755  IFS=$as_save_IFS
6756  test -z "$as_dir" && as_dir=.
6757    for ac_exec_ext in '' $ac_executable_extensions; do
6758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761    break 2
6762  fi
6763done
6764  done
6765IFS=$as_save_IFS
6766
6767  ;;
6768esac
6769fi
6770ECHO=$ac_cv_path_ECHO
6771if test -n "$ECHO"; then
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6773$as_echo "$ECHO" >&6; }
6774else
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776$as_echo "no" >&6; }
6777fi
6778
6779
6780        if test "x$ECHO" = x; then
6781          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6782        fi
6783      else
6784        # Otherwise we believe it is a complete path. Use it as it is.
6785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6786$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6788$as_echo_n "checking for ECHO... " >&6; }
6789        if test ! -x "$tool_specified"; then
6790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6791$as_echo "not found" >&6; }
6792          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6793        fi
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6795$as_echo "$tool_specified" >&6; }
6796      fi
6797    fi
6798  fi
6799
6800
6801
6802  if test "x$ECHO" = x; then
6803    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6804  fi
6805
6806
6807
6808
6809
6810  # Publish this variable in the help.
6811
6812
6813  if test "x$EXPR" = x; then
6814    # The variable is not set by user, try to locate tool using the code snippet
6815    for ac_prog in expr
6816do
6817  # Extract the first word of "$ac_prog", so it can be a program name with args.
6818set dummy $ac_prog; ac_word=$2
6819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6820$as_echo_n "checking for $ac_word... " >&6; }
6821if ${ac_cv_path_EXPR+:} false; then :
6822  $as_echo_n "(cached) " >&6
6823else
6824  case $EXPR in
6825  [\\/]* | ?:[\\/]*)
6826  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6827  ;;
6828  *)
6829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6830for as_dir in $PATH
6831do
6832  IFS=$as_save_IFS
6833  test -z "$as_dir" && as_dir=.
6834    for ac_exec_ext in '' $ac_executable_extensions; do
6835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6836    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6838    break 2
6839  fi
6840done
6841  done
6842IFS=$as_save_IFS
6843
6844  ;;
6845esac
6846fi
6847EXPR=$ac_cv_path_EXPR
6848if test -n "$EXPR"; then
6849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6850$as_echo "$EXPR" >&6; }
6851else
6852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6853$as_echo "no" >&6; }
6854fi
6855
6856
6857  test -n "$EXPR" && break
6858done
6859
6860  else
6861    # The variable is set, but is it from the command line or the environment?
6862
6863    # Try to remove the string !EXPR! from our list.
6864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6866      # If it failed, the variable was not from the command line. Ignore it,
6867      # but warn the user (except for BASH, which is always set by the calling BASH).
6868      if test "xEXPR" != xBASH; then
6869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6870$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6871      fi
6872      # Try to locate tool using the code snippet
6873      for ac_prog in expr
6874do
6875  # Extract the first word of "$ac_prog", so it can be a program name with args.
6876set dummy $ac_prog; ac_word=$2
6877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6878$as_echo_n "checking for $ac_word... " >&6; }
6879if ${ac_cv_path_EXPR+:} false; then :
6880  $as_echo_n "(cached) " >&6
6881else
6882  case $EXPR in
6883  [\\/]* | ?:[\\/]*)
6884  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6885  ;;
6886  *)
6887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6888for as_dir in $PATH
6889do
6890  IFS=$as_save_IFS
6891  test -z "$as_dir" && as_dir=.
6892    for ac_exec_ext in '' $ac_executable_extensions; do
6893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6894    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6896    break 2
6897  fi
6898done
6899  done
6900IFS=$as_save_IFS
6901
6902  ;;
6903esac
6904fi
6905EXPR=$ac_cv_path_EXPR
6906if test -n "$EXPR"; then
6907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6908$as_echo "$EXPR" >&6; }
6909else
6910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6911$as_echo "no" >&6; }
6912fi
6913
6914
6915  test -n "$EXPR" && break
6916done
6917
6918    else
6919      # If it succeeded, then it was overridden by the user. We will use it
6920      # for the tool.
6921
6922      # First remove it from the list of overridden variables, so we can test
6923      # for unknown variables in the end.
6924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6925
6926      # Check if the provided tool contains a complete path.
6927      tool_specified="$EXPR"
6928      tool_basename="${tool_specified##*/}"
6929      if test "x$tool_basename" = "x$tool_specified"; then
6930        # A command without a complete path is provided, search $PATH.
6931        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6932$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6933        # Extract the first word of "$tool_basename", so it can be a program name with args.
6934set dummy $tool_basename; ac_word=$2
6935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6936$as_echo_n "checking for $ac_word... " >&6; }
6937if ${ac_cv_path_EXPR+:} false; then :
6938  $as_echo_n "(cached) " >&6
6939else
6940  case $EXPR in
6941  [\\/]* | ?:[\\/]*)
6942  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6943  ;;
6944  *)
6945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6946for as_dir in $PATH
6947do
6948  IFS=$as_save_IFS
6949  test -z "$as_dir" && as_dir=.
6950    for ac_exec_ext in '' $ac_executable_extensions; do
6951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6952    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6954    break 2
6955  fi
6956done
6957  done
6958IFS=$as_save_IFS
6959
6960  ;;
6961esac
6962fi
6963EXPR=$ac_cv_path_EXPR
6964if test -n "$EXPR"; then
6965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6966$as_echo "$EXPR" >&6; }
6967else
6968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6969$as_echo "no" >&6; }
6970fi
6971
6972
6973        if test "x$EXPR" = x; then
6974          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6975        fi
6976      else
6977        # Otherwise we believe it is a complete path. Use it as it is.
6978        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6979$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6981$as_echo_n "checking for EXPR... " >&6; }
6982        if test ! -x "$tool_specified"; then
6983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6984$as_echo "not found" >&6; }
6985          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6986        fi
6987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6988$as_echo "$tool_specified" >&6; }
6989      fi
6990    fi
6991  fi
6992
6993
6994
6995  if test "x$EXPR" = x; then
6996    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6997  fi
6998
6999
7000
7001
7002
7003  # Publish this variable in the help.
7004
7005
7006  if test "x$FILE" = x; then
7007    # The variable is not set by user, try to locate tool using the code snippet
7008    for ac_prog in file
7009do
7010  # Extract the first word of "$ac_prog", so it can be a program name with args.
7011set dummy $ac_prog; ac_word=$2
7012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7013$as_echo_n "checking for $ac_word... " >&6; }
7014if ${ac_cv_path_FILE+:} false; then :
7015  $as_echo_n "(cached) " >&6
7016else
7017  case $FILE in
7018  [\\/]* | ?:[\\/]*)
7019  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7020  ;;
7021  *)
7022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7023for as_dir in $PATH
7024do
7025  IFS=$as_save_IFS
7026  test -z "$as_dir" && as_dir=.
7027    for ac_exec_ext in '' $ac_executable_extensions; do
7028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7029    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7031    break 2
7032  fi
7033done
7034  done
7035IFS=$as_save_IFS
7036
7037  ;;
7038esac
7039fi
7040FILE=$ac_cv_path_FILE
7041if test -n "$FILE"; then
7042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7043$as_echo "$FILE" >&6; }
7044else
7045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7046$as_echo "no" >&6; }
7047fi
7048
7049
7050  test -n "$FILE" && break
7051done
7052
7053  else
7054    # The variable is set, but is it from the command line or the environment?
7055
7056    # Try to remove the string !FILE! from our list.
7057    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7058    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7059      # If it failed, the variable was not from the command line. Ignore it,
7060      # but warn the user (except for BASH, which is always set by the calling BASH).
7061      if test "xFILE" != xBASH; then
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7063$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7064      fi
7065      # Try to locate tool using the code snippet
7066      for ac_prog in file
7067do
7068  # Extract the first word of "$ac_prog", so it can be a program name with args.
7069set dummy $ac_prog; ac_word=$2
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071$as_echo_n "checking for $ac_word... " >&6; }
7072if ${ac_cv_path_FILE+:} false; then :
7073  $as_echo_n "(cached) " >&6
7074else
7075  case $FILE in
7076  [\\/]* | ?:[\\/]*)
7077  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7078  ;;
7079  *)
7080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7081for as_dir in $PATH
7082do
7083  IFS=$as_save_IFS
7084  test -z "$as_dir" && as_dir=.
7085    for ac_exec_ext in '' $ac_executable_extensions; do
7086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7087    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7089    break 2
7090  fi
7091done
7092  done
7093IFS=$as_save_IFS
7094
7095  ;;
7096esac
7097fi
7098FILE=$ac_cv_path_FILE
7099if test -n "$FILE"; then
7100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7101$as_echo "$FILE" >&6; }
7102else
7103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104$as_echo "no" >&6; }
7105fi
7106
7107
7108  test -n "$FILE" && break
7109done
7110
7111    else
7112      # If it succeeded, then it was overridden by the user. We will use it
7113      # for the tool.
7114
7115      # First remove it from the list of overridden variables, so we can test
7116      # for unknown variables in the end.
7117      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7118
7119      # Check if the provided tool contains a complete path.
7120      tool_specified="$FILE"
7121      tool_basename="${tool_specified##*/}"
7122      if test "x$tool_basename" = "x$tool_specified"; then
7123        # A command without a complete path is provided, search $PATH.
7124        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7125$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7126        # Extract the first word of "$tool_basename", so it can be a program name with args.
7127set dummy $tool_basename; ac_word=$2
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
7130if ${ac_cv_path_FILE+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  case $FILE in
7134  [\\/]* | ?:[\\/]*)
7135  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7136  ;;
7137  *)
7138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  test -z "$as_dir" && as_dir=.
7143    for ac_exec_ext in '' $ac_executable_extensions; do
7144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147    break 2
7148  fi
7149done
7150  done
7151IFS=$as_save_IFS
7152
7153  ;;
7154esac
7155fi
7156FILE=$ac_cv_path_FILE
7157if test -n "$FILE"; then
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7159$as_echo "$FILE" >&6; }
7160else
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
7163fi
7164
7165
7166        if test "x$FILE" = x; then
7167          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7168        fi
7169      else
7170        # Otherwise we believe it is a complete path. Use it as it is.
7171        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7172$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7174$as_echo_n "checking for FILE... " >&6; }
7175        if test ! -x "$tool_specified"; then
7176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7177$as_echo "not found" >&6; }
7178          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7179        fi
7180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7181$as_echo "$tool_specified" >&6; }
7182      fi
7183    fi
7184  fi
7185
7186
7187
7188  if test "x$FILE" = x; then
7189    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7190  fi
7191
7192
7193
7194
7195
7196  # Publish this variable in the help.
7197
7198
7199  if test "x$FIND" = x; then
7200    # The variable is not set by user, try to locate tool using the code snippet
7201    for ac_prog in find
7202do
7203  # Extract the first word of "$ac_prog", so it can be a program name with args.
7204set dummy $ac_prog; ac_word=$2
7205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7206$as_echo_n "checking for $ac_word... " >&6; }
7207if ${ac_cv_path_FIND+:} false; then :
7208  $as_echo_n "(cached) " >&6
7209else
7210  case $FIND in
7211  [\\/]* | ?:[\\/]*)
7212  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7213  ;;
7214  *)
7215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7216for as_dir in $PATH
7217do
7218  IFS=$as_save_IFS
7219  test -z "$as_dir" && as_dir=.
7220    for ac_exec_ext in '' $ac_executable_extensions; do
7221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7222    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7224    break 2
7225  fi
7226done
7227  done
7228IFS=$as_save_IFS
7229
7230  ;;
7231esac
7232fi
7233FIND=$ac_cv_path_FIND
7234if test -n "$FIND"; then
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7236$as_echo "$FIND" >&6; }
7237else
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7239$as_echo "no" >&6; }
7240fi
7241
7242
7243  test -n "$FIND" && break
7244done
7245
7246  else
7247    # The variable is set, but is it from the command line or the environment?
7248
7249    # Try to remove the string !FIND! from our list.
7250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7252      # If it failed, the variable was not from the command line. Ignore it,
7253      # but warn the user (except for BASH, which is always set by the calling BASH).
7254      if test "xFIND" != xBASH; then
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7256$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7257      fi
7258      # Try to locate tool using the code snippet
7259      for ac_prog in find
7260do
7261  # Extract the first word of "$ac_prog", so it can be a program name with args.
7262set dummy $ac_prog; ac_word=$2
7263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7264$as_echo_n "checking for $ac_word... " >&6; }
7265if ${ac_cv_path_FIND+:} false; then :
7266  $as_echo_n "(cached) " >&6
7267else
7268  case $FIND in
7269  [\\/]* | ?:[\\/]*)
7270  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7271  ;;
7272  *)
7273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7274for as_dir in $PATH
7275do
7276  IFS=$as_save_IFS
7277  test -z "$as_dir" && as_dir=.
7278    for ac_exec_ext in '' $ac_executable_extensions; do
7279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7280    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7282    break 2
7283  fi
7284done
7285  done
7286IFS=$as_save_IFS
7287
7288  ;;
7289esac
7290fi
7291FIND=$ac_cv_path_FIND
7292if test -n "$FIND"; then
7293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7294$as_echo "$FIND" >&6; }
7295else
7296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7297$as_echo "no" >&6; }
7298fi
7299
7300
7301  test -n "$FIND" && break
7302done
7303
7304    else
7305      # If it succeeded, then it was overridden by the user. We will use it
7306      # for the tool.
7307
7308      # First remove it from the list of overridden variables, so we can test
7309      # for unknown variables in the end.
7310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7311
7312      # Check if the provided tool contains a complete path.
7313      tool_specified="$FIND"
7314      tool_basename="${tool_specified##*/}"
7315      if test "x$tool_basename" = "x$tool_specified"; then
7316        # A command without a complete path is provided, search $PATH.
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7318$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7319        # Extract the first word of "$tool_basename", so it can be a program name with args.
7320set dummy $tool_basename; ac_word=$2
7321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7322$as_echo_n "checking for $ac_word... " >&6; }
7323if ${ac_cv_path_FIND+:} false; then :
7324  $as_echo_n "(cached) " >&6
7325else
7326  case $FIND in
7327  [\\/]* | ?:[\\/]*)
7328  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7329  ;;
7330  *)
7331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7332for as_dir in $PATH
7333do
7334  IFS=$as_save_IFS
7335  test -z "$as_dir" && as_dir=.
7336    for ac_exec_ext in '' $ac_executable_extensions; do
7337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7338    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7340    break 2
7341  fi
7342done
7343  done
7344IFS=$as_save_IFS
7345
7346  ;;
7347esac
7348fi
7349FIND=$ac_cv_path_FIND
7350if test -n "$FIND"; then
7351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7352$as_echo "$FIND" >&6; }
7353else
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7355$as_echo "no" >&6; }
7356fi
7357
7358
7359        if test "x$FIND" = x; then
7360          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7361        fi
7362      else
7363        # Otherwise we believe it is a complete path. Use it as it is.
7364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7365$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7367$as_echo_n "checking for FIND... " >&6; }
7368        if test ! -x "$tool_specified"; then
7369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7370$as_echo "not found" >&6; }
7371          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7372        fi
7373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7374$as_echo "$tool_specified" >&6; }
7375      fi
7376    fi
7377  fi
7378
7379
7380
7381  if test "x$FIND" = x; then
7382    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7383  fi
7384
7385
7386
7387
7388
7389  # Publish this variable in the help.
7390
7391
7392  if test "x$HEAD" = x; then
7393    # The variable is not set by user, try to locate tool using the code snippet
7394    for ac_prog in head
7395do
7396  # Extract the first word of "$ac_prog", so it can be a program name with args.
7397set dummy $ac_prog; ac_word=$2
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7399$as_echo_n "checking for $ac_word... " >&6; }
7400if ${ac_cv_path_HEAD+:} false; then :
7401  $as_echo_n "(cached) " >&6
7402else
7403  case $HEAD in
7404  [\\/]* | ?:[\\/]*)
7405  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7406  ;;
7407  *)
7408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7409for as_dir in $PATH
7410do
7411  IFS=$as_save_IFS
7412  test -z "$as_dir" && as_dir=.
7413    for ac_exec_ext in '' $ac_executable_extensions; do
7414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7415    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7417    break 2
7418  fi
7419done
7420  done
7421IFS=$as_save_IFS
7422
7423  ;;
7424esac
7425fi
7426HEAD=$ac_cv_path_HEAD
7427if test -n "$HEAD"; then
7428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7429$as_echo "$HEAD" >&6; }
7430else
7431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7432$as_echo "no" >&6; }
7433fi
7434
7435
7436  test -n "$HEAD" && break
7437done
7438
7439  else
7440    # The variable is set, but is it from the command line or the environment?
7441
7442    # Try to remove the string !HEAD! from our list.
7443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7445      # If it failed, the variable was not from the command line. Ignore it,
7446      # but warn the user (except for BASH, which is always set by the calling BASH).
7447      if test "xHEAD" != xBASH; then
7448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7449$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7450      fi
7451      # Try to locate tool using the code snippet
7452      for ac_prog in head
7453do
7454  # Extract the first word of "$ac_prog", so it can be a program name with args.
7455set dummy $ac_prog; ac_word=$2
7456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7457$as_echo_n "checking for $ac_word... " >&6; }
7458if ${ac_cv_path_HEAD+:} false; then :
7459  $as_echo_n "(cached) " >&6
7460else
7461  case $HEAD in
7462  [\\/]* | ?:[\\/]*)
7463  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7464  ;;
7465  *)
7466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7467for as_dir in $PATH
7468do
7469  IFS=$as_save_IFS
7470  test -z "$as_dir" && as_dir=.
7471    for ac_exec_ext in '' $ac_executable_extensions; do
7472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7473    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7475    break 2
7476  fi
7477done
7478  done
7479IFS=$as_save_IFS
7480
7481  ;;
7482esac
7483fi
7484HEAD=$ac_cv_path_HEAD
7485if test -n "$HEAD"; then
7486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7487$as_echo "$HEAD" >&6; }
7488else
7489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7490$as_echo "no" >&6; }
7491fi
7492
7493
7494  test -n "$HEAD" && break
7495done
7496
7497    else
7498      # If it succeeded, then it was overridden by the user. We will use it
7499      # for the tool.
7500
7501      # First remove it from the list of overridden variables, so we can test
7502      # for unknown variables in the end.
7503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7504
7505      # Check if the provided tool contains a complete path.
7506      tool_specified="$HEAD"
7507      tool_basename="${tool_specified##*/}"
7508      if test "x$tool_basename" = "x$tool_specified"; then
7509        # A command without a complete path is provided, search $PATH.
7510        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7511$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7512        # Extract the first word of "$tool_basename", so it can be a program name with args.
7513set dummy $tool_basename; ac_word=$2
7514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7515$as_echo_n "checking for $ac_word... " >&6; }
7516if ${ac_cv_path_HEAD+:} false; then :
7517  $as_echo_n "(cached) " >&6
7518else
7519  case $HEAD in
7520  [\\/]* | ?:[\\/]*)
7521  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7522  ;;
7523  *)
7524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7525for as_dir in $PATH
7526do
7527  IFS=$as_save_IFS
7528  test -z "$as_dir" && as_dir=.
7529    for ac_exec_ext in '' $ac_executable_extensions; do
7530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7531    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7533    break 2
7534  fi
7535done
7536  done
7537IFS=$as_save_IFS
7538
7539  ;;
7540esac
7541fi
7542HEAD=$ac_cv_path_HEAD
7543if test -n "$HEAD"; then
7544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7545$as_echo "$HEAD" >&6; }
7546else
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7548$as_echo "no" >&6; }
7549fi
7550
7551
7552        if test "x$HEAD" = x; then
7553          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7554        fi
7555      else
7556        # Otherwise we believe it is a complete path. Use it as it is.
7557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7558$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7560$as_echo_n "checking for HEAD... " >&6; }
7561        if test ! -x "$tool_specified"; then
7562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7563$as_echo "not found" >&6; }
7564          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7565        fi
7566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7567$as_echo "$tool_specified" >&6; }
7568      fi
7569    fi
7570  fi
7571
7572
7573
7574  if test "x$HEAD" = x; then
7575    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7576  fi
7577
7578
7579
7580
7581
7582  # Publish this variable in the help.
7583
7584
7585  if test "x$LN" = x; then
7586    # The variable is not set by user, try to locate tool using the code snippet
7587    for ac_prog in ln
7588do
7589  # Extract the first word of "$ac_prog", so it can be a program name with args.
7590set dummy $ac_prog; ac_word=$2
7591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7592$as_echo_n "checking for $ac_word... " >&6; }
7593if ${ac_cv_path_LN+:} false; then :
7594  $as_echo_n "(cached) " >&6
7595else
7596  case $LN in
7597  [\\/]* | ?:[\\/]*)
7598  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7599  ;;
7600  *)
7601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7602for as_dir in $PATH
7603do
7604  IFS=$as_save_IFS
7605  test -z "$as_dir" && as_dir=.
7606    for ac_exec_ext in '' $ac_executable_extensions; do
7607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7608    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7610    break 2
7611  fi
7612done
7613  done
7614IFS=$as_save_IFS
7615
7616  ;;
7617esac
7618fi
7619LN=$ac_cv_path_LN
7620if test -n "$LN"; then
7621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7622$as_echo "$LN" >&6; }
7623else
7624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7625$as_echo "no" >&6; }
7626fi
7627
7628
7629  test -n "$LN" && break
7630done
7631
7632  else
7633    # The variable is set, but is it from the command line or the environment?
7634
7635    # Try to remove the string !LN! from our list.
7636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7638      # If it failed, the variable was not from the command line. Ignore it,
7639      # but warn the user (except for BASH, which is always set by the calling BASH).
7640      if test "xLN" != xBASH; then
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7642$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7643      fi
7644      # Try to locate tool using the code snippet
7645      for ac_prog in ln
7646do
7647  # Extract the first word of "$ac_prog", so it can be a program name with args.
7648set dummy $ac_prog; ac_word=$2
7649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7650$as_echo_n "checking for $ac_word... " >&6; }
7651if ${ac_cv_path_LN+:} false; then :
7652  $as_echo_n "(cached) " >&6
7653else
7654  case $LN in
7655  [\\/]* | ?:[\\/]*)
7656  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7657  ;;
7658  *)
7659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7660for as_dir in $PATH
7661do
7662  IFS=$as_save_IFS
7663  test -z "$as_dir" && as_dir=.
7664    for ac_exec_ext in '' $ac_executable_extensions; do
7665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7666    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7668    break 2
7669  fi
7670done
7671  done
7672IFS=$as_save_IFS
7673
7674  ;;
7675esac
7676fi
7677LN=$ac_cv_path_LN
7678if test -n "$LN"; then
7679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7680$as_echo "$LN" >&6; }
7681else
7682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683$as_echo "no" >&6; }
7684fi
7685
7686
7687  test -n "$LN" && break
7688done
7689
7690    else
7691      # If it succeeded, then it was overridden by the user. We will use it
7692      # for the tool.
7693
7694      # First remove it from the list of overridden variables, so we can test
7695      # for unknown variables in the end.
7696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7697
7698      # Check if the provided tool contains a complete path.
7699      tool_specified="$LN"
7700      tool_basename="${tool_specified##*/}"
7701      if test "x$tool_basename" = "x$tool_specified"; then
7702        # A command without a complete path is provided, search $PATH.
7703        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7704$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7705        # Extract the first word of "$tool_basename", so it can be a program name with args.
7706set dummy $tool_basename; ac_word=$2
7707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7708$as_echo_n "checking for $ac_word... " >&6; }
7709if ${ac_cv_path_LN+:} false; then :
7710  $as_echo_n "(cached) " >&6
7711else
7712  case $LN in
7713  [\\/]* | ?:[\\/]*)
7714  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7715  ;;
7716  *)
7717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718for as_dir in $PATH
7719do
7720  IFS=$as_save_IFS
7721  test -z "$as_dir" && as_dir=.
7722    for ac_exec_ext in '' $ac_executable_extensions; do
7723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7724    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726    break 2
7727  fi
7728done
7729  done
7730IFS=$as_save_IFS
7731
7732  ;;
7733esac
7734fi
7735LN=$ac_cv_path_LN
7736if test -n "$LN"; then
7737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7738$as_echo "$LN" >&6; }
7739else
7740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7741$as_echo "no" >&6; }
7742fi
7743
7744
7745        if test "x$LN" = x; then
7746          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7747        fi
7748      else
7749        # Otherwise we believe it is a complete path. Use it as it is.
7750        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7751$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7753$as_echo_n "checking for LN... " >&6; }
7754        if test ! -x "$tool_specified"; then
7755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7756$as_echo "not found" >&6; }
7757          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7758        fi
7759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7760$as_echo "$tool_specified" >&6; }
7761      fi
7762    fi
7763  fi
7764
7765
7766
7767  if test "x$LN" = x; then
7768    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7769  fi
7770
7771
7772
7773
7774
7775  # Publish this variable in the help.
7776
7777
7778  if test "x$LS" = x; then
7779    # The variable is not set by user, try to locate tool using the code snippet
7780    for ac_prog in ls
7781do
7782  # Extract the first word of "$ac_prog", so it can be a program name with args.
7783set dummy $ac_prog; ac_word=$2
7784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7785$as_echo_n "checking for $ac_word... " >&6; }
7786if ${ac_cv_path_LS+:} false; then :
7787  $as_echo_n "(cached) " >&6
7788else
7789  case $LS in
7790  [\\/]* | ?:[\\/]*)
7791  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7792  ;;
7793  *)
7794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7795for as_dir in $PATH
7796do
7797  IFS=$as_save_IFS
7798  test -z "$as_dir" && as_dir=.
7799    for ac_exec_ext in '' $ac_executable_extensions; do
7800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7801    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7803    break 2
7804  fi
7805done
7806  done
7807IFS=$as_save_IFS
7808
7809  ;;
7810esac
7811fi
7812LS=$ac_cv_path_LS
7813if test -n "$LS"; then
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7815$as_echo "$LS" >&6; }
7816else
7817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7818$as_echo "no" >&6; }
7819fi
7820
7821
7822  test -n "$LS" && break
7823done
7824
7825  else
7826    # The variable is set, but is it from the command line or the environment?
7827
7828    # Try to remove the string !LS! from our list.
7829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7831      # If it failed, the variable was not from the command line. Ignore it,
7832      # but warn the user (except for BASH, which is always set by the calling BASH).
7833      if test "xLS" != xBASH; then
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7835$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7836      fi
7837      # Try to locate tool using the code snippet
7838      for ac_prog in ls
7839do
7840  # Extract the first word of "$ac_prog", so it can be a program name with args.
7841set dummy $ac_prog; ac_word=$2
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7843$as_echo_n "checking for $ac_word... " >&6; }
7844if ${ac_cv_path_LS+:} false; then :
7845  $as_echo_n "(cached) " >&6
7846else
7847  case $LS in
7848  [\\/]* | ?:[\\/]*)
7849  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7850  ;;
7851  *)
7852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7853for as_dir in $PATH
7854do
7855  IFS=$as_save_IFS
7856  test -z "$as_dir" && as_dir=.
7857    for ac_exec_ext in '' $ac_executable_extensions; do
7858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7859    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7861    break 2
7862  fi
7863done
7864  done
7865IFS=$as_save_IFS
7866
7867  ;;
7868esac
7869fi
7870LS=$ac_cv_path_LS
7871if test -n "$LS"; then
7872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7873$as_echo "$LS" >&6; }
7874else
7875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7876$as_echo "no" >&6; }
7877fi
7878
7879
7880  test -n "$LS" && break
7881done
7882
7883    else
7884      # If it succeeded, then it was overridden by the user. We will use it
7885      # for the tool.
7886
7887      # First remove it from the list of overridden variables, so we can test
7888      # for unknown variables in the end.
7889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7890
7891      # Check if the provided tool contains a complete path.
7892      tool_specified="$LS"
7893      tool_basename="${tool_specified##*/}"
7894      if test "x$tool_basename" = "x$tool_specified"; then
7895        # A command without a complete path is provided, search $PATH.
7896        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7897$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7898        # Extract the first word of "$tool_basename", so it can be a program name with args.
7899set dummy $tool_basename; ac_word=$2
7900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7901$as_echo_n "checking for $ac_word... " >&6; }
7902if ${ac_cv_path_LS+:} false; then :
7903  $as_echo_n "(cached) " >&6
7904else
7905  case $LS in
7906  [\\/]* | ?:[\\/]*)
7907  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7908  ;;
7909  *)
7910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911for as_dir in $PATH
7912do
7913  IFS=$as_save_IFS
7914  test -z "$as_dir" && as_dir=.
7915    for ac_exec_ext in '' $ac_executable_extensions; do
7916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919    break 2
7920  fi
7921done
7922  done
7923IFS=$as_save_IFS
7924
7925  ;;
7926esac
7927fi
7928LS=$ac_cv_path_LS
7929if test -n "$LS"; then
7930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7931$as_echo "$LS" >&6; }
7932else
7933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934$as_echo "no" >&6; }
7935fi
7936
7937
7938        if test "x$LS" = x; then
7939          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7940        fi
7941      else
7942        # Otherwise we believe it is a complete path. Use it as it is.
7943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7944$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7946$as_echo_n "checking for LS... " >&6; }
7947        if test ! -x "$tool_specified"; then
7948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7949$as_echo "not found" >&6; }
7950          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7951        fi
7952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7953$as_echo "$tool_specified" >&6; }
7954      fi
7955    fi
7956  fi
7957
7958
7959
7960  if test "x$LS" = x; then
7961    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7962  fi
7963
7964
7965
7966
7967
7968  # Publish this variable in the help.
7969
7970
7971  if test "x$MKDIR" = x; then
7972    # The variable is not set by user, try to locate tool using the code snippet
7973    for ac_prog in mkdir
7974do
7975  # Extract the first word of "$ac_prog", so it can be a program name with args.
7976set dummy $ac_prog; ac_word=$2
7977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7978$as_echo_n "checking for $ac_word... " >&6; }
7979if ${ac_cv_path_MKDIR+:} false; then :
7980  $as_echo_n "(cached) " >&6
7981else
7982  case $MKDIR in
7983  [\\/]* | ?:[\\/]*)
7984  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7985  ;;
7986  *)
7987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7988for as_dir in $PATH
7989do
7990  IFS=$as_save_IFS
7991  test -z "$as_dir" && as_dir=.
7992    for ac_exec_ext in '' $ac_executable_extensions; do
7993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7994    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7996    break 2
7997  fi
7998done
7999  done
8000IFS=$as_save_IFS
8001
8002  ;;
8003esac
8004fi
8005MKDIR=$ac_cv_path_MKDIR
8006if test -n "$MKDIR"; then
8007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8008$as_echo "$MKDIR" >&6; }
8009else
8010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8011$as_echo "no" >&6; }
8012fi
8013
8014
8015  test -n "$MKDIR" && break
8016done
8017
8018  else
8019    # The variable is set, but is it from the command line or the environment?
8020
8021    # Try to remove the string !MKDIR! from our list.
8022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8024      # If it failed, the variable was not from the command line. Ignore it,
8025      # but warn the user (except for BASH, which is always set by the calling BASH).
8026      if test "xMKDIR" != xBASH; then
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8028$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8029      fi
8030      # Try to locate tool using the code snippet
8031      for ac_prog in mkdir
8032do
8033  # Extract the first word of "$ac_prog", so it can be a program name with args.
8034set dummy $ac_prog; ac_word=$2
8035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8036$as_echo_n "checking for $ac_word... " >&6; }
8037if ${ac_cv_path_MKDIR+:} false; then :
8038  $as_echo_n "(cached) " >&6
8039else
8040  case $MKDIR in
8041  [\\/]* | ?:[\\/]*)
8042  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8043  ;;
8044  *)
8045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8046for as_dir in $PATH
8047do
8048  IFS=$as_save_IFS
8049  test -z "$as_dir" && as_dir=.
8050    for ac_exec_ext in '' $ac_executable_extensions; do
8051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8052    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8054    break 2
8055  fi
8056done
8057  done
8058IFS=$as_save_IFS
8059
8060  ;;
8061esac
8062fi
8063MKDIR=$ac_cv_path_MKDIR
8064if test -n "$MKDIR"; then
8065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8066$as_echo "$MKDIR" >&6; }
8067else
8068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8069$as_echo "no" >&6; }
8070fi
8071
8072
8073  test -n "$MKDIR" && break
8074done
8075
8076    else
8077      # If it succeeded, then it was overridden by the user. We will use it
8078      # for the tool.
8079
8080      # First remove it from the list of overridden variables, so we can test
8081      # for unknown variables in the end.
8082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8083
8084      # Check if the provided tool contains a complete path.
8085      tool_specified="$MKDIR"
8086      tool_basename="${tool_specified##*/}"
8087      if test "x$tool_basename" = "x$tool_specified"; then
8088        # A command without a complete path is provided, search $PATH.
8089        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8090$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8091        # Extract the first word of "$tool_basename", so it can be a program name with args.
8092set dummy $tool_basename; ac_word=$2
8093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8094$as_echo_n "checking for $ac_word... " >&6; }
8095if ${ac_cv_path_MKDIR+:} false; then :
8096  $as_echo_n "(cached) " >&6
8097else
8098  case $MKDIR in
8099  [\\/]* | ?:[\\/]*)
8100  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8101  ;;
8102  *)
8103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8104for as_dir in $PATH
8105do
8106  IFS=$as_save_IFS
8107  test -z "$as_dir" && as_dir=.
8108    for ac_exec_ext in '' $ac_executable_extensions; do
8109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8110    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8112    break 2
8113  fi
8114done
8115  done
8116IFS=$as_save_IFS
8117
8118  ;;
8119esac
8120fi
8121MKDIR=$ac_cv_path_MKDIR
8122if test -n "$MKDIR"; then
8123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8124$as_echo "$MKDIR" >&6; }
8125else
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8127$as_echo "no" >&6; }
8128fi
8129
8130
8131        if test "x$MKDIR" = x; then
8132          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8133        fi
8134      else
8135        # Otherwise we believe it is a complete path. Use it as it is.
8136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8137$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8139$as_echo_n "checking for MKDIR... " >&6; }
8140        if test ! -x "$tool_specified"; then
8141          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8142$as_echo "not found" >&6; }
8143          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8144        fi
8145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8146$as_echo "$tool_specified" >&6; }
8147      fi
8148    fi
8149  fi
8150
8151
8152
8153  if test "x$MKDIR" = x; then
8154    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8155  fi
8156
8157
8158
8159
8160
8161  # Publish this variable in the help.
8162
8163
8164  if test "x$MKTEMP" = x; then
8165    # The variable is not set by user, try to locate tool using the code snippet
8166    for ac_prog in mktemp
8167do
8168  # Extract the first word of "$ac_prog", so it can be a program name with args.
8169set dummy $ac_prog; ac_word=$2
8170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8171$as_echo_n "checking for $ac_word... " >&6; }
8172if ${ac_cv_path_MKTEMP+:} false; then :
8173  $as_echo_n "(cached) " >&6
8174else
8175  case $MKTEMP in
8176  [\\/]* | ?:[\\/]*)
8177  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8178  ;;
8179  *)
8180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8181for as_dir in $PATH
8182do
8183  IFS=$as_save_IFS
8184  test -z "$as_dir" && as_dir=.
8185    for ac_exec_ext in '' $ac_executable_extensions; do
8186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8187    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8189    break 2
8190  fi
8191done
8192  done
8193IFS=$as_save_IFS
8194
8195  ;;
8196esac
8197fi
8198MKTEMP=$ac_cv_path_MKTEMP
8199if test -n "$MKTEMP"; then
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8201$as_echo "$MKTEMP" >&6; }
8202else
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8204$as_echo "no" >&6; }
8205fi
8206
8207
8208  test -n "$MKTEMP" && break
8209done
8210
8211  else
8212    # The variable is set, but is it from the command line or the environment?
8213
8214    # Try to remove the string !MKTEMP! from our list.
8215    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8216    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8217      # If it failed, the variable was not from the command line. Ignore it,
8218      # but warn the user (except for BASH, which is always set by the calling BASH).
8219      if test "xMKTEMP" != xBASH; then
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8221$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8222      fi
8223      # Try to locate tool using the code snippet
8224      for ac_prog in mktemp
8225do
8226  # Extract the first word of "$ac_prog", so it can be a program name with args.
8227set dummy $ac_prog; ac_word=$2
8228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8229$as_echo_n "checking for $ac_word... " >&6; }
8230if ${ac_cv_path_MKTEMP+:} false; then :
8231  $as_echo_n "(cached) " >&6
8232else
8233  case $MKTEMP in
8234  [\\/]* | ?:[\\/]*)
8235  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8236  ;;
8237  *)
8238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8239for as_dir in $PATH
8240do
8241  IFS=$as_save_IFS
8242  test -z "$as_dir" && as_dir=.
8243    for ac_exec_ext in '' $ac_executable_extensions; do
8244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8245    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8247    break 2
8248  fi
8249done
8250  done
8251IFS=$as_save_IFS
8252
8253  ;;
8254esac
8255fi
8256MKTEMP=$ac_cv_path_MKTEMP
8257if test -n "$MKTEMP"; then
8258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8259$as_echo "$MKTEMP" >&6; }
8260else
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262$as_echo "no" >&6; }
8263fi
8264
8265
8266  test -n "$MKTEMP" && break
8267done
8268
8269    else
8270      # If it succeeded, then it was overridden by the user. We will use it
8271      # for the tool.
8272
8273      # First remove it from the list of overridden variables, so we can test
8274      # for unknown variables in the end.
8275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8276
8277      # Check if the provided tool contains a complete path.
8278      tool_specified="$MKTEMP"
8279      tool_basename="${tool_specified##*/}"
8280      if test "x$tool_basename" = "x$tool_specified"; then
8281        # A command without a complete path is provided, search $PATH.
8282        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8283$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8284        # Extract the first word of "$tool_basename", so it can be a program name with args.
8285set dummy $tool_basename; ac_word=$2
8286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8287$as_echo_n "checking for $ac_word... " >&6; }
8288if ${ac_cv_path_MKTEMP+:} false; then :
8289  $as_echo_n "(cached) " >&6
8290else
8291  case $MKTEMP in
8292  [\\/]* | ?:[\\/]*)
8293  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8294  ;;
8295  *)
8296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8297for as_dir in $PATH
8298do
8299  IFS=$as_save_IFS
8300  test -z "$as_dir" && as_dir=.
8301    for ac_exec_ext in '' $ac_executable_extensions; do
8302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8303    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8305    break 2
8306  fi
8307done
8308  done
8309IFS=$as_save_IFS
8310
8311  ;;
8312esac
8313fi
8314MKTEMP=$ac_cv_path_MKTEMP
8315if test -n "$MKTEMP"; then
8316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8317$as_echo "$MKTEMP" >&6; }
8318else
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320$as_echo "no" >&6; }
8321fi
8322
8323
8324        if test "x$MKTEMP" = x; then
8325          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8326        fi
8327      else
8328        # Otherwise we believe it is a complete path. Use it as it is.
8329        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8330$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8331        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8332$as_echo_n "checking for MKTEMP... " >&6; }
8333        if test ! -x "$tool_specified"; then
8334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8335$as_echo "not found" >&6; }
8336          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8337        fi
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8339$as_echo "$tool_specified" >&6; }
8340      fi
8341    fi
8342  fi
8343
8344
8345
8346  if test "x$MKTEMP" = x; then
8347    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8348  fi
8349
8350
8351
8352
8353
8354  # Publish this variable in the help.
8355
8356
8357  if test "x$MV" = x; then
8358    # The variable is not set by user, try to locate tool using the code snippet
8359    for ac_prog in mv
8360do
8361  # Extract the first word of "$ac_prog", so it can be a program name with args.
8362set dummy $ac_prog; ac_word=$2
8363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8364$as_echo_n "checking for $ac_word... " >&6; }
8365if ${ac_cv_path_MV+:} false; then :
8366  $as_echo_n "(cached) " >&6
8367else
8368  case $MV in
8369  [\\/]* | ?:[\\/]*)
8370  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8371  ;;
8372  *)
8373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8374for as_dir in $PATH
8375do
8376  IFS=$as_save_IFS
8377  test -z "$as_dir" && as_dir=.
8378    for ac_exec_ext in '' $ac_executable_extensions; do
8379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8380    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8382    break 2
8383  fi
8384done
8385  done
8386IFS=$as_save_IFS
8387
8388  ;;
8389esac
8390fi
8391MV=$ac_cv_path_MV
8392if test -n "$MV"; then
8393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8394$as_echo "$MV" >&6; }
8395else
8396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8397$as_echo "no" >&6; }
8398fi
8399
8400
8401  test -n "$MV" && break
8402done
8403
8404  else
8405    # The variable is set, but is it from the command line or the environment?
8406
8407    # Try to remove the string !MV! from our list.
8408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8410      # If it failed, the variable was not from the command line. Ignore it,
8411      # but warn the user (except for BASH, which is always set by the calling BASH).
8412      if test "xMV" != xBASH; then
8413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8414$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8415      fi
8416      # Try to locate tool using the code snippet
8417      for ac_prog in mv
8418do
8419  # Extract the first word of "$ac_prog", so it can be a program name with args.
8420set dummy $ac_prog; ac_word=$2
8421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8422$as_echo_n "checking for $ac_word... " >&6; }
8423if ${ac_cv_path_MV+:} false; then :
8424  $as_echo_n "(cached) " >&6
8425else
8426  case $MV in
8427  [\\/]* | ?:[\\/]*)
8428  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8429  ;;
8430  *)
8431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8432for as_dir in $PATH
8433do
8434  IFS=$as_save_IFS
8435  test -z "$as_dir" && as_dir=.
8436    for ac_exec_ext in '' $ac_executable_extensions; do
8437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8438    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8440    break 2
8441  fi
8442done
8443  done
8444IFS=$as_save_IFS
8445
8446  ;;
8447esac
8448fi
8449MV=$ac_cv_path_MV
8450if test -n "$MV"; then
8451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8452$as_echo "$MV" >&6; }
8453else
8454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8455$as_echo "no" >&6; }
8456fi
8457
8458
8459  test -n "$MV" && break
8460done
8461
8462    else
8463      # If it succeeded, then it was overridden by the user. We will use it
8464      # for the tool.
8465
8466      # First remove it from the list of overridden variables, so we can test
8467      # for unknown variables in the end.
8468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8469
8470      # Check if the provided tool contains a complete path.
8471      tool_specified="$MV"
8472      tool_basename="${tool_specified##*/}"
8473      if test "x$tool_basename" = "x$tool_specified"; then
8474        # A command without a complete path is provided, search $PATH.
8475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8476$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8477        # Extract the first word of "$tool_basename", so it can be a program name with args.
8478set dummy $tool_basename; ac_word=$2
8479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8480$as_echo_n "checking for $ac_word... " >&6; }
8481if ${ac_cv_path_MV+:} false; then :
8482  $as_echo_n "(cached) " >&6
8483else
8484  case $MV in
8485  [\\/]* | ?:[\\/]*)
8486  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8487  ;;
8488  *)
8489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8490for as_dir in $PATH
8491do
8492  IFS=$as_save_IFS
8493  test -z "$as_dir" && as_dir=.
8494    for ac_exec_ext in '' $ac_executable_extensions; do
8495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8496    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8498    break 2
8499  fi
8500done
8501  done
8502IFS=$as_save_IFS
8503
8504  ;;
8505esac
8506fi
8507MV=$ac_cv_path_MV
8508if test -n "$MV"; then
8509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8510$as_echo "$MV" >&6; }
8511else
8512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513$as_echo "no" >&6; }
8514fi
8515
8516
8517        if test "x$MV" = x; then
8518          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8519        fi
8520      else
8521        # Otherwise we believe it is a complete path. Use it as it is.
8522        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8523$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8525$as_echo_n "checking for MV... " >&6; }
8526        if test ! -x "$tool_specified"; then
8527          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8528$as_echo "not found" >&6; }
8529          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8530        fi
8531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8532$as_echo "$tool_specified" >&6; }
8533      fi
8534    fi
8535  fi
8536
8537
8538
8539  if test "x$MV" = x; then
8540    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8541  fi
8542
8543
8544
8545
8546
8547  # Publish this variable in the help.
8548
8549
8550  if test "x$NAWK" = x; then
8551    # The variable is not set by user, try to locate tool using the code snippet
8552    for ac_prog in nawk gawk awk
8553do
8554  # Extract the first word of "$ac_prog", so it can be a program name with args.
8555set dummy $ac_prog; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if ${ac_cv_path_NAWK+:} false; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $NAWK in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8573    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584NAWK=$ac_cv_path_NAWK
8585if test -n "$NAWK"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8587$as_echo "$NAWK" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594  test -n "$NAWK" && break
8595done
8596
8597  else
8598    # The variable is set, but is it from the command line or the environment?
8599
8600    # Try to remove the string !NAWK! from our list.
8601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8603      # If it failed, the variable was not from the command line. Ignore it,
8604      # but warn the user (except for BASH, which is always set by the calling BASH).
8605      if test "xNAWK" != xBASH; then
8606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8607$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8608      fi
8609      # Try to locate tool using the code snippet
8610      for ac_prog in nawk gawk awk
8611do
8612  # Extract the first word of "$ac_prog", so it can be a program name with args.
8613set dummy $ac_prog; ac_word=$2
8614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8615$as_echo_n "checking for $ac_word... " >&6; }
8616if ${ac_cv_path_NAWK+:} false; then :
8617  $as_echo_n "(cached) " >&6
8618else
8619  case $NAWK in
8620  [\\/]* | ?:[\\/]*)
8621  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8622  ;;
8623  *)
8624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8625for as_dir in $PATH
8626do
8627  IFS=$as_save_IFS
8628  test -z "$as_dir" && as_dir=.
8629    for ac_exec_ext in '' $ac_executable_extensions; do
8630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8631    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8633    break 2
8634  fi
8635done
8636  done
8637IFS=$as_save_IFS
8638
8639  ;;
8640esac
8641fi
8642NAWK=$ac_cv_path_NAWK
8643if test -n "$NAWK"; then
8644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8645$as_echo "$NAWK" >&6; }
8646else
8647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8648$as_echo "no" >&6; }
8649fi
8650
8651
8652  test -n "$NAWK" && break
8653done
8654
8655    else
8656      # If it succeeded, then it was overridden by the user. We will use it
8657      # for the tool.
8658
8659      # First remove it from the list of overridden variables, so we can test
8660      # for unknown variables in the end.
8661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8662
8663      # Check if the provided tool contains a complete path.
8664      tool_specified="$NAWK"
8665      tool_basename="${tool_specified##*/}"
8666      if test "x$tool_basename" = "x$tool_specified"; then
8667        # A command without a complete path is provided, search $PATH.
8668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8669$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8670        # Extract the first word of "$tool_basename", so it can be a program name with args.
8671set dummy $tool_basename; ac_word=$2
8672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8673$as_echo_n "checking for $ac_word... " >&6; }
8674if ${ac_cv_path_NAWK+:} false; then :
8675  $as_echo_n "(cached) " >&6
8676else
8677  case $NAWK in
8678  [\\/]* | ?:[\\/]*)
8679  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8680  ;;
8681  *)
8682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8683for as_dir in $PATH
8684do
8685  IFS=$as_save_IFS
8686  test -z "$as_dir" && as_dir=.
8687    for ac_exec_ext in '' $ac_executable_extensions; do
8688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8689    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8691    break 2
8692  fi
8693done
8694  done
8695IFS=$as_save_IFS
8696
8697  ;;
8698esac
8699fi
8700NAWK=$ac_cv_path_NAWK
8701if test -n "$NAWK"; then
8702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8703$as_echo "$NAWK" >&6; }
8704else
8705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8706$as_echo "no" >&6; }
8707fi
8708
8709
8710        if test "x$NAWK" = x; then
8711          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8712        fi
8713      else
8714        # Otherwise we believe it is a complete path. Use it as it is.
8715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8716$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8718$as_echo_n "checking for NAWK... " >&6; }
8719        if test ! -x "$tool_specified"; then
8720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8721$as_echo "not found" >&6; }
8722          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8723        fi
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8725$as_echo "$tool_specified" >&6; }
8726      fi
8727    fi
8728  fi
8729
8730
8731
8732  if test "x$NAWK" = x; then
8733    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8734  fi
8735
8736
8737
8738
8739
8740  # Publish this variable in the help.
8741
8742
8743  if test "x$PRINTF" = x; then
8744    # The variable is not set by user, try to locate tool using the code snippet
8745    for ac_prog in printf
8746do
8747  # Extract the first word of "$ac_prog", so it can be a program name with args.
8748set dummy $ac_prog; ac_word=$2
8749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8750$as_echo_n "checking for $ac_word... " >&6; }
8751if ${ac_cv_path_PRINTF+:} false; then :
8752  $as_echo_n "(cached) " >&6
8753else
8754  case $PRINTF in
8755  [\\/]* | ?:[\\/]*)
8756  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8757  ;;
8758  *)
8759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8760for as_dir in $PATH
8761do
8762  IFS=$as_save_IFS
8763  test -z "$as_dir" && as_dir=.
8764    for ac_exec_ext in '' $ac_executable_extensions; do
8765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8766    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8768    break 2
8769  fi
8770done
8771  done
8772IFS=$as_save_IFS
8773
8774  ;;
8775esac
8776fi
8777PRINTF=$ac_cv_path_PRINTF
8778if test -n "$PRINTF"; then
8779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8780$as_echo "$PRINTF" >&6; }
8781else
8782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8783$as_echo "no" >&6; }
8784fi
8785
8786
8787  test -n "$PRINTF" && break
8788done
8789
8790  else
8791    # The variable is set, but is it from the command line or the environment?
8792
8793    # Try to remove the string !PRINTF! from our list.
8794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8796      # If it failed, the variable was not from the command line. Ignore it,
8797      # but warn the user (except for BASH, which is always set by the calling BASH).
8798      if test "xPRINTF" != xBASH; then
8799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8800$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8801      fi
8802      # Try to locate tool using the code snippet
8803      for ac_prog in printf
8804do
8805  # Extract the first word of "$ac_prog", so it can be a program name with args.
8806set dummy $ac_prog; ac_word=$2
8807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8808$as_echo_n "checking for $ac_word... " >&6; }
8809if ${ac_cv_path_PRINTF+:} false; then :
8810  $as_echo_n "(cached) " >&6
8811else
8812  case $PRINTF in
8813  [\\/]* | ?:[\\/]*)
8814  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8815  ;;
8816  *)
8817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8818for as_dir in $PATH
8819do
8820  IFS=$as_save_IFS
8821  test -z "$as_dir" && as_dir=.
8822    for ac_exec_ext in '' $ac_executable_extensions; do
8823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8824    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8826    break 2
8827  fi
8828done
8829  done
8830IFS=$as_save_IFS
8831
8832  ;;
8833esac
8834fi
8835PRINTF=$ac_cv_path_PRINTF
8836if test -n "$PRINTF"; then
8837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8838$as_echo "$PRINTF" >&6; }
8839else
8840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8841$as_echo "no" >&6; }
8842fi
8843
8844
8845  test -n "$PRINTF" && break
8846done
8847
8848    else
8849      # If it succeeded, then it was overridden by the user. We will use it
8850      # for the tool.
8851
8852      # First remove it from the list of overridden variables, so we can test
8853      # for unknown variables in the end.
8854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8855
8856      # Check if the provided tool contains a complete path.
8857      tool_specified="$PRINTF"
8858      tool_basename="${tool_specified##*/}"
8859      if test "x$tool_basename" = "x$tool_specified"; then
8860        # A command without a complete path is provided, search $PATH.
8861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8862$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8863        # Extract the first word of "$tool_basename", so it can be a program name with args.
8864set dummy $tool_basename; ac_word=$2
8865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8866$as_echo_n "checking for $ac_word... " >&6; }
8867if ${ac_cv_path_PRINTF+:} false; then :
8868  $as_echo_n "(cached) " >&6
8869else
8870  case $PRINTF in
8871  [\\/]* | ?:[\\/]*)
8872  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8873  ;;
8874  *)
8875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8876for as_dir in $PATH
8877do
8878  IFS=$as_save_IFS
8879  test -z "$as_dir" && as_dir=.
8880    for ac_exec_ext in '' $ac_executable_extensions; do
8881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8882    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8884    break 2
8885  fi
8886done
8887  done
8888IFS=$as_save_IFS
8889
8890  ;;
8891esac
8892fi
8893PRINTF=$ac_cv_path_PRINTF
8894if test -n "$PRINTF"; then
8895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8896$as_echo "$PRINTF" >&6; }
8897else
8898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8899$as_echo "no" >&6; }
8900fi
8901
8902
8903        if test "x$PRINTF" = x; then
8904          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8905        fi
8906      else
8907        # Otherwise we believe it is a complete path. Use it as it is.
8908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8909$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8911$as_echo_n "checking for PRINTF... " >&6; }
8912        if test ! -x "$tool_specified"; then
8913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8914$as_echo "not found" >&6; }
8915          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8916        fi
8917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8918$as_echo "$tool_specified" >&6; }
8919      fi
8920    fi
8921  fi
8922
8923
8924
8925  if test "x$PRINTF" = x; then
8926    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8927  fi
8928
8929
8930
8931
8932
8933  # Publish this variable in the help.
8934
8935
8936  if test "x$RM" = x; then
8937    # The variable is not set by user, try to locate tool using the code snippet
8938    for ac_prog in rm
8939do
8940  # Extract the first word of "$ac_prog", so it can be a program name with args.
8941set dummy $ac_prog; ac_word=$2
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8943$as_echo_n "checking for $ac_word... " >&6; }
8944if ${ac_cv_path_RM+:} false; then :
8945  $as_echo_n "(cached) " >&6
8946else
8947  case $RM in
8948  [\\/]* | ?:[\\/]*)
8949  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8950  ;;
8951  *)
8952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8953for as_dir in $PATH
8954do
8955  IFS=$as_save_IFS
8956  test -z "$as_dir" && as_dir=.
8957    for ac_exec_ext in '' $ac_executable_extensions; do
8958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8959    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8961    break 2
8962  fi
8963done
8964  done
8965IFS=$as_save_IFS
8966
8967  ;;
8968esac
8969fi
8970RM=$ac_cv_path_RM
8971if test -n "$RM"; then
8972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8973$as_echo "$RM" >&6; }
8974else
8975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8976$as_echo "no" >&6; }
8977fi
8978
8979
8980  test -n "$RM" && break
8981done
8982
8983  else
8984    # The variable is set, but is it from the command line or the environment?
8985
8986    # Try to remove the string !RM! from our list.
8987    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8988    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8989      # If it failed, the variable was not from the command line. Ignore it,
8990      # but warn the user (except for BASH, which is always set by the calling BASH).
8991      if test "xRM" != xBASH; then
8992        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8993$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8994      fi
8995      # Try to locate tool using the code snippet
8996      for ac_prog in rm
8997do
8998  # Extract the first word of "$ac_prog", so it can be a program name with args.
8999set dummy $ac_prog; ac_word=$2
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9001$as_echo_n "checking for $ac_word... " >&6; }
9002if ${ac_cv_path_RM+:} false; then :
9003  $as_echo_n "(cached) " >&6
9004else
9005  case $RM in
9006  [\\/]* | ?:[\\/]*)
9007  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9008  ;;
9009  *)
9010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9011for as_dir in $PATH
9012do
9013  IFS=$as_save_IFS
9014  test -z "$as_dir" && as_dir=.
9015    for ac_exec_ext in '' $ac_executable_extensions; do
9016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9017    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9019    break 2
9020  fi
9021done
9022  done
9023IFS=$as_save_IFS
9024
9025  ;;
9026esac
9027fi
9028RM=$ac_cv_path_RM
9029if test -n "$RM"; then
9030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9031$as_echo "$RM" >&6; }
9032else
9033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9034$as_echo "no" >&6; }
9035fi
9036
9037
9038  test -n "$RM" && break
9039done
9040
9041    else
9042      # If it succeeded, then it was overridden by the user. We will use it
9043      # for the tool.
9044
9045      # First remove it from the list of overridden variables, so we can test
9046      # for unknown variables in the end.
9047      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9048
9049      # Check if the provided tool contains a complete path.
9050      tool_specified="$RM"
9051      tool_basename="${tool_specified##*/}"
9052      if test "x$tool_basename" = "x$tool_specified"; then
9053        # A command without a complete path is provided, search $PATH.
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9055$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9056        # Extract the first word of "$tool_basename", so it can be a program name with args.
9057set dummy $tool_basename; ac_word=$2
9058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9059$as_echo_n "checking for $ac_word... " >&6; }
9060if ${ac_cv_path_RM+:} false; then :
9061  $as_echo_n "(cached) " >&6
9062else
9063  case $RM in
9064  [\\/]* | ?:[\\/]*)
9065  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9066  ;;
9067  *)
9068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9069for as_dir in $PATH
9070do
9071  IFS=$as_save_IFS
9072  test -z "$as_dir" && as_dir=.
9073    for ac_exec_ext in '' $ac_executable_extensions; do
9074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9075    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9077    break 2
9078  fi
9079done
9080  done
9081IFS=$as_save_IFS
9082
9083  ;;
9084esac
9085fi
9086RM=$ac_cv_path_RM
9087if test -n "$RM"; then
9088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9089$as_echo "$RM" >&6; }
9090else
9091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092$as_echo "no" >&6; }
9093fi
9094
9095
9096        if test "x$RM" = x; then
9097          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9098        fi
9099      else
9100        # Otherwise we believe it is a complete path. Use it as it is.
9101        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9102$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9104$as_echo_n "checking for RM... " >&6; }
9105        if test ! -x "$tool_specified"; then
9106          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9107$as_echo "not found" >&6; }
9108          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9109        fi
9110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9111$as_echo "$tool_specified" >&6; }
9112      fi
9113    fi
9114  fi
9115
9116
9117
9118  if test "x$RM" = x; then
9119    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9120  fi
9121
9122
9123
9124
9125
9126  # Publish this variable in the help.
9127
9128
9129  if test "x$SH" = x; then
9130    # The variable is not set by user, try to locate tool using the code snippet
9131    for ac_prog in sh
9132do
9133  # Extract the first word of "$ac_prog", so it can be a program name with args.
9134set dummy $ac_prog; ac_word=$2
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9136$as_echo_n "checking for $ac_word... " >&6; }
9137if ${ac_cv_path_SH+:} false; then :
9138  $as_echo_n "(cached) " >&6
9139else
9140  case $SH in
9141  [\\/]* | ?:[\\/]*)
9142  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9143  ;;
9144  *)
9145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9146for as_dir in $PATH
9147do
9148  IFS=$as_save_IFS
9149  test -z "$as_dir" && as_dir=.
9150    for ac_exec_ext in '' $ac_executable_extensions; do
9151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9152    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9154    break 2
9155  fi
9156done
9157  done
9158IFS=$as_save_IFS
9159
9160  ;;
9161esac
9162fi
9163SH=$ac_cv_path_SH
9164if test -n "$SH"; then
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9166$as_echo "$SH" >&6; }
9167else
9168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9169$as_echo "no" >&6; }
9170fi
9171
9172
9173  test -n "$SH" && break
9174done
9175
9176  else
9177    # The variable is set, but is it from the command line or the environment?
9178
9179    # Try to remove the string !SH! from our list.
9180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9182      # If it failed, the variable was not from the command line. Ignore it,
9183      # but warn the user (except for BASH, which is always set by the calling BASH).
9184      if test "xSH" != xBASH; then
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9186$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9187      fi
9188      # Try to locate tool using the code snippet
9189      for ac_prog in sh
9190do
9191  # Extract the first word of "$ac_prog", so it can be a program name with args.
9192set dummy $ac_prog; ac_word=$2
9193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9194$as_echo_n "checking for $ac_word... " >&6; }
9195if ${ac_cv_path_SH+:} false; then :
9196  $as_echo_n "(cached) " >&6
9197else
9198  case $SH in
9199  [\\/]* | ?:[\\/]*)
9200  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9201  ;;
9202  *)
9203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9204for as_dir in $PATH
9205do
9206  IFS=$as_save_IFS
9207  test -z "$as_dir" && as_dir=.
9208    for ac_exec_ext in '' $ac_executable_extensions; do
9209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9210    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9212    break 2
9213  fi
9214done
9215  done
9216IFS=$as_save_IFS
9217
9218  ;;
9219esac
9220fi
9221SH=$ac_cv_path_SH
9222if test -n "$SH"; then
9223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9224$as_echo "$SH" >&6; }
9225else
9226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
9228fi
9229
9230
9231  test -n "$SH" && break
9232done
9233
9234    else
9235      # If it succeeded, then it was overridden by the user. We will use it
9236      # for the tool.
9237
9238      # First remove it from the list of overridden variables, so we can test
9239      # for unknown variables in the end.
9240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9241
9242      # Check if the provided tool contains a complete path.
9243      tool_specified="$SH"
9244      tool_basename="${tool_specified##*/}"
9245      if test "x$tool_basename" = "x$tool_specified"; then
9246        # A command without a complete path is provided, search $PATH.
9247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9248$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9249        # Extract the first word of "$tool_basename", so it can be a program name with args.
9250set dummy $tool_basename; ac_word=$2
9251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9252$as_echo_n "checking for $ac_word... " >&6; }
9253if ${ac_cv_path_SH+:} false; then :
9254  $as_echo_n "(cached) " >&6
9255else
9256  case $SH in
9257  [\\/]* | ?:[\\/]*)
9258  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9259  ;;
9260  *)
9261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9262for as_dir in $PATH
9263do
9264  IFS=$as_save_IFS
9265  test -z "$as_dir" && as_dir=.
9266    for ac_exec_ext in '' $ac_executable_extensions; do
9267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9268    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9270    break 2
9271  fi
9272done
9273  done
9274IFS=$as_save_IFS
9275
9276  ;;
9277esac
9278fi
9279SH=$ac_cv_path_SH
9280if test -n "$SH"; then
9281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9282$as_echo "$SH" >&6; }
9283else
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9285$as_echo "no" >&6; }
9286fi
9287
9288
9289        if test "x$SH" = x; then
9290          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9291        fi
9292      else
9293        # Otherwise we believe it is a complete path. Use it as it is.
9294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9295$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9297$as_echo_n "checking for SH... " >&6; }
9298        if test ! -x "$tool_specified"; then
9299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9300$as_echo "not found" >&6; }
9301          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9302        fi
9303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9304$as_echo "$tool_specified" >&6; }
9305      fi
9306    fi
9307  fi
9308
9309
9310
9311  if test "x$SH" = x; then
9312    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9313  fi
9314
9315
9316
9317
9318
9319  # Publish this variable in the help.
9320
9321
9322  if test "x$SORT" = x; then
9323    # The variable is not set by user, try to locate tool using the code snippet
9324    for ac_prog in sort
9325do
9326  # Extract the first word of "$ac_prog", so it can be a program name with args.
9327set dummy $ac_prog; ac_word=$2
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9329$as_echo_n "checking for $ac_word... " >&6; }
9330if ${ac_cv_path_SORT+:} false; then :
9331  $as_echo_n "(cached) " >&6
9332else
9333  case $SORT in
9334  [\\/]* | ?:[\\/]*)
9335  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9336  ;;
9337  *)
9338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9339for as_dir in $PATH
9340do
9341  IFS=$as_save_IFS
9342  test -z "$as_dir" && as_dir=.
9343    for ac_exec_ext in '' $ac_executable_extensions; do
9344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9345    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9347    break 2
9348  fi
9349done
9350  done
9351IFS=$as_save_IFS
9352
9353  ;;
9354esac
9355fi
9356SORT=$ac_cv_path_SORT
9357if test -n "$SORT"; then
9358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9359$as_echo "$SORT" >&6; }
9360else
9361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9362$as_echo "no" >&6; }
9363fi
9364
9365
9366  test -n "$SORT" && break
9367done
9368
9369  else
9370    # The variable is set, but is it from the command line or the environment?
9371
9372    # Try to remove the string !SORT! from our list.
9373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9375      # If it failed, the variable was not from the command line. Ignore it,
9376      # but warn the user (except for BASH, which is always set by the calling BASH).
9377      if test "xSORT" != xBASH; then
9378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9379$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9380      fi
9381      # Try to locate tool using the code snippet
9382      for ac_prog in sort
9383do
9384  # Extract the first word of "$ac_prog", so it can be a program name with args.
9385set dummy $ac_prog; ac_word=$2
9386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9387$as_echo_n "checking for $ac_word... " >&6; }
9388if ${ac_cv_path_SORT+:} false; then :
9389  $as_echo_n "(cached) " >&6
9390else
9391  case $SORT in
9392  [\\/]* | ?:[\\/]*)
9393  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9394  ;;
9395  *)
9396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9397for as_dir in $PATH
9398do
9399  IFS=$as_save_IFS
9400  test -z "$as_dir" && as_dir=.
9401    for ac_exec_ext in '' $ac_executable_extensions; do
9402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9403    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9405    break 2
9406  fi
9407done
9408  done
9409IFS=$as_save_IFS
9410
9411  ;;
9412esac
9413fi
9414SORT=$ac_cv_path_SORT
9415if test -n "$SORT"; then
9416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9417$as_echo "$SORT" >&6; }
9418else
9419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420$as_echo "no" >&6; }
9421fi
9422
9423
9424  test -n "$SORT" && break
9425done
9426
9427    else
9428      # If it succeeded, then it was overridden by the user. We will use it
9429      # for the tool.
9430
9431      # First remove it from the list of overridden variables, so we can test
9432      # for unknown variables in the end.
9433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9434
9435      # Check if the provided tool contains a complete path.
9436      tool_specified="$SORT"
9437      tool_basename="${tool_specified##*/}"
9438      if test "x$tool_basename" = "x$tool_specified"; then
9439        # A command without a complete path is provided, search $PATH.
9440        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9441$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9442        # Extract the first word of "$tool_basename", so it can be a program name with args.
9443set dummy $tool_basename; ac_word=$2
9444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9445$as_echo_n "checking for $ac_word... " >&6; }
9446if ${ac_cv_path_SORT+:} false; then :
9447  $as_echo_n "(cached) " >&6
9448else
9449  case $SORT in
9450  [\\/]* | ?:[\\/]*)
9451  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9452  ;;
9453  *)
9454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9455for as_dir in $PATH
9456do
9457  IFS=$as_save_IFS
9458  test -z "$as_dir" && as_dir=.
9459    for ac_exec_ext in '' $ac_executable_extensions; do
9460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9461    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9463    break 2
9464  fi
9465done
9466  done
9467IFS=$as_save_IFS
9468
9469  ;;
9470esac
9471fi
9472SORT=$ac_cv_path_SORT
9473if test -n "$SORT"; then
9474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9475$as_echo "$SORT" >&6; }
9476else
9477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
9479fi
9480
9481
9482        if test "x$SORT" = x; then
9483          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9484        fi
9485      else
9486        # Otherwise we believe it is a complete path. Use it as it is.
9487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9488$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9489        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9490$as_echo_n "checking for SORT... " >&6; }
9491        if test ! -x "$tool_specified"; then
9492          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9493$as_echo "not found" >&6; }
9494          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9495        fi
9496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9497$as_echo "$tool_specified" >&6; }
9498      fi
9499    fi
9500  fi
9501
9502
9503
9504  if test "x$SORT" = x; then
9505    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9506  fi
9507
9508
9509
9510
9511
9512  # Publish this variable in the help.
9513
9514
9515  if test "x$TAIL" = x; then
9516    # The variable is not set by user, try to locate tool using the code snippet
9517    for ac_prog in tail
9518do
9519  # Extract the first word of "$ac_prog", so it can be a program name with args.
9520set dummy $ac_prog; ac_word=$2
9521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9522$as_echo_n "checking for $ac_word... " >&6; }
9523if ${ac_cv_path_TAIL+:} false; then :
9524  $as_echo_n "(cached) " >&6
9525else
9526  case $TAIL in
9527  [\\/]* | ?:[\\/]*)
9528  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9529  ;;
9530  *)
9531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9532for as_dir in $PATH
9533do
9534  IFS=$as_save_IFS
9535  test -z "$as_dir" && as_dir=.
9536    for ac_exec_ext in '' $ac_executable_extensions; do
9537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9538    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9540    break 2
9541  fi
9542done
9543  done
9544IFS=$as_save_IFS
9545
9546  ;;
9547esac
9548fi
9549TAIL=$ac_cv_path_TAIL
9550if test -n "$TAIL"; then
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9552$as_echo "$TAIL" >&6; }
9553else
9554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
9556fi
9557
9558
9559  test -n "$TAIL" && break
9560done
9561
9562  else
9563    # The variable is set, but is it from the command line or the environment?
9564
9565    # Try to remove the string !TAIL! from our list.
9566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9568      # If it failed, the variable was not from the command line. Ignore it,
9569      # but warn the user (except for BASH, which is always set by the calling BASH).
9570      if test "xTAIL" != xBASH; then
9571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9572$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9573      fi
9574      # Try to locate tool using the code snippet
9575      for ac_prog in tail
9576do
9577  # Extract the first word of "$ac_prog", so it can be a program name with args.
9578set dummy $ac_prog; ac_word=$2
9579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9580$as_echo_n "checking for $ac_word... " >&6; }
9581if ${ac_cv_path_TAIL+:} false; then :
9582  $as_echo_n "(cached) " >&6
9583else
9584  case $TAIL in
9585  [\\/]* | ?:[\\/]*)
9586  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9587  ;;
9588  *)
9589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9590for as_dir in $PATH
9591do
9592  IFS=$as_save_IFS
9593  test -z "$as_dir" && as_dir=.
9594    for ac_exec_ext in '' $ac_executable_extensions; do
9595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9596    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9598    break 2
9599  fi
9600done
9601  done
9602IFS=$as_save_IFS
9603
9604  ;;
9605esac
9606fi
9607TAIL=$ac_cv_path_TAIL
9608if test -n "$TAIL"; then
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9610$as_echo "$TAIL" >&6; }
9611else
9612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613$as_echo "no" >&6; }
9614fi
9615
9616
9617  test -n "$TAIL" && break
9618done
9619
9620    else
9621      # If it succeeded, then it was overridden by the user. We will use it
9622      # for the tool.
9623
9624      # First remove it from the list of overridden variables, so we can test
9625      # for unknown variables in the end.
9626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9627
9628      # Check if the provided tool contains a complete path.
9629      tool_specified="$TAIL"
9630      tool_basename="${tool_specified##*/}"
9631      if test "x$tool_basename" = "x$tool_specified"; then
9632        # A command without a complete path is provided, search $PATH.
9633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9634$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9635        # Extract the first word of "$tool_basename", so it can be a program name with args.
9636set dummy $tool_basename; ac_word=$2
9637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9638$as_echo_n "checking for $ac_word... " >&6; }
9639if ${ac_cv_path_TAIL+:} false; then :
9640  $as_echo_n "(cached) " >&6
9641else
9642  case $TAIL in
9643  [\\/]* | ?:[\\/]*)
9644  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9645  ;;
9646  *)
9647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648for as_dir in $PATH
9649do
9650  IFS=$as_save_IFS
9651  test -z "$as_dir" && as_dir=.
9652    for ac_exec_ext in '' $ac_executable_extensions; do
9653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9654    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9656    break 2
9657  fi
9658done
9659  done
9660IFS=$as_save_IFS
9661
9662  ;;
9663esac
9664fi
9665TAIL=$ac_cv_path_TAIL
9666if test -n "$TAIL"; then
9667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9668$as_echo "$TAIL" >&6; }
9669else
9670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671$as_echo "no" >&6; }
9672fi
9673
9674
9675        if test "x$TAIL" = x; then
9676          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9677        fi
9678      else
9679        # Otherwise we believe it is a complete path. Use it as it is.
9680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9681$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9683$as_echo_n "checking for TAIL... " >&6; }
9684        if test ! -x "$tool_specified"; then
9685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9686$as_echo "not found" >&6; }
9687          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9688        fi
9689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9690$as_echo "$tool_specified" >&6; }
9691      fi
9692    fi
9693  fi
9694
9695
9696
9697  if test "x$TAIL" = x; then
9698    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9699  fi
9700
9701
9702
9703
9704
9705  # Publish this variable in the help.
9706
9707
9708  if test "x$TAR" = x; then
9709    # The variable is not set by user, try to locate tool using the code snippet
9710    for ac_prog in tar
9711do
9712  # Extract the first word of "$ac_prog", so it can be a program name with args.
9713set dummy $ac_prog; ac_word=$2
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9715$as_echo_n "checking for $ac_word... " >&6; }
9716if ${ac_cv_path_TAR+:} false; then :
9717  $as_echo_n "(cached) " >&6
9718else
9719  case $TAR in
9720  [\\/]* | ?:[\\/]*)
9721  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9722  ;;
9723  *)
9724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9725for as_dir in $PATH
9726do
9727  IFS=$as_save_IFS
9728  test -z "$as_dir" && as_dir=.
9729    for ac_exec_ext in '' $ac_executable_extensions; do
9730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9731    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9733    break 2
9734  fi
9735done
9736  done
9737IFS=$as_save_IFS
9738
9739  ;;
9740esac
9741fi
9742TAR=$ac_cv_path_TAR
9743if test -n "$TAR"; then
9744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9745$as_echo "$TAR" >&6; }
9746else
9747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
9749fi
9750
9751
9752  test -n "$TAR" && break
9753done
9754
9755  else
9756    # The variable is set, but is it from the command line or the environment?
9757
9758    # Try to remove the string !TAR! from our list.
9759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9761      # If it failed, the variable was not from the command line. Ignore it,
9762      # but warn the user (except for BASH, which is always set by the calling BASH).
9763      if test "xTAR" != xBASH; then
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9765$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9766      fi
9767      # Try to locate tool using the code snippet
9768      for ac_prog in tar
9769do
9770  # Extract the first word of "$ac_prog", so it can be a program name with args.
9771set dummy $ac_prog; ac_word=$2
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9773$as_echo_n "checking for $ac_word... " >&6; }
9774if ${ac_cv_path_TAR+:} false; then :
9775  $as_echo_n "(cached) " >&6
9776else
9777  case $TAR in
9778  [\\/]* | ?:[\\/]*)
9779  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9780  ;;
9781  *)
9782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9783for as_dir in $PATH
9784do
9785  IFS=$as_save_IFS
9786  test -z "$as_dir" && as_dir=.
9787    for ac_exec_ext in '' $ac_executable_extensions; do
9788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9789    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9791    break 2
9792  fi
9793done
9794  done
9795IFS=$as_save_IFS
9796
9797  ;;
9798esac
9799fi
9800TAR=$ac_cv_path_TAR
9801if test -n "$TAR"; then
9802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9803$as_echo "$TAR" >&6; }
9804else
9805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
9807fi
9808
9809
9810  test -n "$TAR" && break
9811done
9812
9813    else
9814      # If it succeeded, then it was overridden by the user. We will use it
9815      # for the tool.
9816
9817      # First remove it from the list of overridden variables, so we can test
9818      # for unknown variables in the end.
9819      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9820
9821      # Check if the provided tool contains a complete path.
9822      tool_specified="$TAR"
9823      tool_basename="${tool_specified##*/}"
9824      if test "x$tool_basename" = "x$tool_specified"; then
9825        # A command without a complete path is provided, search $PATH.
9826        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9827$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9828        # Extract the first word of "$tool_basename", so it can be a program name with args.
9829set dummy $tool_basename; ac_word=$2
9830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9831$as_echo_n "checking for $ac_word... " >&6; }
9832if ${ac_cv_path_TAR+:} false; then :
9833  $as_echo_n "(cached) " >&6
9834else
9835  case $TAR in
9836  [\\/]* | ?:[\\/]*)
9837  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9838  ;;
9839  *)
9840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9841for as_dir in $PATH
9842do
9843  IFS=$as_save_IFS
9844  test -z "$as_dir" && as_dir=.
9845    for ac_exec_ext in '' $ac_executable_extensions; do
9846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9847    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9849    break 2
9850  fi
9851done
9852  done
9853IFS=$as_save_IFS
9854
9855  ;;
9856esac
9857fi
9858TAR=$ac_cv_path_TAR
9859if test -n "$TAR"; then
9860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9861$as_echo "$TAR" >&6; }
9862else
9863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864$as_echo "no" >&6; }
9865fi
9866
9867
9868        if test "x$TAR" = x; then
9869          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9870        fi
9871      else
9872        # Otherwise we believe it is a complete path. Use it as it is.
9873        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9874$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9876$as_echo_n "checking for TAR... " >&6; }
9877        if test ! -x "$tool_specified"; then
9878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9879$as_echo "not found" >&6; }
9880          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9881        fi
9882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9883$as_echo "$tool_specified" >&6; }
9884      fi
9885    fi
9886  fi
9887
9888
9889
9890  if test "x$TAR" = x; then
9891    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9892  fi
9893
9894
9895
9896
9897
9898  # Publish this variable in the help.
9899
9900
9901  if test "x$TEE" = x; then
9902    # The variable is not set by user, try to locate tool using the code snippet
9903    for ac_prog in tee
9904do
9905  # Extract the first word of "$ac_prog", so it can be a program name with args.
9906set dummy $ac_prog; ac_word=$2
9907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9908$as_echo_n "checking for $ac_word... " >&6; }
9909if ${ac_cv_path_TEE+:} false; then :
9910  $as_echo_n "(cached) " >&6
9911else
9912  case $TEE in
9913  [\\/]* | ?:[\\/]*)
9914  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9915  ;;
9916  *)
9917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9918for as_dir in $PATH
9919do
9920  IFS=$as_save_IFS
9921  test -z "$as_dir" && as_dir=.
9922    for ac_exec_ext in '' $ac_executable_extensions; do
9923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9924    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9926    break 2
9927  fi
9928done
9929  done
9930IFS=$as_save_IFS
9931
9932  ;;
9933esac
9934fi
9935TEE=$ac_cv_path_TEE
9936if test -n "$TEE"; then
9937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9938$as_echo "$TEE" >&6; }
9939else
9940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9941$as_echo "no" >&6; }
9942fi
9943
9944
9945  test -n "$TEE" && break
9946done
9947
9948  else
9949    # The variable is set, but is it from the command line or the environment?
9950
9951    # Try to remove the string !TEE! from our list.
9952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9954      # If it failed, the variable was not from the command line. Ignore it,
9955      # but warn the user (except for BASH, which is always set by the calling BASH).
9956      if test "xTEE" != xBASH; then
9957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9958$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9959      fi
9960      # Try to locate tool using the code snippet
9961      for ac_prog in tee
9962do
9963  # Extract the first word of "$ac_prog", so it can be a program name with args.
9964set dummy $ac_prog; ac_word=$2
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9966$as_echo_n "checking for $ac_word... " >&6; }
9967if ${ac_cv_path_TEE+:} false; then :
9968  $as_echo_n "(cached) " >&6
9969else
9970  case $TEE in
9971  [\\/]* | ?:[\\/]*)
9972  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9973  ;;
9974  *)
9975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976for as_dir in $PATH
9977do
9978  IFS=$as_save_IFS
9979  test -z "$as_dir" && as_dir=.
9980    for ac_exec_ext in '' $ac_executable_extensions; do
9981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9982    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984    break 2
9985  fi
9986done
9987  done
9988IFS=$as_save_IFS
9989
9990  ;;
9991esac
9992fi
9993TEE=$ac_cv_path_TEE
9994if test -n "$TEE"; then
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9996$as_echo "$TEE" >&6; }
9997else
9998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
10000fi
10001
10002
10003  test -n "$TEE" && break
10004done
10005
10006    else
10007      # If it succeeded, then it was overridden by the user. We will use it
10008      # for the tool.
10009
10010      # First remove it from the list of overridden variables, so we can test
10011      # for unknown variables in the end.
10012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10013
10014      # Check if the provided tool contains a complete path.
10015      tool_specified="$TEE"
10016      tool_basename="${tool_specified##*/}"
10017      if test "x$tool_basename" = "x$tool_specified"; then
10018        # A command without a complete path is provided, search $PATH.
10019        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10020$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10021        # Extract the first word of "$tool_basename", so it can be a program name with args.
10022set dummy $tool_basename; ac_word=$2
10023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10024$as_echo_n "checking for $ac_word... " >&6; }
10025if ${ac_cv_path_TEE+:} false; then :
10026  $as_echo_n "(cached) " >&6
10027else
10028  case $TEE in
10029  [\\/]* | ?:[\\/]*)
10030  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10031  ;;
10032  *)
10033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10034for as_dir in $PATH
10035do
10036  IFS=$as_save_IFS
10037  test -z "$as_dir" && as_dir=.
10038    for ac_exec_ext in '' $ac_executable_extensions; do
10039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10040    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10042    break 2
10043  fi
10044done
10045  done
10046IFS=$as_save_IFS
10047
10048  ;;
10049esac
10050fi
10051TEE=$ac_cv_path_TEE
10052if test -n "$TEE"; then
10053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10054$as_echo "$TEE" >&6; }
10055else
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
10058fi
10059
10060
10061        if test "x$TEE" = x; then
10062          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10063        fi
10064      else
10065        # Otherwise we believe it is a complete path. Use it as it is.
10066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10067$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10069$as_echo_n "checking for TEE... " >&6; }
10070        if test ! -x "$tool_specified"; then
10071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10072$as_echo "not found" >&6; }
10073          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10074        fi
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10076$as_echo "$tool_specified" >&6; }
10077      fi
10078    fi
10079  fi
10080
10081
10082
10083  if test "x$TEE" = x; then
10084    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10085  fi
10086
10087
10088
10089
10090
10091  # Publish this variable in the help.
10092
10093
10094  if test "x$TOUCH" = x; then
10095    # The variable is not set by user, try to locate tool using the code snippet
10096    for ac_prog in touch
10097do
10098  # Extract the first word of "$ac_prog", so it can be a program name with args.
10099set dummy $ac_prog; ac_word=$2
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10101$as_echo_n "checking for $ac_word... " >&6; }
10102if ${ac_cv_path_TOUCH+:} false; then :
10103  $as_echo_n "(cached) " >&6
10104else
10105  case $TOUCH in
10106  [\\/]* | ?:[\\/]*)
10107  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10108  ;;
10109  *)
10110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10111for as_dir in $PATH
10112do
10113  IFS=$as_save_IFS
10114  test -z "$as_dir" && as_dir=.
10115    for ac_exec_ext in '' $ac_executable_extensions; do
10116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10117    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10119    break 2
10120  fi
10121done
10122  done
10123IFS=$as_save_IFS
10124
10125  ;;
10126esac
10127fi
10128TOUCH=$ac_cv_path_TOUCH
10129if test -n "$TOUCH"; then
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10131$as_echo "$TOUCH" >&6; }
10132else
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10134$as_echo "no" >&6; }
10135fi
10136
10137
10138  test -n "$TOUCH" && break
10139done
10140
10141  else
10142    # The variable is set, but is it from the command line or the environment?
10143
10144    # Try to remove the string !TOUCH! from our list.
10145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10147      # If it failed, the variable was not from the command line. Ignore it,
10148      # but warn the user (except for BASH, which is always set by the calling BASH).
10149      if test "xTOUCH" != xBASH; then
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10151$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10152      fi
10153      # Try to locate tool using the code snippet
10154      for ac_prog in touch
10155do
10156  # Extract the first word of "$ac_prog", so it can be a program name with args.
10157set dummy $ac_prog; ac_word=$2
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10159$as_echo_n "checking for $ac_word... " >&6; }
10160if ${ac_cv_path_TOUCH+:} false; then :
10161  $as_echo_n "(cached) " >&6
10162else
10163  case $TOUCH in
10164  [\\/]* | ?:[\\/]*)
10165  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10166  ;;
10167  *)
10168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10169for as_dir in $PATH
10170do
10171  IFS=$as_save_IFS
10172  test -z "$as_dir" && as_dir=.
10173    for ac_exec_ext in '' $ac_executable_extensions; do
10174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10175    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10177    break 2
10178  fi
10179done
10180  done
10181IFS=$as_save_IFS
10182
10183  ;;
10184esac
10185fi
10186TOUCH=$ac_cv_path_TOUCH
10187if test -n "$TOUCH"; then
10188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10189$as_echo "$TOUCH" >&6; }
10190else
10191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192$as_echo "no" >&6; }
10193fi
10194
10195
10196  test -n "$TOUCH" && break
10197done
10198
10199    else
10200      # If it succeeded, then it was overridden by the user. We will use it
10201      # for the tool.
10202
10203      # First remove it from the list of overridden variables, so we can test
10204      # for unknown variables in the end.
10205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10206
10207      # Check if the provided tool contains a complete path.
10208      tool_specified="$TOUCH"
10209      tool_basename="${tool_specified##*/}"
10210      if test "x$tool_basename" = "x$tool_specified"; then
10211        # A command without a complete path is provided, search $PATH.
10212        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10213$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10214        # Extract the first word of "$tool_basename", so it can be a program name with args.
10215set dummy $tool_basename; ac_word=$2
10216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10217$as_echo_n "checking for $ac_word... " >&6; }
10218if ${ac_cv_path_TOUCH+:} false; then :
10219  $as_echo_n "(cached) " >&6
10220else
10221  case $TOUCH in
10222  [\\/]* | ?:[\\/]*)
10223  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10224  ;;
10225  *)
10226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10227for as_dir in $PATH
10228do
10229  IFS=$as_save_IFS
10230  test -z "$as_dir" && as_dir=.
10231    for ac_exec_ext in '' $ac_executable_extensions; do
10232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10233    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10235    break 2
10236  fi
10237done
10238  done
10239IFS=$as_save_IFS
10240
10241  ;;
10242esac
10243fi
10244TOUCH=$ac_cv_path_TOUCH
10245if test -n "$TOUCH"; then
10246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10247$as_echo "$TOUCH" >&6; }
10248else
10249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10250$as_echo "no" >&6; }
10251fi
10252
10253
10254        if test "x$TOUCH" = x; then
10255          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10256        fi
10257      else
10258        # Otherwise we believe it is a complete path. Use it as it is.
10259        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10260$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10262$as_echo_n "checking for TOUCH... " >&6; }
10263        if test ! -x "$tool_specified"; then
10264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10265$as_echo "not found" >&6; }
10266          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10267        fi
10268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10269$as_echo "$tool_specified" >&6; }
10270      fi
10271    fi
10272  fi
10273
10274
10275
10276  if test "x$TOUCH" = x; then
10277    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10278  fi
10279
10280
10281
10282
10283
10284  # Publish this variable in the help.
10285
10286
10287  if test "x$TR" = x; then
10288    # The variable is not set by user, try to locate tool using the code snippet
10289    for ac_prog in tr
10290do
10291  # Extract the first word of "$ac_prog", so it can be a program name with args.
10292set dummy $ac_prog; ac_word=$2
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10294$as_echo_n "checking for $ac_word... " >&6; }
10295if ${ac_cv_path_TR+:} false; then :
10296  $as_echo_n "(cached) " >&6
10297else
10298  case $TR in
10299  [\\/]* | ?:[\\/]*)
10300  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10301  ;;
10302  *)
10303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10304for as_dir in $PATH
10305do
10306  IFS=$as_save_IFS
10307  test -z "$as_dir" && as_dir=.
10308    for ac_exec_ext in '' $ac_executable_extensions; do
10309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10310    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10312    break 2
10313  fi
10314done
10315  done
10316IFS=$as_save_IFS
10317
10318  ;;
10319esac
10320fi
10321TR=$ac_cv_path_TR
10322if test -n "$TR"; then
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10324$as_echo "$TR" >&6; }
10325else
10326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
10328fi
10329
10330
10331  test -n "$TR" && break
10332done
10333
10334  else
10335    # The variable is set, but is it from the command line or the environment?
10336
10337    # Try to remove the string !TR! from our list.
10338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10340      # If it failed, the variable was not from the command line. Ignore it,
10341      # but warn the user (except for BASH, which is always set by the calling BASH).
10342      if test "xTR" != xBASH; then
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10344$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10345      fi
10346      # Try to locate tool using the code snippet
10347      for ac_prog in tr
10348do
10349  # Extract the first word of "$ac_prog", so it can be a program name with args.
10350set dummy $ac_prog; ac_word=$2
10351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10352$as_echo_n "checking for $ac_word... " >&6; }
10353if ${ac_cv_path_TR+:} false; then :
10354  $as_echo_n "(cached) " >&6
10355else
10356  case $TR in
10357  [\\/]* | ?:[\\/]*)
10358  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10359  ;;
10360  *)
10361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10362for as_dir in $PATH
10363do
10364  IFS=$as_save_IFS
10365  test -z "$as_dir" && as_dir=.
10366    for ac_exec_ext in '' $ac_executable_extensions; do
10367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10368    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10370    break 2
10371  fi
10372done
10373  done
10374IFS=$as_save_IFS
10375
10376  ;;
10377esac
10378fi
10379TR=$ac_cv_path_TR
10380if test -n "$TR"; then
10381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10382$as_echo "$TR" >&6; }
10383else
10384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10385$as_echo "no" >&6; }
10386fi
10387
10388
10389  test -n "$TR" && break
10390done
10391
10392    else
10393      # If it succeeded, then it was overridden by the user. We will use it
10394      # for the tool.
10395
10396      # First remove it from the list of overridden variables, so we can test
10397      # for unknown variables in the end.
10398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10399
10400      # Check if the provided tool contains a complete path.
10401      tool_specified="$TR"
10402      tool_basename="${tool_specified##*/}"
10403      if test "x$tool_basename" = "x$tool_specified"; then
10404        # A command without a complete path is provided, search $PATH.
10405        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10406$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10407        # Extract the first word of "$tool_basename", so it can be a program name with args.
10408set dummy $tool_basename; ac_word=$2
10409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10410$as_echo_n "checking for $ac_word... " >&6; }
10411if ${ac_cv_path_TR+:} false; then :
10412  $as_echo_n "(cached) " >&6
10413else
10414  case $TR in
10415  [\\/]* | ?:[\\/]*)
10416  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10417  ;;
10418  *)
10419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10420for as_dir in $PATH
10421do
10422  IFS=$as_save_IFS
10423  test -z "$as_dir" && as_dir=.
10424    for ac_exec_ext in '' $ac_executable_extensions; do
10425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10426    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10428    break 2
10429  fi
10430done
10431  done
10432IFS=$as_save_IFS
10433
10434  ;;
10435esac
10436fi
10437TR=$ac_cv_path_TR
10438if test -n "$TR"; then
10439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10440$as_echo "$TR" >&6; }
10441else
10442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443$as_echo "no" >&6; }
10444fi
10445
10446
10447        if test "x$TR" = x; then
10448          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10449        fi
10450      else
10451        # Otherwise we believe it is a complete path. Use it as it is.
10452        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10453$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10455$as_echo_n "checking for TR... " >&6; }
10456        if test ! -x "$tool_specified"; then
10457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10458$as_echo "not found" >&6; }
10459          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10460        fi
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10462$as_echo "$tool_specified" >&6; }
10463      fi
10464    fi
10465  fi
10466
10467
10468
10469  if test "x$TR" = x; then
10470    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10471  fi
10472
10473
10474
10475
10476
10477  # Publish this variable in the help.
10478
10479
10480  if test "x$UNAME" = x; then
10481    # The variable is not set by user, try to locate tool using the code snippet
10482    for ac_prog in uname
10483do
10484  # Extract the first word of "$ac_prog", so it can be a program name with args.
10485set dummy $ac_prog; ac_word=$2
10486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10487$as_echo_n "checking for $ac_word... " >&6; }
10488if ${ac_cv_path_UNAME+:} false; then :
10489  $as_echo_n "(cached) " >&6
10490else
10491  case $UNAME in
10492  [\\/]* | ?:[\\/]*)
10493  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10494  ;;
10495  *)
10496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10497for as_dir in $PATH
10498do
10499  IFS=$as_save_IFS
10500  test -z "$as_dir" && as_dir=.
10501    for ac_exec_ext in '' $ac_executable_extensions; do
10502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10503    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10505    break 2
10506  fi
10507done
10508  done
10509IFS=$as_save_IFS
10510
10511  ;;
10512esac
10513fi
10514UNAME=$ac_cv_path_UNAME
10515if test -n "$UNAME"; then
10516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10517$as_echo "$UNAME" >&6; }
10518else
10519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10520$as_echo "no" >&6; }
10521fi
10522
10523
10524  test -n "$UNAME" && break
10525done
10526
10527  else
10528    # The variable is set, but is it from the command line or the environment?
10529
10530    # Try to remove the string !UNAME! from our list.
10531    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10532    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10533      # If it failed, the variable was not from the command line. Ignore it,
10534      # but warn the user (except for BASH, which is always set by the calling BASH).
10535      if test "xUNAME" != xBASH; then
10536        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10537$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10538      fi
10539      # Try to locate tool using the code snippet
10540      for ac_prog in uname
10541do
10542  # Extract the first word of "$ac_prog", so it can be a program name with args.
10543set dummy $ac_prog; ac_word=$2
10544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10545$as_echo_n "checking for $ac_word... " >&6; }
10546if ${ac_cv_path_UNAME+:} false; then :
10547  $as_echo_n "(cached) " >&6
10548else
10549  case $UNAME in
10550  [\\/]* | ?:[\\/]*)
10551  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10552  ;;
10553  *)
10554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10555for as_dir in $PATH
10556do
10557  IFS=$as_save_IFS
10558  test -z "$as_dir" && as_dir=.
10559    for ac_exec_ext in '' $ac_executable_extensions; do
10560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10561    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10563    break 2
10564  fi
10565done
10566  done
10567IFS=$as_save_IFS
10568
10569  ;;
10570esac
10571fi
10572UNAME=$ac_cv_path_UNAME
10573if test -n "$UNAME"; then
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10575$as_echo "$UNAME" >&6; }
10576else
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
10579fi
10580
10581
10582  test -n "$UNAME" && break
10583done
10584
10585    else
10586      # If it succeeded, then it was overridden by the user. We will use it
10587      # for the tool.
10588
10589      # First remove it from the list of overridden variables, so we can test
10590      # for unknown variables in the end.
10591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10592
10593      # Check if the provided tool contains a complete path.
10594      tool_specified="$UNAME"
10595      tool_basename="${tool_specified##*/}"
10596      if test "x$tool_basename" = "x$tool_specified"; then
10597        # A command without a complete path is provided, search $PATH.
10598        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10599$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10600        # Extract the first word of "$tool_basename", so it can be a program name with args.
10601set dummy $tool_basename; ac_word=$2
10602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10603$as_echo_n "checking for $ac_word... " >&6; }
10604if ${ac_cv_path_UNAME+:} false; then :
10605  $as_echo_n "(cached) " >&6
10606else
10607  case $UNAME in
10608  [\\/]* | ?:[\\/]*)
10609  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10610  ;;
10611  *)
10612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10613for as_dir in $PATH
10614do
10615  IFS=$as_save_IFS
10616  test -z "$as_dir" && as_dir=.
10617    for ac_exec_ext in '' $ac_executable_extensions; do
10618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10619    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10621    break 2
10622  fi
10623done
10624  done
10625IFS=$as_save_IFS
10626
10627  ;;
10628esac
10629fi
10630UNAME=$ac_cv_path_UNAME
10631if test -n "$UNAME"; then
10632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10633$as_echo "$UNAME" >&6; }
10634else
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
10637fi
10638
10639
10640        if test "x$UNAME" = x; then
10641          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10642        fi
10643      else
10644        # Otherwise we believe it is a complete path. Use it as it is.
10645        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10646$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10648$as_echo_n "checking for UNAME... " >&6; }
10649        if test ! -x "$tool_specified"; then
10650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10651$as_echo "not found" >&6; }
10652          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10653        fi
10654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10655$as_echo "$tool_specified" >&6; }
10656      fi
10657    fi
10658  fi
10659
10660
10661
10662  if test "x$UNAME" = x; then
10663    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10664  fi
10665
10666
10667
10668
10669
10670  # Publish this variable in the help.
10671
10672
10673  if test "x$UNIQ" = x; then
10674    # The variable is not set by user, try to locate tool using the code snippet
10675    for ac_prog in uniq
10676do
10677  # Extract the first word of "$ac_prog", so it can be a program name with args.
10678set dummy $ac_prog; ac_word=$2
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10680$as_echo_n "checking for $ac_word... " >&6; }
10681if ${ac_cv_path_UNIQ+:} false; then :
10682  $as_echo_n "(cached) " >&6
10683else
10684  case $UNIQ in
10685  [\\/]* | ?:[\\/]*)
10686  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10687  ;;
10688  *)
10689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10690for as_dir in $PATH
10691do
10692  IFS=$as_save_IFS
10693  test -z "$as_dir" && as_dir=.
10694    for ac_exec_ext in '' $ac_executable_extensions; do
10695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10696    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10698    break 2
10699  fi
10700done
10701  done
10702IFS=$as_save_IFS
10703
10704  ;;
10705esac
10706fi
10707UNIQ=$ac_cv_path_UNIQ
10708if test -n "$UNIQ"; then
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10710$as_echo "$UNIQ" >&6; }
10711else
10712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
10714fi
10715
10716
10717  test -n "$UNIQ" && break
10718done
10719
10720  else
10721    # The variable is set, but is it from the command line or the environment?
10722
10723    # Try to remove the string !UNIQ! from our list.
10724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10726      # If it failed, the variable was not from the command line. Ignore it,
10727      # but warn the user (except for BASH, which is always set by the calling BASH).
10728      if test "xUNIQ" != xBASH; then
10729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10730$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10731      fi
10732      # Try to locate tool using the code snippet
10733      for ac_prog in uniq
10734do
10735  # Extract the first word of "$ac_prog", so it can be a program name with args.
10736set dummy $ac_prog; ac_word=$2
10737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10738$as_echo_n "checking for $ac_word... " >&6; }
10739if ${ac_cv_path_UNIQ+:} false; then :
10740  $as_echo_n "(cached) " >&6
10741else
10742  case $UNIQ in
10743  [\\/]* | ?:[\\/]*)
10744  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10745  ;;
10746  *)
10747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10748for as_dir in $PATH
10749do
10750  IFS=$as_save_IFS
10751  test -z "$as_dir" && as_dir=.
10752    for ac_exec_ext in '' $ac_executable_extensions; do
10753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10754    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10756    break 2
10757  fi
10758done
10759  done
10760IFS=$as_save_IFS
10761
10762  ;;
10763esac
10764fi
10765UNIQ=$ac_cv_path_UNIQ
10766if test -n "$UNIQ"; then
10767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10768$as_echo "$UNIQ" >&6; }
10769else
10770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
10772fi
10773
10774
10775  test -n "$UNIQ" && break
10776done
10777
10778    else
10779      # If it succeeded, then it was overridden by the user. We will use it
10780      # for the tool.
10781
10782      # First remove it from the list of overridden variables, so we can test
10783      # for unknown variables in the end.
10784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10785
10786      # Check if the provided tool contains a complete path.
10787      tool_specified="$UNIQ"
10788      tool_basename="${tool_specified##*/}"
10789      if test "x$tool_basename" = "x$tool_specified"; then
10790        # A command without a complete path is provided, search $PATH.
10791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10792$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10793        # Extract the first word of "$tool_basename", so it can be a program name with args.
10794set dummy $tool_basename; ac_word=$2
10795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10796$as_echo_n "checking for $ac_word... " >&6; }
10797if ${ac_cv_path_UNIQ+:} false; then :
10798  $as_echo_n "(cached) " >&6
10799else
10800  case $UNIQ in
10801  [\\/]* | ?:[\\/]*)
10802  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10803  ;;
10804  *)
10805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10806for as_dir in $PATH
10807do
10808  IFS=$as_save_IFS
10809  test -z "$as_dir" && as_dir=.
10810    for ac_exec_ext in '' $ac_executable_extensions; do
10811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10812    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10814    break 2
10815  fi
10816done
10817  done
10818IFS=$as_save_IFS
10819
10820  ;;
10821esac
10822fi
10823UNIQ=$ac_cv_path_UNIQ
10824if test -n "$UNIQ"; then
10825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10826$as_echo "$UNIQ" >&6; }
10827else
10828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10829$as_echo "no" >&6; }
10830fi
10831
10832
10833        if test "x$UNIQ" = x; then
10834          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10835        fi
10836      else
10837        # Otherwise we believe it is a complete path. Use it as it is.
10838        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10839$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10841$as_echo_n "checking for UNIQ... " >&6; }
10842        if test ! -x "$tool_specified"; then
10843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10844$as_echo "not found" >&6; }
10845          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10846        fi
10847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10848$as_echo "$tool_specified" >&6; }
10849      fi
10850    fi
10851  fi
10852
10853
10854
10855  if test "x$UNIQ" = x; then
10856    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10857  fi
10858
10859
10860
10861
10862
10863  # Publish this variable in the help.
10864
10865
10866  if test "x$WC" = x; then
10867    # The variable is not set by user, try to locate tool using the code snippet
10868    for ac_prog in wc
10869do
10870  # Extract the first word of "$ac_prog", so it can be a program name with args.
10871set dummy $ac_prog; ac_word=$2
10872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10873$as_echo_n "checking for $ac_word... " >&6; }
10874if ${ac_cv_path_WC+:} false; then :
10875  $as_echo_n "(cached) " >&6
10876else
10877  case $WC in
10878  [\\/]* | ?:[\\/]*)
10879  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10880  ;;
10881  *)
10882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10883for as_dir in $PATH
10884do
10885  IFS=$as_save_IFS
10886  test -z "$as_dir" && as_dir=.
10887    for ac_exec_ext in '' $ac_executable_extensions; do
10888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10889    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10891    break 2
10892  fi
10893done
10894  done
10895IFS=$as_save_IFS
10896
10897  ;;
10898esac
10899fi
10900WC=$ac_cv_path_WC
10901if test -n "$WC"; then
10902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10903$as_echo "$WC" >&6; }
10904else
10905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10906$as_echo "no" >&6; }
10907fi
10908
10909
10910  test -n "$WC" && break
10911done
10912
10913  else
10914    # The variable is set, but is it from the command line or the environment?
10915
10916    # Try to remove the string !WC! from our list.
10917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10919      # If it failed, the variable was not from the command line. Ignore it,
10920      # but warn the user (except for BASH, which is always set by the calling BASH).
10921      if test "xWC" != xBASH; then
10922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10923$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10924      fi
10925      # Try to locate tool using the code snippet
10926      for ac_prog in wc
10927do
10928  # Extract the first word of "$ac_prog", so it can be a program name with args.
10929set dummy $ac_prog; ac_word=$2
10930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10931$as_echo_n "checking for $ac_word... " >&6; }
10932if ${ac_cv_path_WC+:} false; then :
10933  $as_echo_n "(cached) " >&6
10934else
10935  case $WC in
10936  [\\/]* | ?:[\\/]*)
10937  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10938  ;;
10939  *)
10940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10941for as_dir in $PATH
10942do
10943  IFS=$as_save_IFS
10944  test -z "$as_dir" && as_dir=.
10945    for ac_exec_ext in '' $ac_executable_extensions; do
10946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10947    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10949    break 2
10950  fi
10951done
10952  done
10953IFS=$as_save_IFS
10954
10955  ;;
10956esac
10957fi
10958WC=$ac_cv_path_WC
10959if test -n "$WC"; then
10960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10961$as_echo "$WC" >&6; }
10962else
10963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10964$as_echo "no" >&6; }
10965fi
10966
10967
10968  test -n "$WC" && break
10969done
10970
10971    else
10972      # If it succeeded, then it was overridden by the user. We will use it
10973      # for the tool.
10974
10975      # First remove it from the list of overridden variables, so we can test
10976      # for unknown variables in the end.
10977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10978
10979      # Check if the provided tool contains a complete path.
10980      tool_specified="$WC"
10981      tool_basename="${tool_specified##*/}"
10982      if test "x$tool_basename" = "x$tool_specified"; then
10983        # A command without a complete path is provided, search $PATH.
10984        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10985$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10986        # Extract the first word of "$tool_basename", so it can be a program name with args.
10987set dummy $tool_basename; ac_word=$2
10988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10989$as_echo_n "checking for $ac_word... " >&6; }
10990if ${ac_cv_path_WC+:} false; then :
10991  $as_echo_n "(cached) " >&6
10992else
10993  case $WC in
10994  [\\/]* | ?:[\\/]*)
10995  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10996  ;;
10997  *)
10998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10999for as_dir in $PATH
11000do
11001  IFS=$as_save_IFS
11002  test -z "$as_dir" && as_dir=.
11003    for ac_exec_ext in '' $ac_executable_extensions; do
11004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11005    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11007    break 2
11008  fi
11009done
11010  done
11011IFS=$as_save_IFS
11012
11013  ;;
11014esac
11015fi
11016WC=$ac_cv_path_WC
11017if test -n "$WC"; then
11018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11019$as_echo "$WC" >&6; }
11020else
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022$as_echo "no" >&6; }
11023fi
11024
11025
11026        if test "x$WC" = x; then
11027          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11028        fi
11029      else
11030        # Otherwise we believe it is a complete path. Use it as it is.
11031        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11032$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11034$as_echo_n "checking for WC... " >&6; }
11035        if test ! -x "$tool_specified"; then
11036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11037$as_echo "not found" >&6; }
11038          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11039        fi
11040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11041$as_echo "$tool_specified" >&6; }
11042      fi
11043    fi
11044  fi
11045
11046
11047
11048  if test "x$WC" = x; then
11049    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11050  fi
11051
11052
11053
11054
11055
11056  # Publish this variable in the help.
11057
11058
11059  if test "x$WHICH" = x; then
11060    # The variable is not set by user, try to locate tool using the code snippet
11061    for ac_prog in which
11062do
11063  # Extract the first word of "$ac_prog", so it can be a program name with args.
11064set dummy $ac_prog; ac_word=$2
11065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11066$as_echo_n "checking for $ac_word... " >&6; }
11067if ${ac_cv_path_WHICH+:} false; then :
11068  $as_echo_n "(cached) " >&6
11069else
11070  case $WHICH in
11071  [\\/]* | ?:[\\/]*)
11072  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11073  ;;
11074  *)
11075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11076for as_dir in $PATH
11077do
11078  IFS=$as_save_IFS
11079  test -z "$as_dir" && as_dir=.
11080    for ac_exec_ext in '' $ac_executable_extensions; do
11081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11082    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11084    break 2
11085  fi
11086done
11087  done
11088IFS=$as_save_IFS
11089
11090  ;;
11091esac
11092fi
11093WHICH=$ac_cv_path_WHICH
11094if test -n "$WHICH"; then
11095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11096$as_echo "$WHICH" >&6; }
11097else
11098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11099$as_echo "no" >&6; }
11100fi
11101
11102
11103  test -n "$WHICH" && break
11104done
11105
11106  else
11107    # The variable is set, but is it from the command line or the environment?
11108
11109    # Try to remove the string !WHICH! from our list.
11110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11112      # If it failed, the variable was not from the command line. Ignore it,
11113      # but warn the user (except for BASH, which is always set by the calling BASH).
11114      if test "xWHICH" != xBASH; then
11115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11116$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11117      fi
11118      # Try to locate tool using the code snippet
11119      for ac_prog in which
11120do
11121  # Extract the first word of "$ac_prog", so it can be a program name with args.
11122set dummy $ac_prog; ac_word=$2
11123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11124$as_echo_n "checking for $ac_word... " >&6; }
11125if ${ac_cv_path_WHICH+:} false; then :
11126  $as_echo_n "(cached) " >&6
11127else
11128  case $WHICH in
11129  [\\/]* | ?:[\\/]*)
11130  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11131  ;;
11132  *)
11133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11134for as_dir in $PATH
11135do
11136  IFS=$as_save_IFS
11137  test -z "$as_dir" && as_dir=.
11138    for ac_exec_ext in '' $ac_executable_extensions; do
11139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11140    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11142    break 2
11143  fi
11144done
11145  done
11146IFS=$as_save_IFS
11147
11148  ;;
11149esac
11150fi
11151WHICH=$ac_cv_path_WHICH
11152if test -n "$WHICH"; then
11153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11154$as_echo "$WHICH" >&6; }
11155else
11156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11157$as_echo "no" >&6; }
11158fi
11159
11160
11161  test -n "$WHICH" && break
11162done
11163
11164    else
11165      # If it succeeded, then it was overridden by the user. We will use it
11166      # for the tool.
11167
11168      # First remove it from the list of overridden variables, so we can test
11169      # for unknown variables in the end.
11170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11171
11172      # Check if the provided tool contains a complete path.
11173      tool_specified="$WHICH"
11174      tool_basename="${tool_specified##*/}"
11175      if test "x$tool_basename" = "x$tool_specified"; then
11176        # A command without a complete path is provided, search $PATH.
11177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11178$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11179        # Extract the first word of "$tool_basename", so it can be a program name with args.
11180set dummy $tool_basename; ac_word=$2
11181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11182$as_echo_n "checking for $ac_word... " >&6; }
11183if ${ac_cv_path_WHICH+:} false; then :
11184  $as_echo_n "(cached) " >&6
11185else
11186  case $WHICH in
11187  [\\/]* | ?:[\\/]*)
11188  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11189  ;;
11190  *)
11191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11192for as_dir in $PATH
11193do
11194  IFS=$as_save_IFS
11195  test -z "$as_dir" && as_dir=.
11196    for ac_exec_ext in '' $ac_executable_extensions; do
11197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11198    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11200    break 2
11201  fi
11202done
11203  done
11204IFS=$as_save_IFS
11205
11206  ;;
11207esac
11208fi
11209WHICH=$ac_cv_path_WHICH
11210if test -n "$WHICH"; then
11211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11212$as_echo "$WHICH" >&6; }
11213else
11214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11215$as_echo "no" >&6; }
11216fi
11217
11218
11219        if test "x$WHICH" = x; then
11220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11221        fi
11222      else
11223        # Otherwise we believe it is a complete path. Use it as it is.
11224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11225$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11227$as_echo_n "checking for WHICH... " >&6; }
11228        if test ! -x "$tool_specified"; then
11229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11230$as_echo "not found" >&6; }
11231          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11232        fi
11233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11234$as_echo "$tool_specified" >&6; }
11235      fi
11236    fi
11237  fi
11238
11239
11240
11241  if test "x$WHICH" = x; then
11242    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11243  fi
11244
11245
11246
11247
11248
11249  # Publish this variable in the help.
11250
11251
11252  if test "x$XARGS" = x; then
11253    # The variable is not set by user, try to locate tool using the code snippet
11254    for ac_prog in xargs
11255do
11256  # Extract the first word of "$ac_prog", so it can be a program name with args.
11257set dummy $ac_prog; ac_word=$2
11258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11259$as_echo_n "checking for $ac_word... " >&6; }
11260if ${ac_cv_path_XARGS+:} false; then :
11261  $as_echo_n "(cached) " >&6
11262else
11263  case $XARGS in
11264  [\\/]* | ?:[\\/]*)
11265  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11266  ;;
11267  *)
11268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11269for as_dir in $PATH
11270do
11271  IFS=$as_save_IFS
11272  test -z "$as_dir" && as_dir=.
11273    for ac_exec_ext in '' $ac_executable_extensions; do
11274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11275    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11277    break 2
11278  fi
11279done
11280  done
11281IFS=$as_save_IFS
11282
11283  ;;
11284esac
11285fi
11286XARGS=$ac_cv_path_XARGS
11287if test -n "$XARGS"; then
11288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11289$as_echo "$XARGS" >&6; }
11290else
11291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11292$as_echo "no" >&6; }
11293fi
11294
11295
11296  test -n "$XARGS" && break
11297done
11298
11299  else
11300    # The variable is set, but is it from the command line or the environment?
11301
11302    # Try to remove the string !XARGS! from our list.
11303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11305      # If it failed, the variable was not from the command line. Ignore it,
11306      # but warn the user (except for BASH, which is always set by the calling BASH).
11307      if test "xXARGS" != xBASH; then
11308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11309$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11310      fi
11311      # Try to locate tool using the code snippet
11312      for ac_prog in xargs
11313do
11314  # Extract the first word of "$ac_prog", so it can be a program name with args.
11315set dummy $ac_prog; ac_word=$2
11316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11317$as_echo_n "checking for $ac_word... " >&6; }
11318if ${ac_cv_path_XARGS+:} false; then :
11319  $as_echo_n "(cached) " >&6
11320else
11321  case $XARGS in
11322  [\\/]* | ?:[\\/]*)
11323  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11324  ;;
11325  *)
11326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11327for as_dir in $PATH
11328do
11329  IFS=$as_save_IFS
11330  test -z "$as_dir" && as_dir=.
11331    for ac_exec_ext in '' $ac_executable_extensions; do
11332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11333    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11335    break 2
11336  fi
11337done
11338  done
11339IFS=$as_save_IFS
11340
11341  ;;
11342esac
11343fi
11344XARGS=$ac_cv_path_XARGS
11345if test -n "$XARGS"; then
11346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11347$as_echo "$XARGS" >&6; }
11348else
11349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
11351fi
11352
11353
11354  test -n "$XARGS" && break
11355done
11356
11357    else
11358      # If it succeeded, then it was overridden by the user. We will use it
11359      # for the tool.
11360
11361      # First remove it from the list of overridden variables, so we can test
11362      # for unknown variables in the end.
11363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11364
11365      # Check if the provided tool contains a complete path.
11366      tool_specified="$XARGS"
11367      tool_basename="${tool_specified##*/}"
11368      if test "x$tool_basename" = "x$tool_specified"; then
11369        # A command without a complete path is provided, search $PATH.
11370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11371$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11372        # Extract the first word of "$tool_basename", so it can be a program name with args.
11373set dummy $tool_basename; ac_word=$2
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11375$as_echo_n "checking for $ac_word... " >&6; }
11376if ${ac_cv_path_XARGS+:} false; then :
11377  $as_echo_n "(cached) " >&6
11378else
11379  case $XARGS in
11380  [\\/]* | ?:[\\/]*)
11381  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11382  ;;
11383  *)
11384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11385for as_dir in $PATH
11386do
11387  IFS=$as_save_IFS
11388  test -z "$as_dir" && as_dir=.
11389    for ac_exec_ext in '' $ac_executable_extensions; do
11390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11391    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11393    break 2
11394  fi
11395done
11396  done
11397IFS=$as_save_IFS
11398
11399  ;;
11400esac
11401fi
11402XARGS=$ac_cv_path_XARGS
11403if test -n "$XARGS"; then
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11405$as_echo "$XARGS" >&6; }
11406else
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409fi
11410
11411
11412        if test "x$XARGS" = x; then
11413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11414        fi
11415      else
11416        # Otherwise we believe it is a complete path. Use it as it is.
11417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11418$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11420$as_echo_n "checking for XARGS... " >&6; }
11421        if test ! -x "$tool_specified"; then
11422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11423$as_echo "not found" >&6; }
11424          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11425        fi
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11427$as_echo "$tool_specified" >&6; }
11428      fi
11429    fi
11430  fi
11431
11432
11433
11434  if test "x$XARGS" = x; then
11435    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11436  fi
11437
11438
11439
11440  # Then required tools that require some special treatment.
11441
11442
11443  # Publish this variable in the help.
11444
11445
11446  if test "x$AWK" = x; then
11447    # The variable is not set by user, try to locate tool using the code snippet
11448    for ac_prog in gawk mawk nawk awk
11449do
11450  # Extract the first word of "$ac_prog", so it can be a program name with args.
11451set dummy $ac_prog; ac_word=$2
11452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11453$as_echo_n "checking for $ac_word... " >&6; }
11454if ${ac_cv_prog_AWK+:} false; then :
11455  $as_echo_n "(cached) " >&6
11456else
11457  if test -n "$AWK"; then
11458  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11459else
11460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11461for as_dir in $PATH
11462do
11463  IFS=$as_save_IFS
11464  test -z "$as_dir" && as_dir=.
11465    for ac_exec_ext in '' $ac_executable_extensions; do
11466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11467    ac_cv_prog_AWK="$ac_prog"
11468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11469    break 2
11470  fi
11471done
11472  done
11473IFS=$as_save_IFS
11474
11475fi
11476fi
11477AWK=$ac_cv_prog_AWK
11478if test -n "$AWK"; then
11479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11480$as_echo "$AWK" >&6; }
11481else
11482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
11484fi
11485
11486
11487  test -n "$AWK" && break
11488done
11489
11490  else
11491    # The variable is set, but is it from the command line or the environment?
11492
11493    # Try to remove the string !AWK! from our list.
11494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11496      # If it failed, the variable was not from the command line. Ignore it,
11497      # but warn the user (except for BASH, which is always set by the calling BASH).
11498      if test "xAWK" != xBASH; then
11499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11500$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11501      fi
11502      # Try to locate tool using the code snippet
11503      for ac_prog in gawk mawk nawk awk
11504do
11505  # Extract the first word of "$ac_prog", so it can be a program name with args.
11506set dummy $ac_prog; ac_word=$2
11507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11508$as_echo_n "checking for $ac_word... " >&6; }
11509if ${ac_cv_prog_AWK+:} false; then :
11510  $as_echo_n "(cached) " >&6
11511else
11512  if test -n "$AWK"; then
11513  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11514else
11515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11516for as_dir in $PATH
11517do
11518  IFS=$as_save_IFS
11519  test -z "$as_dir" && as_dir=.
11520    for ac_exec_ext in '' $ac_executable_extensions; do
11521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11522    ac_cv_prog_AWK="$ac_prog"
11523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11524    break 2
11525  fi
11526done
11527  done
11528IFS=$as_save_IFS
11529
11530fi
11531fi
11532AWK=$ac_cv_prog_AWK
11533if test -n "$AWK"; then
11534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11535$as_echo "$AWK" >&6; }
11536else
11537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11538$as_echo "no" >&6; }
11539fi
11540
11541
11542  test -n "$AWK" && break
11543done
11544
11545    else
11546      # If it succeeded, then it was overridden by the user. We will use it
11547      # for the tool.
11548
11549      # First remove it from the list of overridden variables, so we can test
11550      # for unknown variables in the end.
11551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11552
11553      # Check if the provided tool contains a complete path.
11554      tool_specified="$AWK"
11555      tool_basename="${tool_specified##*/}"
11556      if test "x$tool_basename" = "x$tool_specified"; then
11557        # A command without a complete path is provided, search $PATH.
11558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11559$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11560        # Extract the first word of "$tool_basename", so it can be a program name with args.
11561set dummy $tool_basename; ac_word=$2
11562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11563$as_echo_n "checking for $ac_word... " >&6; }
11564if ${ac_cv_path_AWK+:} false; then :
11565  $as_echo_n "(cached) " >&6
11566else
11567  case $AWK in
11568  [\\/]* | ?:[\\/]*)
11569  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11570  ;;
11571  *)
11572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11573for as_dir in $PATH
11574do
11575  IFS=$as_save_IFS
11576  test -z "$as_dir" && as_dir=.
11577    for ac_exec_ext in '' $ac_executable_extensions; do
11578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11579    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11581    break 2
11582  fi
11583done
11584  done
11585IFS=$as_save_IFS
11586
11587  ;;
11588esac
11589fi
11590AWK=$ac_cv_path_AWK
11591if test -n "$AWK"; then
11592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11593$as_echo "$AWK" >&6; }
11594else
11595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11596$as_echo "no" >&6; }
11597fi
11598
11599
11600        if test "x$AWK" = x; then
11601          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11602        fi
11603      else
11604        # Otherwise we believe it is a complete path. Use it as it is.
11605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11606$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11608$as_echo_n "checking for AWK... " >&6; }
11609        if test ! -x "$tool_specified"; then
11610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11611$as_echo "not found" >&6; }
11612          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11613        fi
11614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11615$as_echo "$tool_specified" >&6; }
11616      fi
11617    fi
11618  fi
11619
11620
11621  if test "x$AWK" = x; then
11622    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11623  fi
11624
11625
11626
11627
11628  # Publish this variable in the help.
11629
11630
11631  if test "x$GREP" = x; then
11632    # The variable is not set by user, try to locate tool using the code snippet
11633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11634$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11635if ${ac_cv_path_GREP+:} false; then :
11636  $as_echo_n "(cached) " >&6
11637else
11638  if test -z "$GREP"; then
11639  ac_path_GREP_found=false
11640  # Loop through the user's path and test for each of PROGNAME-LIST
11641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11642for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11643do
11644  IFS=$as_save_IFS
11645  test -z "$as_dir" && as_dir=.
11646    for ac_prog in grep ggrep; do
11647    for ac_exec_ext in '' $ac_executable_extensions; do
11648      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11649      as_fn_executable_p "$ac_path_GREP" || continue
11650# Check for GNU ac_path_GREP and select it if it is found.
11651  # Check for GNU $ac_path_GREP
11652case `"$ac_path_GREP" --version 2>&1` in
11653*GNU*)
11654  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11655*)
11656  ac_count=0
11657  $as_echo_n 0123456789 >"conftest.in"
11658  while :
11659  do
11660    cat "conftest.in" "conftest.in" >"conftest.tmp"
11661    mv "conftest.tmp" "conftest.in"
11662    cp "conftest.in" "conftest.nl"
11663    $as_echo 'GREP' >> "conftest.nl"
11664    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11665    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11666    as_fn_arith $ac_count + 1 && ac_count=$as_val
11667    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11668      # Best one so far, save it but keep looking for a better one
11669      ac_cv_path_GREP="$ac_path_GREP"
11670      ac_path_GREP_max=$ac_count
11671    fi
11672    # 10*(2^10) chars as input seems more than enough
11673    test $ac_count -gt 10 && break
11674  done
11675  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11676esac
11677
11678      $ac_path_GREP_found && break 3
11679    done
11680  done
11681  done
11682IFS=$as_save_IFS
11683  if test -z "$ac_cv_path_GREP"; then
11684    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11685  fi
11686else
11687  ac_cv_path_GREP=$GREP
11688fi
11689
11690fi
11691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11692$as_echo "$ac_cv_path_GREP" >&6; }
11693 GREP="$ac_cv_path_GREP"
11694
11695
11696  else
11697    # The variable is set, but is it from the command line or the environment?
11698
11699    # Try to remove the string !GREP! from our list.
11700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11702      # If it failed, the variable was not from the command line. Ignore it,
11703      # but warn the user (except for BASH, which is always set by the calling BASH).
11704      if test "xGREP" != xBASH; then
11705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11706$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11707      fi
11708      # Try to locate tool using the code snippet
11709      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11710$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11711if ${ac_cv_path_GREP+:} false; then :
11712  $as_echo_n "(cached) " >&6
11713else
11714  if test -z "$GREP"; then
11715  ac_path_GREP_found=false
11716  # Loop through the user's path and test for each of PROGNAME-LIST
11717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11718for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11719do
11720  IFS=$as_save_IFS
11721  test -z "$as_dir" && as_dir=.
11722    for ac_prog in grep ggrep; do
11723    for ac_exec_ext in '' $ac_executable_extensions; do
11724      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11725      as_fn_executable_p "$ac_path_GREP" || continue
11726# Check for GNU ac_path_GREP and select it if it is found.
11727  # Check for GNU $ac_path_GREP
11728case `"$ac_path_GREP" --version 2>&1` in
11729*GNU*)
11730  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11731*)
11732  ac_count=0
11733  $as_echo_n 0123456789 >"conftest.in"
11734  while :
11735  do
11736    cat "conftest.in" "conftest.in" >"conftest.tmp"
11737    mv "conftest.tmp" "conftest.in"
11738    cp "conftest.in" "conftest.nl"
11739    $as_echo 'GREP' >> "conftest.nl"
11740    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11741    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11742    as_fn_arith $ac_count + 1 && ac_count=$as_val
11743    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11744      # Best one so far, save it but keep looking for a better one
11745      ac_cv_path_GREP="$ac_path_GREP"
11746      ac_path_GREP_max=$ac_count
11747    fi
11748    # 10*(2^10) chars as input seems more than enough
11749    test $ac_count -gt 10 && break
11750  done
11751  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11752esac
11753
11754      $ac_path_GREP_found && break 3
11755    done
11756  done
11757  done
11758IFS=$as_save_IFS
11759  if test -z "$ac_cv_path_GREP"; then
11760    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11761  fi
11762else
11763  ac_cv_path_GREP=$GREP
11764fi
11765
11766fi
11767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11768$as_echo "$ac_cv_path_GREP" >&6; }
11769 GREP="$ac_cv_path_GREP"
11770
11771
11772    else
11773      # If it succeeded, then it was overridden by the user. We will use it
11774      # for the tool.
11775
11776      # First remove it from the list of overridden variables, so we can test
11777      # for unknown variables in the end.
11778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11779
11780      # Check if the provided tool contains a complete path.
11781      tool_specified="$GREP"
11782      tool_basename="${tool_specified##*/}"
11783      if test "x$tool_basename" = "x$tool_specified"; then
11784        # A command without a complete path is provided, search $PATH.
11785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11786$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11787        # Extract the first word of "$tool_basename", so it can be a program name with args.
11788set dummy $tool_basename; ac_word=$2
11789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11790$as_echo_n "checking for $ac_word... " >&6; }
11791if ${ac_cv_path_GREP+:} false; then :
11792  $as_echo_n "(cached) " >&6
11793else
11794  case $GREP in
11795  [\\/]* | ?:[\\/]*)
11796  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11797  ;;
11798  *)
11799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11800for as_dir in $PATH
11801do
11802  IFS=$as_save_IFS
11803  test -z "$as_dir" && as_dir=.
11804    for ac_exec_ext in '' $ac_executable_extensions; do
11805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11806    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11808    break 2
11809  fi
11810done
11811  done
11812IFS=$as_save_IFS
11813
11814  ;;
11815esac
11816fi
11817GREP=$ac_cv_path_GREP
11818if test -n "$GREP"; then
11819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11820$as_echo "$GREP" >&6; }
11821else
11822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11823$as_echo "no" >&6; }
11824fi
11825
11826
11827        if test "x$GREP" = x; then
11828          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11829        fi
11830      else
11831        # Otherwise we believe it is a complete path. Use it as it is.
11832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11833$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11835$as_echo_n "checking for GREP... " >&6; }
11836        if test ! -x "$tool_specified"; then
11837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11838$as_echo "not found" >&6; }
11839          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11840        fi
11841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11842$as_echo "$tool_specified" >&6; }
11843      fi
11844    fi
11845  fi
11846
11847
11848  if test "x$GREP" = x; then
11849    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11850  fi
11851
11852
11853
11854
11855  # Publish this variable in the help.
11856
11857
11858  if test "x$EGREP" = x; then
11859    # The variable is not set by user, try to locate tool using the code snippet
11860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11861$as_echo_n "checking for egrep... " >&6; }
11862if ${ac_cv_path_EGREP+:} false; then :
11863  $as_echo_n "(cached) " >&6
11864else
11865  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11866   then ac_cv_path_EGREP="$GREP -E"
11867   else
11868     if test -z "$EGREP"; then
11869  ac_path_EGREP_found=false
11870  # Loop through the user's path and test for each of PROGNAME-LIST
11871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11873do
11874  IFS=$as_save_IFS
11875  test -z "$as_dir" && as_dir=.
11876    for ac_prog in egrep; do
11877    for ac_exec_ext in '' $ac_executable_extensions; do
11878      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11879      as_fn_executable_p "$ac_path_EGREP" || continue
11880# Check for GNU ac_path_EGREP and select it if it is found.
11881  # Check for GNU $ac_path_EGREP
11882case `"$ac_path_EGREP" --version 2>&1` in
11883*GNU*)
11884  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11885*)
11886  ac_count=0
11887  $as_echo_n 0123456789 >"conftest.in"
11888  while :
11889  do
11890    cat "conftest.in" "conftest.in" >"conftest.tmp"
11891    mv "conftest.tmp" "conftest.in"
11892    cp "conftest.in" "conftest.nl"
11893    $as_echo 'EGREP' >> "conftest.nl"
11894    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11895    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11896    as_fn_arith $ac_count + 1 && ac_count=$as_val
11897    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11898      # Best one so far, save it but keep looking for a better one
11899      ac_cv_path_EGREP="$ac_path_EGREP"
11900      ac_path_EGREP_max=$ac_count
11901    fi
11902    # 10*(2^10) chars as input seems more than enough
11903    test $ac_count -gt 10 && break
11904  done
11905  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11906esac
11907
11908      $ac_path_EGREP_found && break 3
11909    done
11910  done
11911  done
11912IFS=$as_save_IFS
11913  if test -z "$ac_cv_path_EGREP"; then
11914    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11915  fi
11916else
11917  ac_cv_path_EGREP=$EGREP
11918fi
11919
11920   fi
11921fi
11922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11923$as_echo "$ac_cv_path_EGREP" >&6; }
11924 EGREP="$ac_cv_path_EGREP"
11925
11926
11927  else
11928    # The variable is set, but is it from the command line or the environment?
11929
11930    # Try to remove the string !EGREP! from our list.
11931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11933      # If it failed, the variable was not from the command line. Ignore it,
11934      # but warn the user (except for BASH, which is always set by the calling BASH).
11935      if test "xEGREP" != xBASH; then
11936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11937$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11938      fi
11939      # Try to locate tool using the code snippet
11940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11941$as_echo_n "checking for egrep... " >&6; }
11942if ${ac_cv_path_EGREP+:} false; then :
11943  $as_echo_n "(cached) " >&6
11944else
11945  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11946   then ac_cv_path_EGREP="$GREP -E"
11947   else
11948     if test -z "$EGREP"; then
11949  ac_path_EGREP_found=false
11950  # Loop through the user's path and test for each of PROGNAME-LIST
11951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11952for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11953do
11954  IFS=$as_save_IFS
11955  test -z "$as_dir" && as_dir=.
11956    for ac_prog in egrep; do
11957    for ac_exec_ext in '' $ac_executable_extensions; do
11958      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11959      as_fn_executable_p "$ac_path_EGREP" || continue
11960# Check for GNU ac_path_EGREP and select it if it is found.
11961  # Check for GNU $ac_path_EGREP
11962case `"$ac_path_EGREP" --version 2>&1` in
11963*GNU*)
11964  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11965*)
11966  ac_count=0
11967  $as_echo_n 0123456789 >"conftest.in"
11968  while :
11969  do
11970    cat "conftest.in" "conftest.in" >"conftest.tmp"
11971    mv "conftest.tmp" "conftest.in"
11972    cp "conftest.in" "conftest.nl"
11973    $as_echo 'EGREP' >> "conftest.nl"
11974    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11975    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11976    as_fn_arith $ac_count + 1 && ac_count=$as_val
11977    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11978      # Best one so far, save it but keep looking for a better one
11979      ac_cv_path_EGREP="$ac_path_EGREP"
11980      ac_path_EGREP_max=$ac_count
11981    fi
11982    # 10*(2^10) chars as input seems more than enough
11983    test $ac_count -gt 10 && break
11984  done
11985  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11986esac
11987
11988      $ac_path_EGREP_found && break 3
11989    done
11990  done
11991  done
11992IFS=$as_save_IFS
11993  if test -z "$ac_cv_path_EGREP"; then
11994    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11995  fi
11996else
11997  ac_cv_path_EGREP=$EGREP
11998fi
11999
12000   fi
12001fi
12002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12003$as_echo "$ac_cv_path_EGREP" >&6; }
12004 EGREP="$ac_cv_path_EGREP"
12005
12006
12007    else
12008      # If it succeeded, then it was overridden by the user. We will use it
12009      # for the tool.
12010
12011      # First remove it from the list of overridden variables, so we can test
12012      # for unknown variables in the end.
12013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12014
12015      # Check if the provided tool contains a complete path.
12016      tool_specified="$EGREP"
12017      tool_basename="${tool_specified##*/}"
12018      if test "x$tool_basename" = "x$tool_specified"; then
12019        # A command without a complete path is provided, search $PATH.
12020        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12021$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12022        # Extract the first word of "$tool_basename", so it can be a program name with args.
12023set dummy $tool_basename; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_EGREP+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $EGREP in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052EGREP=$ac_cv_path_EGREP
12053if test -n "$EGREP"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12055$as_echo "$EGREP" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062        if test "x$EGREP" = x; then
12063          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12064        fi
12065      else
12066        # Otherwise we believe it is a complete path. Use it as it is.
12067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12068$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12070$as_echo_n "checking for EGREP... " >&6; }
12071        if test ! -x "$tool_specified"; then
12072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12073$as_echo "not found" >&6; }
12074          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12075        fi
12076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12077$as_echo "$tool_specified" >&6; }
12078      fi
12079    fi
12080  fi
12081
12082
12083  if test "x$EGREP" = x; then
12084    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12085  fi
12086
12087
12088
12089
12090  # Publish this variable in the help.
12091
12092
12093  if test "x$FGREP" = x; then
12094    # The variable is not set by user, try to locate tool using the code snippet
12095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12096$as_echo_n "checking for fgrep... " >&6; }
12097if ${ac_cv_path_FGREP+:} false; then :
12098  $as_echo_n "(cached) " >&6
12099else
12100  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12101   then ac_cv_path_FGREP="$GREP -F"
12102   else
12103     if test -z "$FGREP"; then
12104  ac_path_FGREP_found=false
12105  # Loop through the user's path and test for each of PROGNAME-LIST
12106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12107for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12108do
12109  IFS=$as_save_IFS
12110  test -z "$as_dir" && as_dir=.
12111    for ac_prog in fgrep; do
12112    for ac_exec_ext in '' $ac_executable_extensions; do
12113      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12114      as_fn_executable_p "$ac_path_FGREP" || continue
12115# Check for GNU ac_path_FGREP and select it if it is found.
12116  # Check for GNU $ac_path_FGREP
12117case `"$ac_path_FGREP" --version 2>&1` in
12118*GNU*)
12119  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12120*)
12121  ac_count=0
12122  $as_echo_n 0123456789 >"conftest.in"
12123  while :
12124  do
12125    cat "conftest.in" "conftest.in" >"conftest.tmp"
12126    mv "conftest.tmp" "conftest.in"
12127    cp "conftest.in" "conftest.nl"
12128    $as_echo 'FGREP' >> "conftest.nl"
12129    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12130    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12131    as_fn_arith $ac_count + 1 && ac_count=$as_val
12132    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12133      # Best one so far, save it but keep looking for a better one
12134      ac_cv_path_FGREP="$ac_path_FGREP"
12135      ac_path_FGREP_max=$ac_count
12136    fi
12137    # 10*(2^10) chars as input seems more than enough
12138    test $ac_count -gt 10 && break
12139  done
12140  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12141esac
12142
12143      $ac_path_FGREP_found && break 3
12144    done
12145  done
12146  done
12147IFS=$as_save_IFS
12148  if test -z "$ac_cv_path_FGREP"; then
12149    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12150  fi
12151else
12152  ac_cv_path_FGREP=$FGREP
12153fi
12154
12155   fi
12156fi
12157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12158$as_echo "$ac_cv_path_FGREP" >&6; }
12159 FGREP="$ac_cv_path_FGREP"
12160
12161
12162  else
12163    # The variable is set, but is it from the command line or the environment?
12164
12165    # Try to remove the string !FGREP! from our list.
12166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12168      # If it failed, the variable was not from the command line. Ignore it,
12169      # but warn the user (except for BASH, which is always set by the calling BASH).
12170      if test "xFGREP" != xBASH; then
12171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12172$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12173      fi
12174      # Try to locate tool using the code snippet
12175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12176$as_echo_n "checking for fgrep... " >&6; }
12177if ${ac_cv_path_FGREP+:} false; then :
12178  $as_echo_n "(cached) " >&6
12179else
12180  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12181   then ac_cv_path_FGREP="$GREP -F"
12182   else
12183     if test -z "$FGREP"; then
12184  ac_path_FGREP_found=false
12185  # Loop through the user's path and test for each of PROGNAME-LIST
12186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12187for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12188do
12189  IFS=$as_save_IFS
12190  test -z "$as_dir" && as_dir=.
12191    for ac_prog in fgrep; do
12192    for ac_exec_ext in '' $ac_executable_extensions; do
12193      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12194      as_fn_executable_p "$ac_path_FGREP" || continue
12195# Check for GNU ac_path_FGREP and select it if it is found.
12196  # Check for GNU $ac_path_FGREP
12197case `"$ac_path_FGREP" --version 2>&1` in
12198*GNU*)
12199  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12200*)
12201  ac_count=0
12202  $as_echo_n 0123456789 >"conftest.in"
12203  while :
12204  do
12205    cat "conftest.in" "conftest.in" >"conftest.tmp"
12206    mv "conftest.tmp" "conftest.in"
12207    cp "conftest.in" "conftest.nl"
12208    $as_echo 'FGREP' >> "conftest.nl"
12209    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12210    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12211    as_fn_arith $ac_count + 1 && ac_count=$as_val
12212    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12213      # Best one so far, save it but keep looking for a better one
12214      ac_cv_path_FGREP="$ac_path_FGREP"
12215      ac_path_FGREP_max=$ac_count
12216    fi
12217    # 10*(2^10) chars as input seems more than enough
12218    test $ac_count -gt 10 && break
12219  done
12220  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12221esac
12222
12223      $ac_path_FGREP_found && break 3
12224    done
12225  done
12226  done
12227IFS=$as_save_IFS
12228  if test -z "$ac_cv_path_FGREP"; then
12229    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12230  fi
12231else
12232  ac_cv_path_FGREP=$FGREP
12233fi
12234
12235   fi
12236fi
12237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12238$as_echo "$ac_cv_path_FGREP" >&6; }
12239 FGREP="$ac_cv_path_FGREP"
12240
12241
12242    else
12243      # If it succeeded, then it was overridden by the user. We will use it
12244      # for the tool.
12245
12246      # First remove it from the list of overridden variables, so we can test
12247      # for unknown variables in the end.
12248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12249
12250      # Check if the provided tool contains a complete path.
12251      tool_specified="$FGREP"
12252      tool_basename="${tool_specified##*/}"
12253      if test "x$tool_basename" = "x$tool_specified"; then
12254        # A command without a complete path is provided, search $PATH.
12255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12256$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12257        # Extract the first word of "$tool_basename", so it can be a program name with args.
12258set dummy $tool_basename; ac_word=$2
12259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12260$as_echo_n "checking for $ac_word... " >&6; }
12261if ${ac_cv_path_FGREP+:} false; then :
12262  $as_echo_n "(cached) " >&6
12263else
12264  case $FGREP in
12265  [\\/]* | ?:[\\/]*)
12266  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12267  ;;
12268  *)
12269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12270for as_dir in $PATH
12271do
12272  IFS=$as_save_IFS
12273  test -z "$as_dir" && as_dir=.
12274    for ac_exec_ext in '' $ac_executable_extensions; do
12275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12276    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12278    break 2
12279  fi
12280done
12281  done
12282IFS=$as_save_IFS
12283
12284  ;;
12285esac
12286fi
12287FGREP=$ac_cv_path_FGREP
12288if test -n "$FGREP"; then
12289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12290$as_echo "$FGREP" >&6; }
12291else
12292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12293$as_echo "no" >&6; }
12294fi
12295
12296
12297        if test "x$FGREP" = x; then
12298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12299        fi
12300      else
12301        # Otherwise we believe it is a complete path. Use it as it is.
12302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12303$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12305$as_echo_n "checking for FGREP... " >&6; }
12306        if test ! -x "$tool_specified"; then
12307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12308$as_echo "not found" >&6; }
12309          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12310        fi
12311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12312$as_echo "$tool_specified" >&6; }
12313      fi
12314    fi
12315  fi
12316
12317
12318  if test "x$FGREP" = x; then
12319    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12320  fi
12321
12322
12323
12324
12325  # Publish this variable in the help.
12326
12327
12328  if test "x$SED" = x; then
12329    # The variable is not set by user, try to locate tool using the code snippet
12330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12331$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12332if ${ac_cv_path_SED+:} false; then :
12333  $as_echo_n "(cached) " >&6
12334else
12335            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12336     for ac_i in 1 2 3 4 5 6 7; do
12337       ac_script="$ac_script$as_nl$ac_script"
12338     done
12339     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12340     { ac_script=; unset ac_script;}
12341     if test -z "$SED"; then
12342  ac_path_SED_found=false
12343  # Loop through the user's path and test for each of PROGNAME-LIST
12344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12345for as_dir in $PATH
12346do
12347  IFS=$as_save_IFS
12348  test -z "$as_dir" && as_dir=.
12349    for ac_prog in sed gsed; do
12350    for ac_exec_ext in '' $ac_executable_extensions; do
12351      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12352      as_fn_executable_p "$ac_path_SED" || continue
12353# Check for GNU ac_path_SED and select it if it is found.
12354  # Check for GNU $ac_path_SED
12355case `"$ac_path_SED" --version 2>&1` in
12356*GNU*)
12357  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12358*)
12359  ac_count=0
12360  $as_echo_n 0123456789 >"conftest.in"
12361  while :
12362  do
12363    cat "conftest.in" "conftest.in" >"conftest.tmp"
12364    mv "conftest.tmp" "conftest.in"
12365    cp "conftest.in" "conftest.nl"
12366    $as_echo '' >> "conftest.nl"
12367    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12368    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12369    as_fn_arith $ac_count + 1 && ac_count=$as_val
12370    if test $ac_count -gt ${ac_path_SED_max-0}; then
12371      # Best one so far, save it but keep looking for a better one
12372      ac_cv_path_SED="$ac_path_SED"
12373      ac_path_SED_max=$ac_count
12374    fi
12375    # 10*(2^10) chars as input seems more than enough
12376    test $ac_count -gt 10 && break
12377  done
12378  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12379esac
12380
12381      $ac_path_SED_found && break 3
12382    done
12383  done
12384  done
12385IFS=$as_save_IFS
12386  if test -z "$ac_cv_path_SED"; then
12387    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12388  fi
12389else
12390  ac_cv_path_SED=$SED
12391fi
12392
12393fi
12394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12395$as_echo "$ac_cv_path_SED" >&6; }
12396 SED="$ac_cv_path_SED"
12397  rm -f conftest.sed
12398
12399  else
12400    # The variable is set, but is it from the command line or the environment?
12401
12402    # Try to remove the string !SED! from our list.
12403    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12404    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12405      # If it failed, the variable was not from the command line. Ignore it,
12406      # but warn the user (except for BASH, which is always set by the calling BASH).
12407      if test "xSED" != xBASH; then
12408        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12409$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12410      fi
12411      # Try to locate tool using the code snippet
12412      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12413$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12414if ${ac_cv_path_SED+:} false; then :
12415  $as_echo_n "(cached) " >&6
12416else
12417            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12418     for ac_i in 1 2 3 4 5 6 7; do
12419       ac_script="$ac_script$as_nl$ac_script"
12420     done
12421     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12422     { ac_script=; unset ac_script;}
12423     if test -z "$SED"; then
12424  ac_path_SED_found=false
12425  # Loop through the user's path and test for each of PROGNAME-LIST
12426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12427for as_dir in $PATH
12428do
12429  IFS=$as_save_IFS
12430  test -z "$as_dir" && as_dir=.
12431    for ac_prog in sed gsed; do
12432    for ac_exec_ext in '' $ac_executable_extensions; do
12433      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12434      as_fn_executable_p "$ac_path_SED" || continue
12435# Check for GNU ac_path_SED and select it if it is found.
12436  # Check for GNU $ac_path_SED
12437case `"$ac_path_SED" --version 2>&1` in
12438*GNU*)
12439  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12440*)
12441  ac_count=0
12442  $as_echo_n 0123456789 >"conftest.in"
12443  while :
12444  do
12445    cat "conftest.in" "conftest.in" >"conftest.tmp"
12446    mv "conftest.tmp" "conftest.in"
12447    cp "conftest.in" "conftest.nl"
12448    $as_echo '' >> "conftest.nl"
12449    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12450    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12451    as_fn_arith $ac_count + 1 && ac_count=$as_val
12452    if test $ac_count -gt ${ac_path_SED_max-0}; then
12453      # Best one so far, save it but keep looking for a better one
12454      ac_cv_path_SED="$ac_path_SED"
12455      ac_path_SED_max=$ac_count
12456    fi
12457    # 10*(2^10) chars as input seems more than enough
12458    test $ac_count -gt 10 && break
12459  done
12460  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12461esac
12462
12463      $ac_path_SED_found && break 3
12464    done
12465  done
12466  done
12467IFS=$as_save_IFS
12468  if test -z "$ac_cv_path_SED"; then
12469    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12470  fi
12471else
12472  ac_cv_path_SED=$SED
12473fi
12474
12475fi
12476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12477$as_echo "$ac_cv_path_SED" >&6; }
12478 SED="$ac_cv_path_SED"
12479  rm -f conftest.sed
12480
12481    else
12482      # If it succeeded, then it was overridden by the user. We will use it
12483      # for the tool.
12484
12485      # First remove it from the list of overridden variables, so we can test
12486      # for unknown variables in the end.
12487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12488
12489      # Check if the provided tool contains a complete path.
12490      tool_specified="$SED"
12491      tool_basename="${tool_specified##*/}"
12492      if test "x$tool_basename" = "x$tool_specified"; then
12493        # A command without a complete path is provided, search $PATH.
12494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12495$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12496        # Extract the first word of "$tool_basename", so it can be a program name with args.
12497set dummy $tool_basename; ac_word=$2
12498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12499$as_echo_n "checking for $ac_word... " >&6; }
12500if ${ac_cv_path_SED+:} false; then :
12501  $as_echo_n "(cached) " >&6
12502else
12503  case $SED in
12504  [\\/]* | ?:[\\/]*)
12505  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12506  ;;
12507  *)
12508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12509for as_dir in $PATH
12510do
12511  IFS=$as_save_IFS
12512  test -z "$as_dir" && as_dir=.
12513    for ac_exec_ext in '' $ac_executable_extensions; do
12514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12515    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12517    break 2
12518  fi
12519done
12520  done
12521IFS=$as_save_IFS
12522
12523  ;;
12524esac
12525fi
12526SED=$ac_cv_path_SED
12527if test -n "$SED"; then
12528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12529$as_echo "$SED" >&6; }
12530else
12531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12532$as_echo "no" >&6; }
12533fi
12534
12535
12536        if test "x$SED" = x; then
12537          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12538        fi
12539      else
12540        # Otherwise we believe it is a complete path. Use it as it is.
12541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12542$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12544$as_echo_n "checking for SED... " >&6; }
12545        if test ! -x "$tool_specified"; then
12546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12547$as_echo "not found" >&6; }
12548          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12549        fi
12550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12551$as_echo "$tool_specified" >&6; }
12552      fi
12553    fi
12554  fi
12555
12556
12557  if test "x$SED" = x; then
12558    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12559  fi
12560
12561
12562
12563  # Always force rm.
12564  RM="$RM -f"
12565
12566  # pwd behaves differently on various platforms and some don't support the -L flag.
12567  # Always use the bash builtin pwd to get uniform behavior.
12568  THEPWDCMD=pwd
12569
12570  # These are not required on all platforms
12571
12572
12573  # Publish this variable in the help.
12574
12575
12576  if test "x$CYGPATH" = x; then
12577    # The variable is not set by user, try to locate tool using the code snippet
12578    for ac_prog in cygpath
12579do
12580  # Extract the first word of "$ac_prog", so it can be a program name with args.
12581set dummy $ac_prog; ac_word=$2
12582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12583$as_echo_n "checking for $ac_word... " >&6; }
12584if ${ac_cv_path_CYGPATH+:} false; then :
12585  $as_echo_n "(cached) " >&6
12586else
12587  case $CYGPATH in
12588  [\\/]* | ?:[\\/]*)
12589  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12590  ;;
12591  *)
12592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12593for as_dir in $PATH
12594do
12595  IFS=$as_save_IFS
12596  test -z "$as_dir" && as_dir=.
12597    for ac_exec_ext in '' $ac_executable_extensions; do
12598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12599    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12601    break 2
12602  fi
12603done
12604  done
12605IFS=$as_save_IFS
12606
12607  ;;
12608esac
12609fi
12610CYGPATH=$ac_cv_path_CYGPATH
12611if test -n "$CYGPATH"; then
12612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12613$as_echo "$CYGPATH" >&6; }
12614else
12615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12616$as_echo "no" >&6; }
12617fi
12618
12619
12620  test -n "$CYGPATH" && break
12621done
12622
12623  else
12624    # The variable is set, but is it from the command line or the environment?
12625
12626    # Try to remove the string !CYGPATH! from our list.
12627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12629      # If it failed, the variable was not from the command line. Ignore it,
12630      # but warn the user (except for BASH, which is always set by the calling BASH).
12631      if test "xCYGPATH" != xBASH; then
12632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12633$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12634      fi
12635      # Try to locate tool using the code snippet
12636      for ac_prog in cygpath
12637do
12638  # Extract the first word of "$ac_prog", so it can be a program name with args.
12639set dummy $ac_prog; ac_word=$2
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12641$as_echo_n "checking for $ac_word... " >&6; }
12642if ${ac_cv_path_CYGPATH+:} false; then :
12643  $as_echo_n "(cached) " >&6
12644else
12645  case $CYGPATH in
12646  [\\/]* | ?:[\\/]*)
12647  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12648  ;;
12649  *)
12650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12651for as_dir in $PATH
12652do
12653  IFS=$as_save_IFS
12654  test -z "$as_dir" && as_dir=.
12655    for ac_exec_ext in '' $ac_executable_extensions; do
12656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12657    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12659    break 2
12660  fi
12661done
12662  done
12663IFS=$as_save_IFS
12664
12665  ;;
12666esac
12667fi
12668CYGPATH=$ac_cv_path_CYGPATH
12669if test -n "$CYGPATH"; then
12670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12671$as_echo "$CYGPATH" >&6; }
12672else
12673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12674$as_echo "no" >&6; }
12675fi
12676
12677
12678  test -n "$CYGPATH" && break
12679done
12680
12681    else
12682      # If it succeeded, then it was overridden by the user. We will use it
12683      # for the tool.
12684
12685      # First remove it from the list of overridden variables, so we can test
12686      # for unknown variables in the end.
12687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12688
12689      # Check if the provided tool contains a complete path.
12690      tool_specified="$CYGPATH"
12691      tool_basename="${tool_specified##*/}"
12692      if test "x$tool_basename" = "x$tool_specified"; then
12693        # A command without a complete path is provided, search $PATH.
12694        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12695$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12696        # Extract the first word of "$tool_basename", so it can be a program name with args.
12697set dummy $tool_basename; ac_word=$2
12698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12699$as_echo_n "checking for $ac_word... " >&6; }
12700if ${ac_cv_path_CYGPATH+:} false; then :
12701  $as_echo_n "(cached) " >&6
12702else
12703  case $CYGPATH in
12704  [\\/]* | ?:[\\/]*)
12705  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12706  ;;
12707  *)
12708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12709for as_dir in $PATH
12710do
12711  IFS=$as_save_IFS
12712  test -z "$as_dir" && as_dir=.
12713    for ac_exec_ext in '' $ac_executable_extensions; do
12714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12715    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12717    break 2
12718  fi
12719done
12720  done
12721IFS=$as_save_IFS
12722
12723  ;;
12724esac
12725fi
12726CYGPATH=$ac_cv_path_CYGPATH
12727if test -n "$CYGPATH"; then
12728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12729$as_echo "$CYGPATH" >&6; }
12730else
12731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12732$as_echo "no" >&6; }
12733fi
12734
12735
12736        if test "x$CYGPATH" = x; then
12737          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12738        fi
12739      else
12740        # Otherwise we believe it is a complete path. Use it as it is.
12741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12742$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12744$as_echo_n "checking for CYGPATH... " >&6; }
12745        if test ! -x "$tool_specified"; then
12746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12747$as_echo "not found" >&6; }
12748          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12749        fi
12750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12751$as_echo "$tool_specified" >&6; }
12752      fi
12753    fi
12754  fi
12755
12756
12757
12758
12759  # Publish this variable in the help.
12760
12761
12762  if test "x$READLINK" = x; then
12763    # The variable is not set by user, try to locate tool using the code snippet
12764    for ac_prog in greadlink readlink
12765do
12766  # Extract the first word of "$ac_prog", so it can be a program name with args.
12767set dummy $ac_prog; ac_word=$2
12768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12769$as_echo_n "checking for $ac_word... " >&6; }
12770if ${ac_cv_path_READLINK+:} false; then :
12771  $as_echo_n "(cached) " >&6
12772else
12773  case $READLINK in
12774  [\\/]* | ?:[\\/]*)
12775  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12776  ;;
12777  *)
12778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12779for as_dir in $PATH
12780do
12781  IFS=$as_save_IFS
12782  test -z "$as_dir" && as_dir=.
12783    for ac_exec_ext in '' $ac_executable_extensions; do
12784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12785    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12787    break 2
12788  fi
12789done
12790  done
12791IFS=$as_save_IFS
12792
12793  ;;
12794esac
12795fi
12796READLINK=$ac_cv_path_READLINK
12797if test -n "$READLINK"; then
12798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12799$as_echo "$READLINK" >&6; }
12800else
12801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12802$as_echo "no" >&6; }
12803fi
12804
12805
12806  test -n "$READLINK" && break
12807done
12808
12809  else
12810    # The variable is set, but is it from the command line or the environment?
12811
12812    # Try to remove the string !READLINK! from our list.
12813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12815      # If it failed, the variable was not from the command line. Ignore it,
12816      # but warn the user (except for BASH, which is always set by the calling BASH).
12817      if test "xREADLINK" != xBASH; then
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12819$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12820      fi
12821      # Try to locate tool using the code snippet
12822      for ac_prog in greadlink readlink
12823do
12824  # Extract the first word of "$ac_prog", so it can be a program name with args.
12825set dummy $ac_prog; ac_word=$2
12826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12827$as_echo_n "checking for $ac_word... " >&6; }
12828if ${ac_cv_path_READLINK+:} false; then :
12829  $as_echo_n "(cached) " >&6
12830else
12831  case $READLINK in
12832  [\\/]* | ?:[\\/]*)
12833  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12834  ;;
12835  *)
12836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12837for as_dir in $PATH
12838do
12839  IFS=$as_save_IFS
12840  test -z "$as_dir" && as_dir=.
12841    for ac_exec_ext in '' $ac_executable_extensions; do
12842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12843    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12845    break 2
12846  fi
12847done
12848  done
12849IFS=$as_save_IFS
12850
12851  ;;
12852esac
12853fi
12854READLINK=$ac_cv_path_READLINK
12855if test -n "$READLINK"; then
12856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12857$as_echo "$READLINK" >&6; }
12858else
12859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12860$as_echo "no" >&6; }
12861fi
12862
12863
12864  test -n "$READLINK" && break
12865done
12866
12867    else
12868      # If it succeeded, then it was overridden by the user. We will use it
12869      # for the tool.
12870
12871      # First remove it from the list of overridden variables, so we can test
12872      # for unknown variables in the end.
12873      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12874
12875      # Check if the provided tool contains a complete path.
12876      tool_specified="$READLINK"
12877      tool_basename="${tool_specified##*/}"
12878      if test "x$tool_basename" = "x$tool_specified"; then
12879        # A command without a complete path is provided, search $PATH.
12880        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12881$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12882        # Extract the first word of "$tool_basename", so it can be a program name with args.
12883set dummy $tool_basename; ac_word=$2
12884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12885$as_echo_n "checking for $ac_word... " >&6; }
12886if ${ac_cv_path_READLINK+:} false; then :
12887  $as_echo_n "(cached) " >&6
12888else
12889  case $READLINK in
12890  [\\/]* | ?:[\\/]*)
12891  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12892  ;;
12893  *)
12894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12895for as_dir in $PATH
12896do
12897  IFS=$as_save_IFS
12898  test -z "$as_dir" && as_dir=.
12899    for ac_exec_ext in '' $ac_executable_extensions; do
12900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12901    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12903    break 2
12904  fi
12905done
12906  done
12907IFS=$as_save_IFS
12908
12909  ;;
12910esac
12911fi
12912READLINK=$ac_cv_path_READLINK
12913if test -n "$READLINK"; then
12914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12915$as_echo "$READLINK" >&6; }
12916else
12917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12918$as_echo "no" >&6; }
12919fi
12920
12921
12922        if test "x$READLINK" = x; then
12923          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12924        fi
12925      else
12926        # Otherwise we believe it is a complete path. Use it as it is.
12927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12928$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12930$as_echo_n "checking for READLINK... " >&6; }
12931        if test ! -x "$tool_specified"; then
12932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12933$as_echo "not found" >&6; }
12934          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12935        fi
12936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12937$as_echo "$tool_specified" >&6; }
12938      fi
12939    fi
12940  fi
12941
12942
12943
12944
12945  # Publish this variable in the help.
12946
12947
12948  if test "x$DF" = x; then
12949    # The variable is not set by user, try to locate tool using the code snippet
12950    for ac_prog in df
12951do
12952  # Extract the first word of "$ac_prog", so it can be a program name with args.
12953set dummy $ac_prog; ac_word=$2
12954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12955$as_echo_n "checking for $ac_word... " >&6; }
12956if ${ac_cv_path_DF+:} false; then :
12957  $as_echo_n "(cached) " >&6
12958else
12959  case $DF in
12960  [\\/]* | ?:[\\/]*)
12961  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12962  ;;
12963  *)
12964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12965for as_dir in $PATH
12966do
12967  IFS=$as_save_IFS
12968  test -z "$as_dir" && as_dir=.
12969    for ac_exec_ext in '' $ac_executable_extensions; do
12970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12971    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12973    break 2
12974  fi
12975done
12976  done
12977IFS=$as_save_IFS
12978
12979  ;;
12980esac
12981fi
12982DF=$ac_cv_path_DF
12983if test -n "$DF"; then
12984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12985$as_echo "$DF" >&6; }
12986else
12987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12988$as_echo "no" >&6; }
12989fi
12990
12991
12992  test -n "$DF" && break
12993done
12994
12995  else
12996    # The variable is set, but is it from the command line or the environment?
12997
12998    # Try to remove the string !DF! from our list.
12999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13001      # If it failed, the variable was not from the command line. Ignore it,
13002      # but warn the user (except for BASH, which is always set by the calling BASH).
13003      if test "xDF" != xBASH; then
13004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13005$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13006      fi
13007      # Try to locate tool using the code snippet
13008      for ac_prog in df
13009do
13010  # Extract the first word of "$ac_prog", so it can be a program name with args.
13011set dummy $ac_prog; ac_word=$2
13012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13013$as_echo_n "checking for $ac_word... " >&6; }
13014if ${ac_cv_path_DF+:} false; then :
13015  $as_echo_n "(cached) " >&6
13016else
13017  case $DF in
13018  [\\/]* | ?:[\\/]*)
13019  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13020  ;;
13021  *)
13022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13023for as_dir in $PATH
13024do
13025  IFS=$as_save_IFS
13026  test -z "$as_dir" && as_dir=.
13027    for ac_exec_ext in '' $ac_executable_extensions; do
13028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13029    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13031    break 2
13032  fi
13033done
13034  done
13035IFS=$as_save_IFS
13036
13037  ;;
13038esac
13039fi
13040DF=$ac_cv_path_DF
13041if test -n "$DF"; then
13042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13043$as_echo "$DF" >&6; }
13044else
13045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13046$as_echo "no" >&6; }
13047fi
13048
13049
13050  test -n "$DF" && break
13051done
13052
13053    else
13054      # If it succeeded, then it was overridden by the user. We will use it
13055      # for the tool.
13056
13057      # First remove it from the list of overridden variables, so we can test
13058      # for unknown variables in the end.
13059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13060
13061      # Check if the provided tool contains a complete path.
13062      tool_specified="$DF"
13063      tool_basename="${tool_specified##*/}"
13064      if test "x$tool_basename" = "x$tool_specified"; then
13065        # A command without a complete path is provided, search $PATH.
13066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13067$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13068        # Extract the first word of "$tool_basename", so it can be a program name with args.
13069set dummy $tool_basename; ac_word=$2
13070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13071$as_echo_n "checking for $ac_word... " >&6; }
13072if ${ac_cv_path_DF+:} false; then :
13073  $as_echo_n "(cached) " >&6
13074else
13075  case $DF in
13076  [\\/]* | ?:[\\/]*)
13077  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13078  ;;
13079  *)
13080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13081for as_dir in $PATH
13082do
13083  IFS=$as_save_IFS
13084  test -z "$as_dir" && as_dir=.
13085    for ac_exec_ext in '' $ac_executable_extensions; do
13086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13087    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13089    break 2
13090  fi
13091done
13092  done
13093IFS=$as_save_IFS
13094
13095  ;;
13096esac
13097fi
13098DF=$ac_cv_path_DF
13099if test -n "$DF"; then
13100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13101$as_echo "$DF" >&6; }
13102else
13103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13104$as_echo "no" >&6; }
13105fi
13106
13107
13108        if test "x$DF" = x; then
13109          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13110        fi
13111      else
13112        # Otherwise we believe it is a complete path. Use it as it is.
13113        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13114$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13116$as_echo_n "checking for DF... " >&6; }
13117        if test ! -x "$tool_specified"; then
13118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13119$as_echo "not found" >&6; }
13120          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13121        fi
13122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13123$as_echo "$tool_specified" >&6; }
13124      fi
13125    fi
13126  fi
13127
13128
13129
13130
13131  # Publish this variable in the help.
13132
13133
13134  if test "x$SETFILE" = x; then
13135    # The variable is not set by user, try to locate tool using the code snippet
13136    for ac_prog in SetFile
13137do
13138  # Extract the first word of "$ac_prog", so it can be a program name with args.
13139set dummy $ac_prog; ac_word=$2
13140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13141$as_echo_n "checking for $ac_word... " >&6; }
13142if ${ac_cv_path_SETFILE+:} false; then :
13143  $as_echo_n "(cached) " >&6
13144else
13145  case $SETFILE in
13146  [\\/]* | ?:[\\/]*)
13147  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13148  ;;
13149  *)
13150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13151for as_dir in $PATH
13152do
13153  IFS=$as_save_IFS
13154  test -z "$as_dir" && as_dir=.
13155    for ac_exec_ext in '' $ac_executable_extensions; do
13156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13157    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13159    break 2
13160  fi
13161done
13162  done
13163IFS=$as_save_IFS
13164
13165  ;;
13166esac
13167fi
13168SETFILE=$ac_cv_path_SETFILE
13169if test -n "$SETFILE"; then
13170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13171$as_echo "$SETFILE" >&6; }
13172else
13173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13174$as_echo "no" >&6; }
13175fi
13176
13177
13178  test -n "$SETFILE" && break
13179done
13180
13181  else
13182    # The variable is set, but is it from the command line or the environment?
13183
13184    # Try to remove the string !SETFILE! from our list.
13185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13187      # If it failed, the variable was not from the command line. Ignore it,
13188      # but warn the user (except for BASH, which is always set by the calling BASH).
13189      if test "xSETFILE" != xBASH; then
13190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13191$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13192      fi
13193      # Try to locate tool using the code snippet
13194      for ac_prog in SetFile
13195do
13196  # Extract the first word of "$ac_prog", so it can be a program name with args.
13197set dummy $ac_prog; ac_word=$2
13198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13199$as_echo_n "checking for $ac_word... " >&6; }
13200if ${ac_cv_path_SETFILE+:} false; then :
13201  $as_echo_n "(cached) " >&6
13202else
13203  case $SETFILE in
13204  [\\/]* | ?:[\\/]*)
13205  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13206  ;;
13207  *)
13208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13209for as_dir in $PATH
13210do
13211  IFS=$as_save_IFS
13212  test -z "$as_dir" && as_dir=.
13213    for ac_exec_ext in '' $ac_executable_extensions; do
13214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13215    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13217    break 2
13218  fi
13219done
13220  done
13221IFS=$as_save_IFS
13222
13223  ;;
13224esac
13225fi
13226SETFILE=$ac_cv_path_SETFILE
13227if test -n "$SETFILE"; then
13228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13229$as_echo "$SETFILE" >&6; }
13230else
13231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13232$as_echo "no" >&6; }
13233fi
13234
13235
13236  test -n "$SETFILE" && break
13237done
13238
13239    else
13240      # If it succeeded, then it was overridden by the user. We will use it
13241      # for the tool.
13242
13243      # First remove it from the list of overridden variables, so we can test
13244      # for unknown variables in the end.
13245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13246
13247      # Check if the provided tool contains a complete path.
13248      tool_specified="$SETFILE"
13249      tool_basename="${tool_specified##*/}"
13250      if test "x$tool_basename" = "x$tool_specified"; then
13251        # A command without a complete path is provided, search $PATH.
13252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13253$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13254        # Extract the first word of "$tool_basename", so it can be a program name with args.
13255set dummy $tool_basename; ac_word=$2
13256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13257$as_echo_n "checking for $ac_word... " >&6; }
13258if ${ac_cv_path_SETFILE+:} false; then :
13259  $as_echo_n "(cached) " >&6
13260else
13261  case $SETFILE in
13262  [\\/]* | ?:[\\/]*)
13263  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13264  ;;
13265  *)
13266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13267for as_dir in $PATH
13268do
13269  IFS=$as_save_IFS
13270  test -z "$as_dir" && as_dir=.
13271    for ac_exec_ext in '' $ac_executable_extensions; do
13272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13273    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13275    break 2
13276  fi
13277done
13278  done
13279IFS=$as_save_IFS
13280
13281  ;;
13282esac
13283fi
13284SETFILE=$ac_cv_path_SETFILE
13285if test -n "$SETFILE"; then
13286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13287$as_echo "$SETFILE" >&6; }
13288else
13289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13290$as_echo "no" >&6; }
13291fi
13292
13293
13294        if test "x$SETFILE" = x; then
13295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13296        fi
13297      else
13298        # Otherwise we believe it is a complete path. Use it as it is.
13299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13300$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13302$as_echo_n "checking for SETFILE... " >&6; }
13303        if test ! -x "$tool_specified"; then
13304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13305$as_echo "not found" >&6; }
13306          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13307        fi
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13309$as_echo "$tool_specified" >&6; }
13310      fi
13311    fi
13312  fi
13313
13314
13315
13316
13317  # Publish this variable in the help.
13318
13319
13320  if test "x$CPIO" = x; then
13321    # The variable is not set by user, try to locate tool using the code snippet
13322    for ac_prog in cpio bsdcpio
13323do
13324  # Extract the first word of "$ac_prog", so it can be a program name with args.
13325set dummy $ac_prog; ac_word=$2
13326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13327$as_echo_n "checking for $ac_word... " >&6; }
13328if ${ac_cv_path_CPIO+:} false; then :
13329  $as_echo_n "(cached) " >&6
13330else
13331  case $CPIO in
13332  [\\/]* | ?:[\\/]*)
13333  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13334  ;;
13335  *)
13336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13337for as_dir in $PATH
13338do
13339  IFS=$as_save_IFS
13340  test -z "$as_dir" && as_dir=.
13341    for ac_exec_ext in '' $ac_executable_extensions; do
13342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13343    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13345    break 2
13346  fi
13347done
13348  done
13349IFS=$as_save_IFS
13350
13351  ;;
13352esac
13353fi
13354CPIO=$ac_cv_path_CPIO
13355if test -n "$CPIO"; then
13356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13357$as_echo "$CPIO" >&6; }
13358else
13359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13360$as_echo "no" >&6; }
13361fi
13362
13363
13364  test -n "$CPIO" && break
13365done
13366
13367  else
13368    # The variable is set, but is it from the command line or the environment?
13369
13370    # Try to remove the string !CPIO! from our list.
13371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13373      # If it failed, the variable was not from the command line. Ignore it,
13374      # but warn the user (except for BASH, which is always set by the calling BASH).
13375      if test "xCPIO" != xBASH; then
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13377$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13378      fi
13379      # Try to locate tool using the code snippet
13380      for ac_prog in cpio bsdcpio
13381do
13382  # Extract the first word of "$ac_prog", so it can be a program name with args.
13383set dummy $ac_prog; ac_word=$2
13384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13385$as_echo_n "checking for $ac_word... " >&6; }
13386if ${ac_cv_path_CPIO+:} false; then :
13387  $as_echo_n "(cached) " >&6
13388else
13389  case $CPIO in
13390  [\\/]* | ?:[\\/]*)
13391  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13392  ;;
13393  *)
13394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13395for as_dir in $PATH
13396do
13397  IFS=$as_save_IFS
13398  test -z "$as_dir" && as_dir=.
13399    for ac_exec_ext in '' $ac_executable_extensions; do
13400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13401    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13403    break 2
13404  fi
13405done
13406  done
13407IFS=$as_save_IFS
13408
13409  ;;
13410esac
13411fi
13412CPIO=$ac_cv_path_CPIO
13413if test -n "$CPIO"; then
13414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13415$as_echo "$CPIO" >&6; }
13416else
13417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13418$as_echo "no" >&6; }
13419fi
13420
13421
13422  test -n "$CPIO" && break
13423done
13424
13425    else
13426      # If it succeeded, then it was overridden by the user. We will use it
13427      # for the tool.
13428
13429      # First remove it from the list of overridden variables, so we can test
13430      # for unknown variables in the end.
13431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13432
13433      # Check if the provided tool contains a complete path.
13434      tool_specified="$CPIO"
13435      tool_basename="${tool_specified##*/}"
13436      if test "x$tool_basename" = "x$tool_specified"; then
13437        # A command without a complete path is provided, search $PATH.
13438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13439$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13440        # Extract the first word of "$tool_basename", so it can be a program name with args.
13441set dummy $tool_basename; ac_word=$2
13442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13443$as_echo_n "checking for $ac_word... " >&6; }
13444if ${ac_cv_path_CPIO+:} false; then :
13445  $as_echo_n "(cached) " >&6
13446else
13447  case $CPIO in
13448  [\\/]* | ?:[\\/]*)
13449  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13450  ;;
13451  *)
13452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13453for as_dir in $PATH
13454do
13455  IFS=$as_save_IFS
13456  test -z "$as_dir" && as_dir=.
13457    for ac_exec_ext in '' $ac_executable_extensions; do
13458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13459    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13461    break 2
13462  fi
13463done
13464  done
13465IFS=$as_save_IFS
13466
13467  ;;
13468esac
13469fi
13470CPIO=$ac_cv_path_CPIO
13471if test -n "$CPIO"; then
13472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13473$as_echo "$CPIO" >&6; }
13474else
13475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13476$as_echo "no" >&6; }
13477fi
13478
13479
13480        if test "x$CPIO" = x; then
13481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13482        fi
13483      else
13484        # Otherwise we believe it is a complete path. Use it as it is.
13485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13486$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13488$as_echo_n "checking for CPIO... " >&6; }
13489        if test ! -x "$tool_specified"; then
13490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13491$as_echo "not found" >&6; }
13492          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13493        fi
13494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13495$as_echo "$tool_specified" >&6; }
13496      fi
13497    fi
13498  fi
13499
13500
13501
13502
13503# Now we can determine OpenJDK build and target platforms. This is required to
13504# have early on.
13505# Make sure we can run config.sub.
13506$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13507  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13508
13509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13510$as_echo_n "checking build system type... " >&6; }
13511if ${ac_cv_build+:} false; then :
13512  $as_echo_n "(cached) " >&6
13513else
13514  ac_build_alias=$build_alias
13515test "x$ac_build_alias" = x &&
13516  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13517test "x$ac_build_alias" = x &&
13518  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13519ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13520  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13521
13522fi
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13524$as_echo "$ac_cv_build" >&6; }
13525case $ac_cv_build in
13526*-*-*) ;;
13527*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13528esac
13529build=$ac_cv_build
13530ac_save_IFS=$IFS; IFS='-'
13531set x $ac_cv_build
13532shift
13533build_cpu=$1
13534build_vendor=$2
13535shift; shift
13536# Remember, the first character of IFS is used to create $*,
13537# except with old shells:
13538build_os=$*
13539IFS=$ac_save_IFS
13540case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13541
13542
13543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13544$as_echo_n "checking host system type... " >&6; }
13545if ${ac_cv_host+:} false; then :
13546  $as_echo_n "(cached) " >&6
13547else
13548  if test "x$host_alias" = x; then
13549  ac_cv_host=$ac_cv_build
13550else
13551  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13552    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13553fi
13554
13555fi
13556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13557$as_echo "$ac_cv_host" >&6; }
13558case $ac_cv_host in
13559*-*-*) ;;
13560*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13561esac
13562host=$ac_cv_host
13563ac_save_IFS=$IFS; IFS='-'
13564set x $ac_cv_host
13565shift
13566host_cpu=$1
13567host_vendor=$2
13568shift; shift
13569# Remember, the first character of IFS is used to create $*,
13570# except with old shells:
13571host_os=$*
13572IFS=$ac_save_IFS
13573case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13574
13575
13576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13577$as_echo_n "checking target system type... " >&6; }
13578if ${ac_cv_target+:} false; then :
13579  $as_echo_n "(cached) " >&6
13580else
13581  if test "x$target_alias" = x; then
13582  ac_cv_target=$ac_cv_host
13583else
13584  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13585    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13586fi
13587
13588fi
13589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13590$as_echo "$ac_cv_target" >&6; }
13591case $ac_cv_target in
13592*-*-*) ;;
13593*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13594esac
13595target=$ac_cv_target
13596ac_save_IFS=$IFS; IFS='-'
13597set x $ac_cv_target
13598shift
13599target_cpu=$1
13600target_vendor=$2
13601shift; shift
13602# Remember, the first character of IFS is used to create $*,
13603# except with old shells:
13604target_os=$*
13605IFS=$ac_save_IFS
13606case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13607
13608
13609# The aliases save the names the user supplied, while $host etc.
13610# will get canonicalized.
13611test -n "$target_alias" &&
13612  test "$program_prefix$program_suffix$program_transform_name" = \
13613    NONENONEs,x,x, &&
13614  program_prefix=${target_alias}-
13615
13616  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13617  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13618  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13619  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13620  # to use the configure naming style.
13621
13622
13623
13624
13625
13626  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13627  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13628  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13629  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13630  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13631  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13632
13633
13634
13635  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13636
13637  case "$build_os" in
13638    *linux*)
13639      VAR_OS=linux
13640      VAR_OS_TYPE=unix
13641      ;;
13642    *solaris*)
13643      VAR_OS=solaris
13644      VAR_OS_TYPE=unix
13645      ;;
13646    *darwin*)
13647      VAR_OS=macosx
13648      VAR_OS_TYPE=unix
13649      ;;
13650    *bsd*)
13651      VAR_OS=bsd
13652      VAR_OS_TYPE=unix
13653      ;;
13654    *cygwin*)
13655      VAR_OS=windows
13656      VAR_OS_ENV=windows.cygwin
13657      ;;
13658    *mingw*)
13659      VAR_OS=windows
13660      VAR_OS_ENV=windows.msys
13661      ;;
13662    *aix*)
13663      VAR_OS=aix
13664      VAR_OS_TYPE=unix
13665      ;;
13666    *)
13667      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13668      ;;
13669  esac
13670
13671
13672  # First argument is the cpu name from the trip/quad
13673  case "$build_cpu" in
13674    x86_64)
13675      VAR_CPU=x86_64
13676      VAR_CPU_ARCH=x86
13677      VAR_CPU_BITS=64
13678      VAR_CPU_ENDIAN=little
13679      ;;
13680    i?86)
13681      VAR_CPU=x86
13682      VAR_CPU_ARCH=x86
13683      VAR_CPU_BITS=32
13684      VAR_CPU_ENDIAN=little
13685      ;;
13686    arm*)
13687      VAR_CPU=arm
13688      VAR_CPU_ARCH=arm
13689      VAR_CPU_BITS=32
13690      VAR_CPU_ENDIAN=little
13691      ;;
13692    aarch64)
13693      VAR_CPU=aarch64
13694      VAR_CPU_ARCH=aarch64
13695      VAR_CPU_BITS=64
13696      VAR_CPU_ENDIAN=little
13697      ;;
13698    powerpc)
13699      VAR_CPU=ppc
13700      VAR_CPU_ARCH=ppc
13701      VAR_CPU_BITS=32
13702      VAR_CPU_ENDIAN=big
13703      ;;
13704    powerpc64)
13705      VAR_CPU=ppc64
13706      VAR_CPU_ARCH=ppc
13707      VAR_CPU_BITS=64
13708      VAR_CPU_ENDIAN=big
13709      ;;
13710    powerpc64le)
13711      VAR_CPU=ppc64
13712      VAR_CPU_ARCH=ppc
13713      VAR_CPU_BITS=64
13714      VAR_CPU_ENDIAN=little
13715      ;;
13716    s390)
13717      VAR_CPU=s390
13718      VAR_CPU_ARCH=s390
13719      VAR_CPU_BITS=32
13720      VAR_CPU_ENDIAN=big
13721      ;;
13722    s390x)
13723      VAR_CPU=s390x
13724      VAR_CPU_ARCH=s390
13725      VAR_CPU_BITS=64
13726      VAR_CPU_ENDIAN=big
13727      ;;
13728    sparc)
13729      VAR_CPU=sparc
13730      VAR_CPU_ARCH=sparc
13731      VAR_CPU_BITS=32
13732      VAR_CPU_ENDIAN=big
13733      ;;
13734    sparcv9|sparc64)
13735      VAR_CPU=sparcv9
13736      VAR_CPU_ARCH=sparc
13737      VAR_CPU_BITS=64
13738      VAR_CPU_ENDIAN=big
13739      ;;
13740    *)
13741      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13742      ;;
13743  esac
13744
13745  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13746  OPENJDK_BUILD_OS="$VAR_OS"
13747  if test "x$VAR_OS_TYPE" != x; then
13748    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13749  else
13750    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13751  fi
13752  if test "x$VAR_OS_ENV" != x; then
13753    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13754  else
13755    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13756  fi
13757  OPENJDK_BUILD_CPU="$VAR_CPU"
13758  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13759  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13760  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13761
13762
13763
13764
13765
13766
13767
13768
13769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13770$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13772$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13773
13774  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13775
13776  case "$host_os" in
13777    *linux*)
13778      VAR_OS=linux
13779      VAR_OS_TYPE=unix
13780      ;;
13781    *solaris*)
13782      VAR_OS=solaris
13783      VAR_OS_TYPE=unix
13784      ;;
13785    *darwin*)
13786      VAR_OS=macosx
13787      VAR_OS_TYPE=unix
13788      ;;
13789    *bsd*)
13790      VAR_OS=bsd
13791      VAR_OS_TYPE=unix
13792      ;;
13793    *cygwin*)
13794      VAR_OS=windows
13795      VAR_OS_ENV=windows.cygwin
13796      ;;
13797    *mingw*)
13798      VAR_OS=windows
13799      VAR_OS_ENV=windows.msys
13800      ;;
13801    *aix*)
13802      VAR_OS=aix
13803      VAR_OS_TYPE=unix
13804      ;;
13805    *)
13806      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13807      ;;
13808  esac
13809
13810
13811  # First argument is the cpu name from the trip/quad
13812  case "$host_cpu" in
13813    x86_64)
13814      VAR_CPU=x86_64
13815      VAR_CPU_ARCH=x86
13816      VAR_CPU_BITS=64
13817      VAR_CPU_ENDIAN=little
13818      ;;
13819    i?86)
13820      VAR_CPU=x86
13821      VAR_CPU_ARCH=x86
13822      VAR_CPU_BITS=32
13823      VAR_CPU_ENDIAN=little
13824      ;;
13825    arm*)
13826      VAR_CPU=arm
13827      VAR_CPU_ARCH=arm
13828      VAR_CPU_BITS=32
13829      VAR_CPU_ENDIAN=little
13830      ;;
13831    aarch64)
13832      VAR_CPU=aarch64
13833      VAR_CPU_ARCH=aarch64
13834      VAR_CPU_BITS=64
13835      VAR_CPU_ENDIAN=little
13836      ;;
13837    powerpc)
13838      VAR_CPU=ppc
13839      VAR_CPU_ARCH=ppc
13840      VAR_CPU_BITS=32
13841      VAR_CPU_ENDIAN=big
13842      ;;
13843    powerpc64)
13844      VAR_CPU=ppc64
13845      VAR_CPU_ARCH=ppc
13846      VAR_CPU_BITS=64
13847      VAR_CPU_ENDIAN=big
13848      ;;
13849    powerpc64le)
13850      VAR_CPU=ppc64
13851      VAR_CPU_ARCH=ppc
13852      VAR_CPU_BITS=64
13853      VAR_CPU_ENDIAN=little
13854      ;;
13855    s390)
13856      VAR_CPU=s390
13857      VAR_CPU_ARCH=s390
13858      VAR_CPU_BITS=32
13859      VAR_CPU_ENDIAN=big
13860      ;;
13861    s390x)
13862      VAR_CPU=s390x
13863      VAR_CPU_ARCH=s390
13864      VAR_CPU_BITS=64
13865      VAR_CPU_ENDIAN=big
13866      ;;
13867    sparc)
13868      VAR_CPU=sparc
13869      VAR_CPU_ARCH=sparc
13870      VAR_CPU_BITS=32
13871      VAR_CPU_ENDIAN=big
13872      ;;
13873    sparcv9|sparc64)
13874      VAR_CPU=sparcv9
13875      VAR_CPU_ARCH=sparc
13876      VAR_CPU_BITS=64
13877      VAR_CPU_ENDIAN=big
13878      ;;
13879    *)
13880      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13881      ;;
13882  esac
13883
13884  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13885  OPENJDK_TARGET_OS="$VAR_OS"
13886  if test "x$VAR_OS_TYPE" != x; then
13887    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13888  else
13889    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13890  fi
13891  if test "x$VAR_OS_ENV" != x; then
13892    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13893  else
13894    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13895  fi
13896  OPENJDK_TARGET_CPU="$VAR_CPU"
13897  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13898  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13899  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13900
13901
13902
13903
13904
13905
13906
13907
13908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13909$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13911$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13912
13913
13914
13915# Check whether --with-target-bits was given.
13916if test "${with_target_bits+set}" = set; then :
13917  withval=$with_target_bits;
13918fi
13919
13920
13921  # We have three types of compiles:
13922  # native  == normal compilation, target system == build system
13923  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13924  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13925  #
13926  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13927    # We're doing a proper cross-compilation
13928    COMPILE_TYPE="cross"
13929  else
13930    COMPILE_TYPE="native"
13931  fi
13932
13933  if test "x$with_target_bits" != x; then
13934    if test "x$COMPILE_TYPE" = "xcross"; then
13935      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13936    fi
13937
13938    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13939      # A reduced build is requested
13940      COMPILE_TYPE="reduced"
13941      OPENJDK_TARGET_CPU_BITS=32
13942      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13943        OPENJDK_TARGET_CPU=x86
13944      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13945        OPENJDK_TARGET_CPU=sparc
13946      else
13947        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13948      fi
13949    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13950      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
13951    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13952      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13953$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13954    else
13955      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13956    fi
13957  fi
13958
13959
13960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13961$as_echo_n "checking compilation type... " >&6; }
13962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13963$as_echo "$COMPILE_TYPE" >&6; }
13964
13965
13966  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13967    REQUIRED_OS_NAME=SunOS
13968    REQUIRED_OS_VERSION=5.10
13969  fi
13970  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13971    REQUIRED_OS_NAME=Linux
13972    REQUIRED_OS_VERSION=2.6
13973  fi
13974  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13975    REQUIRED_OS_NAME=Windows
13976    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13977      REQUIRED_OS_VERSION=5.2
13978    else
13979      REQUIRED_OS_VERSION=5.1
13980    fi
13981  fi
13982  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13983    REQUIRED_OS_NAME=Darwin
13984    REQUIRED_OS_VERSION=11.2
13985  fi
13986
13987
13988
13989
13990
13991  # Also store the legacy naming of the cpu.
13992  # Ie i586 and amd64 instead of x86 and x86_64
13993  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13994  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13995    OPENJDK_TARGET_CPU_LEGACY="i586"
13996  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13997    # On all platforms except MacOSX replace x86_64 with amd64.
13998    OPENJDK_TARGET_CPU_LEGACY="amd64"
13999  fi
14000
14001
14002  # And the second legacy naming of the cpu.
14003  # Ie i386 and amd64 instead of x86 and x86_64.
14004  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14005  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14006    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14007  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14008    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14009  fi
14010
14011
14012  # This is the name of the cpu (but using i386 and amd64 instead of
14013  # x86 and x86_64, respectively), preceeded by a /, to be used when
14014  # locating libraries. On macosx, it's empty, though.
14015  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14016  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14017    OPENJDK_TARGET_CPU_LIBDIR=""
14018  fi
14019
14020
14021  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14022  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14023  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14024  OPENJDK_TARGET_CPU_ISADIR=""
14025  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14026    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14027      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14028    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14029      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14030    fi
14031  fi
14032
14033
14034  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14035  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14036  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14037    # On linux only, we replace x86 with i386.
14038    OPENJDK_TARGET_CPU_OSARCH="i386"
14039  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14040    # On all platforms except macosx, we replace x86_64 with amd64.
14041    OPENJDK_TARGET_CPU_OSARCH="amd64"
14042  fi
14043
14044
14045  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14046  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14047    OPENJDK_TARGET_CPU_JLI="i386"
14048  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14049    # On all platforms except macosx, we replace x86_64 with amd64.
14050    OPENJDK_TARGET_CPU_JLI="amd64"
14051  fi
14052  # Now setup the -D flags for building libjli.
14053  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14054  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14055    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14056      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14057    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14058      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14059    fi
14060  fi
14061
14062
14063  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14064      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14065  else
14066      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14067  fi
14068
14069
14070  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14071    A_LP64="LP64:="
14072    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14073    # unpack200.exe
14074    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14075      ADD_LP64="-D_LP64=1"
14076    fi
14077  fi
14078  LP64=$A_LP64
14079
14080
14081  if test "x$COMPILE_TYPE" = "xcross"; then
14082    # FIXME: ... or should this include reduced builds..?
14083    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14084  else
14085    DEFINE_CROSS_COMPILE_ARCH=""
14086  fi
14087
14088
14089  # ZERO_ARCHDEF is used to enable architecture-specific code
14090  case "${OPENJDK_TARGET_CPU}" in
14091    ppc)     ZERO_ARCHDEF=PPC32 ;;
14092    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14093    s390*)   ZERO_ARCHDEF=S390  ;;
14094    sparc*)  ZERO_ARCHDEF=SPARC ;;
14095    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14096    x86)     ZERO_ARCHDEF=IA32  ;;
14097    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14098  esac
14099
14100
14101
14102
14103# Continue setting up basic stuff. Most remaining code require fundamental tools.
14104
14105  # Save the current directory this script was started from
14106  CURDIR="$PWD"
14107
14108  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14109    PATH_SEP=";"
14110
14111  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14112  if test $SRC_ROOT_LENGTH -gt 100; then
14113    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14114  fi
14115
14116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14118$as_echo_n "checking cygwin release... " >&6; }
14119    CYGWIN_VERSION=`$UNAME -r`
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14121$as_echo "$CYGWIN_VERSION" >&6; }
14122    WINDOWS_ENV_VENDOR='cygwin'
14123    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14124
14125    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14126    if test "x$CYGWIN_VERSION_OLD" != x; then
14127      { $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
14128$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;}
14129      as_fn_error $? "Cannot continue" "$LINENO" 5
14130    fi
14131    if test "x$CYGPATH" = x; then
14132      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14133    fi
14134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14135$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14136    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14137    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14138    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14139    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14141$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14142    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14143    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14144    if test "x$test_cygdrive_prefix" = x; then
14145      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14146    fi
14147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14149$as_echo_n "checking msys release... " >&6; }
14150    MSYS_VERSION=`$UNAME -r`
14151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14152$as_echo "$MSYS_VERSION" >&6; }
14153
14154    WINDOWS_ENV_VENDOR='msys'
14155    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14156
14157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14158$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14159    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14160    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14161
14162  windows_path="$MSYS_ROOT_PATH"
14163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14164    unix_path=`$CYGPATH -u "$windows_path"`
14165    MSYS_ROOT_PATH="$unix_path"
14166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14168    MSYS_ROOT_PATH="$unix_path"
14169  fi
14170
14171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14172$as_echo "$MSYS_ROOT_PATH" >&6; }
14173    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14174  else
14175    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14176  fi
14177
14178  # Test if windows or unix (cygwin/msys) find is first in path.
14179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14180$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14181  FIND_BINARY_OUTPUT=`find --version 2>&1`
14182  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14184$as_echo "unix style" >&6; }
14185  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14187$as_echo "Windows" >&6; }
14188    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14189$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14190    { $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
14191$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14192    as_fn_error $? "Cannot continue" "$LINENO" 5
14193  else
14194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14195$as_echo "unknown" >&6; }
14196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14197$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14198  fi
14199
14200  else
14201    PATH_SEP=":"
14202  fi
14203
14204
14205  # We get the top-level directory from the supporting wrappers.
14206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14207$as_echo_n "checking for top-level directory... " >&6; }
14208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14209$as_echo "$TOPDIR" >&6; }
14210
14211
14212  # Save the original version of TOPDIR for string comparisons
14213  ORIGINAL_TOPDIR="$TOPDIR"
14214
14215
14216  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14217
14218  # Only process if variable expands to non-empty
14219
14220  if test "x$CURDIR" != x; then
14221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14222
14223  # Input might be given as Windows format, start by converting to
14224  # unix format.
14225  path="$CURDIR"
14226  new_path=`$CYGPATH -u "$path"`
14227
14228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14231  # "foo.exe" is OK but "foo" is an error.
14232  #
14233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14234  # It is also a way to make sure we got the proper file name for the real test later on.
14235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14236  if test "x$test_shortpath" = x; then
14237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14238$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14239    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14240  fi
14241
14242  # Call helper function which possibly converts this using DOS-style short mode.
14243  # If so, the updated path is stored in $new_path.
14244
14245  input_path="$new_path"
14246  # Check if we need to convert this using DOS-style short mode. If the path
14247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14248  # take no chances and rewrite it.
14249  # Note: m4 eats our [], so we need to use [ and ] instead.
14250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14251  if test "x$has_forbidden_chars" != x; then
14252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14256      # Going to short mode and back again did indeed matter. Since short mode is
14257      # case insensitive, let's make it lowercase to improve readability.
14258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14259      # Now convert it back to Unix-style (cygpath)
14260      input_path=`$CYGPATH -u "$shortmode_path"`
14261      new_path="$input_path"
14262    fi
14263  fi
14264
14265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14266  if test "x$test_cygdrive_prefix" = x; then
14267    # As a simple fix, exclude /usr/bin since it's not a real path.
14268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14270      # a path prefixed by /cygdrive for fixpath to work.
14271      new_path="$CYGWIN_ROOT_PATH$input_path"
14272    fi
14273  fi
14274
14275
14276  if test "x$path" != "x$new_path"; then
14277    CURDIR="$new_path"
14278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14279$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14280  fi
14281
14282    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14283
14284  path="$CURDIR"
14285  has_colon=`$ECHO $path | $GREP ^.:`
14286  new_path="$path"
14287  if test "x$has_colon" = x; then
14288    # Not in mixed or Windows style, start by that.
14289    new_path=`cmd //c echo $path`
14290  fi
14291
14292
14293  input_path="$new_path"
14294  # Check if we need to convert this using DOS-style short mode. If the path
14295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14296  # take no chances and rewrite it.
14297  # Note: m4 eats our [], so we need to use [ and ] instead.
14298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14299  if test "x$has_forbidden_chars" != x; then
14300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14302  fi
14303
14304
14305  windows_path="$new_path"
14306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14307    unix_path=`$CYGPATH -u "$windows_path"`
14308    new_path="$unix_path"
14309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14311    new_path="$unix_path"
14312  fi
14313
14314  if test "x$path" != "x$new_path"; then
14315    CURDIR="$new_path"
14316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14317$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14318  fi
14319
14320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14322
14323    else
14324      # We're on a unix platform. Hooray! :)
14325      path="$CURDIR"
14326      has_space=`$ECHO "$path" | $GREP " "`
14327      if test "x$has_space" != x; then
14328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14329$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14330        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14331      fi
14332
14333      # Use eval to expand a potential ~
14334      eval path="$path"
14335      if test ! -f "$path" && test ! -d "$path"; then
14336        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14337      fi
14338
14339      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14340    fi
14341  fi
14342
14343
14344  # Only process if variable expands to non-empty
14345
14346  if test "x$TOPDIR" != x; then
14347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14348
14349  # Input might be given as Windows format, start by converting to
14350  # unix format.
14351  path="$TOPDIR"
14352  new_path=`$CYGPATH -u "$path"`
14353
14354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14357  # "foo.exe" is OK but "foo" is an error.
14358  #
14359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14360  # It is also a way to make sure we got the proper file name for the real test later on.
14361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14362  if test "x$test_shortpath" = x; then
14363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14364$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14365    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14366  fi
14367
14368  # Call helper function which possibly converts this using DOS-style short mode.
14369  # If so, the updated path is stored in $new_path.
14370
14371  input_path="$new_path"
14372  # Check if we need to convert this using DOS-style short mode. If the path
14373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14374  # take no chances and rewrite it.
14375  # Note: m4 eats our [], so we need to use [ and ] instead.
14376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14377  if test "x$has_forbidden_chars" != x; then
14378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14382      # Going to short mode and back again did indeed matter. Since short mode is
14383      # case insensitive, let's make it lowercase to improve readability.
14384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14385      # Now convert it back to Unix-style (cygpath)
14386      input_path=`$CYGPATH -u "$shortmode_path"`
14387      new_path="$input_path"
14388    fi
14389  fi
14390
14391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14392  if test "x$test_cygdrive_prefix" = x; then
14393    # As a simple fix, exclude /usr/bin since it's not a real path.
14394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14396      # a path prefixed by /cygdrive for fixpath to work.
14397      new_path="$CYGWIN_ROOT_PATH$input_path"
14398    fi
14399  fi
14400
14401
14402  if test "x$path" != "x$new_path"; then
14403    TOPDIR="$new_path"
14404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14405$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14406  fi
14407
14408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14409
14410  path="$TOPDIR"
14411  has_colon=`$ECHO $path | $GREP ^.:`
14412  new_path="$path"
14413  if test "x$has_colon" = x; then
14414    # Not in mixed or Windows style, start by that.
14415    new_path=`cmd //c echo $path`
14416  fi
14417
14418
14419  input_path="$new_path"
14420  # Check if we need to convert this using DOS-style short mode. If the path
14421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14422  # take no chances and rewrite it.
14423  # Note: m4 eats our [], so we need to use [ and ] instead.
14424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14425  if test "x$has_forbidden_chars" != x; then
14426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14428  fi
14429
14430
14431  windows_path="$new_path"
14432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14433    unix_path=`$CYGPATH -u "$windows_path"`
14434    new_path="$unix_path"
14435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14437    new_path="$unix_path"
14438  fi
14439
14440  if test "x$path" != "x$new_path"; then
14441    TOPDIR="$new_path"
14442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14443$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14444  fi
14445
14446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14448
14449    else
14450      # We're on a unix platform. Hooray! :)
14451      path="$TOPDIR"
14452      has_space=`$ECHO "$path" | $GREP " "`
14453      if test "x$has_space" != x; then
14454        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14455$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14456        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14457      fi
14458
14459      # Use eval to expand a potential ~
14460      eval path="$path"
14461      if test ! -f "$path" && test ! -d "$path"; then
14462        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14463      fi
14464
14465      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14466    fi
14467  fi
14468
14469  # SRC_ROOT is a traditional alias for TOPDIR.
14470  SRC_ROOT=$TOPDIR
14471
14472  # Calculate a canonical version of TOPDIR for string comparisons
14473  CANONICAL_TOPDIR=$TOPDIR
14474
14475  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14476    # Follow a chain of symbolic links. Use readlink
14477    # where it exists, else fall back to horribly
14478    # complicated shell code.
14479    if test "x$READLINK_TESTED" != yes; then
14480      # On MacOSX there is a readlink tool with a different
14481      # purpose than the GNU readlink tool. Check the found readlink.
14482      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14483      if test "x$ISGNU" = x; then
14484        # A readlink that we do not know how to use.
14485        # Are there other non-GNU readlinks out there?
14486        READLINK_TESTED=yes
14487        READLINK=
14488      fi
14489    fi
14490
14491    if test "x$READLINK" != x; then
14492      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14493    else
14494      # Save the current directory for restoring afterwards
14495      STARTDIR=$PWD
14496      COUNTER=0
14497      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14498      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14499      cd $sym_link_dir
14500      # Use -P flag to resolve symlinks in directories.
14501      cd `$THEPWDCMD -P`
14502      sym_link_dir=`$THEPWDCMD -P`
14503      # Resolve file symlinks
14504      while test $COUNTER -lt 20; do
14505        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14506        if test "x$ISLINK" == x; then
14507          # This is not a symbolic link! We are done!
14508          break
14509        fi
14510        # Again resolve directory symlinks since the target of the just found
14511        # link could be in a different directory
14512        cd `$DIRNAME $ISLINK`
14513        sym_link_dir=`$THEPWDCMD -P`
14514        sym_link_file=`$BASENAME $ISLINK`
14515        let COUNTER=COUNTER+1
14516      done
14517      cd $STARTDIR
14518      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14519    fi
14520  fi
14521
14522
14523
14524  # Locate the directory of this script.
14525  AUTOCONF_DIR=$TOPDIR/common/autoconf
14526
14527
14528# Check if it's a pure open build or if custom sources are to be used.
14529
14530  # Check whether --enable-openjdk-only was given.
14531if test "${enable_openjdk_only+set}" = set; then :
14532  enableval=$enable_openjdk_only;
14533else
14534  enable_openjdk_only="no"
14535fi
14536
14537
14538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14539$as_echo_n "checking for presence of closed sources... " >&6; }
14540  if test -d "$SRC_ROOT/jdk/src/closed"; then
14541    CLOSED_SOURCE_PRESENT=yes
14542  else
14543    CLOSED_SOURCE_PRESENT=no
14544  fi
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14546$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14547
14548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14549$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14550  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14552$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14553
14554  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14555    OPENJDK=true
14556    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14557      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14558$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14559    fi
14560  else
14561    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14562      OPENJDK=true
14563    else
14564      OPENJDK=false
14565    fi
14566  fi
14567
14568  if test "x$OPENJDK" = "xtrue"; then
14569    SET_OPENJDK="OPENJDK=true"
14570  fi
14571
14572
14573
14574  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14575  # the IncludeCustomExtension macro.
14576
14577
14578# Check whether --with-custom-make-dir was given.
14579if test "${with_custom_make_dir+set}" = set; then :
14580  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
14581$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14582fi
14583
14584
14585
14586
14587# These are needed to be able to create a configuration name (and thus the output directory)
14588
14589  ###############################################################################
14590  #
14591  # Check which variant of the JDK that we want to build.
14592  # Currently we have:
14593  #    normal:   standard edition
14594  # but the custom make system may add other variants
14595  #
14596  # Effectively the JDK variant gives a name to a specific set of
14597  # modules to compile into the JDK. In the future, these modules
14598  # might even be Jigsaw modules.
14599  #
14600  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14601$as_echo_n "checking which variant of the JDK to build... " >&6; }
14602
14603# Check whether --with-jdk-variant was given.
14604if test "${with_jdk_variant+set}" = set; then :
14605  withval=$with_jdk_variant;
14606fi
14607
14608
14609  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14610    JDK_VARIANT="normal"
14611  else
14612    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14613  fi
14614
14615
14616
14617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14618$as_echo "$JDK_VARIANT" >&6; }
14619
14620
14621###############################################################################
14622#
14623# Check which interpreter of the JVM we want to build.
14624# Currently we have:
14625#    template: Template interpreter (the default)
14626#    cpp     : C++ interpreter
14627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14628$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14629
14630# Check whether --with-jvm-interpreter was given.
14631if test "${with_jvm_interpreter+set}" = set; then :
14632  withval=$with_jvm_interpreter;
14633fi
14634
14635
14636if test "x$with_jvm_interpreter" = x; then
14637     with_jvm_interpreter="template"
14638fi
14639
14640JVM_INTERPRETER="$with_jvm_interpreter"
14641
14642if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14643   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14644fi
14645
14646
14647
14648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14649$as_echo "$with_jvm_interpreter" >&6; }
14650
14651
14652
14653  ###############################################################################
14654  #
14655  # Check which variants of the JVM that we want to build.
14656  # Currently we have:
14657  #    server: normal interpreter and a tiered C1/C2 compiler
14658  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14659  #    minimal1: reduced form of client with optional VM services and features stripped out
14660  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14661  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14662  #    zero: no machine code interpreter, no compiler
14663  #    zeroshark: zero interpreter and shark/llvm compiler backend
14664#    core: interpreter only, no compiler (only works on some platforms)
14665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14666$as_echo_n "checking which variants of the JVM to build... " >&6; }
14667
14668# Check whether --with-jvm-variants was given.
14669if test "${with_jvm_variants+set}" = set; then :
14670  withval=$with_jvm_variants;
14671fi
14672
14673
14674  if test "x$with_jvm_variants" = x; then
14675    with_jvm_variants="server"
14676  fi
14677
14678  JVM_VARIANTS=",$with_jvm_variants,"
14679  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,//'`
14680
14681  if test "x$TEST_VARIANTS" != "x,"; then
14682     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14683  fi
14684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14685$as_echo "$with_jvm_variants" >&6; }
14686
14687  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14688  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14689  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14690  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14691  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14692  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14693  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14694
14695  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14696    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14697      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14698    fi
14699  fi
14700  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14701    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14702      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14703    fi
14704  fi
14705  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14706    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14707      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14708    fi
14709  fi
14710
14711  # Replace the commas with AND for use in the build directory name.
14712  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14713  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/'`
14714  if test "x$COUNT_VARIANTS" != "x,1"; then
14715    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14716  else
14717    BUILDING_MULTIPLE_JVM_VARIANTS=no
14718  fi
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729  INCLUDE_SA=true
14730  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14731    INCLUDE_SA=false
14732  fi
14733  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14734    INCLUDE_SA=false
14735  fi
14736  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14737    INCLUDE_SA=false
14738  fi
14739  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14740    INCLUDE_SA=false
14741  fi
14742
14743
14744  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14745    MACOSX_UNIVERSAL="true"
14746  fi
14747
14748
14749
14750
14751  ###############################################################################
14752  #
14753  # Set the debug level
14754  #    release: no debug information, all optimizations, no asserts.
14755  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14756  #    fastdebug: debug information (-g), all optimizations, all asserts
14757  #    slowdebug: debug information (-g), no optimizations, all asserts
14758  #
14759  DEBUG_LEVEL="release"
14760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14761$as_echo_n "checking which debug level to use... " >&6; }
14762  # Check whether --enable-debug was given.
14763if test "${enable_debug+set}" = set; then :
14764  enableval=$enable_debug;
14765        ENABLE_DEBUG="${enableval}"
14766        DEBUG_LEVEL="fastdebug"
14767
14768else
14769  ENABLE_DEBUG="no"
14770fi
14771
14772
14773
14774# Check whether --with-debug-level was given.
14775if test "${with_debug_level+set}" = set; then :
14776  withval=$with_debug_level;
14777        DEBUG_LEVEL="${withval}"
14778        if test "x$ENABLE_DEBUG" = xyes; then
14779          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14780        fi
14781
14782fi
14783
14784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14785$as_echo "$DEBUG_LEVEL" >&6; }
14786
14787  if test "x$DEBUG_LEVEL" != xrelease && \
14788      test "x$DEBUG_LEVEL" != xoptimized && \
14789      test "x$DEBUG_LEVEL" != xfastdebug && \
14790      test "x$DEBUG_LEVEL" != xslowdebug; then
14791    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14792  fi
14793
14794
14795  ###############################################################################
14796  #
14797  # Setup legacy vars/targets and new vars to deal with different debug levels.
14798  #
14799
14800  case $DEBUG_LEVEL in
14801    release )
14802      VARIANT="OPT"
14803      FASTDEBUG="false"
14804      DEBUG_CLASSFILES="false"
14805      BUILD_VARIANT_RELEASE=""
14806      HOTSPOT_DEBUG_LEVEL="product"
14807      HOTSPOT_EXPORT="product"
14808      ;;
14809    fastdebug )
14810      VARIANT="DBG"
14811      FASTDEBUG="true"
14812      DEBUG_CLASSFILES="true"
14813      BUILD_VARIANT_RELEASE="-fastdebug"
14814      HOTSPOT_DEBUG_LEVEL="fastdebug"
14815      HOTSPOT_EXPORT="fastdebug"
14816      ;;
14817    slowdebug )
14818      VARIANT="DBG"
14819      FASTDEBUG="false"
14820      DEBUG_CLASSFILES="true"
14821      BUILD_VARIANT_RELEASE="-debug"
14822      HOTSPOT_DEBUG_LEVEL="debug"
14823      HOTSPOT_EXPORT="debug"
14824      ;;
14825    optimized )
14826      VARIANT="OPT"
14827      FASTDEBUG="false"
14828      DEBUG_CLASSFILES="false"
14829      BUILD_VARIANT_RELEASE="-optimized"
14830      HOTSPOT_DEBUG_LEVEL="optimized"
14831      HOTSPOT_EXPORT="optimized"
14832      ;;
14833  esac
14834
14835  # The debug level 'optimized' is a little special because it is currently only
14836  # applicable to the HotSpot build where it means to build a completely
14837  # optimized version of the VM without any debugging code (like for the
14838  # 'release' debug level which is called 'product' in the HotSpot build) but
14839  # with the exception that it can contain additional code which is otherwise
14840  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14841  # test new and/or experimental features which are not intended for customer
14842  # shipment. Because these new features need to be tested and benchmarked in
14843  # real world scenarios, we want to build the containing JDK at the 'release'
14844  # debug level.
14845  if test "x$DEBUG_LEVEL" = xoptimized; then
14846    DEBUG_LEVEL="release"
14847  fi
14848
14849  #####
14850  # Generate the legacy makefile targets for hotspot.
14851  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14852  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14853  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14854  # But until then ...
14855  HOTSPOT_TARGET=""
14856
14857  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14858    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14859  fi
14860
14861  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14862    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14863  fi
14864
14865  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14866    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14867  fi
14868
14869  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14870    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14871  fi
14872
14873  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14874    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14875  fi
14876
14877  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14878    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14879  fi
14880
14881  if test "x$JVM_VARIANT_CORE" = xtrue; then
14882    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14883  fi
14884
14885  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14886
14887  # On Macosx universal binaries are produced, but they only contain
14888  # 64 bit intel. This invalidates control of which jvms are built
14889  # from configure, but only server is valid anyway. Fix this
14890  # when hotspot makefiles are rewritten.
14891  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14892    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14893  fi
14894
14895  #####
14896
14897
14898
14899
14900
14901
14902
14903
14904# With basic setup done, call the custom early hook.
14905
14906
14907# Check if we have devkits, extra paths or sysroot set.
14908
14909
14910# Check whether --with-devkit was given.
14911if test "${with_devkit+set}" = set; then :
14912  withval=$with_devkit;
14913
14914  # Only process if variable expands to non-empty
14915
14916  if test "x$with_devkit" != x; then
14917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14918
14919  # Input might be given as Windows format, start by converting to
14920  # unix format.
14921  path="$with_devkit"
14922  new_path=`$CYGPATH -u "$path"`
14923
14924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14927  # "foo.exe" is OK but "foo" is an error.
14928  #
14929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14930  # It is also a way to make sure we got the proper file name for the real test later on.
14931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14932  if test "x$test_shortpath" = x; then
14933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14934$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14935    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14936  fi
14937
14938  # Call helper function which possibly converts this using DOS-style short mode.
14939  # If so, the updated path is stored in $new_path.
14940
14941  input_path="$new_path"
14942  # Check if we need to convert this using DOS-style short mode. If the path
14943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14944  # take no chances and rewrite it.
14945  # Note: m4 eats our [], so we need to use [ and ] instead.
14946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14947  if test "x$has_forbidden_chars" != x; then
14948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14952      # Going to short mode and back again did indeed matter. Since short mode is
14953      # case insensitive, let's make it lowercase to improve readability.
14954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14955      # Now convert it back to Unix-style (cygpath)
14956      input_path=`$CYGPATH -u "$shortmode_path"`
14957      new_path="$input_path"
14958    fi
14959  fi
14960
14961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14962  if test "x$test_cygdrive_prefix" = x; then
14963    # As a simple fix, exclude /usr/bin since it's not a real path.
14964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14966      # a path prefixed by /cygdrive for fixpath to work.
14967      new_path="$CYGWIN_ROOT_PATH$input_path"
14968    fi
14969  fi
14970
14971
14972  if test "x$path" != "x$new_path"; then
14973    with_devkit="$new_path"
14974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14975$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14976  fi
14977
14978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14979
14980  path="$with_devkit"
14981  has_colon=`$ECHO $path | $GREP ^.:`
14982  new_path="$path"
14983  if test "x$has_colon" = x; then
14984    # Not in mixed or Windows style, start by that.
14985    new_path=`cmd //c echo $path`
14986  fi
14987
14988
14989  input_path="$new_path"
14990  # Check if we need to convert this using DOS-style short mode. If the path
14991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14992  # take no chances and rewrite it.
14993  # Note: m4 eats our [], so we need to use [ and ] instead.
14994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14995  if test "x$has_forbidden_chars" != x; then
14996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14998  fi
14999
15000
15001  windows_path="$new_path"
15002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15003    unix_path=`$CYGPATH -u "$windows_path"`
15004    new_path="$unix_path"
15005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15007    new_path="$unix_path"
15008  fi
15009
15010  if test "x$path" != "x$new_path"; then
15011    with_devkit="$new_path"
15012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15013$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15014  fi
15015
15016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15018
15019    else
15020      # We're on a unix platform. Hooray! :)
15021      path="$with_devkit"
15022      has_space=`$ECHO "$path" | $GREP " "`
15023      if test "x$has_space" != x; then
15024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15025$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15026        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15027      fi
15028
15029      # Use eval to expand a potential ~
15030      eval path="$path"
15031      if test ! -f "$path" && test ! -d "$path"; then
15032        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15033      fi
15034
15035      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15036    fi
15037  fi
15038
15039        DEVKIT_ROOT="$with_devkit"
15040        # Check for a meta data info file in the root of the devkit
15041        if test -f "$DEVKIT_ROOT/devkit.info"; then
15042          . $DEVKIT_ROOT/devkit.info
15043          # This potentially sets the following:
15044          # A descriptive name of the devkit
15045
15046  if test "x$DEVKIT_NAME" = x; then
15047    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15048  fi
15049
15050          # Corresponds to --with-extra-path
15051
15052  if test "x$DEVKIT_EXTRA_PATH" = x; then
15053    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15054  fi
15055
15056          # Corresponds to --with-toolchain-path
15057
15058  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15059    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15060  fi
15061
15062          # Corresponds to --with-sysroot
15063
15064  if test "x$DEVKIT_SYSROOT" = x; then
15065    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15066  fi
15067
15068
15069          # Identifies the Visual Studio version in the devkit
15070
15071  if test "x$DEVKIT_VS_VERSION" = x; then
15072    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15073  fi
15074
15075          # The Visual Studio include environment variable
15076
15077  if test "x$DEVKIT_VS_INCLUDE" = x; then
15078    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15079  fi
15080
15081          # The Visual Studio lib environment variable
15082
15083  if test "x$DEVKIT_VS_LIB" = x; then
15084    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15085  fi
15086
15087          # Corresponds to --with-msvcr-dll
15088
15089  if test "x$DEVKIT_MSVCR_DLL" = x; then
15090    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15091  fi
15092
15093          # Corresponds to --with-msvcp-dll
15094
15095  if test "x$DEVKIT_MSVCP_DLL" = x; then
15096    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15097  fi
15098
15099        fi
15100
15101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15102$as_echo_n "checking for devkit... " >&6; }
15103        if test "x$DEVKIT_NAME" != x; then
15104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15105$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15106        else
15107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15108$as_echo "$DEVKIT_ROOT" >&6; }
15109        fi
15110
15111
15112  if test "x$DEVKIT_EXTRA_PATH" != x; then
15113    if test "x$EXTRA_PATH" = x; then
15114      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15115    else
15116      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15117    fi
15118  fi
15119
15120
15121        # Fallback default of just /bin if DEVKIT_PATH is not defined
15122        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15123          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15124        fi
15125
15126  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15127    if test "x$TOOLCHAIN_PATH" = x; then
15128      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15129    else
15130      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15131    fi
15132  fi
15133
15134
15135        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15136        # places for backwards compatiblity.
15137        if test "x$DEVKIT_SYSROOT" != x; then
15138          SYSROOT="$DEVKIT_SYSROOT"
15139        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15140          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15141        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15142          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15143        fi
15144
15145
15146fi
15147
15148
15149  # You can force the sysroot if the sysroot encoded into the compiler tools
15150  # is not correct.
15151
15152# Check whether --with-sys-root was given.
15153if test "${with_sys_root+set}" = set; then :
15154  withval=$with_sys_root; SYSROOT=$with_sys_root
15155
15156fi
15157
15158
15159
15160# Check whether --with-sysroot was given.
15161if test "${with_sysroot+set}" = set; then :
15162  withval=$with_sysroot; SYSROOT=$with_sysroot
15163
15164fi
15165
15166
15167
15168# Check whether --with-tools-dir was given.
15169if test "${with_tools_dir+set}" = set; then :
15170  withval=$with_tools_dir;
15171  if test "x$with_tools_dir" != x; then
15172    if test "x$TOOLCHAIN_PATH" = x; then
15173      TOOLCHAIN_PATH="$with_tools_dir"
15174    else
15175      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15176    fi
15177  fi
15178
15179
15180fi
15181
15182
15183
15184# Check whether --with-toolchain-path was given.
15185if test "${with_toolchain_path+set}" = set; then :
15186  withval=$with_toolchain_path;
15187  if test "x$with_toolchain_path" != x; then
15188    if test "x$TOOLCHAIN_PATH" = x; then
15189      TOOLCHAIN_PATH="$with_toolchain_path"
15190    else
15191      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15192    fi
15193  fi
15194
15195
15196fi
15197
15198
15199
15200# Check whether --with-extra-path was given.
15201if test "${with_extra_path+set}" = set; then :
15202  withval=$with_extra_path;
15203  if test "x$with_extra_path" != x; then
15204    if test "x$EXTRA_PATH" = x; then
15205      EXTRA_PATH="$with_extra_path"
15206    else
15207      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15208    fi
15209  fi
15210
15211
15212fi
15213
15214
15215  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15216    # detect if Xcode is installed by running xcodebuild -version
15217    # if no Xcode installed, xcodebuild exits with 1
15218    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15219    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15220      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15221      # fall back on the stub binary in /usr/bin/xcodebuild
15222      # Extract the first word of "xcodebuild", so it can be a program name with args.
15223set dummy xcodebuild; ac_word=$2
15224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15225$as_echo_n "checking for $ac_word... " >&6; }
15226if ${ac_cv_path_XCODEBUILD+:} false; then :
15227  $as_echo_n "(cached) " >&6
15228else
15229  case $XCODEBUILD in
15230  [\\/]* | ?:[\\/]*)
15231  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15232  ;;
15233  *)
15234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15235for as_dir in $TOOLCHAIN_PATH
15236do
15237  IFS=$as_save_IFS
15238  test -z "$as_dir" && as_dir=.
15239    for ac_exec_ext in '' $ac_executable_extensions; do
15240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15241    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15243    break 2
15244  fi
15245done
15246  done
15247IFS=$as_save_IFS
15248
15249  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15250  ;;
15251esac
15252fi
15253XCODEBUILD=$ac_cv_path_XCODEBUILD
15254if test -n "$XCODEBUILD"; then
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15256$as_echo "$XCODEBUILD" >&6; }
15257else
15258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15259$as_echo "no" >&6; }
15260fi
15261
15262
15263    else
15264      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15265      # when only the command line tools are installed there are no SDKs, so headers
15266      # are copied into the system frameworks
15267      XCODEBUILD=
15268
15269    fi
15270
15271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15272$as_echo_n "checking for sdk name... " >&6; }
15273
15274# Check whether --with-sdk-name was given.
15275if test "${with_sdk_name+set}" = set; then :
15276  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15277
15278fi
15279
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15281$as_echo "$SDKNAME" >&6; }
15282
15283    # if toolchain path is specified then don't rely on system headers, they may not compile
15284    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15285    test -z "$TOOLCHAIN_PATH" && \
15286      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15287
15288    if test -z "$SYSROOT"; then
15289      if test -n "$XCODEBUILD"; then
15290        # if we don't have system headers, use default SDK name (last resort)
15291        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15292          SDKNAME=${SDKNAME:-macosx}
15293        fi
15294
15295        if test -n "$SDKNAME"; then
15296          # Call xcodebuild to determine SYSROOT
15297          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15298        fi
15299      else
15300        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15301          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
15302        fi
15303      fi
15304    else
15305      # warn user if --with-sdk-name was also set
15306      if test -n "$with_sdk_name"; then
15307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15308$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15309      fi
15310    fi
15311
15312    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15313      # If no system framework headers, then SYSROOT must be set, or we won't build
15314      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
15315    fi
15316
15317    # Perform a basic sanity test
15318    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15319      if test -z "$SYSROOT"; then
15320        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
15321      else
15322        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15323      fi
15324    fi
15325
15326    # set SDKROOT too, Xcode tools will pick it up
15327    SDKROOT=$SYSROOT
15328
15329  fi
15330
15331  # Prepend the extra path to the global path
15332
15333  if test "x$EXTRA_PATH" != x; then
15334    if test "x$PATH" = x; then
15335      PATH="$EXTRA_PATH"
15336    else
15337      PATH="$EXTRA_PATH:$PATH"
15338    fi
15339  fi
15340
15341
15342  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15343    # Add extra search paths on solaris for utilities like ar and as etc...
15344    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15345  fi
15346
15347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15348$as_echo_n "checking for sysroot... " >&6; }
15349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15350$as_echo "$SYSROOT" >&6; }
15351  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15352$as_echo_n "checking for toolchain path... " >&6; }
15353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15354$as_echo "$TOOLCHAIN_PATH" >&6; }
15355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15356$as_echo_n "checking for extra path... " >&6; }
15357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15358$as_echo "$EXTRA_PATH" >&6; }
15359
15360
15361# To properly create a configuration name, we need to have the OpenJDK target
15362# and options (variants and debug level) parsed.
15363
15364
15365
15366# Check whether --with-conf-name was given.
15367if test "${with_conf_name+set}" = set; then :
15368  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15369fi
15370
15371
15372  # Test from where we are running configure, in or outside of src root.
15373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15374$as_echo_n "checking where to store configuration... " >&6; }
15375  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15376      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15377      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15378    # We are running configure from the src root.
15379    # Create a default ./build/target-variant-debuglevel output root.
15380    if test "x${CONF_NAME}" = x; then
15381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15382$as_echo "in default location" >&6; }
15383      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15384    else
15385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15386$as_echo "in build directory with custom name" >&6; }
15387    fi
15388    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15389    $MKDIR -p "$OUTPUT_ROOT"
15390    if test ! -d "$OUTPUT_ROOT"; then
15391      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15392    fi
15393  else
15394    # We are running configure from outside of the src dir.
15395    # Then use the current directory as output dir!
15396    # If configuration is situated in normal build directory, just use the build
15397    # directory name as configuration name, otherwise use the complete path.
15398    if test "x${CONF_NAME}" = x; then
15399      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15400    fi
15401    OUTPUT_ROOT="$CURDIR"
15402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15403$as_echo "in current directory" >&6; }
15404
15405    # WARNING: This might be a bad thing to do. You need to be sure you want to
15406    # have a configuration in this directory. Do some sanity checks!
15407
15408    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15409      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15410      # other files
15411      files_present=`$LS $OUTPUT_ROOT`
15412      # Configure has already touched config.log and confdefs.h in the current dir when this check
15413      # is performed.
15414      filtered_files=`$ECHO "$files_present" \
15415          | $SED -e 's/config.log//g' \
15416              -e 's/configure.log//g' \
15417              -e 's/confdefs.h//g' \
15418              -e 's/ //g' \
15419          | $TR -d '\n'`
15420      if test "x$filtered_files" != x; then
15421        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15422$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15423        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15424$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15425        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15426$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15427        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15428$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15429        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15430$as_echo "$as_me: seriously mess up just about everything." >&6;}
15431        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15432$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15433        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15434$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15435        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15436      fi
15437    fi
15438  fi
15439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15440$as_echo_n "checking what configuration name to use... " >&6; }
15441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15442$as_echo "$CONF_NAME" >&6; }
15443
15444
15445  # Only process if variable expands to non-empty
15446
15447  if test "x$OUTPUT_ROOT" != x; then
15448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15449
15450  # Input might be given as Windows format, start by converting to
15451  # unix format.
15452  path="$OUTPUT_ROOT"
15453  new_path=`$CYGPATH -u "$path"`
15454
15455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15458  # "foo.exe" is OK but "foo" is an error.
15459  #
15460  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15461  # It is also a way to make sure we got the proper file name for the real test later on.
15462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15463  if test "x$test_shortpath" = x; then
15464    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15465$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15466    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15467  fi
15468
15469  # Call helper function which possibly converts this using DOS-style short mode.
15470  # If so, the updated path is stored in $new_path.
15471
15472  input_path="$new_path"
15473  # Check if we need to convert this using DOS-style short mode. If the path
15474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15475  # take no chances and rewrite it.
15476  # Note: m4 eats our [], so we need to use [ and ] instead.
15477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15478  if test "x$has_forbidden_chars" != x; then
15479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15483      # Going to short mode and back again did indeed matter. Since short mode is
15484      # case insensitive, let's make it lowercase to improve readability.
15485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15486      # Now convert it back to Unix-style (cygpath)
15487      input_path=`$CYGPATH -u "$shortmode_path"`
15488      new_path="$input_path"
15489    fi
15490  fi
15491
15492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15493  if test "x$test_cygdrive_prefix" = x; then
15494    # As a simple fix, exclude /usr/bin since it's not a real path.
15495    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15497      # a path prefixed by /cygdrive for fixpath to work.
15498      new_path="$CYGWIN_ROOT_PATH$input_path"
15499    fi
15500  fi
15501
15502
15503  if test "x$path" != "x$new_path"; then
15504    OUTPUT_ROOT="$new_path"
15505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15506$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15507  fi
15508
15509    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15510
15511  path="$OUTPUT_ROOT"
15512  has_colon=`$ECHO $path | $GREP ^.:`
15513  new_path="$path"
15514  if test "x$has_colon" = x; then
15515    # Not in mixed or Windows style, start by that.
15516    new_path=`cmd //c echo $path`
15517  fi
15518
15519
15520  input_path="$new_path"
15521  # Check if we need to convert this using DOS-style short mode. If the path
15522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15523  # take no chances and rewrite it.
15524  # Note: m4 eats our [], so we need to use [ and ] instead.
15525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15526  if test "x$has_forbidden_chars" != x; then
15527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15529  fi
15530
15531
15532  windows_path="$new_path"
15533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15534    unix_path=`$CYGPATH -u "$windows_path"`
15535    new_path="$unix_path"
15536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15538    new_path="$unix_path"
15539  fi
15540
15541  if test "x$path" != "x$new_path"; then
15542    OUTPUT_ROOT="$new_path"
15543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15544$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15545  fi
15546
15547  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15548  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15549
15550    else
15551      # We're on a unix platform. Hooray! :)
15552      path="$OUTPUT_ROOT"
15553      has_space=`$ECHO "$path" | $GREP " "`
15554      if test "x$has_space" != x; then
15555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15556$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15557        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15558      fi
15559
15560      # Use eval to expand a potential ~
15561      eval path="$path"
15562      if test ! -f "$path" && test ! -d "$path"; then
15563        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15564      fi
15565
15566      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15567    fi
15568  fi
15569
15570
15571  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15572  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15573
15574  SPEC=$OUTPUT_ROOT/spec.gmk
15575
15576  CONF_NAME=$CONF_NAME
15577
15578  OUTPUT_ROOT=$OUTPUT_ROOT
15579
15580
15581
15582  # The spec.gmk file contains all variables for the make system.
15583  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15584
15585  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15586  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15587
15588  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15589  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15590
15591  # The compare.sh is used to compare the build output to other builds.
15592  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15593
15594  # The generated Makefile knows where the spec.gmk is and where the source is.
15595  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15596  # which will look for generated configurations
15597  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15598
15599
15600
15601# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15602
15603  for ac_prog in apt-get yum port pkgutil pkgadd
15604do
15605  # Extract the first word of "$ac_prog", so it can be a program name with args.
15606set dummy $ac_prog; ac_word=$2
15607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15608$as_echo_n "checking for $ac_word... " >&6; }
15609if ${ac_cv_prog_PKGHANDLER+:} false; then :
15610  $as_echo_n "(cached) " >&6
15611else
15612  if test -n "$PKGHANDLER"; then
15613  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15614else
15615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15616for as_dir in $PATH
15617do
15618  IFS=$as_save_IFS
15619  test -z "$as_dir" && as_dir=.
15620    for ac_exec_ext in '' $ac_executable_extensions; do
15621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15622    ac_cv_prog_PKGHANDLER="$ac_prog"
15623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15624    break 2
15625  fi
15626done
15627  done
15628IFS=$as_save_IFS
15629
15630fi
15631fi
15632PKGHANDLER=$ac_cv_prog_PKGHANDLER
15633if test -n "$PKGHANDLER"; then
15634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15635$as_echo "$PKGHANDLER" >&6; }
15636else
15637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15638$as_echo "no" >&6; }
15639fi
15640
15641
15642  test -n "$PKGHANDLER" && break
15643done
15644
15645
15646
15647# Setup tools that requires more complex handling, or that is not needed by the configure script.
15648
15649
15650  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15651  if test "x$MAKE" != x; then
15652    # User has supplied a make, test it.
15653    if test ! -f "$MAKE"; then
15654      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15655    fi
15656
15657  MAKE_CANDIDATE=""$MAKE""
15658  DESCRIPTION="user supplied MAKE=$MAKE"
15659
15660  # On Cygwin, we require a newer version of make than on other platforms
15661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15662    MAKE_VERSION_EXPR="-e 4\."
15663    MAKE_REQUIRED_VERSION="4.0"
15664   else
15665    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15666    MAKE_REQUIRED_VERSION="3.81"
15667  fi
15668
15669  if test "x$MAKE_CANDIDATE" != x; then
15670    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15671$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15672    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15673    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15674    if test "x$IS_GNU_MAKE" = x; then
15675      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15676$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15677    else
15678      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15679      if test "x$IS_MODERN_MAKE" = x; then
15680        { $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
15681$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;}
15682      else
15683        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15684          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15685            MAKE_EXPECTED_ENV='cygwin'
15686          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15687            MAKE_EXPECTED_ENV='msys'
15688          else
15689            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15690          fi
15691          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15692          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15693        else
15694          # Not relevant for non-Windows
15695          IS_MAKE_CORRECT_ENV=true
15696        fi
15697        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15698          { $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
15699$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;}
15700        else
15701          FOUND_MAKE=$MAKE_CANDIDATE
15702
15703  # Only process if variable expands to non-empty
15704
15705  if test "x$FOUND_MAKE" != x; then
15706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15707
15708  # First separate the path from the arguments. This will split at the first
15709  # space.
15710  complete="$FOUND_MAKE"
15711  path="${complete%% *}"
15712  tmp="$complete EOL"
15713  arguments="${tmp#* }"
15714
15715  # Input might be given as Windows format, start by converting to
15716  # unix format.
15717  new_path=`$CYGPATH -u "$path"`
15718
15719  # Now try to locate executable using which
15720  new_path=`$WHICH "$new_path" 2> /dev/null`
15721  # bat and cmd files are not always considered executable in cygwin causing which
15722  # to not find them
15723  if test "x$new_path" = x \
15724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15726    new_path=`$CYGPATH -u "$path"`
15727  fi
15728  if test "x$new_path" = x; then
15729    # Oops. Which didn't find the executable.
15730    # The splitting of arguments from the executable at a space might have been incorrect,
15731    # since paths with space are more likely in Windows. Give it another try with the whole
15732    # argument.
15733    path="$complete"
15734    arguments="EOL"
15735    new_path=`$CYGPATH -u "$path"`
15736    new_path=`$WHICH "$new_path" 2> /dev/null`
15737    # bat and cmd files are not always considered executable in cygwin causing which
15738    # to not find them
15739    if test "x$new_path" = x \
15740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15742      new_path=`$CYGPATH -u "$path"`
15743    fi
15744    if test "x$new_path" = x; then
15745      # It's still not found. Now this is an unrecoverable error.
15746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15747$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15748      has_space=`$ECHO "$complete" | $GREP " "`
15749      if test "x$has_space" != x; then
15750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15752      fi
15753      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15754    fi
15755  fi
15756
15757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15760  # "foo.exe" is OK but "foo" is an error.
15761  #
15762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15763  # It is also a way to make sure we got the proper file name for the real test later on.
15764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15765  if test "x$test_shortpath" = x; then
15766    # Short path failed, file does not exist as specified.
15767    # Try adding .exe or .cmd
15768    if test -f "${new_path}.exe"; then
15769      input_to_shortpath="${new_path}.exe"
15770    elif test -f "${new_path}.cmd"; then
15771      input_to_shortpath="${new_path}.cmd"
15772    else
15773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15774$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15777      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15778    fi
15779  else
15780    input_to_shortpath="$new_path"
15781  fi
15782
15783  # Call helper function which possibly converts this using DOS-style short mode.
15784  # If so, the updated path is stored in $new_path.
15785  new_path="$input_to_shortpath"
15786
15787  input_path="$input_to_shortpath"
15788  # Check if we need to convert this using DOS-style short mode. If the path
15789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15790  # take no chances and rewrite it.
15791  # Note: m4 eats our [], so we need to use [ and ] instead.
15792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15793  if test "x$has_forbidden_chars" != x; then
15794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15798      # Going to short mode and back again did indeed matter. Since short mode is
15799      # case insensitive, let's make it lowercase to improve readability.
15800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15801      # Now convert it back to Unix-style (cygpath)
15802      input_path=`$CYGPATH -u "$shortmode_path"`
15803      new_path="$input_path"
15804    fi
15805  fi
15806
15807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15808  if test "x$test_cygdrive_prefix" = x; then
15809    # As a simple fix, exclude /usr/bin since it's not a real path.
15810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15812      # a path prefixed by /cygdrive for fixpath to work.
15813      new_path="$CYGWIN_ROOT_PATH$input_path"
15814    fi
15815  fi
15816
15817  # remove trailing .exe if any
15818  new_path="${new_path/%.exe/}"
15819
15820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15821
15822  # First separate the path from the arguments. This will split at the first
15823  # space.
15824  complete="$FOUND_MAKE"
15825  path="${complete%% *}"
15826  tmp="$complete EOL"
15827  arguments="${tmp#* }"
15828
15829  # Input might be given as Windows format, start by converting to
15830  # unix format.
15831  new_path="$path"
15832
15833  windows_path="$new_path"
15834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15835    unix_path=`$CYGPATH -u "$windows_path"`
15836    new_path="$unix_path"
15837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15839    new_path="$unix_path"
15840  fi
15841
15842
15843  # Now try to locate executable using which
15844  new_path=`$WHICH "$new_path" 2> /dev/null`
15845
15846  if test "x$new_path" = x; then
15847    # Oops. Which didn't find the executable.
15848    # The splitting of arguments from the executable at a space might have been incorrect,
15849    # since paths with space are more likely in Windows. Give it another try with the whole
15850    # argument.
15851    path="$complete"
15852    arguments="EOL"
15853    new_path="$path"
15854
15855  windows_path="$new_path"
15856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15857    unix_path=`$CYGPATH -u "$windows_path"`
15858    new_path="$unix_path"
15859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15861    new_path="$unix_path"
15862  fi
15863
15864
15865    new_path=`$WHICH "$new_path" 2> /dev/null`
15866    # bat and cmd files are not always considered executable in MSYS causing which
15867    # to not find them
15868    if test "x$new_path" = x \
15869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15871      new_path="$path"
15872
15873  windows_path="$new_path"
15874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15875    unix_path=`$CYGPATH -u "$windows_path"`
15876    new_path="$unix_path"
15877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15879    new_path="$unix_path"
15880  fi
15881
15882    fi
15883
15884    if test "x$new_path" = x; then
15885      # It's still not found. Now this is an unrecoverable error.
15886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15887$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15888      has_space=`$ECHO "$complete" | $GREP " "`
15889      if test "x$has_space" != x; then
15890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15892      fi
15893      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15894    fi
15895  fi
15896
15897  # Now new_path has a complete unix path to the binary
15898  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15899    # Keep paths in /bin as-is, but remove trailing .exe if any
15900    new_path="${new_path/%.exe/}"
15901    # Do not save /bin paths to all_fixpath_prefixes!
15902  else
15903    # Not in mixed or Windows style, start by that.
15904    new_path=`cmd //c echo $new_path`
15905
15906  input_path="$new_path"
15907  # Check if we need to convert this using DOS-style short mode. If the path
15908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15909  # take no chances and rewrite it.
15910  # Note: m4 eats our [], so we need to use [ and ] instead.
15911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15912  if test "x$has_forbidden_chars" != x; then
15913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15915  fi
15916
15917    # Output is in $new_path
15918
15919  windows_path="$new_path"
15920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15921    unix_path=`$CYGPATH -u "$windows_path"`
15922    new_path="$unix_path"
15923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15925    new_path="$unix_path"
15926  fi
15927
15928    # remove trailing .exe if any
15929    new_path="${new_path/%.exe/}"
15930
15931    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15932    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15933  fi
15934
15935    else
15936      # We're on a unix platform. Hooray! :)
15937      # First separate the path from the arguments. This will split at the first
15938      # space.
15939      complete="$FOUND_MAKE"
15940      path="${complete%% *}"
15941      tmp="$complete EOL"
15942      arguments="${tmp#* }"
15943
15944      # Cannot rely on the command "which" here since it doesn't always work.
15945      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15946      if test -z "$is_absolute_path"; then
15947        # Path to executable is not absolute. Find it.
15948        IFS_save="$IFS"
15949        IFS=:
15950        for p in $PATH; do
15951          if test -f "$p/$path" && test -x "$p/$path"; then
15952            new_path="$p/$path"
15953            break
15954          fi
15955        done
15956        IFS="$IFS_save"
15957      else
15958        # This is an absolute path, we can use it without further modifications.
15959        new_path="$path"
15960      fi
15961
15962      if test "x$new_path" = x; then
15963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15965        has_space=`$ECHO "$complete" | $GREP " "`
15966        if test "x$has_space" != x; then
15967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15969        fi
15970        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15971      fi
15972    fi
15973
15974    # Now join together the path and the arguments once again
15975    if test "x$arguments" != xEOL; then
15976      new_complete="$new_path ${arguments% *}"
15977    else
15978      new_complete="$new_path"
15979    fi
15980
15981    if test "x$complete" != "x$new_complete"; then
15982      FOUND_MAKE="$new_complete"
15983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15984$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15985    fi
15986  fi
15987
15988        fi
15989      fi
15990    fi
15991  fi
15992
15993    if test "x$FOUND_MAKE" = x; then
15994      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15995    fi
15996  else
15997    # Try our hardest to locate a correct version of GNU make
15998    for ac_prog in gmake
15999do
16000  # Extract the first word of "$ac_prog", so it can be a program name with args.
16001set dummy $ac_prog; ac_word=$2
16002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16003$as_echo_n "checking for $ac_word... " >&6; }
16004if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16005  $as_echo_n "(cached) " >&6
16006else
16007  case $CHECK_GMAKE in
16008  [\\/]* | ?:[\\/]*)
16009  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16010  ;;
16011  *)
16012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16013for as_dir in $PATH
16014do
16015  IFS=$as_save_IFS
16016  test -z "$as_dir" && as_dir=.
16017    for ac_exec_ext in '' $ac_executable_extensions; do
16018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16019    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16021    break 2
16022  fi
16023done
16024  done
16025IFS=$as_save_IFS
16026
16027  ;;
16028esac
16029fi
16030CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16031if test -n "$CHECK_GMAKE"; then
16032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16033$as_echo "$CHECK_GMAKE" >&6; }
16034else
16035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16036$as_echo "no" >&6; }
16037fi
16038
16039
16040  test -n "$CHECK_GMAKE" && break
16041done
16042
16043
16044  MAKE_CANDIDATE=""$CHECK_GMAKE""
16045  DESCRIPTION="gmake in PATH"
16046
16047  # On Cygwin, we require a newer version of make than on other platforms
16048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16049    MAKE_VERSION_EXPR="-e 4\."
16050    MAKE_REQUIRED_VERSION="4.0"
16051   else
16052    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16053    MAKE_REQUIRED_VERSION="3.81"
16054  fi
16055
16056  if test "x$MAKE_CANDIDATE" != x; then
16057    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16058$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16059    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16060    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16061    if test "x$IS_GNU_MAKE" = x; then
16062      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16063$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16064    else
16065      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16066      if test "x$IS_MODERN_MAKE" = x; then
16067        { $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
16068$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;}
16069      else
16070        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16071          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16072            MAKE_EXPECTED_ENV='cygwin'
16073          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16074            MAKE_EXPECTED_ENV='msys'
16075          else
16076            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16077          fi
16078          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16079          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16080        else
16081          # Not relevant for non-Windows
16082          IS_MAKE_CORRECT_ENV=true
16083        fi
16084        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16085          { $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
16086$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;}
16087        else
16088          FOUND_MAKE=$MAKE_CANDIDATE
16089
16090  # Only process if variable expands to non-empty
16091
16092  if test "x$FOUND_MAKE" != x; then
16093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16094
16095  # First separate the path from the arguments. This will split at the first
16096  # space.
16097  complete="$FOUND_MAKE"
16098  path="${complete%% *}"
16099  tmp="$complete EOL"
16100  arguments="${tmp#* }"
16101
16102  # Input might be given as Windows format, start by converting to
16103  # unix format.
16104  new_path=`$CYGPATH -u "$path"`
16105
16106  # Now try to locate executable using which
16107  new_path=`$WHICH "$new_path" 2> /dev/null`
16108  # bat and cmd files are not always considered executable in cygwin causing which
16109  # to not find them
16110  if test "x$new_path" = x \
16111      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16112      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16113    new_path=`$CYGPATH -u "$path"`
16114  fi
16115  if test "x$new_path" = x; then
16116    # Oops. Which didn't find the executable.
16117    # The splitting of arguments from the executable at a space might have been incorrect,
16118    # since paths with space are more likely in Windows. Give it another try with the whole
16119    # argument.
16120    path="$complete"
16121    arguments="EOL"
16122    new_path=`$CYGPATH -u "$path"`
16123    new_path=`$WHICH "$new_path" 2> /dev/null`
16124    # bat and cmd files are not always considered executable in cygwin causing which
16125    # to not find them
16126    if test "x$new_path" = x \
16127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16129      new_path=`$CYGPATH -u "$path"`
16130    fi
16131    if test "x$new_path" = x; then
16132      # It's still not found. Now this is an unrecoverable error.
16133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16134$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16135      has_space=`$ECHO "$complete" | $GREP " "`
16136      if test "x$has_space" != x; then
16137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16139      fi
16140      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16141    fi
16142  fi
16143
16144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16147  # "foo.exe" is OK but "foo" is an error.
16148  #
16149  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16150  # It is also a way to make sure we got the proper file name for the real test later on.
16151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16152  if test "x$test_shortpath" = x; then
16153    # Short path failed, file does not exist as specified.
16154    # Try adding .exe or .cmd
16155    if test -f "${new_path}.exe"; then
16156      input_to_shortpath="${new_path}.exe"
16157    elif test -f "${new_path}.cmd"; then
16158      input_to_shortpath="${new_path}.cmd"
16159    else
16160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16161$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16162      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16163$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16164      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16165    fi
16166  else
16167    input_to_shortpath="$new_path"
16168  fi
16169
16170  # Call helper function which possibly converts this using DOS-style short mode.
16171  # If so, the updated path is stored in $new_path.
16172  new_path="$input_to_shortpath"
16173
16174  input_path="$input_to_shortpath"
16175  # Check if we need to convert this using DOS-style short mode. If the path
16176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16177  # take no chances and rewrite it.
16178  # Note: m4 eats our [], so we need to use [ and ] instead.
16179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16180  if test "x$has_forbidden_chars" != x; then
16181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16185      # Going to short mode and back again did indeed matter. Since short mode is
16186      # case insensitive, let's make it lowercase to improve readability.
16187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16188      # Now convert it back to Unix-style (cygpath)
16189      input_path=`$CYGPATH -u "$shortmode_path"`
16190      new_path="$input_path"
16191    fi
16192  fi
16193
16194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16195  if test "x$test_cygdrive_prefix" = x; then
16196    # As a simple fix, exclude /usr/bin since it's not a real path.
16197    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16199      # a path prefixed by /cygdrive for fixpath to work.
16200      new_path="$CYGWIN_ROOT_PATH$input_path"
16201    fi
16202  fi
16203
16204  # remove trailing .exe if any
16205  new_path="${new_path/%.exe/}"
16206
16207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16208
16209  # First separate the path from the arguments. This will split at the first
16210  # space.
16211  complete="$FOUND_MAKE"
16212  path="${complete%% *}"
16213  tmp="$complete EOL"
16214  arguments="${tmp#* }"
16215
16216  # Input might be given as Windows format, start by converting to
16217  # unix format.
16218  new_path="$path"
16219
16220  windows_path="$new_path"
16221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16222    unix_path=`$CYGPATH -u "$windows_path"`
16223    new_path="$unix_path"
16224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16226    new_path="$unix_path"
16227  fi
16228
16229
16230  # Now try to locate executable using which
16231  new_path=`$WHICH "$new_path" 2> /dev/null`
16232
16233  if test "x$new_path" = x; then
16234    # Oops. Which didn't find the executable.
16235    # The splitting of arguments from the executable at a space might have been incorrect,
16236    # since paths with space are more likely in Windows. Give it another try with the whole
16237    # argument.
16238    path="$complete"
16239    arguments="EOL"
16240    new_path="$path"
16241
16242  windows_path="$new_path"
16243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16244    unix_path=`$CYGPATH -u "$windows_path"`
16245    new_path="$unix_path"
16246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16248    new_path="$unix_path"
16249  fi
16250
16251
16252    new_path=`$WHICH "$new_path" 2> /dev/null`
16253    # bat and cmd files are not always considered executable in MSYS causing which
16254    # to not find them
16255    if test "x$new_path" = x \
16256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16258      new_path="$path"
16259
16260  windows_path="$new_path"
16261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16262    unix_path=`$CYGPATH -u "$windows_path"`
16263    new_path="$unix_path"
16264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16266    new_path="$unix_path"
16267  fi
16268
16269    fi
16270
16271    if test "x$new_path" = x; then
16272      # It's still not found. Now this is an unrecoverable error.
16273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16275      has_space=`$ECHO "$complete" | $GREP " "`
16276      if test "x$has_space" != x; then
16277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16279      fi
16280      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16281    fi
16282  fi
16283
16284  # Now new_path has a complete unix path to the binary
16285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16286    # Keep paths in /bin as-is, but remove trailing .exe if any
16287    new_path="${new_path/%.exe/}"
16288    # Do not save /bin paths to all_fixpath_prefixes!
16289  else
16290    # Not in mixed or Windows style, start by that.
16291    new_path=`cmd //c echo $new_path`
16292
16293  input_path="$new_path"
16294  # Check if we need to convert this using DOS-style short mode. If the path
16295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16296  # take no chances and rewrite it.
16297  # Note: m4 eats our [], so we need to use [ and ] instead.
16298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16299  if test "x$has_forbidden_chars" != x; then
16300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16302  fi
16303
16304    # Output is in $new_path
16305
16306  windows_path="$new_path"
16307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16308    unix_path=`$CYGPATH -u "$windows_path"`
16309    new_path="$unix_path"
16310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16312    new_path="$unix_path"
16313  fi
16314
16315    # remove trailing .exe if any
16316    new_path="${new_path/%.exe/}"
16317
16318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16320  fi
16321
16322    else
16323      # We're on a unix platform. Hooray! :)
16324      # First separate the path from the arguments. This will split at the first
16325      # space.
16326      complete="$FOUND_MAKE"
16327      path="${complete%% *}"
16328      tmp="$complete EOL"
16329      arguments="${tmp#* }"
16330
16331      # Cannot rely on the command "which" here since it doesn't always work.
16332      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16333      if test -z "$is_absolute_path"; then
16334        # Path to executable is not absolute. Find it.
16335        IFS_save="$IFS"
16336        IFS=:
16337        for p in $PATH; do
16338          if test -f "$p/$path" && test -x "$p/$path"; then
16339            new_path="$p/$path"
16340            break
16341          fi
16342        done
16343        IFS="$IFS_save"
16344      else
16345        # This is an absolute path, we can use it without further modifications.
16346        new_path="$path"
16347      fi
16348
16349      if test "x$new_path" = x; then
16350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16351$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16352        has_space=`$ECHO "$complete" | $GREP " "`
16353        if test "x$has_space" != x; then
16354          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16356        fi
16357        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16358      fi
16359    fi
16360
16361    # Now join together the path and the arguments once again
16362    if test "x$arguments" != xEOL; then
16363      new_complete="$new_path ${arguments% *}"
16364    else
16365      new_complete="$new_path"
16366    fi
16367
16368    if test "x$complete" != "x$new_complete"; then
16369      FOUND_MAKE="$new_complete"
16370      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16371$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16372    fi
16373  fi
16374
16375        fi
16376      fi
16377    fi
16378  fi
16379
16380
16381    if test "x$FOUND_MAKE" = x; then
16382      for ac_prog in make
16383do
16384  # Extract the first word of "$ac_prog", so it can be a program name with args.
16385set dummy $ac_prog; ac_word=$2
16386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16387$as_echo_n "checking for $ac_word... " >&6; }
16388if ${ac_cv_path_CHECK_MAKE+:} false; then :
16389  $as_echo_n "(cached) " >&6
16390else
16391  case $CHECK_MAKE in
16392  [\\/]* | ?:[\\/]*)
16393  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16394  ;;
16395  *)
16396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16397for as_dir in $PATH
16398do
16399  IFS=$as_save_IFS
16400  test -z "$as_dir" && as_dir=.
16401    for ac_exec_ext in '' $ac_executable_extensions; do
16402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16403    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16405    break 2
16406  fi
16407done
16408  done
16409IFS=$as_save_IFS
16410
16411  ;;
16412esac
16413fi
16414CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16415if test -n "$CHECK_MAKE"; then
16416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16417$as_echo "$CHECK_MAKE" >&6; }
16418else
16419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16420$as_echo "no" >&6; }
16421fi
16422
16423
16424  test -n "$CHECK_MAKE" && break
16425done
16426
16427
16428  MAKE_CANDIDATE=""$CHECK_MAKE""
16429  DESCRIPTION="make in PATH"
16430
16431  # On Cygwin, we require a newer version of make than on other platforms
16432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16433    MAKE_VERSION_EXPR="-e 4\."
16434    MAKE_REQUIRED_VERSION="4.0"
16435   else
16436    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16437    MAKE_REQUIRED_VERSION="3.81"
16438  fi
16439
16440  if test "x$MAKE_CANDIDATE" != x; then
16441    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16442$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16443    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16444    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16445    if test "x$IS_GNU_MAKE" = x; then
16446      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16447$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16448    else
16449      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16450      if test "x$IS_MODERN_MAKE" = x; then
16451        { $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
16452$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;}
16453      else
16454        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16455          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16456            MAKE_EXPECTED_ENV='cygwin'
16457          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16458            MAKE_EXPECTED_ENV='msys'
16459          else
16460            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16461          fi
16462          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16463          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16464        else
16465          # Not relevant for non-Windows
16466          IS_MAKE_CORRECT_ENV=true
16467        fi
16468        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16469          { $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
16470$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;}
16471        else
16472          FOUND_MAKE=$MAKE_CANDIDATE
16473
16474  # Only process if variable expands to non-empty
16475
16476  if test "x$FOUND_MAKE" != x; then
16477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16478
16479  # First separate the path from the arguments. This will split at the first
16480  # space.
16481  complete="$FOUND_MAKE"
16482  path="${complete%% *}"
16483  tmp="$complete EOL"
16484  arguments="${tmp#* }"
16485
16486  # Input might be given as Windows format, start by converting to
16487  # unix format.
16488  new_path=`$CYGPATH -u "$path"`
16489
16490  # Now try to locate executable using which
16491  new_path=`$WHICH "$new_path" 2> /dev/null`
16492  # bat and cmd files are not always considered executable in cygwin causing which
16493  # to not find them
16494  if test "x$new_path" = x \
16495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16497    new_path=`$CYGPATH -u "$path"`
16498  fi
16499  if test "x$new_path" = x; then
16500    # Oops. Which didn't find the executable.
16501    # The splitting of arguments from the executable at a space might have been incorrect,
16502    # since paths with space are more likely in Windows. Give it another try with the whole
16503    # argument.
16504    path="$complete"
16505    arguments="EOL"
16506    new_path=`$CYGPATH -u "$path"`
16507    new_path=`$WHICH "$new_path" 2> /dev/null`
16508    # bat and cmd files are not always considered executable in cygwin causing which
16509    # to not find them
16510    if test "x$new_path" = x \
16511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16513      new_path=`$CYGPATH -u "$path"`
16514    fi
16515    if test "x$new_path" = x; then
16516      # It's still not found. Now this is an unrecoverable error.
16517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16518$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16519      has_space=`$ECHO "$complete" | $GREP " "`
16520      if test "x$has_space" != x; then
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16523      fi
16524      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16525    fi
16526  fi
16527
16528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16531  # "foo.exe" is OK but "foo" is an error.
16532  #
16533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16534  # It is also a way to make sure we got the proper file name for the real test later on.
16535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16536  if test "x$test_shortpath" = x; then
16537    # Short path failed, file does not exist as specified.
16538    # Try adding .exe or .cmd
16539    if test -f "${new_path}.exe"; then
16540      input_to_shortpath="${new_path}.exe"
16541    elif test -f "${new_path}.cmd"; then
16542      input_to_shortpath="${new_path}.cmd"
16543    else
16544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16545$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16548      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16549    fi
16550  else
16551    input_to_shortpath="$new_path"
16552  fi
16553
16554  # Call helper function which possibly converts this using DOS-style short mode.
16555  # If so, the updated path is stored in $new_path.
16556  new_path="$input_to_shortpath"
16557
16558  input_path="$input_to_shortpath"
16559  # Check if we need to convert this using DOS-style short mode. If the path
16560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16561  # take no chances and rewrite it.
16562  # Note: m4 eats our [], so we need to use [ and ] instead.
16563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16564  if test "x$has_forbidden_chars" != x; then
16565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16569      # Going to short mode and back again did indeed matter. Since short mode is
16570      # case insensitive, let's make it lowercase to improve readability.
16571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16572      # Now convert it back to Unix-style (cygpath)
16573      input_path=`$CYGPATH -u "$shortmode_path"`
16574      new_path="$input_path"
16575    fi
16576  fi
16577
16578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16579  if test "x$test_cygdrive_prefix" = x; then
16580    # As a simple fix, exclude /usr/bin since it's not a real path.
16581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16583      # a path prefixed by /cygdrive for fixpath to work.
16584      new_path="$CYGWIN_ROOT_PATH$input_path"
16585    fi
16586  fi
16587
16588  # remove trailing .exe if any
16589  new_path="${new_path/%.exe/}"
16590
16591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16592
16593  # First separate the path from the arguments. This will split at the first
16594  # space.
16595  complete="$FOUND_MAKE"
16596  path="${complete%% *}"
16597  tmp="$complete EOL"
16598  arguments="${tmp#* }"
16599
16600  # Input might be given as Windows format, start by converting to
16601  # unix format.
16602  new_path="$path"
16603
16604  windows_path="$new_path"
16605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16606    unix_path=`$CYGPATH -u "$windows_path"`
16607    new_path="$unix_path"
16608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16610    new_path="$unix_path"
16611  fi
16612
16613
16614  # Now try to locate executable using which
16615  new_path=`$WHICH "$new_path" 2> /dev/null`
16616
16617  if test "x$new_path" = x; then
16618    # Oops. Which didn't find the executable.
16619    # The splitting of arguments from the executable at a space might have been incorrect,
16620    # since paths with space are more likely in Windows. Give it another try with the whole
16621    # argument.
16622    path="$complete"
16623    arguments="EOL"
16624    new_path="$path"
16625
16626  windows_path="$new_path"
16627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16628    unix_path=`$CYGPATH -u "$windows_path"`
16629    new_path="$unix_path"
16630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16632    new_path="$unix_path"
16633  fi
16634
16635
16636    new_path=`$WHICH "$new_path" 2> /dev/null`
16637    # bat and cmd files are not always considered executable in MSYS causing which
16638    # to not find them
16639    if test "x$new_path" = x \
16640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16642      new_path="$path"
16643
16644  windows_path="$new_path"
16645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16646    unix_path=`$CYGPATH -u "$windows_path"`
16647    new_path="$unix_path"
16648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16650    new_path="$unix_path"
16651  fi
16652
16653    fi
16654
16655    if test "x$new_path" = x; then
16656      # It's still not found. Now this is an unrecoverable error.
16657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16658$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16659      has_space=`$ECHO "$complete" | $GREP " "`
16660      if test "x$has_space" != x; then
16661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16663      fi
16664      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16665    fi
16666  fi
16667
16668  # Now new_path has a complete unix path to the binary
16669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16670    # Keep paths in /bin as-is, but remove trailing .exe if any
16671    new_path="${new_path/%.exe/}"
16672    # Do not save /bin paths to all_fixpath_prefixes!
16673  else
16674    # Not in mixed or Windows style, start by that.
16675    new_path=`cmd //c echo $new_path`
16676
16677  input_path="$new_path"
16678  # Check if we need to convert this using DOS-style short mode. If the path
16679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16680  # take no chances and rewrite it.
16681  # Note: m4 eats our [], so we need to use [ and ] instead.
16682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16683  if test "x$has_forbidden_chars" != x; then
16684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16686  fi
16687
16688    # Output is in $new_path
16689
16690  windows_path="$new_path"
16691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16692    unix_path=`$CYGPATH -u "$windows_path"`
16693    new_path="$unix_path"
16694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16696    new_path="$unix_path"
16697  fi
16698
16699    # remove trailing .exe if any
16700    new_path="${new_path/%.exe/}"
16701
16702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16704  fi
16705
16706    else
16707      # We're on a unix platform. Hooray! :)
16708      # First separate the path from the arguments. This will split at the first
16709      # space.
16710      complete="$FOUND_MAKE"
16711      path="${complete%% *}"
16712      tmp="$complete EOL"
16713      arguments="${tmp#* }"
16714
16715      # Cannot rely on the command "which" here since it doesn't always work.
16716      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16717      if test -z "$is_absolute_path"; then
16718        # Path to executable is not absolute. Find it.
16719        IFS_save="$IFS"
16720        IFS=:
16721        for p in $PATH; do
16722          if test -f "$p/$path" && test -x "$p/$path"; then
16723            new_path="$p/$path"
16724            break
16725          fi
16726        done
16727        IFS="$IFS_save"
16728      else
16729        # This is an absolute path, we can use it without further modifications.
16730        new_path="$path"
16731      fi
16732
16733      if test "x$new_path" = x; then
16734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16735$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16736        has_space=`$ECHO "$complete" | $GREP " "`
16737        if test "x$has_space" != x; then
16738          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16740        fi
16741        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16742      fi
16743    fi
16744
16745    # Now join together the path and the arguments once again
16746    if test "x$arguments" != xEOL; then
16747      new_complete="$new_path ${arguments% *}"
16748    else
16749      new_complete="$new_path"
16750    fi
16751
16752    if test "x$complete" != "x$new_complete"; then
16753      FOUND_MAKE="$new_complete"
16754      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16755$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16756    fi
16757  fi
16758
16759        fi
16760      fi
16761    fi
16762  fi
16763
16764    fi
16765
16766    if test "x$FOUND_MAKE" = x; then
16767      if test "x$TOOLCHAIN_PATH" != x; then
16768        # We have a toolchain path, check that as well before giving up.
16769        OLD_PATH=$PATH
16770        PATH=$TOOLCHAIN_PATH:$PATH
16771        for ac_prog in gmake
16772do
16773  # Extract the first word of "$ac_prog", so it can be a program name with args.
16774set dummy $ac_prog; ac_word=$2
16775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16776$as_echo_n "checking for $ac_word... " >&6; }
16777if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16778  $as_echo_n "(cached) " >&6
16779else
16780  case $CHECK_TOOLSDIR_GMAKE in
16781  [\\/]* | ?:[\\/]*)
16782  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16783  ;;
16784  *)
16785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16786for as_dir in $PATH
16787do
16788  IFS=$as_save_IFS
16789  test -z "$as_dir" && as_dir=.
16790    for ac_exec_ext in '' $ac_executable_extensions; do
16791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16792    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16794    break 2
16795  fi
16796done
16797  done
16798IFS=$as_save_IFS
16799
16800  ;;
16801esac
16802fi
16803CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16804if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16806$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16807else
16808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16809$as_echo "no" >&6; }
16810fi
16811
16812
16813  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16814done
16815
16816
16817  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16818  DESCRIPTION="gmake in tools-dir"
16819
16820  # On Cygwin, we require a newer version of make than on other platforms
16821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16822    MAKE_VERSION_EXPR="-e 4\."
16823    MAKE_REQUIRED_VERSION="4.0"
16824   else
16825    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16826    MAKE_REQUIRED_VERSION="3.81"
16827  fi
16828
16829  if test "x$MAKE_CANDIDATE" != x; then
16830    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16831$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16832    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16833    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16834    if test "x$IS_GNU_MAKE" = x; then
16835      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16836$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16837    else
16838      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16839      if test "x$IS_MODERN_MAKE" = x; then
16840        { $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
16841$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;}
16842      else
16843        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16844          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16845            MAKE_EXPECTED_ENV='cygwin'
16846          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16847            MAKE_EXPECTED_ENV='msys'
16848          else
16849            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16850          fi
16851          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16852          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16853        else
16854          # Not relevant for non-Windows
16855          IS_MAKE_CORRECT_ENV=true
16856        fi
16857        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16858          { $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
16859$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;}
16860        else
16861          FOUND_MAKE=$MAKE_CANDIDATE
16862
16863  # Only process if variable expands to non-empty
16864
16865  if test "x$FOUND_MAKE" != x; then
16866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867
16868  # First separate the path from the arguments. This will split at the first
16869  # space.
16870  complete="$FOUND_MAKE"
16871  path="${complete%% *}"
16872  tmp="$complete EOL"
16873  arguments="${tmp#* }"
16874
16875  # Input might be given as Windows format, start by converting to
16876  # unix format.
16877  new_path=`$CYGPATH -u "$path"`
16878
16879  # Now try to locate executable using which
16880  new_path=`$WHICH "$new_path" 2> /dev/null`
16881  # bat and cmd files are not always considered executable in cygwin causing which
16882  # to not find them
16883  if test "x$new_path" = x \
16884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16886    new_path=`$CYGPATH -u "$path"`
16887  fi
16888  if test "x$new_path" = x; then
16889    # Oops. Which didn't find the executable.
16890    # The splitting of arguments from the executable at a space might have been incorrect,
16891    # since paths with space are more likely in Windows. Give it another try with the whole
16892    # argument.
16893    path="$complete"
16894    arguments="EOL"
16895    new_path=`$CYGPATH -u "$path"`
16896    new_path=`$WHICH "$new_path" 2> /dev/null`
16897    # bat and cmd files are not always considered executable in cygwin causing which
16898    # to not find them
16899    if test "x$new_path" = x \
16900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16902      new_path=`$CYGPATH -u "$path"`
16903    fi
16904    if test "x$new_path" = x; then
16905      # It's still not found. Now this is an unrecoverable error.
16906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16907$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16908      has_space=`$ECHO "$complete" | $GREP " "`
16909      if test "x$has_space" != x; then
16910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16912      fi
16913      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16914    fi
16915  fi
16916
16917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16920  # "foo.exe" is OK but "foo" is an error.
16921  #
16922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16923  # It is also a way to make sure we got the proper file name for the real test later on.
16924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16925  if test "x$test_shortpath" = x; then
16926    # Short path failed, file does not exist as specified.
16927    # Try adding .exe or .cmd
16928    if test -f "${new_path}.exe"; then
16929      input_to_shortpath="${new_path}.exe"
16930    elif test -f "${new_path}.cmd"; then
16931      input_to_shortpath="${new_path}.cmd"
16932    else
16933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16937      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16938    fi
16939  else
16940    input_to_shortpath="$new_path"
16941  fi
16942
16943  # Call helper function which possibly converts this using DOS-style short mode.
16944  # If so, the updated path is stored in $new_path.
16945  new_path="$input_to_shortpath"
16946
16947  input_path="$input_to_shortpath"
16948  # Check if we need to convert this using DOS-style short mode. If the path
16949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16950  # take no chances and rewrite it.
16951  # Note: m4 eats our [], so we need to use [ and ] instead.
16952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16953  if test "x$has_forbidden_chars" != x; then
16954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16958      # Going to short mode and back again did indeed matter. Since short mode is
16959      # case insensitive, let's make it lowercase to improve readability.
16960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16961      # Now convert it back to Unix-style (cygpath)
16962      input_path=`$CYGPATH -u "$shortmode_path"`
16963      new_path="$input_path"
16964    fi
16965  fi
16966
16967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16968  if test "x$test_cygdrive_prefix" = x; then
16969    # As a simple fix, exclude /usr/bin since it's not a real path.
16970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16972      # a path prefixed by /cygdrive for fixpath to work.
16973      new_path="$CYGWIN_ROOT_PATH$input_path"
16974    fi
16975  fi
16976
16977  # remove trailing .exe if any
16978  new_path="${new_path/%.exe/}"
16979
16980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16981
16982  # First separate the path from the arguments. This will split at the first
16983  # space.
16984  complete="$FOUND_MAKE"
16985  path="${complete%% *}"
16986  tmp="$complete EOL"
16987  arguments="${tmp#* }"
16988
16989  # Input might be given as Windows format, start by converting to
16990  # unix format.
16991  new_path="$path"
16992
16993  windows_path="$new_path"
16994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16995    unix_path=`$CYGPATH -u "$windows_path"`
16996    new_path="$unix_path"
16997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16999    new_path="$unix_path"
17000  fi
17001
17002
17003  # Now try to locate executable using which
17004  new_path=`$WHICH "$new_path" 2> /dev/null`
17005
17006  if test "x$new_path" = x; then
17007    # Oops. Which didn't find the executable.
17008    # The splitting of arguments from the executable at a space might have been incorrect,
17009    # since paths with space are more likely in Windows. Give it another try with the whole
17010    # argument.
17011    path="$complete"
17012    arguments="EOL"
17013    new_path="$path"
17014
17015  windows_path="$new_path"
17016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17017    unix_path=`$CYGPATH -u "$windows_path"`
17018    new_path="$unix_path"
17019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17021    new_path="$unix_path"
17022  fi
17023
17024
17025    new_path=`$WHICH "$new_path" 2> /dev/null`
17026    # bat and cmd files are not always considered executable in MSYS causing which
17027    # to not find them
17028    if test "x$new_path" = x \
17029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17031      new_path="$path"
17032
17033  windows_path="$new_path"
17034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17035    unix_path=`$CYGPATH -u "$windows_path"`
17036    new_path="$unix_path"
17037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17039    new_path="$unix_path"
17040  fi
17041
17042    fi
17043
17044    if test "x$new_path" = x; then
17045      # It's still not found. Now this is an unrecoverable error.
17046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17048      has_space=`$ECHO "$complete" | $GREP " "`
17049      if test "x$has_space" != x; then
17050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17052      fi
17053      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17054    fi
17055  fi
17056
17057  # Now new_path has a complete unix path to the binary
17058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17059    # Keep paths in /bin as-is, but remove trailing .exe if any
17060    new_path="${new_path/%.exe/}"
17061    # Do not save /bin paths to all_fixpath_prefixes!
17062  else
17063    # Not in mixed or Windows style, start by that.
17064    new_path=`cmd //c echo $new_path`
17065
17066  input_path="$new_path"
17067  # Check if we need to convert this using DOS-style short mode. If the path
17068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17069  # take no chances and rewrite it.
17070  # Note: m4 eats our [], so we need to use [ and ] instead.
17071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17072  if test "x$has_forbidden_chars" != x; then
17073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17075  fi
17076
17077    # Output is in $new_path
17078
17079  windows_path="$new_path"
17080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17081    unix_path=`$CYGPATH -u "$windows_path"`
17082    new_path="$unix_path"
17083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17085    new_path="$unix_path"
17086  fi
17087
17088    # remove trailing .exe if any
17089    new_path="${new_path/%.exe/}"
17090
17091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17093  fi
17094
17095    else
17096      # We're on a unix platform. Hooray! :)
17097      # First separate the path from the arguments. This will split at the first
17098      # space.
17099      complete="$FOUND_MAKE"
17100      path="${complete%% *}"
17101      tmp="$complete EOL"
17102      arguments="${tmp#* }"
17103
17104      # Cannot rely on the command "which" here since it doesn't always work.
17105      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17106      if test -z "$is_absolute_path"; then
17107        # Path to executable is not absolute. Find it.
17108        IFS_save="$IFS"
17109        IFS=:
17110        for p in $PATH; do
17111          if test -f "$p/$path" && test -x "$p/$path"; then
17112            new_path="$p/$path"
17113            break
17114          fi
17115        done
17116        IFS="$IFS_save"
17117      else
17118        # This is an absolute path, we can use it without further modifications.
17119        new_path="$path"
17120      fi
17121
17122      if test "x$new_path" = x; then
17123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17124$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17125        has_space=`$ECHO "$complete" | $GREP " "`
17126        if test "x$has_space" != x; then
17127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17129        fi
17130        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17131      fi
17132    fi
17133
17134    # Now join together the path and the arguments once again
17135    if test "x$arguments" != xEOL; then
17136      new_complete="$new_path ${arguments% *}"
17137    else
17138      new_complete="$new_path"
17139    fi
17140
17141    if test "x$complete" != "x$new_complete"; then
17142      FOUND_MAKE="$new_complete"
17143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17144$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17145    fi
17146  fi
17147
17148        fi
17149      fi
17150    fi
17151  fi
17152
17153        if test "x$FOUND_MAKE" = x; then
17154          for ac_prog in make
17155do
17156  # Extract the first word of "$ac_prog", so it can be a program name with args.
17157set dummy $ac_prog; ac_word=$2
17158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17159$as_echo_n "checking for $ac_word... " >&6; }
17160if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17161  $as_echo_n "(cached) " >&6
17162else
17163  case $CHECK_TOOLSDIR_MAKE in
17164  [\\/]* | ?:[\\/]*)
17165  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17166  ;;
17167  *)
17168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17169for as_dir in $PATH
17170do
17171  IFS=$as_save_IFS
17172  test -z "$as_dir" && as_dir=.
17173    for ac_exec_ext in '' $ac_executable_extensions; do
17174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17175    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17177    break 2
17178  fi
17179done
17180  done
17181IFS=$as_save_IFS
17182
17183  ;;
17184esac
17185fi
17186CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17187if test -n "$CHECK_TOOLSDIR_MAKE"; then
17188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17189$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17190else
17191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17192$as_echo "no" >&6; }
17193fi
17194
17195
17196  test -n "$CHECK_TOOLSDIR_MAKE" && break
17197done
17198
17199
17200  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17201  DESCRIPTION="make in tools-dir"
17202
17203  # On Cygwin, we require a newer version of make than on other platforms
17204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17205    MAKE_VERSION_EXPR="-e 4\."
17206    MAKE_REQUIRED_VERSION="4.0"
17207   else
17208    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17209    MAKE_REQUIRED_VERSION="3.81"
17210  fi
17211
17212  if test "x$MAKE_CANDIDATE" != x; then
17213    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17214$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17215    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17216    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17217    if test "x$IS_GNU_MAKE" = x; then
17218      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17219$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17220    else
17221      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17222      if test "x$IS_MODERN_MAKE" = x; then
17223        { $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
17224$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;}
17225      else
17226        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17227          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17228            MAKE_EXPECTED_ENV='cygwin'
17229          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17230            MAKE_EXPECTED_ENV='msys'
17231          else
17232            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17233          fi
17234          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17235          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17236        else
17237          # Not relevant for non-Windows
17238          IS_MAKE_CORRECT_ENV=true
17239        fi
17240        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17241          { $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
17242$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;}
17243        else
17244          FOUND_MAKE=$MAKE_CANDIDATE
17245
17246  # Only process if variable expands to non-empty
17247
17248  if test "x$FOUND_MAKE" != x; then
17249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17250
17251  # First separate the path from the arguments. This will split at the first
17252  # space.
17253  complete="$FOUND_MAKE"
17254  path="${complete%% *}"
17255  tmp="$complete EOL"
17256  arguments="${tmp#* }"
17257
17258  # Input might be given as Windows format, start by converting to
17259  # unix format.
17260  new_path=`$CYGPATH -u "$path"`
17261
17262  # Now try to locate executable using which
17263  new_path=`$WHICH "$new_path" 2> /dev/null`
17264  # bat and cmd files are not always considered executable in cygwin causing which
17265  # to not find them
17266  if test "x$new_path" = x \
17267      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17268      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17269    new_path=`$CYGPATH -u "$path"`
17270  fi
17271  if test "x$new_path" = x; then
17272    # Oops. Which didn't find the executable.
17273    # The splitting of arguments from the executable at a space might have been incorrect,
17274    # since paths with space are more likely in Windows. Give it another try with the whole
17275    # argument.
17276    path="$complete"
17277    arguments="EOL"
17278    new_path=`$CYGPATH -u "$path"`
17279    new_path=`$WHICH "$new_path" 2> /dev/null`
17280    # bat and cmd files are not always considered executable in cygwin causing which
17281    # to not find them
17282    if test "x$new_path" = x \
17283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17285      new_path=`$CYGPATH -u "$path"`
17286    fi
17287    if test "x$new_path" = x; then
17288      # It's still not found. Now this is an unrecoverable error.
17289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17290$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17291      has_space=`$ECHO "$complete" | $GREP " "`
17292      if test "x$has_space" != x; then
17293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17295      fi
17296      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17297    fi
17298  fi
17299
17300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17303  # "foo.exe" is OK but "foo" is an error.
17304  #
17305  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17306  # It is also a way to make sure we got the proper file name for the real test later on.
17307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17308  if test "x$test_shortpath" = x; then
17309    # Short path failed, file does not exist as specified.
17310    # Try adding .exe or .cmd
17311    if test -f "${new_path}.exe"; then
17312      input_to_shortpath="${new_path}.exe"
17313    elif test -f "${new_path}.cmd"; then
17314      input_to_shortpath="${new_path}.cmd"
17315    else
17316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17317$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17318      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17319$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17320      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17321    fi
17322  else
17323    input_to_shortpath="$new_path"
17324  fi
17325
17326  # Call helper function which possibly converts this using DOS-style short mode.
17327  # If so, the updated path is stored in $new_path.
17328  new_path="$input_to_shortpath"
17329
17330  input_path="$input_to_shortpath"
17331  # Check if we need to convert this using DOS-style short mode. If the path
17332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17333  # take no chances and rewrite it.
17334  # Note: m4 eats our [], so we need to use [ and ] instead.
17335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17336  if test "x$has_forbidden_chars" != x; then
17337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17341      # Going to short mode and back again did indeed matter. Since short mode is
17342      # case insensitive, let's make it lowercase to improve readability.
17343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17344      # Now convert it back to Unix-style (cygpath)
17345      input_path=`$CYGPATH -u "$shortmode_path"`
17346      new_path="$input_path"
17347    fi
17348  fi
17349
17350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17351  if test "x$test_cygdrive_prefix" = x; then
17352    # As a simple fix, exclude /usr/bin since it's not a real path.
17353    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17355      # a path prefixed by /cygdrive for fixpath to work.
17356      new_path="$CYGWIN_ROOT_PATH$input_path"
17357    fi
17358  fi
17359
17360  # remove trailing .exe if any
17361  new_path="${new_path/%.exe/}"
17362
17363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17364
17365  # First separate the path from the arguments. This will split at the first
17366  # space.
17367  complete="$FOUND_MAKE"
17368  path="${complete%% *}"
17369  tmp="$complete EOL"
17370  arguments="${tmp#* }"
17371
17372  # Input might be given as Windows format, start by converting to
17373  # unix format.
17374  new_path="$path"
17375
17376  windows_path="$new_path"
17377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17378    unix_path=`$CYGPATH -u "$windows_path"`
17379    new_path="$unix_path"
17380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17382    new_path="$unix_path"
17383  fi
17384
17385
17386  # Now try to locate executable using which
17387  new_path=`$WHICH "$new_path" 2> /dev/null`
17388
17389  if test "x$new_path" = x; then
17390    # Oops. Which didn't find the executable.
17391    # The splitting of arguments from the executable at a space might have been incorrect,
17392    # since paths with space are more likely in Windows. Give it another try with the whole
17393    # argument.
17394    path="$complete"
17395    arguments="EOL"
17396    new_path="$path"
17397
17398  windows_path="$new_path"
17399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17400    unix_path=`$CYGPATH -u "$windows_path"`
17401    new_path="$unix_path"
17402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17404    new_path="$unix_path"
17405  fi
17406
17407
17408    new_path=`$WHICH "$new_path" 2> /dev/null`
17409    # bat and cmd files are not always considered executable in MSYS causing which
17410    # to not find them
17411    if test "x$new_path" = x \
17412        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17413        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17414      new_path="$path"
17415
17416  windows_path="$new_path"
17417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17418    unix_path=`$CYGPATH -u "$windows_path"`
17419    new_path="$unix_path"
17420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17422    new_path="$unix_path"
17423  fi
17424
17425    fi
17426
17427    if test "x$new_path" = x; then
17428      # It's still not found. Now this is an unrecoverable error.
17429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17430$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17431      has_space=`$ECHO "$complete" | $GREP " "`
17432      if test "x$has_space" != x; then
17433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17435      fi
17436      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17437    fi
17438  fi
17439
17440  # Now new_path has a complete unix path to the binary
17441  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17442    # Keep paths in /bin as-is, but remove trailing .exe if any
17443    new_path="${new_path/%.exe/}"
17444    # Do not save /bin paths to all_fixpath_prefixes!
17445  else
17446    # Not in mixed or Windows style, start by that.
17447    new_path=`cmd //c echo $new_path`
17448
17449  input_path="$new_path"
17450  # Check if we need to convert this using DOS-style short mode. If the path
17451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17452  # take no chances and rewrite it.
17453  # Note: m4 eats our [], so we need to use [ and ] instead.
17454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17455  if test "x$has_forbidden_chars" != x; then
17456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17458  fi
17459
17460    # Output is in $new_path
17461
17462  windows_path="$new_path"
17463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17464    unix_path=`$CYGPATH -u "$windows_path"`
17465    new_path="$unix_path"
17466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17468    new_path="$unix_path"
17469  fi
17470
17471    # remove trailing .exe if any
17472    new_path="${new_path/%.exe/}"
17473
17474    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17475    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17476  fi
17477
17478    else
17479      # We're on a unix platform. Hooray! :)
17480      # First separate the path from the arguments. This will split at the first
17481      # space.
17482      complete="$FOUND_MAKE"
17483      path="${complete%% *}"
17484      tmp="$complete EOL"
17485      arguments="${tmp#* }"
17486
17487      # Cannot rely on the command "which" here since it doesn't always work.
17488      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17489      if test -z "$is_absolute_path"; then
17490        # Path to executable is not absolute. Find it.
17491        IFS_save="$IFS"
17492        IFS=:
17493        for p in $PATH; do
17494          if test -f "$p/$path" && test -x "$p/$path"; then
17495            new_path="$p/$path"
17496            break
17497          fi
17498        done
17499        IFS="$IFS_save"
17500      else
17501        # This is an absolute path, we can use it without further modifications.
17502        new_path="$path"
17503      fi
17504
17505      if test "x$new_path" = x; then
17506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17507$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17508        has_space=`$ECHO "$complete" | $GREP " "`
17509        if test "x$has_space" != x; then
17510          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17511$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17512        fi
17513        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17514      fi
17515    fi
17516
17517    # Now join together the path and the arguments once again
17518    if test "x$arguments" != xEOL; then
17519      new_complete="$new_path ${arguments% *}"
17520    else
17521      new_complete="$new_path"
17522    fi
17523
17524    if test "x$complete" != "x$new_complete"; then
17525      FOUND_MAKE="$new_complete"
17526      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17527$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17528    fi
17529  fi
17530
17531        fi
17532      fi
17533    fi
17534  fi
17535
17536        fi
17537        PATH=$OLD_PATH
17538      fi
17539    fi
17540
17541    if test "x$FOUND_MAKE" = x; then
17542      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
17543    fi
17544  fi
17545
17546  MAKE=$FOUND_MAKE
17547
17548  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17549$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17550
17551
17552  # Check if make supports the output sync option and if so, setup using it.
17553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17554$as_echo_n "checking if make --output-sync is supported... " >&6; }
17555  if $MAKE --version -O > /dev/null 2>&1; then
17556    OUTPUT_SYNC_SUPPORTED=true
17557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17558$as_echo "yes" >&6; }
17559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17560$as_echo_n "checking for output-sync value... " >&6; }
17561
17562# Check whether --with-output-sync was given.
17563if test "${with_output_sync+set}" = set; then :
17564  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17565fi
17566
17567    if test "x$OUTPUT_SYNC" = "x"; then
17568      OUTPUT_SYNC=none
17569    fi
17570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17571$as_echo "$OUTPUT_SYNC" >&6; }
17572    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17573      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17574    fi
17575  else
17576    OUTPUT_SYNC_SUPPORTED=false
17577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17578$as_echo "no" >&6; }
17579  fi
17580
17581
17582
17583
17584
17585
17586  # Test if find supports -delete
17587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17588$as_echo_n "checking if find supports -delete... " >&6; }
17589  FIND_DELETE="-delete"
17590
17591  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17592
17593  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17594
17595  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17596  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17597    # No, it does not.
17598    rm $DELETEDIR/TestIfFindSupportsDelete
17599    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17600      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17601      FIND_DELETE="-print | xargs rm"
17602    else
17603      FIND_DELETE="-exec rm \{\} \+"
17604    fi
17605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17606$as_echo "no" >&6; }
17607  else
17608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17609$as_echo "yes" >&6; }
17610  fi
17611  rmdir $DELETEDIR
17612
17613
17614
17615  # These tools might not be installed by default,
17616  # need hint on how to install them.
17617
17618
17619
17620  # Publish this variable in the help.
17621
17622
17623  if test "x$UNZIP" = x; then
17624    # The variable is not set by user, try to locate tool using the code snippet
17625    for ac_prog in unzip
17626do
17627  # Extract the first word of "$ac_prog", so it can be a program name with args.
17628set dummy $ac_prog; ac_word=$2
17629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17630$as_echo_n "checking for $ac_word... " >&6; }
17631if ${ac_cv_path_UNZIP+:} false; then :
17632  $as_echo_n "(cached) " >&6
17633else
17634  case $UNZIP in
17635  [\\/]* | ?:[\\/]*)
17636  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17637  ;;
17638  *)
17639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17640for as_dir in $PATH
17641do
17642  IFS=$as_save_IFS
17643  test -z "$as_dir" && as_dir=.
17644    for ac_exec_ext in '' $ac_executable_extensions; do
17645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17646    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17648    break 2
17649  fi
17650done
17651  done
17652IFS=$as_save_IFS
17653
17654  ;;
17655esac
17656fi
17657UNZIP=$ac_cv_path_UNZIP
17658if test -n "$UNZIP"; then
17659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17660$as_echo "$UNZIP" >&6; }
17661else
17662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17663$as_echo "no" >&6; }
17664fi
17665
17666
17667  test -n "$UNZIP" && break
17668done
17669
17670  else
17671    # The variable is set, but is it from the command line or the environment?
17672
17673    # Try to remove the string !UNZIP! from our list.
17674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17676      # If it failed, the variable was not from the command line. Ignore it,
17677      # but warn the user (except for BASH, which is always set by the calling BASH).
17678      if test "xUNZIP" != xBASH; then
17679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17680$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17681      fi
17682      # Try to locate tool using the code snippet
17683      for ac_prog in unzip
17684do
17685  # Extract the first word of "$ac_prog", so it can be a program name with args.
17686set dummy $ac_prog; ac_word=$2
17687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17688$as_echo_n "checking for $ac_word... " >&6; }
17689if ${ac_cv_path_UNZIP+:} false; then :
17690  $as_echo_n "(cached) " >&6
17691else
17692  case $UNZIP in
17693  [\\/]* | ?:[\\/]*)
17694  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17695  ;;
17696  *)
17697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17698for as_dir in $PATH
17699do
17700  IFS=$as_save_IFS
17701  test -z "$as_dir" && as_dir=.
17702    for ac_exec_ext in '' $ac_executable_extensions; do
17703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17704    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17706    break 2
17707  fi
17708done
17709  done
17710IFS=$as_save_IFS
17711
17712  ;;
17713esac
17714fi
17715UNZIP=$ac_cv_path_UNZIP
17716if test -n "$UNZIP"; then
17717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17718$as_echo "$UNZIP" >&6; }
17719else
17720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17721$as_echo "no" >&6; }
17722fi
17723
17724
17725  test -n "$UNZIP" && break
17726done
17727
17728    else
17729      # If it succeeded, then it was overridden by the user. We will use it
17730      # for the tool.
17731
17732      # First remove it from the list of overridden variables, so we can test
17733      # for unknown variables in the end.
17734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17735
17736      # Check if the provided tool contains a complete path.
17737      tool_specified="$UNZIP"
17738      tool_basename="${tool_specified##*/}"
17739      if test "x$tool_basename" = "x$tool_specified"; then
17740        # A command without a complete path is provided, search $PATH.
17741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17742$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17743        # Extract the first word of "$tool_basename", so it can be a program name with args.
17744set dummy $tool_basename; ac_word=$2
17745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17746$as_echo_n "checking for $ac_word... " >&6; }
17747if ${ac_cv_path_UNZIP+:} false; then :
17748  $as_echo_n "(cached) " >&6
17749else
17750  case $UNZIP in
17751  [\\/]* | ?:[\\/]*)
17752  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17753  ;;
17754  *)
17755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17756for as_dir in $PATH
17757do
17758  IFS=$as_save_IFS
17759  test -z "$as_dir" && as_dir=.
17760    for ac_exec_ext in '' $ac_executable_extensions; do
17761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17762    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17764    break 2
17765  fi
17766done
17767  done
17768IFS=$as_save_IFS
17769
17770  ;;
17771esac
17772fi
17773UNZIP=$ac_cv_path_UNZIP
17774if test -n "$UNZIP"; then
17775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17776$as_echo "$UNZIP" >&6; }
17777else
17778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17779$as_echo "no" >&6; }
17780fi
17781
17782
17783        if test "x$UNZIP" = x; then
17784          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17785        fi
17786      else
17787        # Otherwise we believe it is a complete path. Use it as it is.
17788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17789$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17791$as_echo_n "checking for UNZIP... " >&6; }
17792        if test ! -x "$tool_specified"; then
17793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17794$as_echo "not found" >&6; }
17795          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17796        fi
17797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17798$as_echo "$tool_specified" >&6; }
17799      fi
17800    fi
17801  fi
17802
17803
17804
17805  if test "x$UNZIP" = x; then
17806    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17807  fi
17808
17809
17810
17811
17812
17813  # Publish this variable in the help.
17814
17815
17816  if test "x$ZIP" = x; then
17817    # The variable is not set by user, try to locate tool using the code snippet
17818    for ac_prog in zip
17819do
17820  # Extract the first word of "$ac_prog", so it can be a program name with args.
17821set dummy $ac_prog; ac_word=$2
17822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17823$as_echo_n "checking for $ac_word... " >&6; }
17824if ${ac_cv_path_ZIP+:} false; then :
17825  $as_echo_n "(cached) " >&6
17826else
17827  case $ZIP in
17828  [\\/]* | ?:[\\/]*)
17829  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17830  ;;
17831  *)
17832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17833for as_dir in $PATH
17834do
17835  IFS=$as_save_IFS
17836  test -z "$as_dir" && as_dir=.
17837    for ac_exec_ext in '' $ac_executable_extensions; do
17838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17839    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17841    break 2
17842  fi
17843done
17844  done
17845IFS=$as_save_IFS
17846
17847  ;;
17848esac
17849fi
17850ZIP=$ac_cv_path_ZIP
17851if test -n "$ZIP"; then
17852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17853$as_echo "$ZIP" >&6; }
17854else
17855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17856$as_echo "no" >&6; }
17857fi
17858
17859
17860  test -n "$ZIP" && break
17861done
17862
17863  else
17864    # The variable is set, but is it from the command line or the environment?
17865
17866    # Try to remove the string !ZIP! from our list.
17867    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17868    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17869      # If it failed, the variable was not from the command line. Ignore it,
17870      # but warn the user (except for BASH, which is always set by the calling BASH).
17871      if test "xZIP" != xBASH; then
17872        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17873$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17874      fi
17875      # Try to locate tool using the code snippet
17876      for ac_prog in zip
17877do
17878  # Extract the first word of "$ac_prog", so it can be a program name with args.
17879set dummy $ac_prog; ac_word=$2
17880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17881$as_echo_n "checking for $ac_word... " >&6; }
17882if ${ac_cv_path_ZIP+:} false; then :
17883  $as_echo_n "(cached) " >&6
17884else
17885  case $ZIP in
17886  [\\/]* | ?:[\\/]*)
17887  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17888  ;;
17889  *)
17890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17891for as_dir in $PATH
17892do
17893  IFS=$as_save_IFS
17894  test -z "$as_dir" && as_dir=.
17895    for ac_exec_ext in '' $ac_executable_extensions; do
17896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17897    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17899    break 2
17900  fi
17901done
17902  done
17903IFS=$as_save_IFS
17904
17905  ;;
17906esac
17907fi
17908ZIP=$ac_cv_path_ZIP
17909if test -n "$ZIP"; then
17910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17911$as_echo "$ZIP" >&6; }
17912else
17913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17914$as_echo "no" >&6; }
17915fi
17916
17917
17918  test -n "$ZIP" && break
17919done
17920
17921    else
17922      # If it succeeded, then it was overridden by the user. We will use it
17923      # for the tool.
17924
17925      # First remove it from the list of overridden variables, so we can test
17926      # for unknown variables in the end.
17927      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17928
17929      # Check if the provided tool contains a complete path.
17930      tool_specified="$ZIP"
17931      tool_basename="${tool_specified##*/}"
17932      if test "x$tool_basename" = "x$tool_specified"; then
17933        # A command without a complete path is provided, search $PATH.
17934        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17935$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17936        # Extract the first word of "$tool_basename", so it can be a program name with args.
17937set dummy $tool_basename; ac_word=$2
17938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17939$as_echo_n "checking for $ac_word... " >&6; }
17940if ${ac_cv_path_ZIP+:} false; then :
17941  $as_echo_n "(cached) " >&6
17942else
17943  case $ZIP in
17944  [\\/]* | ?:[\\/]*)
17945  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17946  ;;
17947  *)
17948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17949for as_dir in $PATH
17950do
17951  IFS=$as_save_IFS
17952  test -z "$as_dir" && as_dir=.
17953    for ac_exec_ext in '' $ac_executable_extensions; do
17954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17955    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17957    break 2
17958  fi
17959done
17960  done
17961IFS=$as_save_IFS
17962
17963  ;;
17964esac
17965fi
17966ZIP=$ac_cv_path_ZIP
17967if test -n "$ZIP"; then
17968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17969$as_echo "$ZIP" >&6; }
17970else
17971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17972$as_echo "no" >&6; }
17973fi
17974
17975
17976        if test "x$ZIP" = x; then
17977          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17978        fi
17979      else
17980        # Otherwise we believe it is a complete path. Use it as it is.
17981        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17982$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17983        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17984$as_echo_n "checking for ZIP... " >&6; }
17985        if test ! -x "$tool_specified"; then
17986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17987$as_echo "not found" >&6; }
17988          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17989        fi
17990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17991$as_echo "$tool_specified" >&6; }
17992      fi
17993    fi
17994  fi
17995
17996
17997
17998  if test "x$ZIP" = x; then
17999    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
18000  fi
18001
18002
18003
18004  # Non-required basic tools
18005
18006
18007
18008  # Publish this variable in the help.
18009
18010
18011  if test "x$LDD" = x; then
18012    # The variable is not set by user, try to locate tool using the code snippet
18013    for ac_prog in ldd
18014do
18015  # Extract the first word of "$ac_prog", so it can be a program name with args.
18016set dummy $ac_prog; ac_word=$2
18017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18018$as_echo_n "checking for $ac_word... " >&6; }
18019if ${ac_cv_path_LDD+:} false; then :
18020  $as_echo_n "(cached) " >&6
18021else
18022  case $LDD in
18023  [\\/]* | ?:[\\/]*)
18024  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18025  ;;
18026  *)
18027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18028for as_dir in $PATH
18029do
18030  IFS=$as_save_IFS
18031  test -z "$as_dir" && as_dir=.
18032    for ac_exec_ext in '' $ac_executable_extensions; do
18033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18034    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18036    break 2
18037  fi
18038done
18039  done
18040IFS=$as_save_IFS
18041
18042  ;;
18043esac
18044fi
18045LDD=$ac_cv_path_LDD
18046if test -n "$LDD"; then
18047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18048$as_echo "$LDD" >&6; }
18049else
18050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18051$as_echo "no" >&6; }
18052fi
18053
18054
18055  test -n "$LDD" && break
18056done
18057
18058  else
18059    # The variable is set, but is it from the command line or the environment?
18060
18061    # Try to remove the string !LDD! from our list.
18062    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
18063    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18064      # If it failed, the variable was not from the command line. Ignore it,
18065      # but warn the user (except for BASH, which is always set by the calling BASH).
18066      if test "xLDD" != xBASH; then
18067        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
18068$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
18069      fi
18070      # Try to locate tool using the code snippet
18071      for ac_prog in ldd
18072do
18073  # Extract the first word of "$ac_prog", so it can be a program name with args.
18074set dummy $ac_prog; ac_word=$2
18075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18076$as_echo_n "checking for $ac_word... " >&6; }
18077if ${ac_cv_path_LDD+:} false; then :
18078  $as_echo_n "(cached) " >&6
18079else
18080  case $LDD in
18081  [\\/]* | ?:[\\/]*)
18082  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18083  ;;
18084  *)
18085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18086for as_dir in $PATH
18087do
18088  IFS=$as_save_IFS
18089  test -z "$as_dir" && as_dir=.
18090    for ac_exec_ext in '' $ac_executable_extensions; do
18091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18092    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18094    break 2
18095  fi
18096done
18097  done
18098IFS=$as_save_IFS
18099
18100  ;;
18101esac
18102fi
18103LDD=$ac_cv_path_LDD
18104if test -n "$LDD"; then
18105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18106$as_echo "$LDD" >&6; }
18107else
18108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18109$as_echo "no" >&6; }
18110fi
18111
18112
18113  test -n "$LDD" && break
18114done
18115
18116    else
18117      # If it succeeded, then it was overridden by the user. We will use it
18118      # for the tool.
18119
18120      # First remove it from the list of overridden variables, so we can test
18121      # for unknown variables in the end.
18122      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18123
18124      # Check if the provided tool contains a complete path.
18125      tool_specified="$LDD"
18126      tool_basename="${tool_specified##*/}"
18127      if test "x$tool_basename" = "x$tool_specified"; then
18128        # A command without a complete path is provided, search $PATH.
18129        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18130$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18131        # Extract the first word of "$tool_basename", so it can be a program name with args.
18132set dummy $tool_basename; ac_word=$2
18133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18134$as_echo_n "checking for $ac_word... " >&6; }
18135if ${ac_cv_path_LDD+:} false; then :
18136  $as_echo_n "(cached) " >&6
18137else
18138  case $LDD in
18139  [\\/]* | ?:[\\/]*)
18140  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18141  ;;
18142  *)
18143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18144for as_dir in $PATH
18145do
18146  IFS=$as_save_IFS
18147  test -z "$as_dir" && as_dir=.
18148    for ac_exec_ext in '' $ac_executable_extensions; do
18149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18150    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18152    break 2
18153  fi
18154done
18155  done
18156IFS=$as_save_IFS
18157
18158  ;;
18159esac
18160fi
18161LDD=$ac_cv_path_LDD
18162if test -n "$LDD"; then
18163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18164$as_echo "$LDD" >&6; }
18165else
18166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18167$as_echo "no" >&6; }
18168fi
18169
18170
18171        if test "x$LDD" = x; then
18172          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18173        fi
18174      else
18175        # Otherwise we believe it is a complete path. Use it as it is.
18176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18177$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18179$as_echo_n "checking for LDD... " >&6; }
18180        if test ! -x "$tool_specified"; then
18181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18182$as_echo "not found" >&6; }
18183          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18184        fi
18185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18186$as_echo "$tool_specified" >&6; }
18187      fi
18188    fi
18189  fi
18190
18191
18192  if test "x$LDD" = "x"; then
18193    # List shared lib dependencies is used for
18194    # debug output and checking for forbidden dependencies.
18195    # We can build without it.
18196    LDD="true"
18197  fi
18198
18199
18200  # Publish this variable in the help.
18201
18202
18203  if test "x$OTOOL" = x; then
18204    # The variable is not set by user, try to locate tool using the code snippet
18205    for ac_prog in otool
18206do
18207  # Extract the first word of "$ac_prog", so it can be a program name with args.
18208set dummy $ac_prog; ac_word=$2
18209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18210$as_echo_n "checking for $ac_word... " >&6; }
18211if ${ac_cv_path_OTOOL+:} false; then :
18212  $as_echo_n "(cached) " >&6
18213else
18214  case $OTOOL in
18215  [\\/]* | ?:[\\/]*)
18216  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18217  ;;
18218  *)
18219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18220for as_dir in $PATH
18221do
18222  IFS=$as_save_IFS
18223  test -z "$as_dir" && as_dir=.
18224    for ac_exec_ext in '' $ac_executable_extensions; do
18225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18226    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18228    break 2
18229  fi
18230done
18231  done
18232IFS=$as_save_IFS
18233
18234  ;;
18235esac
18236fi
18237OTOOL=$ac_cv_path_OTOOL
18238if test -n "$OTOOL"; then
18239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18240$as_echo "$OTOOL" >&6; }
18241else
18242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18243$as_echo "no" >&6; }
18244fi
18245
18246
18247  test -n "$OTOOL" && break
18248done
18249
18250  else
18251    # The variable is set, but is it from the command line or the environment?
18252
18253    # Try to remove the string !OTOOL! from our list.
18254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18256      # If it failed, the variable was not from the command line. Ignore it,
18257      # but warn the user (except for BASH, which is always set by the calling BASH).
18258      if test "xOTOOL" != xBASH; then
18259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18260$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18261      fi
18262      # Try to locate tool using the code snippet
18263      for ac_prog in otool
18264do
18265  # Extract the first word of "$ac_prog", so it can be a program name with args.
18266set dummy $ac_prog; ac_word=$2
18267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18268$as_echo_n "checking for $ac_word... " >&6; }
18269if ${ac_cv_path_OTOOL+:} false; then :
18270  $as_echo_n "(cached) " >&6
18271else
18272  case $OTOOL in
18273  [\\/]* | ?:[\\/]*)
18274  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18275  ;;
18276  *)
18277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18278for as_dir in $PATH
18279do
18280  IFS=$as_save_IFS
18281  test -z "$as_dir" && as_dir=.
18282    for ac_exec_ext in '' $ac_executable_extensions; do
18283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18284    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18286    break 2
18287  fi
18288done
18289  done
18290IFS=$as_save_IFS
18291
18292  ;;
18293esac
18294fi
18295OTOOL=$ac_cv_path_OTOOL
18296if test -n "$OTOOL"; then
18297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18298$as_echo "$OTOOL" >&6; }
18299else
18300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18301$as_echo "no" >&6; }
18302fi
18303
18304
18305  test -n "$OTOOL" && break
18306done
18307
18308    else
18309      # If it succeeded, then it was overridden by the user. We will use it
18310      # for the tool.
18311
18312      # First remove it from the list of overridden variables, so we can test
18313      # for unknown variables in the end.
18314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18315
18316      # Check if the provided tool contains a complete path.
18317      tool_specified="$OTOOL"
18318      tool_basename="${tool_specified##*/}"
18319      if test "x$tool_basename" = "x$tool_specified"; then
18320        # A command without a complete path is provided, search $PATH.
18321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18322$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18323        # Extract the first word of "$tool_basename", so it can be a program name with args.
18324set dummy $tool_basename; ac_word=$2
18325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18326$as_echo_n "checking for $ac_word... " >&6; }
18327if ${ac_cv_path_OTOOL+:} false; then :
18328  $as_echo_n "(cached) " >&6
18329else
18330  case $OTOOL in
18331  [\\/]* | ?:[\\/]*)
18332  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18333  ;;
18334  *)
18335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18336for as_dir in $PATH
18337do
18338  IFS=$as_save_IFS
18339  test -z "$as_dir" && as_dir=.
18340    for ac_exec_ext in '' $ac_executable_extensions; do
18341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18342    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18344    break 2
18345  fi
18346done
18347  done
18348IFS=$as_save_IFS
18349
18350  ;;
18351esac
18352fi
18353OTOOL=$ac_cv_path_OTOOL
18354if test -n "$OTOOL"; then
18355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18356$as_echo "$OTOOL" >&6; }
18357else
18358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18359$as_echo "no" >&6; }
18360fi
18361
18362
18363        if test "x$OTOOL" = x; then
18364          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18365        fi
18366      else
18367        # Otherwise we believe it is a complete path. Use it as it is.
18368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18369$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18371$as_echo_n "checking for OTOOL... " >&6; }
18372        if test ! -x "$tool_specified"; then
18373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18374$as_echo "not found" >&6; }
18375          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18376        fi
18377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18378$as_echo "$tool_specified" >&6; }
18379      fi
18380    fi
18381  fi
18382
18383
18384  if test "x$OTOOL" = "x"; then
18385    OTOOL="true"
18386  fi
18387
18388
18389  # Publish this variable in the help.
18390
18391
18392  if test "x$READELF" = x; then
18393    # The variable is not set by user, try to locate tool using the code snippet
18394    for ac_prog in greadelf readelf
18395do
18396  # Extract the first word of "$ac_prog", so it can be a program name with args.
18397set dummy $ac_prog; ac_word=$2
18398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18399$as_echo_n "checking for $ac_word... " >&6; }
18400if ${ac_cv_path_READELF+:} false; then :
18401  $as_echo_n "(cached) " >&6
18402else
18403  case $READELF in
18404  [\\/]* | ?:[\\/]*)
18405  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18406  ;;
18407  *)
18408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18409for as_dir in $PATH
18410do
18411  IFS=$as_save_IFS
18412  test -z "$as_dir" && as_dir=.
18413    for ac_exec_ext in '' $ac_executable_extensions; do
18414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18415    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18417    break 2
18418  fi
18419done
18420  done
18421IFS=$as_save_IFS
18422
18423  ;;
18424esac
18425fi
18426READELF=$ac_cv_path_READELF
18427if test -n "$READELF"; then
18428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18429$as_echo "$READELF" >&6; }
18430else
18431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18432$as_echo "no" >&6; }
18433fi
18434
18435
18436  test -n "$READELF" && break
18437done
18438
18439  else
18440    # The variable is set, but is it from the command line or the environment?
18441
18442    # Try to remove the string !READELF! from our list.
18443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18445      # If it failed, the variable was not from the command line. Ignore it,
18446      # but warn the user (except for BASH, which is always set by the calling BASH).
18447      if test "xREADELF" != xBASH; then
18448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18449$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18450      fi
18451      # Try to locate tool using the code snippet
18452      for ac_prog in greadelf readelf
18453do
18454  # Extract the first word of "$ac_prog", so it can be a program name with args.
18455set dummy $ac_prog; ac_word=$2
18456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18457$as_echo_n "checking for $ac_word... " >&6; }
18458if ${ac_cv_path_READELF+:} false; then :
18459  $as_echo_n "(cached) " >&6
18460else
18461  case $READELF in
18462  [\\/]* | ?:[\\/]*)
18463  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18464  ;;
18465  *)
18466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18467for as_dir in $PATH
18468do
18469  IFS=$as_save_IFS
18470  test -z "$as_dir" && as_dir=.
18471    for ac_exec_ext in '' $ac_executable_extensions; do
18472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18473    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18475    break 2
18476  fi
18477done
18478  done
18479IFS=$as_save_IFS
18480
18481  ;;
18482esac
18483fi
18484READELF=$ac_cv_path_READELF
18485if test -n "$READELF"; then
18486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18487$as_echo "$READELF" >&6; }
18488else
18489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18490$as_echo "no" >&6; }
18491fi
18492
18493
18494  test -n "$READELF" && break
18495done
18496
18497    else
18498      # If it succeeded, then it was overridden by the user. We will use it
18499      # for the tool.
18500
18501      # First remove it from the list of overridden variables, so we can test
18502      # for unknown variables in the end.
18503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18504
18505      # Check if the provided tool contains a complete path.
18506      tool_specified="$READELF"
18507      tool_basename="${tool_specified##*/}"
18508      if test "x$tool_basename" = "x$tool_specified"; then
18509        # A command without a complete path is provided, search $PATH.
18510        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18511$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18512        # Extract the first word of "$tool_basename", so it can be a program name with args.
18513set dummy $tool_basename; ac_word=$2
18514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18515$as_echo_n "checking for $ac_word... " >&6; }
18516if ${ac_cv_path_READELF+:} false; then :
18517  $as_echo_n "(cached) " >&6
18518else
18519  case $READELF in
18520  [\\/]* | ?:[\\/]*)
18521  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18522  ;;
18523  *)
18524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18525for as_dir in $PATH
18526do
18527  IFS=$as_save_IFS
18528  test -z "$as_dir" && as_dir=.
18529    for ac_exec_ext in '' $ac_executable_extensions; do
18530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18531    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18533    break 2
18534  fi
18535done
18536  done
18537IFS=$as_save_IFS
18538
18539  ;;
18540esac
18541fi
18542READELF=$ac_cv_path_READELF
18543if test -n "$READELF"; then
18544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18545$as_echo "$READELF" >&6; }
18546else
18547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18548$as_echo "no" >&6; }
18549fi
18550
18551
18552        if test "x$READELF" = x; then
18553          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18554        fi
18555      else
18556        # Otherwise we believe it is a complete path. Use it as it is.
18557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18558$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18560$as_echo_n "checking for READELF... " >&6; }
18561        if test ! -x "$tool_specified"; then
18562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18563$as_echo "not found" >&6; }
18564          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18565        fi
18566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18567$as_echo "$tool_specified" >&6; }
18568      fi
18569    fi
18570  fi
18571
18572
18573
18574
18575  # Publish this variable in the help.
18576
18577
18578  if test "x$HG" = x; then
18579    # The variable is not set by user, try to locate tool using the code snippet
18580    for ac_prog in hg
18581do
18582  # Extract the first word of "$ac_prog", so it can be a program name with args.
18583set dummy $ac_prog; ac_word=$2
18584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18585$as_echo_n "checking for $ac_word... " >&6; }
18586if ${ac_cv_path_HG+:} false; then :
18587  $as_echo_n "(cached) " >&6
18588else
18589  case $HG in
18590  [\\/]* | ?:[\\/]*)
18591  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18592  ;;
18593  *)
18594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18595for as_dir in $PATH
18596do
18597  IFS=$as_save_IFS
18598  test -z "$as_dir" && as_dir=.
18599    for ac_exec_ext in '' $ac_executable_extensions; do
18600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18601    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18603    break 2
18604  fi
18605done
18606  done
18607IFS=$as_save_IFS
18608
18609  ;;
18610esac
18611fi
18612HG=$ac_cv_path_HG
18613if test -n "$HG"; then
18614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18615$as_echo "$HG" >&6; }
18616else
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18618$as_echo "no" >&6; }
18619fi
18620
18621
18622  test -n "$HG" && break
18623done
18624
18625  else
18626    # The variable is set, but is it from the command line or the environment?
18627
18628    # Try to remove the string !HG! from our list.
18629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18631      # If it failed, the variable was not from the command line. Ignore it,
18632      # but warn the user (except for BASH, which is always set by the calling BASH).
18633      if test "xHG" != xBASH; then
18634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18635$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18636      fi
18637      # Try to locate tool using the code snippet
18638      for ac_prog in hg
18639do
18640  # Extract the first word of "$ac_prog", so it can be a program name with args.
18641set dummy $ac_prog; ac_word=$2
18642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18643$as_echo_n "checking for $ac_word... " >&6; }
18644if ${ac_cv_path_HG+:} false; then :
18645  $as_echo_n "(cached) " >&6
18646else
18647  case $HG in
18648  [\\/]* | ?:[\\/]*)
18649  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18650  ;;
18651  *)
18652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18653for as_dir in $PATH
18654do
18655  IFS=$as_save_IFS
18656  test -z "$as_dir" && as_dir=.
18657    for ac_exec_ext in '' $ac_executable_extensions; do
18658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18659    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18661    break 2
18662  fi
18663done
18664  done
18665IFS=$as_save_IFS
18666
18667  ;;
18668esac
18669fi
18670HG=$ac_cv_path_HG
18671if test -n "$HG"; then
18672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18673$as_echo "$HG" >&6; }
18674else
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18676$as_echo "no" >&6; }
18677fi
18678
18679
18680  test -n "$HG" && break
18681done
18682
18683    else
18684      # If it succeeded, then it was overridden by the user. We will use it
18685      # for the tool.
18686
18687      # First remove it from the list of overridden variables, so we can test
18688      # for unknown variables in the end.
18689      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18690
18691      # Check if the provided tool contains a complete path.
18692      tool_specified="$HG"
18693      tool_basename="${tool_specified##*/}"
18694      if test "x$tool_basename" = "x$tool_specified"; then
18695        # A command without a complete path is provided, search $PATH.
18696        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18697$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18698        # Extract the first word of "$tool_basename", so it can be a program name with args.
18699set dummy $tool_basename; ac_word=$2
18700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18701$as_echo_n "checking for $ac_word... " >&6; }
18702if ${ac_cv_path_HG+:} false; then :
18703  $as_echo_n "(cached) " >&6
18704else
18705  case $HG in
18706  [\\/]* | ?:[\\/]*)
18707  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18708  ;;
18709  *)
18710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18711for as_dir in $PATH
18712do
18713  IFS=$as_save_IFS
18714  test -z "$as_dir" && as_dir=.
18715    for ac_exec_ext in '' $ac_executable_extensions; do
18716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18717    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18719    break 2
18720  fi
18721done
18722  done
18723IFS=$as_save_IFS
18724
18725  ;;
18726esac
18727fi
18728HG=$ac_cv_path_HG
18729if test -n "$HG"; then
18730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18731$as_echo "$HG" >&6; }
18732else
18733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18734$as_echo "no" >&6; }
18735fi
18736
18737
18738        if test "x$HG" = x; then
18739          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18740        fi
18741      else
18742        # Otherwise we believe it is a complete path. Use it as it is.
18743        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18744$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18746$as_echo_n "checking for HG... " >&6; }
18747        if test ! -x "$tool_specified"; then
18748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18749$as_echo "not found" >&6; }
18750          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18751        fi
18752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18753$as_echo "$tool_specified" >&6; }
18754      fi
18755    fi
18756  fi
18757
18758
18759
18760
18761  # Publish this variable in the help.
18762
18763
18764  if test "x$STAT" = x; then
18765    # The variable is not set by user, try to locate tool using the code snippet
18766    for ac_prog in stat
18767do
18768  # Extract the first word of "$ac_prog", so it can be a program name with args.
18769set dummy $ac_prog; ac_word=$2
18770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18771$as_echo_n "checking for $ac_word... " >&6; }
18772if ${ac_cv_path_STAT+:} false; then :
18773  $as_echo_n "(cached) " >&6
18774else
18775  case $STAT in
18776  [\\/]* | ?:[\\/]*)
18777  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18778  ;;
18779  *)
18780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18781for as_dir in $PATH
18782do
18783  IFS=$as_save_IFS
18784  test -z "$as_dir" && as_dir=.
18785    for ac_exec_ext in '' $ac_executable_extensions; do
18786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18787    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18789    break 2
18790  fi
18791done
18792  done
18793IFS=$as_save_IFS
18794
18795  ;;
18796esac
18797fi
18798STAT=$ac_cv_path_STAT
18799if test -n "$STAT"; then
18800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18801$as_echo "$STAT" >&6; }
18802else
18803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18804$as_echo "no" >&6; }
18805fi
18806
18807
18808  test -n "$STAT" && break
18809done
18810
18811  else
18812    # The variable is set, but is it from the command line or the environment?
18813
18814    # Try to remove the string !STAT! from our list.
18815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18817      # If it failed, the variable was not from the command line. Ignore it,
18818      # but warn the user (except for BASH, which is always set by the calling BASH).
18819      if test "xSTAT" != xBASH; then
18820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18821$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18822      fi
18823      # Try to locate tool using the code snippet
18824      for ac_prog in stat
18825do
18826  # Extract the first word of "$ac_prog", so it can be a program name with args.
18827set dummy $ac_prog; ac_word=$2
18828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18829$as_echo_n "checking for $ac_word... " >&6; }
18830if ${ac_cv_path_STAT+:} false; then :
18831  $as_echo_n "(cached) " >&6
18832else
18833  case $STAT in
18834  [\\/]* | ?:[\\/]*)
18835  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18836  ;;
18837  *)
18838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18839for as_dir in $PATH
18840do
18841  IFS=$as_save_IFS
18842  test -z "$as_dir" && as_dir=.
18843    for ac_exec_ext in '' $ac_executable_extensions; do
18844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18845    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18847    break 2
18848  fi
18849done
18850  done
18851IFS=$as_save_IFS
18852
18853  ;;
18854esac
18855fi
18856STAT=$ac_cv_path_STAT
18857if test -n "$STAT"; then
18858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18859$as_echo "$STAT" >&6; }
18860else
18861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18862$as_echo "no" >&6; }
18863fi
18864
18865
18866  test -n "$STAT" && break
18867done
18868
18869    else
18870      # If it succeeded, then it was overridden by the user. We will use it
18871      # for the tool.
18872
18873      # First remove it from the list of overridden variables, so we can test
18874      # for unknown variables in the end.
18875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18876
18877      # Check if the provided tool contains a complete path.
18878      tool_specified="$STAT"
18879      tool_basename="${tool_specified##*/}"
18880      if test "x$tool_basename" = "x$tool_specified"; then
18881        # A command without a complete path is provided, search $PATH.
18882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18883$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18884        # Extract the first word of "$tool_basename", so it can be a program name with args.
18885set dummy $tool_basename; ac_word=$2
18886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18887$as_echo_n "checking for $ac_word... " >&6; }
18888if ${ac_cv_path_STAT+:} false; then :
18889  $as_echo_n "(cached) " >&6
18890else
18891  case $STAT in
18892  [\\/]* | ?:[\\/]*)
18893  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18894  ;;
18895  *)
18896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18897for as_dir in $PATH
18898do
18899  IFS=$as_save_IFS
18900  test -z "$as_dir" && as_dir=.
18901    for ac_exec_ext in '' $ac_executable_extensions; do
18902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18903    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18905    break 2
18906  fi
18907done
18908  done
18909IFS=$as_save_IFS
18910
18911  ;;
18912esac
18913fi
18914STAT=$ac_cv_path_STAT
18915if test -n "$STAT"; then
18916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18917$as_echo "$STAT" >&6; }
18918else
18919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18920$as_echo "no" >&6; }
18921fi
18922
18923
18924        if test "x$STAT" = x; then
18925          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18926        fi
18927      else
18928        # Otherwise we believe it is a complete path. Use it as it is.
18929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18930$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18932$as_echo_n "checking for STAT... " >&6; }
18933        if test ! -x "$tool_specified"; then
18934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18935$as_echo "not found" >&6; }
18936          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18937        fi
18938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18939$as_echo "$tool_specified" >&6; }
18940      fi
18941    fi
18942  fi
18943
18944
18945
18946
18947  # Publish this variable in the help.
18948
18949
18950  if test "x$TIME" = x; then
18951    # The variable is not set by user, try to locate tool using the code snippet
18952    for ac_prog in time
18953do
18954  # Extract the first word of "$ac_prog", so it can be a program name with args.
18955set dummy $ac_prog; ac_word=$2
18956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18957$as_echo_n "checking for $ac_word... " >&6; }
18958if ${ac_cv_path_TIME+:} false; then :
18959  $as_echo_n "(cached) " >&6
18960else
18961  case $TIME in
18962  [\\/]* | ?:[\\/]*)
18963  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18964  ;;
18965  *)
18966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18967for as_dir in $PATH
18968do
18969  IFS=$as_save_IFS
18970  test -z "$as_dir" && as_dir=.
18971    for ac_exec_ext in '' $ac_executable_extensions; do
18972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18973    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18975    break 2
18976  fi
18977done
18978  done
18979IFS=$as_save_IFS
18980
18981  ;;
18982esac
18983fi
18984TIME=$ac_cv_path_TIME
18985if test -n "$TIME"; then
18986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18987$as_echo "$TIME" >&6; }
18988else
18989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18990$as_echo "no" >&6; }
18991fi
18992
18993
18994  test -n "$TIME" && break
18995done
18996
18997  else
18998    # The variable is set, but is it from the command line or the environment?
18999
19000    # Try to remove the string !TIME! from our list.
19001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
19002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19003      # If it failed, the variable was not from the command line. Ignore it,
19004      # but warn the user (except for BASH, which is always set by the calling BASH).
19005      if test "xTIME" != xBASH; then
19006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
19007$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
19008      fi
19009      # Try to locate tool using the code snippet
19010      for ac_prog in time
19011do
19012  # Extract the first word of "$ac_prog", so it can be a program name with args.
19013set dummy $ac_prog; ac_word=$2
19014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19015$as_echo_n "checking for $ac_word... " >&6; }
19016if ${ac_cv_path_TIME+:} false; then :
19017  $as_echo_n "(cached) " >&6
19018else
19019  case $TIME in
19020  [\\/]* | ?:[\\/]*)
19021  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19022  ;;
19023  *)
19024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19025for as_dir in $PATH
19026do
19027  IFS=$as_save_IFS
19028  test -z "$as_dir" && as_dir=.
19029    for ac_exec_ext in '' $ac_executable_extensions; do
19030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19031    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19033    break 2
19034  fi
19035done
19036  done
19037IFS=$as_save_IFS
19038
19039  ;;
19040esac
19041fi
19042TIME=$ac_cv_path_TIME
19043if test -n "$TIME"; then
19044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19045$as_echo "$TIME" >&6; }
19046else
19047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19048$as_echo "no" >&6; }
19049fi
19050
19051
19052  test -n "$TIME" && break
19053done
19054
19055    else
19056      # If it succeeded, then it was overridden by the user. We will use it
19057      # for the tool.
19058
19059      # First remove it from the list of overridden variables, so we can test
19060      # for unknown variables in the end.
19061      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19062
19063      # Check if the provided tool contains a complete path.
19064      tool_specified="$TIME"
19065      tool_basename="${tool_specified##*/}"
19066      if test "x$tool_basename" = "x$tool_specified"; then
19067        # A command without a complete path is provided, search $PATH.
19068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
19069$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
19070        # Extract the first word of "$tool_basename", so it can be a program name with args.
19071set dummy $tool_basename; ac_word=$2
19072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19073$as_echo_n "checking for $ac_word... " >&6; }
19074if ${ac_cv_path_TIME+:} false; then :
19075  $as_echo_n "(cached) " >&6
19076else
19077  case $TIME in
19078  [\\/]* | ?:[\\/]*)
19079  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19080  ;;
19081  *)
19082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19083for as_dir in $PATH
19084do
19085  IFS=$as_save_IFS
19086  test -z "$as_dir" && as_dir=.
19087    for ac_exec_ext in '' $ac_executable_extensions; do
19088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19089    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19091    break 2
19092  fi
19093done
19094  done
19095IFS=$as_save_IFS
19096
19097  ;;
19098esac
19099fi
19100TIME=$ac_cv_path_TIME
19101if test -n "$TIME"; then
19102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19103$as_echo "$TIME" >&6; }
19104else
19105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19106$as_echo "no" >&6; }
19107fi
19108
19109
19110        if test "x$TIME" = x; then
19111          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19112        fi
19113      else
19114        # Otherwise we believe it is a complete path. Use it as it is.
19115        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19116$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19118$as_echo_n "checking for TIME... " >&6; }
19119        if test ! -x "$tool_specified"; then
19120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19121$as_echo "not found" >&6; }
19122          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19123        fi
19124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19125$as_echo "$tool_specified" >&6; }
19126      fi
19127    fi
19128  fi
19129
19130
19131  # Check if it's GNU time
19132  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19133  if test "x$IS_GNU_TIME" != x; then
19134    IS_GNU_TIME=yes
19135  else
19136    IS_GNU_TIME=no
19137  fi
19138
19139
19140  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19141
19142
19143
19144  # Publish this variable in the help.
19145
19146
19147  if test "x$DSYMUTIL" = x; then
19148    # The variable is not set by user, try to locate tool using the code snippet
19149    for ac_prog in dsymutil
19150do
19151  # Extract the first word of "$ac_prog", so it can be a program name with args.
19152set dummy $ac_prog; ac_word=$2
19153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19154$as_echo_n "checking for $ac_word... " >&6; }
19155if ${ac_cv_path_DSYMUTIL+:} false; then :
19156  $as_echo_n "(cached) " >&6
19157else
19158  case $DSYMUTIL in
19159  [\\/]* | ?:[\\/]*)
19160  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19161  ;;
19162  *)
19163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19164for as_dir in $PATH
19165do
19166  IFS=$as_save_IFS
19167  test -z "$as_dir" && as_dir=.
19168    for ac_exec_ext in '' $ac_executable_extensions; do
19169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19170    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19172    break 2
19173  fi
19174done
19175  done
19176IFS=$as_save_IFS
19177
19178  ;;
19179esac
19180fi
19181DSYMUTIL=$ac_cv_path_DSYMUTIL
19182if test -n "$DSYMUTIL"; then
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19184$as_echo "$DSYMUTIL" >&6; }
19185else
19186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19187$as_echo "no" >&6; }
19188fi
19189
19190
19191  test -n "$DSYMUTIL" && break
19192done
19193
19194  else
19195    # The variable is set, but is it from the command line or the environment?
19196
19197    # Try to remove the string !DSYMUTIL! from our list.
19198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19200      # If it failed, the variable was not from the command line. Ignore it,
19201      # but warn the user (except for BASH, which is always set by the calling BASH).
19202      if test "xDSYMUTIL" != xBASH; then
19203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19204$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19205      fi
19206      # Try to locate tool using the code snippet
19207      for ac_prog in dsymutil
19208do
19209  # Extract the first word of "$ac_prog", so it can be a program name with args.
19210set dummy $ac_prog; ac_word=$2
19211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19212$as_echo_n "checking for $ac_word... " >&6; }
19213if ${ac_cv_path_DSYMUTIL+:} false; then :
19214  $as_echo_n "(cached) " >&6
19215else
19216  case $DSYMUTIL in
19217  [\\/]* | ?:[\\/]*)
19218  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19219  ;;
19220  *)
19221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19222for as_dir in $PATH
19223do
19224  IFS=$as_save_IFS
19225  test -z "$as_dir" && as_dir=.
19226    for ac_exec_ext in '' $ac_executable_extensions; do
19227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19228    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19230    break 2
19231  fi
19232done
19233  done
19234IFS=$as_save_IFS
19235
19236  ;;
19237esac
19238fi
19239DSYMUTIL=$ac_cv_path_DSYMUTIL
19240if test -n "$DSYMUTIL"; then
19241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19242$as_echo "$DSYMUTIL" >&6; }
19243else
19244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19245$as_echo "no" >&6; }
19246fi
19247
19248
19249  test -n "$DSYMUTIL" && break
19250done
19251
19252    else
19253      # If it succeeded, then it was overridden by the user. We will use it
19254      # for the tool.
19255
19256      # First remove it from the list of overridden variables, so we can test
19257      # for unknown variables in the end.
19258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19259
19260      # Check if the provided tool contains a complete path.
19261      tool_specified="$DSYMUTIL"
19262      tool_basename="${tool_specified##*/}"
19263      if test "x$tool_basename" = "x$tool_specified"; then
19264        # A command without a complete path is provided, search $PATH.
19265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19266$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19267        # Extract the first word of "$tool_basename", so it can be a program name with args.
19268set dummy $tool_basename; ac_word=$2
19269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19270$as_echo_n "checking for $ac_word... " >&6; }
19271if ${ac_cv_path_DSYMUTIL+:} false; then :
19272  $as_echo_n "(cached) " >&6
19273else
19274  case $DSYMUTIL in
19275  [\\/]* | ?:[\\/]*)
19276  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19277  ;;
19278  *)
19279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19280for as_dir in $PATH
19281do
19282  IFS=$as_save_IFS
19283  test -z "$as_dir" && as_dir=.
19284    for ac_exec_ext in '' $ac_executable_extensions; do
19285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19286    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19288    break 2
19289  fi
19290done
19291  done
19292IFS=$as_save_IFS
19293
19294  ;;
19295esac
19296fi
19297DSYMUTIL=$ac_cv_path_DSYMUTIL
19298if test -n "$DSYMUTIL"; then
19299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19300$as_echo "$DSYMUTIL" >&6; }
19301else
19302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19303$as_echo "no" >&6; }
19304fi
19305
19306
19307        if test "x$DSYMUTIL" = x; then
19308          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19309        fi
19310      else
19311        # Otherwise we believe it is a complete path. Use it as it is.
19312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19313$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19315$as_echo_n "checking for DSYMUTIL... " >&6; }
19316        if test ! -x "$tool_specified"; then
19317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19318$as_echo "not found" >&6; }
19319          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19320        fi
19321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19322$as_echo "$tool_specified" >&6; }
19323      fi
19324    fi
19325  fi
19326
19327
19328
19329  if test "x$DSYMUTIL" = x; then
19330    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19331  fi
19332
19333
19334
19335
19336
19337  # Publish this variable in the help.
19338
19339
19340  if test "x$XATTR" = x; then
19341    # The variable is not set by user, try to locate tool using the code snippet
19342    for ac_prog in xattr
19343do
19344  # Extract the first word of "$ac_prog", so it can be a program name with args.
19345set dummy $ac_prog; ac_word=$2
19346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19347$as_echo_n "checking for $ac_word... " >&6; }
19348if ${ac_cv_path_XATTR+:} false; then :
19349  $as_echo_n "(cached) " >&6
19350else
19351  case $XATTR in
19352  [\\/]* | ?:[\\/]*)
19353  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19354  ;;
19355  *)
19356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19357for as_dir in $PATH
19358do
19359  IFS=$as_save_IFS
19360  test -z "$as_dir" && as_dir=.
19361    for ac_exec_ext in '' $ac_executable_extensions; do
19362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19363    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19365    break 2
19366  fi
19367done
19368  done
19369IFS=$as_save_IFS
19370
19371  ;;
19372esac
19373fi
19374XATTR=$ac_cv_path_XATTR
19375if test -n "$XATTR"; then
19376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19377$as_echo "$XATTR" >&6; }
19378else
19379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19380$as_echo "no" >&6; }
19381fi
19382
19383
19384  test -n "$XATTR" && break
19385done
19386
19387  else
19388    # The variable is set, but is it from the command line or the environment?
19389
19390    # Try to remove the string !XATTR! from our list.
19391    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19392    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19393      # If it failed, the variable was not from the command line. Ignore it,
19394      # but warn the user (except for BASH, which is always set by the calling BASH).
19395      if test "xXATTR" != xBASH; then
19396        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19397$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19398      fi
19399      # Try to locate tool using the code snippet
19400      for ac_prog in xattr
19401do
19402  # Extract the first word of "$ac_prog", so it can be a program name with args.
19403set dummy $ac_prog; ac_word=$2
19404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19405$as_echo_n "checking for $ac_word... " >&6; }
19406if ${ac_cv_path_XATTR+:} false; then :
19407  $as_echo_n "(cached) " >&6
19408else
19409  case $XATTR in
19410  [\\/]* | ?:[\\/]*)
19411  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19412  ;;
19413  *)
19414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19415for as_dir in $PATH
19416do
19417  IFS=$as_save_IFS
19418  test -z "$as_dir" && as_dir=.
19419    for ac_exec_ext in '' $ac_executable_extensions; do
19420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19421    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19423    break 2
19424  fi
19425done
19426  done
19427IFS=$as_save_IFS
19428
19429  ;;
19430esac
19431fi
19432XATTR=$ac_cv_path_XATTR
19433if test -n "$XATTR"; then
19434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19435$as_echo "$XATTR" >&6; }
19436else
19437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19438$as_echo "no" >&6; }
19439fi
19440
19441
19442  test -n "$XATTR" && break
19443done
19444
19445    else
19446      # If it succeeded, then it was overridden by the user. We will use it
19447      # for the tool.
19448
19449      # First remove it from the list of overridden variables, so we can test
19450      # for unknown variables in the end.
19451      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19452
19453      # Check if the provided tool contains a complete path.
19454      tool_specified="$XATTR"
19455      tool_basename="${tool_specified##*/}"
19456      if test "x$tool_basename" = "x$tool_specified"; then
19457        # A command without a complete path is provided, search $PATH.
19458        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19459$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19460        # Extract the first word of "$tool_basename", so it can be a program name with args.
19461set dummy $tool_basename; ac_word=$2
19462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19463$as_echo_n "checking for $ac_word... " >&6; }
19464if ${ac_cv_path_XATTR+:} false; then :
19465  $as_echo_n "(cached) " >&6
19466else
19467  case $XATTR in
19468  [\\/]* | ?:[\\/]*)
19469  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19470  ;;
19471  *)
19472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19473for as_dir in $PATH
19474do
19475  IFS=$as_save_IFS
19476  test -z "$as_dir" && as_dir=.
19477    for ac_exec_ext in '' $ac_executable_extensions; do
19478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19479    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19481    break 2
19482  fi
19483done
19484  done
19485IFS=$as_save_IFS
19486
19487  ;;
19488esac
19489fi
19490XATTR=$ac_cv_path_XATTR
19491if test -n "$XATTR"; then
19492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19493$as_echo "$XATTR" >&6; }
19494else
19495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19496$as_echo "no" >&6; }
19497fi
19498
19499
19500        if test "x$XATTR" = x; then
19501          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19502        fi
19503      else
19504        # Otherwise we believe it is a complete path. Use it as it is.
19505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19506$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19508$as_echo_n "checking for XATTR... " >&6; }
19509        if test ! -x "$tool_specified"; then
19510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19511$as_echo "not found" >&6; }
19512          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19513        fi
19514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19515$as_echo "$tool_specified" >&6; }
19516      fi
19517    fi
19518  fi
19519
19520
19521
19522  if test "x$XATTR" = x; then
19523    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19524  fi
19525
19526
19527
19528
19529  # Publish this variable in the help.
19530
19531
19532  if test "x$CODESIGN" = x; then
19533    # The variable is not set by user, try to locate tool using the code snippet
19534    for ac_prog in codesign
19535do
19536  # Extract the first word of "$ac_prog", so it can be a program name with args.
19537set dummy $ac_prog; ac_word=$2
19538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19539$as_echo_n "checking for $ac_word... " >&6; }
19540if ${ac_cv_path_CODESIGN+:} false; then :
19541  $as_echo_n "(cached) " >&6
19542else
19543  case $CODESIGN in
19544  [\\/]* | ?:[\\/]*)
19545  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19546  ;;
19547  *)
19548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19549for as_dir in $PATH
19550do
19551  IFS=$as_save_IFS
19552  test -z "$as_dir" && as_dir=.
19553    for ac_exec_ext in '' $ac_executable_extensions; do
19554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19555    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19557    break 2
19558  fi
19559done
19560  done
19561IFS=$as_save_IFS
19562
19563  ;;
19564esac
19565fi
19566CODESIGN=$ac_cv_path_CODESIGN
19567if test -n "$CODESIGN"; then
19568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19569$as_echo "$CODESIGN" >&6; }
19570else
19571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19572$as_echo "no" >&6; }
19573fi
19574
19575
19576  test -n "$CODESIGN" && break
19577done
19578
19579  else
19580    # The variable is set, but is it from the command line or the environment?
19581
19582    # Try to remove the string !CODESIGN! from our list.
19583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19585      # If it failed, the variable was not from the command line. Ignore it,
19586      # but warn the user (except for BASH, which is always set by the calling BASH).
19587      if test "xCODESIGN" != xBASH; then
19588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19589$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19590      fi
19591      # Try to locate tool using the code snippet
19592      for ac_prog in codesign
19593do
19594  # Extract the first word of "$ac_prog", so it can be a program name with args.
19595set dummy $ac_prog; ac_word=$2
19596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19597$as_echo_n "checking for $ac_word... " >&6; }
19598if ${ac_cv_path_CODESIGN+:} false; then :
19599  $as_echo_n "(cached) " >&6
19600else
19601  case $CODESIGN in
19602  [\\/]* | ?:[\\/]*)
19603  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19604  ;;
19605  *)
19606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19607for as_dir in $PATH
19608do
19609  IFS=$as_save_IFS
19610  test -z "$as_dir" && as_dir=.
19611    for ac_exec_ext in '' $ac_executable_extensions; do
19612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19613    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19615    break 2
19616  fi
19617done
19618  done
19619IFS=$as_save_IFS
19620
19621  ;;
19622esac
19623fi
19624CODESIGN=$ac_cv_path_CODESIGN
19625if test -n "$CODESIGN"; then
19626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19627$as_echo "$CODESIGN" >&6; }
19628else
19629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19630$as_echo "no" >&6; }
19631fi
19632
19633
19634  test -n "$CODESIGN" && break
19635done
19636
19637    else
19638      # If it succeeded, then it was overridden by the user. We will use it
19639      # for the tool.
19640
19641      # First remove it from the list of overridden variables, so we can test
19642      # for unknown variables in the end.
19643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19644
19645      # Check if the provided tool contains a complete path.
19646      tool_specified="$CODESIGN"
19647      tool_basename="${tool_specified##*/}"
19648      if test "x$tool_basename" = "x$tool_specified"; then
19649        # A command without a complete path is provided, search $PATH.
19650        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19651$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19652        # Extract the first word of "$tool_basename", so it can be a program name with args.
19653set dummy $tool_basename; ac_word=$2
19654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19655$as_echo_n "checking for $ac_word... " >&6; }
19656if ${ac_cv_path_CODESIGN+:} false; then :
19657  $as_echo_n "(cached) " >&6
19658else
19659  case $CODESIGN in
19660  [\\/]* | ?:[\\/]*)
19661  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19662  ;;
19663  *)
19664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19665for as_dir in $PATH
19666do
19667  IFS=$as_save_IFS
19668  test -z "$as_dir" && as_dir=.
19669    for ac_exec_ext in '' $ac_executable_extensions; do
19670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19671    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19673    break 2
19674  fi
19675done
19676  done
19677IFS=$as_save_IFS
19678
19679  ;;
19680esac
19681fi
19682CODESIGN=$ac_cv_path_CODESIGN
19683if test -n "$CODESIGN"; then
19684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19685$as_echo "$CODESIGN" >&6; }
19686else
19687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19688$as_echo "no" >&6; }
19689fi
19690
19691
19692        if test "x$CODESIGN" = x; then
19693          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19694        fi
19695      else
19696        # Otherwise we believe it is a complete path. Use it as it is.
19697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19698$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19700$as_echo_n "checking for CODESIGN... " >&6; }
19701        if test ! -x "$tool_specified"; then
19702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19703$as_echo "not found" >&6; }
19704          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19705        fi
19706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19707$as_echo "$tool_specified" >&6; }
19708      fi
19709    fi
19710  fi
19711
19712
19713    if test "x$CODESIGN" != "x"; then
19714      # Verify that the openjdk_codesign certificate is present
19715      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19716$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19717      rm -f codesign-testfile
19718      touch codesign-testfile
19719      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19720      rm -f codesign-testfile
19721      if test "x$CODESIGN" = x; then
19722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19723$as_echo "no" >&6; }
19724      else
19725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19726$as_echo "yes" >&6; }
19727      fi
19728    fi
19729  fi
19730
19731
19732  # Test if bash supports pipefail.
19733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19734$as_echo_n "checking if bash supports pipefail... " >&6; }
19735  if ${BASH} -c 'set -o pipefail'; then
19736    BASH_ARGS="$BASH_ARGS -o pipefail"
19737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19738$as_echo "yes" >&6; }
19739  else
19740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19741$as_echo "no" >&6; }
19742  fi
19743
19744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19745$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19746  if ${BASH} -e -c 'true'; then
19747    BASH_ARGS="$BASH_ARGS -e"
19748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19749$as_echo "yes" >&6; }
19750  else
19751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19752$as_echo "no" >&6; }
19753  fi
19754
19755
19756
19757
19758# Check if pkg-config is available.
19759
19760
19761if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19762	if test -n "$ac_tool_prefix"; then
19763  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19764set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19766$as_echo_n "checking for $ac_word... " >&6; }
19767if ${ac_cv_path_PKG_CONFIG+:} false; then :
19768  $as_echo_n "(cached) " >&6
19769else
19770  case $PKG_CONFIG in
19771  [\\/]* | ?:[\\/]*)
19772  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19773  ;;
19774  *)
19775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19776for as_dir in $PATH
19777do
19778  IFS=$as_save_IFS
19779  test -z "$as_dir" && as_dir=.
19780    for ac_exec_ext in '' $ac_executable_extensions; do
19781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19782    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19784    break 2
19785  fi
19786done
19787  done
19788IFS=$as_save_IFS
19789
19790  ;;
19791esac
19792fi
19793PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19794if test -n "$PKG_CONFIG"; then
19795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19796$as_echo "$PKG_CONFIG" >&6; }
19797else
19798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19799$as_echo "no" >&6; }
19800fi
19801
19802
19803fi
19804if test -z "$ac_cv_path_PKG_CONFIG"; then
19805  ac_pt_PKG_CONFIG=$PKG_CONFIG
19806  # Extract the first word of "pkg-config", so it can be a program name with args.
19807set dummy pkg-config; ac_word=$2
19808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19809$as_echo_n "checking for $ac_word... " >&6; }
19810if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19811  $as_echo_n "(cached) " >&6
19812else
19813  case $ac_pt_PKG_CONFIG in
19814  [\\/]* | ?:[\\/]*)
19815  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19816  ;;
19817  *)
19818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19819for as_dir in $PATH
19820do
19821  IFS=$as_save_IFS
19822  test -z "$as_dir" && as_dir=.
19823    for ac_exec_ext in '' $ac_executable_extensions; do
19824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19825    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19827    break 2
19828  fi
19829done
19830  done
19831IFS=$as_save_IFS
19832
19833  ;;
19834esac
19835fi
19836ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19837if test -n "$ac_pt_PKG_CONFIG"; then
19838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19839$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19840else
19841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19842$as_echo "no" >&6; }
19843fi
19844
19845  if test "x$ac_pt_PKG_CONFIG" = x; then
19846    PKG_CONFIG=""
19847  else
19848    case $cross_compiling:$ac_tool_warned in
19849yes:)
19850{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19851$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19852ac_tool_warned=yes ;;
19853esac
19854    PKG_CONFIG=$ac_pt_PKG_CONFIG
19855  fi
19856else
19857  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19858fi
19859
19860fi
19861if test -n "$PKG_CONFIG"; then
19862	_pkg_min_version=0.9.0
19863	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19864$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19865	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19866		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19867$as_echo "yes" >&6; }
19868	else
19869		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19870$as_echo "no" >&6; }
19871		PKG_CONFIG=""
19872	fi
19873
19874fi
19875
19876# After basic tools have been setup, we can check build os specific details.
19877
19878  ###############################################################################
19879
19880  # Note that this is the build platform OS version!
19881
19882  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19883  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19884  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19885  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19886
19887
19888
19889
19890
19891# Setup builddeps, for automatic downloading of tools we need.
19892# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19893# boot-jdk setup, but we need to have basic tools setup first.
19894
19895
19896# Check whether --with-builddeps-conf was given.
19897if test "${with_builddeps_conf+set}" = set; then :
19898  withval=$with_builddeps_conf;
19899fi
19900
19901
19902
19903# Check whether --with-builddeps-server was given.
19904if test "${with_builddeps_server+set}" = set; then :
19905  withval=$with_builddeps_server;
19906fi
19907
19908
19909
19910# Check whether --with-builddeps-dir was given.
19911if test "${with_builddeps_dir+set}" = set; then :
19912  withval=$with_builddeps_dir;
19913else
19914  with_builddeps_dir=/localhome/builddeps
19915fi
19916
19917
19918
19919# Check whether --with-builddeps-group was given.
19920if test "${with_builddeps_group+set}" = set; then :
19921  withval=$with_builddeps_group;
19922fi
19923
19924
19925
19926
19927  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19928    if test "x$with_builddeps_conf" != x; then
19929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19930$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19931      builddepsfile=$with_builddeps_conf
19932      if test -s $builddepsfile; then
19933        . $builddepsfile
19934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19935$as_echo "loaded!" >&6; }
19936      else
19937        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19938      fi
19939    else
19940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19941$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19942      builddepsfile=`mktemp`
19943      touch $builddepsfile
19944      # Put all found confs into a single file.
19945      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19946      # Source the file to acquire the variables
19947      if test -s $builddepsfile; then
19948        . $builddepsfile
19949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19950$as_echo "found at least one!" >&6; }
19951      else
19952        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19953      fi
19954    fi
19955    # Create build and target names that use _ instead of "-" and ".".
19956    # This is necessary to use them in variable names.
19957    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19958    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19959    # Extract rewrite information for build and target
19960    eval rewritten_build=\${REWRITE_${build_var}}
19961    if test "x$rewritten_build" = x; then
19962      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19963      echo Build stays the same $rewritten_build
19964    else
19965      echo Rewriting build for builddeps into $rewritten_build
19966    fi
19967    eval rewritten_target=\${REWRITE_${target_var}}
19968    if test "x$rewritten_target" = x; then
19969      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19970      echo Target stays the same $rewritten_target
19971    else
19972      echo Rewriting target for builddeps into $rewritten_target
19973    fi
19974    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19975    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19976  fi
19977  for ac_prog in 7z unzip
19978do
19979  # Extract the first word of "$ac_prog", so it can be a program name with args.
19980set dummy $ac_prog; ac_word=$2
19981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19982$as_echo_n "checking for $ac_word... " >&6; }
19983if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19984  $as_echo_n "(cached) " >&6
19985else
19986  if test -n "$BDEPS_UNZIP"; then
19987  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19988else
19989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19990for as_dir in $PATH
19991do
19992  IFS=$as_save_IFS
19993  test -z "$as_dir" && as_dir=.
19994    for ac_exec_ext in '' $ac_executable_extensions; do
19995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19996    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19998    break 2
19999  fi
20000done
20001  done
20002IFS=$as_save_IFS
20003
20004fi
20005fi
20006BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20007if test -n "$BDEPS_UNZIP"; then
20008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20009$as_echo "$BDEPS_UNZIP" >&6; }
20010else
20011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20012$as_echo "no" >&6; }
20013fi
20014
20015
20016  test -n "$BDEPS_UNZIP" && break
20017done
20018
20019  if test "x$BDEPS_UNZIP" = x7z; then
20020    BDEPS_UNZIP="7z x"
20021  fi
20022
20023  for ac_prog in wget lftp ftp
20024do
20025  # Extract the first word of "$ac_prog", so it can be a program name with args.
20026set dummy $ac_prog; ac_word=$2
20027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20028$as_echo_n "checking for $ac_word... " >&6; }
20029if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20030  $as_echo_n "(cached) " >&6
20031else
20032  if test -n "$BDEPS_FTP"; then
20033  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20034else
20035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20036for as_dir in $PATH
20037do
20038  IFS=$as_save_IFS
20039  test -z "$as_dir" && as_dir=.
20040    for ac_exec_ext in '' $ac_executable_extensions; do
20041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20042    ac_cv_prog_BDEPS_FTP="$ac_prog"
20043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20044    break 2
20045  fi
20046done
20047  done
20048IFS=$as_save_IFS
20049
20050fi
20051fi
20052BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20053if test -n "$BDEPS_FTP"; then
20054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20055$as_echo "$BDEPS_FTP" >&6; }
20056else
20057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20058$as_echo "no" >&6; }
20059fi
20060
20061
20062  test -n "$BDEPS_FTP" && break
20063done
20064
20065
20066
20067###############################################################################
20068#
20069# Determine OpenJDK variants, options and version numbers.
20070#
20071###############################################################################
20072
20073# We need build & target for this.
20074
20075
20076  ###############################################################################
20077  #
20078  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20079  # We always build headless support.
20080  #
20081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20082$as_echo_n "checking headful support... " >&6; }
20083  # Check whether --enable-headful was given.
20084if test "${enable_headful+set}" = set; then :
20085  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20086else
20087  SUPPORT_HEADFUL=yes
20088fi
20089
20090
20091  SUPPORT_HEADLESS=yes
20092  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20093
20094  if test "x$SUPPORT_HEADFUL" = xyes; then
20095    # We are building both headful and headless.
20096    headful_msg="include support for both headful and headless"
20097  fi
20098
20099  if test "x$SUPPORT_HEADFUL" = xno; then
20100    # Thus we are building headless only.
20101    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20102    headful_msg="headless only"
20103  fi
20104
20105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20106$as_echo "$headful_msg" >&6; }
20107
20108
20109
20110
20111
20112  # Control wether Hotspot runs Queens test after build.
20113  # Check whether --enable-hotspot-test-in-build was given.
20114if test "${enable_hotspot_test_in_build+set}" = set; then :
20115  enableval=$enable_hotspot_test_in_build;
20116else
20117  enable_hotspot_test_in_build=no
20118fi
20119
20120  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20121    TEST_IN_BUILD=true
20122  else
20123    TEST_IN_BUILD=false
20124  fi
20125
20126
20127  ###############################################################################
20128  #
20129  # Choose cacerts source file
20130  #
20131
20132# Check whether --with-cacerts-file was given.
20133if test "${with_cacerts_file+set}" = set; then :
20134  withval=$with_cacerts_file;
20135fi
20136
20137  if test "x$with_cacerts_file" != x; then
20138    CACERTS_FILE=$with_cacerts_file
20139  fi
20140
20141
20142  ###############################################################################
20143  #
20144  # Enable or disable unlimited crypto
20145  #
20146  # Check whether --enable-unlimited-crypto was given.
20147if test "${enable_unlimited_crypto+set}" = set; then :
20148  enableval=$enable_unlimited_crypto;
20149else
20150  enable_unlimited_crypto=no
20151fi
20152
20153  if test "x$enable_unlimited_crypto" = "xyes"; then
20154    UNLIMITED_CRYPTO=true
20155  else
20156    UNLIMITED_CRYPTO=false
20157  fi
20158
20159
20160  ###############################################################################
20161  #
20162  # --enable-rmiconnector-iiop
20163  #
20164  # Check whether --enable-rmiconnector-iiop was given.
20165if test "${enable_rmiconnector_iiop+set}" = set; then :
20166  enableval=$enable_rmiconnector_iiop;
20167fi
20168
20169  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20170    RMICONNECTOR_IIOP=true
20171  else
20172    RMICONNECTOR_IIOP=false
20173  fi
20174
20175
20176  ###############################################################################
20177  #
20178  # Compress jars
20179  #
20180  COMPRESS_JARS=false
20181
20182
20183
20184  # Setup default copyright year. Mostly overridden when building close to a new year.
20185
20186# Check whether --with-copyright-year was given.
20187if test "${with_copyright_year+set}" = set; then :
20188  withval=$with_copyright_year;
20189fi
20190
20191  if test "x$with_copyright_year" = xyes; then
20192    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20193  elif test "x$with_copyright_year" != x; then
20194    COPYRIGHT_YEAR="$with_copyright_year"
20195  else
20196    COPYRIGHT_YEAR=`date +'%Y'`
20197  fi
20198
20199
20200
20201  # Warn user that old version arguments are deprecated.
20202
20203
20204# Check whether --with-milestone was given.
20205if test "${with_milestone+set}" = set; then :
20206  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20207$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20208fi
20209
20210
20211
20212
20213# Check whether --with-update-version was given.
20214if test "${with_update_version+set}" = set; then :
20215  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20216$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20217fi
20218
20219
20220
20221
20222# Check whether --with-user-release-suffix was given.
20223if test "${with_user_release_suffix+set}" = set; then :
20224  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
20225$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20226fi
20227
20228
20229
20230
20231# Check whether --with-build-number was given.
20232if test "${with_build_number+set}" = set; then :
20233  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20234$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20235fi
20236
20237
20238
20239  # Source the version numbers file
20240  . $AUTOCONF_DIR/version-numbers
20241
20242  # Some non-version number information is set in that file
20243
20244
20245
20246
20247
20248
20249
20250
20251  # Override version from arguments
20252
20253  # If --with-version-string is set, process it first. It is possible to
20254  # override parts with more specific flags, since these are processed later.
20255
20256# Check whether --with-version-string was given.
20257if test "${with_version_string+set}" = set; then :
20258  withval=$with_version_string;
20259fi
20260
20261  if test "x$with_version_string" = xyes; then
20262    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20263  elif test "x$with_version_string" != x; then
20264    # Additional [] needed to keep m4 from mangling shell constructs.
20265    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?(_([a-zA-Z]+))?)?$ ]] ; then
20266      VERSION_MAJOR=${BASH_REMATCH[1]}
20267      VERSION_MINOR=${BASH_REMATCH[3]}
20268      VERSION_SECURITY=${BASH_REMATCH[5]}
20269      VERSION_PATCH=${BASH_REMATCH[7]}
20270      VERSION_PRE=${BASH_REMATCH[9]}
20271      version_plus_separator=${BASH_REMATCH[11]}
20272      VERSION_BUILD=${BASH_REMATCH[12]}
20273      VERSION_OPT_BASE=${BASH_REMATCH[14]}
20274      VERSION_OPT_DEBUGLEVEL=${BASH_REMATCH[16]}
20275      # Unspecified numerical fields are interpreted as 0.
20276      if test "x$VERSION_MINOR" = x; then
20277        VERSION_MINOR=0
20278      fi
20279      if test "x$VERSION_SECURITY" = x; then
20280        VERSION_SECURITY=0
20281      fi
20282      if test "x$VERSION_PATCH" = x; then
20283        VERSION_PATCH=0
20284      fi
20285      if test "x$version_plus_separator" != x \
20286          && test "x$VERSION_BUILD$VERSION_OPT_BASE$VERSION_OPT_DEBUGLEVEL" = x; then
20287        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20288      fi
20289      # Stop the version part process from setting default values.
20290      # We still allow them to explicitely override though.
20291      NO_DEFAULT_VERSION_PARTS=true
20292    else
20293      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20294    fi
20295  fi
20296
20297
20298# Check whether --with-version-pre was given.
20299if test "${with_version_pre+set}" = set; then :
20300  withval=$with_version_pre; with_version_pre_present=true
20301else
20302  with_version_pre_present=false
20303fi
20304
20305
20306  if test "x$with_version_pre_present" = xtrue; then
20307    if test "x$with_version_pre" = xyes; then
20308      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
20309    elif test "x$with_version_pre" = xno; then
20310      # Interpret --without-* as empty string instead of the literal "no"
20311      VERSION_PRE=
20312    else
20313      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20314       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
20315      if test "x$VERSION_PRE" != "x$with_version_pre"; then
20316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
20317$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
20318      fi
20319    fi
20320  else
20321    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20322      # Default is to use "internal" as pre
20323      VERSION_PRE="internal"
20324    fi
20325  fi
20326
20327
20328# Check whether --with-version-opt-base was given.
20329if test "${with_version_opt_base+set}" = set; then :
20330  withval=$with_version_opt_base; with_version_opt_base_present=true
20331else
20332  with_version_opt_base_present=false
20333fi
20334
20335
20336  if test "x$with_version_opt_base_present" = xtrue; then
20337    if test "x$with_version_opt_base" = xyes; then
20338      as_fn_error $? "--with-version-opt-base must have a value" "$LINENO" 5
20339    elif test "x$with_version_opt_base" = xno; then
20340      # Interpret --without-* as empty string instead of the literal "no"
20341      VERSION_OPT_BASE=
20342    else
20343      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_BASE. Outer [ ] to quote m4.
20344       VERSION_OPT_BASE=`$ECHO "$with_version_opt_base" | $TR -c -d '[a-z][A-Z][0-9].-'`
20345      if test "x$VERSION_OPT_BASE" != "x$with_version_opt_base"; then
20346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&5
20347$as_echo "$as_me: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&2;}
20348      fi
20349    fi
20350  else
20351    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20352      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20353      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20354      # Outer [ ] to quote m4.
20355       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20356       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20357      VERSION_OPT_BASE="$timestamp.$username.$basedirname"
20358    fi
20359  fi
20360
20361
20362# Check whether --with-version-opt-debuglevel was given.
20363if test "${with_version_opt_debuglevel+set}" = set; then :
20364  withval=$with_version_opt_debuglevel; with_version_opt_debuglevel_present=true
20365else
20366  with_version_opt_debuglevel_present=false
20367fi
20368
20369
20370  if test "x$with_version_opt_debuglevel_present" = xtrue; then
20371    if test "x$with_version_opt_debuglevel" = xyes; then
20372      as_fn_error $? "--with-version-opt-debuglevel must have a value" "$LINENO" 5
20373    elif test "x$with_version_opt_debuglevel" = xno; then
20374      # Interpret --without-* as empty string instead of the literal "no"
20375      VERSION_OPT_DEBUGLEVEL=
20376    else
20377      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_DEBUGLEVEL. Outer [ ] to quote m4.
20378       VERSION_OPT_DEBUGLEVEL=`$ECHO "$with_version_opt_debuglevel" | $TR -c -d '[a-z][A-Z][0-9].-'`
20379      if test "x$VERSION_OPT_DEBUGLEVEL" != "x$with_version_opt_debuglevel"; then
20380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&5
20381$as_echo "$as_me: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&2;}
20382      fi
20383    fi
20384  else
20385    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20386      # Default is to use the debug level name, except for release which is empty.
20387      if test "x$DEBUG_LEVEL" != "xrelease"; then
20388        VERSION_OPT_DEBUGLEVEL="$DEBUG_LEVEL"
20389      else
20390        VERSION_OPT_DEBUGLEVEL=""
20391      fi
20392    fi
20393  fi
20394
20395# Check whether --with-version-build was given.
20396if test "${with_version_build+set}" = set; then :
20397  withval=$with_version_build; with_version_build_present=true
20398else
20399  with_version_build_present=false
20400fi
20401
20402
20403  if test "x$with_version_build_present" = xtrue; then
20404    if test "x$with_version_build" = xyes; then
20405      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20406    elif test "x$with_version_build" = xno; then
20407      # Interpret --without-* as empty string instead of the literal "no"
20408      VERSION_BUILD=
20409    elif test "x$with_version_build" = x; then
20410      VERSION_BUILD=
20411    else
20412
20413  # Additional [] needed to keep m4 from mangling shell constructs.
20414  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20415    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20416  fi
20417  # Extract the version number without leading zeros.
20418  cleaned_value=${BASH_REMATCH[1]}
20419  if test "x$cleaned_value" = x; then
20420    # Special case for zero
20421    cleaned_value=${BASH_REMATCH[2]}
20422  fi
20423
20424  if test $cleaned_value -gt 255; then
20425    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20426  fi
20427  if test "x$cleaned_value" != "x$with_version_build"; then
20428    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20429$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20430  fi
20431  VERSION_BUILD=$cleaned_value
20432
20433    fi
20434  else
20435    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20436      # Default is to not have a build number.
20437      VERSION_BUILD=""
20438      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20439      VERSION_BUILD=0
20440    fi
20441  fi
20442
20443
20444# Check whether --with-version-major was given.
20445if test "${with_version_major+set}" = set; then :
20446  withval=$with_version_major; with_version_major_present=true
20447else
20448  with_version_major_present=false
20449fi
20450
20451
20452  if test "x$with_version_major_present" = xtrue; then
20453    if test "x$with_version_major" = xyes; then
20454      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20455    else
20456
20457  # Additional [] needed to keep m4 from mangling shell constructs.
20458  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20459    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20460  fi
20461  # Extract the version number without leading zeros.
20462  cleaned_value=${BASH_REMATCH[1]}
20463  if test "x$cleaned_value" = x; then
20464    # Special case for zero
20465    cleaned_value=${BASH_REMATCH[2]}
20466  fi
20467
20468  if test $cleaned_value -gt 255; then
20469    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20470  fi
20471  if test "x$cleaned_value" != "x$with_version_major"; then
20472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20473$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20474  fi
20475  VERSION_MAJOR=$cleaned_value
20476
20477    fi
20478  else
20479    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20480      # Default is to get value from version-numbers
20481      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20482    fi
20483  fi
20484
20485
20486# Check whether --with-version-minor was given.
20487if test "${with_version_minor+set}" = set; then :
20488  withval=$with_version_minor; with_version_minor_present=true
20489else
20490  with_version_minor_present=false
20491fi
20492
20493
20494  if test "x$with_version_minor_present" = xtrue; then
20495    if test "x$with_version_minor" = xyes; then
20496      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20497    elif test "x$with_version_minor" = xno; then
20498      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20499      VERSION_MINOR=0
20500    elif test "x$with_version_minor" = x; then
20501      VERSION_MINOR=0
20502    else
20503
20504  # Additional [] needed to keep m4 from mangling shell constructs.
20505  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20506    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20507  fi
20508  # Extract the version number without leading zeros.
20509  cleaned_value=${BASH_REMATCH[1]}
20510  if test "x$cleaned_value" = x; then
20511    # Special case for zero
20512    cleaned_value=${BASH_REMATCH[2]}
20513  fi
20514
20515  if test $cleaned_value -gt 255; then
20516    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20517  fi
20518  if test "x$cleaned_value" != "x$with_version_minor"; then
20519    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20520$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20521  fi
20522  VERSION_MINOR=$cleaned_value
20523
20524    fi
20525  else
20526    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20527      # Default is 0, if unspecified
20528      VERSION_MINOR=0
20529    fi
20530  fi
20531
20532
20533# Check whether --with-version-security was given.
20534if test "${with_version_security+set}" = set; then :
20535  withval=$with_version_security; with_version_security_present=true
20536else
20537  with_version_security_present=false
20538fi
20539
20540
20541  if test "x$with_version_security_present" = xtrue; then
20542    if test "x$with_version_security" = xyes; then
20543      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20544    elif test "x$with_version_security" = xno; then
20545      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20546      VERSION_SECURITY=0
20547    elif test "x$with_version_security" = x; then
20548      VERSION_SECURITY=0
20549    else
20550
20551  # Additional [] needed to keep m4 from mangling shell constructs.
20552  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20553    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20554  fi
20555  # Extract the version number without leading zeros.
20556  cleaned_value=${BASH_REMATCH[1]}
20557  if test "x$cleaned_value" = x; then
20558    # Special case for zero
20559    cleaned_value=${BASH_REMATCH[2]}
20560  fi
20561
20562  if test $cleaned_value -gt 255; then
20563    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20564  fi
20565  if test "x$cleaned_value" != "x$with_version_security"; then
20566    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20567$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20568  fi
20569  VERSION_SECURITY=$cleaned_value
20570
20571    fi
20572  else
20573    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20574      # Default is 0, if unspecified
20575      VERSION_SECURITY=0
20576    fi
20577  fi
20578
20579
20580# Check whether --with-version-patch was given.
20581if test "${with_version_patch+set}" = set; then :
20582  withval=$with_version_patch; with_version_patch_present=true
20583else
20584  with_version_patch_present=false
20585fi
20586
20587
20588  if test "x$with_version_patch_present" = xtrue; then
20589    if test "x$with_version_patch" = xyes; then
20590      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20591    elif test "x$with_version_patch" = xno; then
20592      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20593      VERSION_PATCH=0
20594    elif test "x$with_version_patch" = x; then
20595      VERSION_PATCH=0
20596    else
20597
20598  # Additional [] needed to keep m4 from mangling shell constructs.
20599  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20600    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20601  fi
20602  # Extract the version number without leading zeros.
20603  cleaned_value=${BASH_REMATCH[1]}
20604  if test "x$cleaned_value" = x; then
20605    # Special case for zero
20606    cleaned_value=${BASH_REMATCH[2]}
20607  fi
20608
20609  if test $cleaned_value -gt 255; then
20610    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20611  fi
20612  if test "x$cleaned_value" != "x$with_version_patch"; then
20613    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20614$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20615  fi
20616  VERSION_PATCH=$cleaned_value
20617
20618    fi
20619  else
20620    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20621      # Default is 0, if unspecified
20622      VERSION_PATCH=0
20623    fi
20624  fi
20625
20626  # Calculate derived version properties
20627
20628  # Set opt to "opt-base" if debug level is empty (i.e. release), or
20629  # "opt-base_debug-level" otherwise.
20630  VERSION_OPT=$VERSION_OPT_BASE${VERSION_OPT_DEBUGLEVEL:+_$VERSION_OPT_DEBUGLEVEL}
20631
20632  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20633  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20634
20635  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20636  # Strip trailing zeroes from stripped_version_number
20637  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20638  VERSION_NUMBER=$stripped_version_number
20639
20640  # The complete version string, with additional build information
20641  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20642    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20643  else
20644    # If either build or opt is set, we need a + separator
20645    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20646  fi
20647
20648  # The short version string, just VERSION_NUMBER and PRE, if present.
20649  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20650
20651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20652$as_echo_n "checking for version string... " >&6; }
20653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20654$as_echo "$VERSION_STRING" >&6; }
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669###############################################################################
20670#
20671# Setup BootJDK, used to bootstrap the build.
20672#
20673###############################################################################
20674
20675
20676  BOOT_JDK_FOUND=no
20677
20678# Check whether --with-boot-jdk was given.
20679if test "${with_boot_jdk+set}" = set; then :
20680  withval=$with_boot_jdk;
20681fi
20682
20683
20684  # We look for the Boot JDK through various means, going from more certain to
20685  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20686  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20687  # must check if this is indeed valid; otherwise we'll continue looking.
20688
20689  # Test: Is bootjdk explicitely set by command line arguments?
20690
20691  if test "x$BOOT_JDK_FOUND" = xno; then
20692    # Now execute the test
20693
20694  if test "x$with_boot_jdk" != x; then
20695    BOOT_JDK=$with_boot_jdk
20696    BOOT_JDK_FOUND=maybe
20697    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20698$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20699  fi
20700
20701
20702    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20703    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20704      # Do we have a bin/java?
20705      if test ! -x "$BOOT_JDK/bin/java"; then
20706        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20708        BOOT_JDK_FOUND=no
20709      else
20710        # Do we have a bin/javac?
20711        if test ! -x "$BOOT_JDK/bin/javac"; then
20712          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20714          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20715$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20716          BOOT_JDK_FOUND=no
20717        else
20718          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20719          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20720
20721          # Extra M4 quote needed to protect [] in grep expression.
20722          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20723          if test "x$FOUND_CORRECT_VERSION" = x; then
20724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20726            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20727$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20728            BOOT_JDK_FOUND=no
20729          else
20730            # We're done! :-)
20731            BOOT_JDK_FOUND=yes
20732
20733  # Only process if variable expands to non-empty
20734
20735  if test "x$BOOT_JDK" != x; then
20736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20737
20738  # Input might be given as Windows format, start by converting to
20739  # unix format.
20740  path="$BOOT_JDK"
20741  new_path=`$CYGPATH -u "$path"`
20742
20743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20746  # "foo.exe" is OK but "foo" is an error.
20747  #
20748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20749  # It is also a way to make sure we got the proper file name for the real test later on.
20750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20751  if test "x$test_shortpath" = x; then
20752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20754    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20755  fi
20756
20757  # Call helper function which possibly converts this using DOS-style short mode.
20758  # If so, the updated path is stored in $new_path.
20759
20760  input_path="$new_path"
20761  # Check if we need to convert this using DOS-style short mode. If the path
20762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20763  # take no chances and rewrite it.
20764  # Note: m4 eats our [], so we need to use [ and ] instead.
20765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20766  if test "x$has_forbidden_chars" != x; then
20767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20771      # Going to short mode and back again did indeed matter. Since short mode is
20772      # case insensitive, let's make it lowercase to improve readability.
20773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20774      # Now convert it back to Unix-style (cygpath)
20775      input_path=`$CYGPATH -u "$shortmode_path"`
20776      new_path="$input_path"
20777    fi
20778  fi
20779
20780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20781  if test "x$test_cygdrive_prefix" = x; then
20782    # As a simple fix, exclude /usr/bin since it's not a real path.
20783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20785      # a path prefixed by /cygdrive for fixpath to work.
20786      new_path="$CYGWIN_ROOT_PATH$input_path"
20787    fi
20788  fi
20789
20790
20791  if test "x$path" != "x$new_path"; then
20792    BOOT_JDK="$new_path"
20793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20795  fi
20796
20797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20798
20799  path="$BOOT_JDK"
20800  has_colon=`$ECHO $path | $GREP ^.:`
20801  new_path="$path"
20802  if test "x$has_colon" = x; then
20803    # Not in mixed or Windows style, start by that.
20804    new_path=`cmd //c echo $path`
20805  fi
20806
20807
20808  input_path="$new_path"
20809  # Check if we need to convert this using DOS-style short mode. If the path
20810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20811  # take no chances and rewrite it.
20812  # Note: m4 eats our [], so we need to use [ and ] instead.
20813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20814  if test "x$has_forbidden_chars" != x; then
20815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20817  fi
20818
20819
20820  windows_path="$new_path"
20821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20822    unix_path=`$CYGPATH -u "$windows_path"`
20823    new_path="$unix_path"
20824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20826    new_path="$unix_path"
20827  fi
20828
20829  if test "x$path" != "x$new_path"; then
20830    BOOT_JDK="$new_path"
20831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20833  fi
20834
20835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20837
20838    else
20839      # We're on a unix platform. Hooray! :)
20840      path="$BOOT_JDK"
20841      has_space=`$ECHO "$path" | $GREP " "`
20842      if test "x$has_space" != x; then
20843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20846      fi
20847
20848      # Use eval to expand a potential ~
20849      eval path="$path"
20850      if test ! -f "$path" && test ! -d "$path"; then
20851        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20852      fi
20853
20854      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20855    fi
20856  fi
20857
20858            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20859$as_echo_n "checking for Boot JDK... " >&6; }
20860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20861$as_echo "$BOOT_JDK" >&6; }
20862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20863$as_echo_n "checking Boot JDK version... " >&6; }
20864            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20866$as_echo "$BOOT_JDK_VERSION" >&6; }
20867          fi # end check jdk version
20868        fi # end check javac
20869      fi # end check java
20870    fi # end check boot jdk found
20871  fi
20872
20873  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20874    # Having specified an argument which is incorrect will produce an instant failure;
20875    # we should not go on looking
20876    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20877  fi
20878
20879  # Test: Is bootjdk available from builddeps?
20880
20881  if test "x$BOOT_JDK_FOUND" = xno; then
20882    # Now execute the test
20883
20884
20885
20886  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20887    # Source the builddeps file again, to make sure it uses the latest variables!
20888    . $builddepsfile
20889    # Look for a target and build machine specific resource!
20890    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20891    if test "x$resource" = x; then
20892      # Ok, lets instead look for a target specific resource
20893      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20894    fi
20895    if test "x$resource" = x; then
20896      # Ok, lets instead look for a build specific resource
20897      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20898    fi
20899    if test "x$resource" = x; then
20900      # Ok, lets instead look for a generic resource
20901      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20902      resource=${builddep_bootjdk}
20903    fi
20904    if test "x$resource" != x; then
20905      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20906$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20907      # If the resource in the builddeps.conf file is an existing directory,
20908      # for example /java/linux/cups
20909      if test -d ${resource}; then
20910        depdir=${resource}
20911      else
20912
20913  # bootjdk is for example mymodule
20914  # $resource is for example libs/general/libmymod_1_2_3.zip
20915  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20916  # $with_builddeps_dir is for example /localhome/builddeps
20917  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20918  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20919  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20920  filename=`basename $resource`
20921  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20922  filebase=${filename%%.*}
20923  extension=${filename#*.}
20924  installdir=$with_builddeps_dir/$filebase
20925  if test ! -f $installdir/$filename.unpacked; then
20926    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20927$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20928    if test ! -d $installdir; then
20929      mkdir -p $installdir
20930    fi
20931    if test ! -d $installdir; then
20932      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20933    fi
20934    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20935    touch $tmpfile
20936    if test ! -f $tmpfile; then
20937      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20938    fi
20939
20940  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20941  # $tmpfile is the local file name for the downloaded file.
20942  VALID_TOOL=no
20943  if test "x$BDEPS_FTP" = xwget; then
20944    VALID_TOOL=yes
20945    wget -O $tmpfile $with_builddeps_server/$resource
20946  fi
20947  if test "x$BDEPS_FTP" = xlftp; then
20948    VALID_TOOL=yes
20949    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20950  fi
20951  if test "x$BDEPS_FTP" = xftp; then
20952    VALID_TOOL=yes
20953    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20954    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20955    FTPUSERPWD=${FTPSERVER%%@*}
20956    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20957      FTPUSER=${userpwd%%:*}
20958      FTPPWD=${userpwd#*@}
20959      FTPSERVER=${FTPSERVER#*@}
20960    else
20961      FTPUSER=ftp
20962      FTPPWD=ftp
20963    fi
20964    # the "pass" command does not work on some
20965    # ftp clients (read ftp.exe) but if it works,
20966    # passive mode is better!
20967    ( \
20968        echo "user $FTPUSER $FTPPWD"        ; \
20969        echo "pass"                         ; \
20970        echo "bin"                          ; \
20971        echo "get $FTPPATH $tmpfile"              ; \
20972    ) | ftp -in $FTPSERVER
20973  fi
20974  if test "x$VALID_TOOL" != xyes; then
20975    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20976  fi
20977
20978    mv $tmpfile $installdir/$filename
20979    if test ! -s $installdir/$filename; then
20980      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20981    fi
20982    case "$extension" in
20983      zip)  echo "Unzipping $installdir/$filename..."
20984        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20985        ;;
20986      tar.gz) echo "Untaring $installdir/$filename..."
20987        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20988        ;;
20989      tgz) echo "Untaring $installdir/$filename..."
20990        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20991        ;;
20992      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20993        ;;
20994    esac
20995  fi
20996  if test -f $installdir/$filename.unpacked; then
20997    depdir=$installdir
20998  fi
20999
21000      fi
21001      # Source the builddeps file again, because in the previous command, the depdir
21002      # was updated to point at the current build dependency install directory.
21003      . $builddepsfile
21004      # Now extract variables from the builddeps.conf files.
21005      theroot=${builddep_bootjdk_ROOT}
21006      thecflags=${builddep_bootjdk_CFLAGS}
21007      thelibs=${builddep_bootjdk_LIBS}
21008      if test "x$depdir" = x; then
21009        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21010      fi
21011      BOOT_JDK=$depdir
21012      if test "x$theroot" != x; then
21013        BOOT_JDK="$theroot"
21014      fi
21015      if test "x$thecflags" != x; then
21016        BOOT_JDK_CFLAGS="$thecflags"
21017      fi
21018      if test "x$thelibs" != x; then
21019        BOOT_JDK_LIBS="$thelibs"
21020      fi
21021      BOOT_JDK_FOUND=maybe
21022      else BOOT_JDK_FOUND=no
21023
21024    fi
21025    else BOOT_JDK_FOUND=no
21026
21027  fi
21028
21029
21030
21031    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21032    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21033      # Do we have a bin/java?
21034      if test ! -x "$BOOT_JDK/bin/java"; then
21035        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21037        BOOT_JDK_FOUND=no
21038      else
21039        # Do we have a bin/javac?
21040        if test ! -x "$BOOT_JDK/bin/javac"; then
21041          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21043          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21044$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21045          BOOT_JDK_FOUND=no
21046        else
21047          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21048          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21049
21050          # Extra M4 quote needed to protect [] in grep expression.
21051          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21052          if test "x$FOUND_CORRECT_VERSION" = x; then
21053            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21055            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21056$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21057            BOOT_JDK_FOUND=no
21058          else
21059            # We're done! :-)
21060            BOOT_JDK_FOUND=yes
21061
21062  # Only process if variable expands to non-empty
21063
21064  if test "x$BOOT_JDK" != x; then
21065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21066
21067  # Input might be given as Windows format, start by converting to
21068  # unix format.
21069  path="$BOOT_JDK"
21070  new_path=`$CYGPATH -u "$path"`
21071
21072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21075  # "foo.exe" is OK but "foo" is an error.
21076  #
21077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21078  # It is also a way to make sure we got the proper file name for the real test later on.
21079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21080  if test "x$test_shortpath" = x; then
21081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21084  fi
21085
21086  # Call helper function which possibly converts this using DOS-style short mode.
21087  # If so, the updated path is stored in $new_path.
21088
21089  input_path="$new_path"
21090  # Check if we need to convert this using DOS-style short mode. If the path
21091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21092  # take no chances and rewrite it.
21093  # Note: m4 eats our [], so we need to use [ and ] instead.
21094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21095  if test "x$has_forbidden_chars" != x; then
21096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21100      # Going to short mode and back again did indeed matter. Since short mode is
21101      # case insensitive, let's make it lowercase to improve readability.
21102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21103      # Now convert it back to Unix-style (cygpath)
21104      input_path=`$CYGPATH -u "$shortmode_path"`
21105      new_path="$input_path"
21106    fi
21107  fi
21108
21109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21110  if test "x$test_cygdrive_prefix" = x; then
21111    # As a simple fix, exclude /usr/bin since it's not a real path.
21112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21114      # a path prefixed by /cygdrive for fixpath to work.
21115      new_path="$CYGWIN_ROOT_PATH$input_path"
21116    fi
21117  fi
21118
21119
21120  if test "x$path" != "x$new_path"; then
21121    BOOT_JDK="$new_path"
21122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21124  fi
21125
21126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21127
21128  path="$BOOT_JDK"
21129  has_colon=`$ECHO $path | $GREP ^.:`
21130  new_path="$path"
21131  if test "x$has_colon" = x; then
21132    # Not in mixed or Windows style, start by that.
21133    new_path=`cmd //c echo $path`
21134  fi
21135
21136
21137  input_path="$new_path"
21138  # Check if we need to convert this using DOS-style short mode. If the path
21139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21140  # take no chances and rewrite it.
21141  # Note: m4 eats our [], so we need to use [ and ] instead.
21142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21143  if test "x$has_forbidden_chars" != x; then
21144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21146  fi
21147
21148
21149  windows_path="$new_path"
21150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21151    unix_path=`$CYGPATH -u "$windows_path"`
21152    new_path="$unix_path"
21153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21155    new_path="$unix_path"
21156  fi
21157
21158  if test "x$path" != "x$new_path"; then
21159    BOOT_JDK="$new_path"
21160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21162  fi
21163
21164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21166
21167    else
21168      # We're on a unix platform. Hooray! :)
21169      path="$BOOT_JDK"
21170      has_space=`$ECHO "$path" | $GREP " "`
21171      if test "x$has_space" != x; then
21172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21175      fi
21176
21177      # Use eval to expand a potential ~
21178      eval path="$path"
21179      if test ! -f "$path" && test ! -d "$path"; then
21180        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21181      fi
21182
21183      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21184    fi
21185  fi
21186
21187            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21188$as_echo_n "checking for Boot JDK... " >&6; }
21189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21190$as_echo "$BOOT_JDK" >&6; }
21191            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21192$as_echo_n "checking Boot JDK version... " >&6; }
21193            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21195$as_echo "$BOOT_JDK_VERSION" >&6; }
21196          fi # end check jdk version
21197        fi # end check javac
21198      fi # end check java
21199    fi # end check boot jdk found
21200  fi
21201
21202
21203  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21204
21205  if test "x$BOOT_JDK_FOUND" = xno; then
21206    # Now execute the test
21207
21208  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21209    # First check at user selected default
21210
21211  if test "x$BOOT_JDK_FOUND" = xno; then
21212    # Now execute the test
21213
21214  if test -x /usr/libexec/java_home; then
21215    BOOT_JDK=`/usr/libexec/java_home `
21216    BOOT_JDK_FOUND=maybe
21217    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21218$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21219  fi
21220
21221
21222    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21223    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21224      # Do we have a bin/java?
21225      if test ! -x "$BOOT_JDK/bin/java"; then
21226        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21228        BOOT_JDK_FOUND=no
21229      else
21230        # Do we have a bin/javac?
21231        if test ! -x "$BOOT_JDK/bin/javac"; then
21232          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21234          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21235$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21236          BOOT_JDK_FOUND=no
21237        else
21238          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21239          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21240
21241          # Extra M4 quote needed to protect [] in grep expression.
21242          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21243          if test "x$FOUND_CORRECT_VERSION" = x; then
21244            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21246            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21247$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21248            BOOT_JDK_FOUND=no
21249          else
21250            # We're done! :-)
21251            BOOT_JDK_FOUND=yes
21252
21253  # Only process if variable expands to non-empty
21254
21255  if test "x$BOOT_JDK" != x; then
21256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21257
21258  # Input might be given as Windows format, start by converting to
21259  # unix format.
21260  path="$BOOT_JDK"
21261  new_path=`$CYGPATH -u "$path"`
21262
21263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21266  # "foo.exe" is OK but "foo" is an error.
21267  #
21268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21269  # It is also a way to make sure we got the proper file name for the real test later on.
21270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21271  if test "x$test_shortpath" = x; then
21272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21275  fi
21276
21277  # Call helper function which possibly converts this using DOS-style short mode.
21278  # If so, the updated path is stored in $new_path.
21279
21280  input_path="$new_path"
21281  # Check if we need to convert this using DOS-style short mode. If the path
21282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21283  # take no chances and rewrite it.
21284  # Note: m4 eats our [], so we need to use [ and ] instead.
21285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21286  if test "x$has_forbidden_chars" != x; then
21287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21291      # Going to short mode and back again did indeed matter. Since short mode is
21292      # case insensitive, let's make it lowercase to improve readability.
21293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21294      # Now convert it back to Unix-style (cygpath)
21295      input_path=`$CYGPATH -u "$shortmode_path"`
21296      new_path="$input_path"
21297    fi
21298  fi
21299
21300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21301  if test "x$test_cygdrive_prefix" = x; then
21302    # As a simple fix, exclude /usr/bin since it's not a real path.
21303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21305      # a path prefixed by /cygdrive for fixpath to work.
21306      new_path="$CYGWIN_ROOT_PATH$input_path"
21307    fi
21308  fi
21309
21310
21311  if test "x$path" != "x$new_path"; then
21312    BOOT_JDK="$new_path"
21313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21315  fi
21316
21317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21318
21319  path="$BOOT_JDK"
21320  has_colon=`$ECHO $path | $GREP ^.:`
21321  new_path="$path"
21322  if test "x$has_colon" = x; then
21323    # Not in mixed or Windows style, start by that.
21324    new_path=`cmd //c echo $path`
21325  fi
21326
21327
21328  input_path="$new_path"
21329  # Check if we need to convert this using DOS-style short mode. If the path
21330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21331  # take no chances and rewrite it.
21332  # Note: m4 eats our [], so we need to use [ and ] instead.
21333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21334  if test "x$has_forbidden_chars" != x; then
21335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21337  fi
21338
21339
21340  windows_path="$new_path"
21341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21342    unix_path=`$CYGPATH -u "$windows_path"`
21343    new_path="$unix_path"
21344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21346    new_path="$unix_path"
21347  fi
21348
21349  if test "x$path" != "x$new_path"; then
21350    BOOT_JDK="$new_path"
21351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21353  fi
21354
21355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21357
21358    else
21359      # We're on a unix platform. Hooray! :)
21360      path="$BOOT_JDK"
21361      has_space=`$ECHO "$path" | $GREP " "`
21362      if test "x$has_space" != x; then
21363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21366      fi
21367
21368      # Use eval to expand a potential ~
21369      eval path="$path"
21370      if test ! -f "$path" && test ! -d "$path"; then
21371        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21372      fi
21373
21374      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21375    fi
21376  fi
21377
21378            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21379$as_echo_n "checking for Boot JDK... " >&6; }
21380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21381$as_echo "$BOOT_JDK" >&6; }
21382            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21383$as_echo_n "checking Boot JDK version... " >&6; }
21384            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21386$as_echo "$BOOT_JDK_VERSION" >&6; }
21387          fi # end check jdk version
21388        fi # end check javac
21389      fi # end check java
21390    fi # end check boot jdk found
21391  fi
21392
21393    # If that did not work out (e.g. too old), try explicit versions instead
21394
21395  if test "x$BOOT_JDK_FOUND" = xno; then
21396    # Now execute the test
21397
21398  if test -x /usr/libexec/java_home; then
21399    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21400    BOOT_JDK_FOUND=maybe
21401    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21402$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21403  fi
21404
21405
21406    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21407    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21408      # Do we have a bin/java?
21409      if test ! -x "$BOOT_JDK/bin/java"; then
21410        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21412        BOOT_JDK_FOUND=no
21413      else
21414        # Do we have a bin/javac?
21415        if test ! -x "$BOOT_JDK/bin/javac"; then
21416          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21418          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21419$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21420          BOOT_JDK_FOUND=no
21421        else
21422          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21423          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21424
21425          # Extra M4 quote needed to protect [] in grep expression.
21426          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21427          if test "x$FOUND_CORRECT_VERSION" = x; then
21428            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21430            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21431$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21432            BOOT_JDK_FOUND=no
21433          else
21434            # We're done! :-)
21435            BOOT_JDK_FOUND=yes
21436
21437  # Only process if variable expands to non-empty
21438
21439  if test "x$BOOT_JDK" != x; then
21440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21441
21442  # Input might be given as Windows format, start by converting to
21443  # unix format.
21444  path="$BOOT_JDK"
21445  new_path=`$CYGPATH -u "$path"`
21446
21447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21450  # "foo.exe" is OK but "foo" is an error.
21451  #
21452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21453  # It is also a way to make sure we got the proper file name for the real test later on.
21454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21455  if test "x$test_shortpath" = x; then
21456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21458    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21459  fi
21460
21461  # Call helper function which possibly converts this using DOS-style short mode.
21462  # If so, the updated path is stored in $new_path.
21463
21464  input_path="$new_path"
21465  # Check if we need to convert this using DOS-style short mode. If the path
21466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21467  # take no chances and rewrite it.
21468  # Note: m4 eats our [], so we need to use [ and ] instead.
21469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21470  if test "x$has_forbidden_chars" != x; then
21471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21475      # Going to short mode and back again did indeed matter. Since short mode is
21476      # case insensitive, let's make it lowercase to improve readability.
21477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21478      # Now convert it back to Unix-style (cygpath)
21479      input_path=`$CYGPATH -u "$shortmode_path"`
21480      new_path="$input_path"
21481    fi
21482  fi
21483
21484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21485  if test "x$test_cygdrive_prefix" = x; then
21486    # As a simple fix, exclude /usr/bin since it's not a real path.
21487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21489      # a path prefixed by /cygdrive for fixpath to work.
21490      new_path="$CYGWIN_ROOT_PATH$input_path"
21491    fi
21492  fi
21493
21494
21495  if test "x$path" != "x$new_path"; then
21496    BOOT_JDK="$new_path"
21497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21499  fi
21500
21501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21502
21503  path="$BOOT_JDK"
21504  has_colon=`$ECHO $path | $GREP ^.:`
21505  new_path="$path"
21506  if test "x$has_colon" = x; then
21507    # Not in mixed or Windows style, start by that.
21508    new_path=`cmd //c echo $path`
21509  fi
21510
21511
21512  input_path="$new_path"
21513  # Check if we need to convert this using DOS-style short mode. If the path
21514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21515  # take no chances and rewrite it.
21516  # Note: m4 eats our [], so we need to use [ and ] instead.
21517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21518  if test "x$has_forbidden_chars" != x; then
21519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21521  fi
21522
21523
21524  windows_path="$new_path"
21525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21526    unix_path=`$CYGPATH -u "$windows_path"`
21527    new_path="$unix_path"
21528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21530    new_path="$unix_path"
21531  fi
21532
21533  if test "x$path" != "x$new_path"; then
21534    BOOT_JDK="$new_path"
21535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21537  fi
21538
21539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21541
21542    else
21543      # We're on a unix platform. Hooray! :)
21544      path="$BOOT_JDK"
21545      has_space=`$ECHO "$path" | $GREP " "`
21546      if test "x$has_space" != x; then
21547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21550      fi
21551
21552      # Use eval to expand a potential ~
21553      eval path="$path"
21554      if test ! -f "$path" && test ! -d "$path"; then
21555        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21556      fi
21557
21558      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21559    fi
21560  fi
21561
21562            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21563$as_echo_n "checking for Boot JDK... " >&6; }
21564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21565$as_echo "$BOOT_JDK" >&6; }
21566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21567$as_echo_n "checking Boot JDK version... " >&6; }
21568            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21570$as_echo "$BOOT_JDK_VERSION" >&6; }
21571          fi # end check jdk version
21572        fi # end check javac
21573      fi # end check java
21574    fi # end check boot jdk found
21575  fi
21576
21577
21578  if test "x$BOOT_JDK_FOUND" = xno; then
21579    # Now execute the test
21580
21581  if test -x /usr/libexec/java_home; then
21582    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21583    BOOT_JDK_FOUND=maybe
21584    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21585$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21586  fi
21587
21588
21589    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21590    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21591      # Do we have a bin/java?
21592      if test ! -x "$BOOT_JDK/bin/java"; then
21593        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21595        BOOT_JDK_FOUND=no
21596      else
21597        # Do we have a bin/javac?
21598        if test ! -x "$BOOT_JDK/bin/javac"; then
21599          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21601          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21602$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21603          BOOT_JDK_FOUND=no
21604        else
21605          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21606          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21607
21608          # Extra M4 quote needed to protect [] in grep expression.
21609          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21610          if test "x$FOUND_CORRECT_VERSION" = x; then
21611            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21613            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21614$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21615            BOOT_JDK_FOUND=no
21616          else
21617            # We're done! :-)
21618            BOOT_JDK_FOUND=yes
21619
21620  # Only process if variable expands to non-empty
21621
21622  if test "x$BOOT_JDK" != x; then
21623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21624
21625  # Input might be given as Windows format, start by converting to
21626  # unix format.
21627  path="$BOOT_JDK"
21628  new_path=`$CYGPATH -u "$path"`
21629
21630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21633  # "foo.exe" is OK but "foo" is an error.
21634  #
21635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21636  # It is also a way to make sure we got the proper file name for the real test later on.
21637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21638  if test "x$test_shortpath" = x; then
21639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21641    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21642  fi
21643
21644  # Call helper function which possibly converts this using DOS-style short mode.
21645  # If so, the updated path is stored in $new_path.
21646
21647  input_path="$new_path"
21648  # Check if we need to convert this using DOS-style short mode. If the path
21649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21650  # take no chances and rewrite it.
21651  # Note: m4 eats our [], so we need to use [ and ] instead.
21652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21653  if test "x$has_forbidden_chars" != x; then
21654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21658      # Going to short mode and back again did indeed matter. Since short mode is
21659      # case insensitive, let's make it lowercase to improve readability.
21660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21661      # Now convert it back to Unix-style (cygpath)
21662      input_path=`$CYGPATH -u "$shortmode_path"`
21663      new_path="$input_path"
21664    fi
21665  fi
21666
21667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21668  if test "x$test_cygdrive_prefix" = x; then
21669    # As a simple fix, exclude /usr/bin since it's not a real path.
21670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21672      # a path prefixed by /cygdrive for fixpath to work.
21673      new_path="$CYGWIN_ROOT_PATH$input_path"
21674    fi
21675  fi
21676
21677
21678  if test "x$path" != "x$new_path"; then
21679    BOOT_JDK="$new_path"
21680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21682  fi
21683
21684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21685
21686  path="$BOOT_JDK"
21687  has_colon=`$ECHO $path | $GREP ^.:`
21688  new_path="$path"
21689  if test "x$has_colon" = x; then
21690    # Not in mixed or Windows style, start by that.
21691    new_path=`cmd //c echo $path`
21692  fi
21693
21694
21695  input_path="$new_path"
21696  # Check if we need to convert this using DOS-style short mode. If the path
21697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21698  # take no chances and rewrite it.
21699  # Note: m4 eats our [], so we need to use [ and ] instead.
21700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21701  if test "x$has_forbidden_chars" != x; then
21702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21704  fi
21705
21706
21707  windows_path="$new_path"
21708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21709    unix_path=`$CYGPATH -u "$windows_path"`
21710    new_path="$unix_path"
21711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21713    new_path="$unix_path"
21714  fi
21715
21716  if test "x$path" != "x$new_path"; then
21717    BOOT_JDK="$new_path"
21718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21719$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21720  fi
21721
21722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21724
21725    else
21726      # We're on a unix platform. Hooray! :)
21727      path="$BOOT_JDK"
21728      has_space=`$ECHO "$path" | $GREP " "`
21729      if test "x$has_space" != x; then
21730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21733      fi
21734
21735      # Use eval to expand a potential ~
21736      eval path="$path"
21737      if test ! -f "$path" && test ! -d "$path"; then
21738        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21739      fi
21740
21741      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21742    fi
21743  fi
21744
21745            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21746$as_echo_n "checking for Boot JDK... " >&6; }
21747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21748$as_echo "$BOOT_JDK" >&6; }
21749            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21750$as_echo_n "checking Boot JDK version... " >&6; }
21751            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21753$as_echo "$BOOT_JDK_VERSION" >&6; }
21754          fi # end check jdk version
21755        fi # end check javac
21756      fi # end check java
21757    fi # end check boot jdk found
21758  fi
21759
21760
21761  if test "x$BOOT_JDK_FOUND" = xno; then
21762    # Now execute the test
21763
21764  if test -x /usr/libexec/java_home; then
21765    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21766    BOOT_JDK_FOUND=maybe
21767    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21768$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21769  fi
21770
21771
21772    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21773    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21774      # Do we have a bin/java?
21775      if test ! -x "$BOOT_JDK/bin/java"; then
21776        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21778        BOOT_JDK_FOUND=no
21779      else
21780        # Do we have a bin/javac?
21781        if test ! -x "$BOOT_JDK/bin/javac"; then
21782          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21784          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21785$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21786          BOOT_JDK_FOUND=no
21787        else
21788          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21789          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21790
21791          # Extra M4 quote needed to protect [] in grep expression.
21792          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21793          if test "x$FOUND_CORRECT_VERSION" = x; then
21794            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21796            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21797$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21798            BOOT_JDK_FOUND=no
21799          else
21800            # We're done! :-)
21801            BOOT_JDK_FOUND=yes
21802
21803  # Only process if variable expands to non-empty
21804
21805  if test "x$BOOT_JDK" != x; then
21806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21807
21808  # Input might be given as Windows format, start by converting to
21809  # unix format.
21810  path="$BOOT_JDK"
21811  new_path=`$CYGPATH -u "$path"`
21812
21813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21816  # "foo.exe" is OK but "foo" is an error.
21817  #
21818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21819  # It is also a way to make sure we got the proper file name for the real test later on.
21820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21821  if test "x$test_shortpath" = x; then
21822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21825  fi
21826
21827  # Call helper function which possibly converts this using DOS-style short mode.
21828  # If so, the updated path is stored in $new_path.
21829
21830  input_path="$new_path"
21831  # Check if we need to convert this using DOS-style short mode. If the path
21832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21833  # take no chances and rewrite it.
21834  # Note: m4 eats our [], so we need to use [ and ] instead.
21835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21836  if test "x$has_forbidden_chars" != x; then
21837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21841      # Going to short mode and back again did indeed matter. Since short mode is
21842      # case insensitive, let's make it lowercase to improve readability.
21843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21844      # Now convert it back to Unix-style (cygpath)
21845      input_path=`$CYGPATH -u "$shortmode_path"`
21846      new_path="$input_path"
21847    fi
21848  fi
21849
21850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21851  if test "x$test_cygdrive_prefix" = x; then
21852    # As a simple fix, exclude /usr/bin since it's not a real path.
21853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21855      # a path prefixed by /cygdrive for fixpath to work.
21856      new_path="$CYGWIN_ROOT_PATH$input_path"
21857    fi
21858  fi
21859
21860
21861  if test "x$path" != "x$new_path"; then
21862    BOOT_JDK="$new_path"
21863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21865  fi
21866
21867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21868
21869  path="$BOOT_JDK"
21870  has_colon=`$ECHO $path | $GREP ^.:`
21871  new_path="$path"
21872  if test "x$has_colon" = x; then
21873    # Not in mixed or Windows style, start by that.
21874    new_path=`cmd //c echo $path`
21875  fi
21876
21877
21878  input_path="$new_path"
21879  # Check if we need to convert this using DOS-style short mode. If the path
21880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21881  # take no chances and rewrite it.
21882  # Note: m4 eats our [], so we need to use [ and ] instead.
21883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21884  if test "x$has_forbidden_chars" != x; then
21885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21887  fi
21888
21889
21890  windows_path="$new_path"
21891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21892    unix_path=`$CYGPATH -u "$windows_path"`
21893    new_path="$unix_path"
21894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21896    new_path="$unix_path"
21897  fi
21898
21899  if test "x$path" != "x$new_path"; then
21900    BOOT_JDK="$new_path"
21901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21903  fi
21904
21905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21907
21908    else
21909      # We're on a unix platform. Hooray! :)
21910      path="$BOOT_JDK"
21911      has_space=`$ECHO "$path" | $GREP " "`
21912      if test "x$has_space" != x; then
21913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21916      fi
21917
21918      # Use eval to expand a potential ~
21919      eval path="$path"
21920      if test ! -f "$path" && test ! -d "$path"; then
21921        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21922      fi
21923
21924      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21925    fi
21926  fi
21927
21928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21929$as_echo_n "checking for Boot JDK... " >&6; }
21930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21931$as_echo "$BOOT_JDK" >&6; }
21932            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21933$as_echo_n "checking Boot JDK version... " >&6; }
21934            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21936$as_echo "$BOOT_JDK_VERSION" >&6; }
21937          fi # end check jdk version
21938        fi # end check javac
21939      fi # end check java
21940    fi # end check boot jdk found
21941  fi
21942
21943  fi
21944
21945
21946    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21947    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21948      # Do we have a bin/java?
21949      if test ! -x "$BOOT_JDK/bin/java"; then
21950        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21952        BOOT_JDK_FOUND=no
21953      else
21954        # Do we have a bin/javac?
21955        if test ! -x "$BOOT_JDK/bin/javac"; then
21956          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21958          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21959$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21960          BOOT_JDK_FOUND=no
21961        else
21962          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21963          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21964
21965          # Extra M4 quote needed to protect [] in grep expression.
21966          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21967          if test "x$FOUND_CORRECT_VERSION" = x; then
21968            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21970            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21971$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21972            BOOT_JDK_FOUND=no
21973          else
21974            # We're done! :-)
21975            BOOT_JDK_FOUND=yes
21976
21977  # Only process if variable expands to non-empty
21978
21979  if test "x$BOOT_JDK" != x; then
21980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21981
21982  # Input might be given as Windows format, start by converting to
21983  # unix format.
21984  path="$BOOT_JDK"
21985  new_path=`$CYGPATH -u "$path"`
21986
21987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21990  # "foo.exe" is OK but "foo" is an error.
21991  #
21992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21993  # It is also a way to make sure we got the proper file name for the real test later on.
21994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21995  if test "x$test_shortpath" = x; then
21996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21999  fi
22000
22001  # Call helper function which possibly converts this using DOS-style short mode.
22002  # If so, the updated path is stored in $new_path.
22003
22004  input_path="$new_path"
22005  # Check if we need to convert this using DOS-style short mode. If the path
22006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22007  # take no chances and rewrite it.
22008  # Note: m4 eats our [], so we need to use [ and ] instead.
22009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22010  if test "x$has_forbidden_chars" != x; then
22011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22015      # Going to short mode and back again did indeed matter. Since short mode is
22016      # case insensitive, let's make it lowercase to improve readability.
22017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22018      # Now convert it back to Unix-style (cygpath)
22019      input_path=`$CYGPATH -u "$shortmode_path"`
22020      new_path="$input_path"
22021    fi
22022  fi
22023
22024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22025  if test "x$test_cygdrive_prefix" = x; then
22026    # As a simple fix, exclude /usr/bin since it's not a real path.
22027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22029      # a path prefixed by /cygdrive for fixpath to work.
22030      new_path="$CYGWIN_ROOT_PATH$input_path"
22031    fi
22032  fi
22033
22034
22035  if test "x$path" != "x$new_path"; then
22036    BOOT_JDK="$new_path"
22037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22039  fi
22040
22041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22042
22043  path="$BOOT_JDK"
22044  has_colon=`$ECHO $path | $GREP ^.:`
22045  new_path="$path"
22046  if test "x$has_colon" = x; then
22047    # Not in mixed or Windows style, start by that.
22048    new_path=`cmd //c echo $path`
22049  fi
22050
22051
22052  input_path="$new_path"
22053  # Check if we need to convert this using DOS-style short mode. If the path
22054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22055  # take no chances and rewrite it.
22056  # Note: m4 eats our [], so we need to use [ and ] instead.
22057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22058  if test "x$has_forbidden_chars" != x; then
22059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22061  fi
22062
22063
22064  windows_path="$new_path"
22065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22066    unix_path=`$CYGPATH -u "$windows_path"`
22067    new_path="$unix_path"
22068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22070    new_path="$unix_path"
22071  fi
22072
22073  if test "x$path" != "x$new_path"; then
22074    BOOT_JDK="$new_path"
22075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22077  fi
22078
22079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22081
22082    else
22083      # We're on a unix platform. Hooray! :)
22084      path="$BOOT_JDK"
22085      has_space=`$ECHO "$path" | $GREP " "`
22086      if test "x$has_space" != x; then
22087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22088$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22090      fi
22091
22092      # Use eval to expand a potential ~
22093      eval path="$path"
22094      if test ! -f "$path" && test ! -d "$path"; then
22095        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22096      fi
22097
22098      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22099    fi
22100  fi
22101
22102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22103$as_echo_n "checking for Boot JDK... " >&6; }
22104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22105$as_echo "$BOOT_JDK" >&6; }
22106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22107$as_echo_n "checking Boot JDK version... " >&6; }
22108            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22110$as_echo "$BOOT_JDK_VERSION" >&6; }
22111          fi # end check jdk version
22112        fi # end check javac
22113      fi # end check java
22114    fi # end check boot jdk found
22115  fi
22116
22117
22118  # Test: Is $JAVA_HOME set?
22119
22120  if test "x$BOOT_JDK_FOUND" = xno; then
22121    # Now execute the test
22122
22123  if test "x$JAVA_HOME" != x; then
22124    JAVA_HOME_PROCESSED="$JAVA_HOME"
22125
22126  # Only process if variable expands to non-empty
22127
22128  if test "x$JAVA_HOME_PROCESSED" != x; then
22129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22130
22131  # Input might be given as Windows format, start by converting to
22132  # unix format.
22133  path="$JAVA_HOME_PROCESSED"
22134  new_path=`$CYGPATH -u "$path"`
22135
22136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22139  # "foo.exe" is OK but "foo" is an error.
22140  #
22141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22142  # It is also a way to make sure we got the proper file name for the real test later on.
22143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22144  if test "x$test_shortpath" = x; then
22145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22146$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22147    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22148  fi
22149
22150  # Call helper function which possibly converts this using DOS-style short mode.
22151  # If so, the updated path is stored in $new_path.
22152
22153  input_path="$new_path"
22154  # Check if we need to convert this using DOS-style short mode. If the path
22155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22156  # take no chances and rewrite it.
22157  # Note: m4 eats our [], so we need to use [ and ] instead.
22158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22159  if test "x$has_forbidden_chars" != x; then
22160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22164      # Going to short mode and back again did indeed matter. Since short mode is
22165      # case insensitive, let's make it lowercase to improve readability.
22166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22167      # Now convert it back to Unix-style (cygpath)
22168      input_path=`$CYGPATH -u "$shortmode_path"`
22169      new_path="$input_path"
22170    fi
22171  fi
22172
22173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22174  if test "x$test_cygdrive_prefix" = x; then
22175    # As a simple fix, exclude /usr/bin since it's not a real path.
22176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22178      # a path prefixed by /cygdrive for fixpath to work.
22179      new_path="$CYGWIN_ROOT_PATH$input_path"
22180    fi
22181  fi
22182
22183
22184  if test "x$path" != "x$new_path"; then
22185    JAVA_HOME_PROCESSED="$new_path"
22186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22187$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22188  fi
22189
22190    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22191
22192  path="$JAVA_HOME_PROCESSED"
22193  has_colon=`$ECHO $path | $GREP ^.:`
22194  new_path="$path"
22195  if test "x$has_colon" = x; then
22196    # Not in mixed or Windows style, start by that.
22197    new_path=`cmd //c echo $path`
22198  fi
22199
22200
22201  input_path="$new_path"
22202  # Check if we need to convert this using DOS-style short mode. If the path
22203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22204  # take no chances and rewrite it.
22205  # Note: m4 eats our [], so we need to use [ and ] instead.
22206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22207  if test "x$has_forbidden_chars" != x; then
22208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22210  fi
22211
22212
22213  windows_path="$new_path"
22214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22215    unix_path=`$CYGPATH -u "$windows_path"`
22216    new_path="$unix_path"
22217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22219    new_path="$unix_path"
22220  fi
22221
22222  if test "x$path" != "x$new_path"; then
22223    JAVA_HOME_PROCESSED="$new_path"
22224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22225$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22226  fi
22227
22228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22230
22231    else
22232      # We're on a unix platform. Hooray! :)
22233      path="$JAVA_HOME_PROCESSED"
22234      has_space=`$ECHO "$path" | $GREP " "`
22235      if test "x$has_space" != x; then
22236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22237$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22238        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22239      fi
22240
22241      # Use eval to expand a potential ~
22242      eval path="$path"
22243      if test ! -f "$path" && test ! -d "$path"; then
22244        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22245      fi
22246
22247      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22248    fi
22249  fi
22250
22251    if test ! -d "$JAVA_HOME_PROCESSED"; then
22252      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22253$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22254    else
22255      # Aha, the user has set a JAVA_HOME
22256      # let us use that as the Boot JDK.
22257      BOOT_JDK="$JAVA_HOME_PROCESSED"
22258      BOOT_JDK_FOUND=maybe
22259      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22260$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22261    fi
22262  fi
22263
22264
22265    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22266    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22267      # Do we have a bin/java?
22268      if test ! -x "$BOOT_JDK/bin/java"; then
22269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22271        BOOT_JDK_FOUND=no
22272      else
22273        # Do we have a bin/javac?
22274        if test ! -x "$BOOT_JDK/bin/javac"; then
22275          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22277          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22278$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22279          BOOT_JDK_FOUND=no
22280        else
22281          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22282          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22283
22284          # Extra M4 quote needed to protect [] in grep expression.
22285          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22286          if test "x$FOUND_CORRECT_VERSION" = x; then
22287            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22289            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22290$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22291            BOOT_JDK_FOUND=no
22292          else
22293            # We're done! :-)
22294            BOOT_JDK_FOUND=yes
22295
22296  # Only process if variable expands to non-empty
22297
22298  if test "x$BOOT_JDK" != x; then
22299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22300
22301  # Input might be given as Windows format, start by converting to
22302  # unix format.
22303  path="$BOOT_JDK"
22304  new_path=`$CYGPATH -u "$path"`
22305
22306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22309  # "foo.exe" is OK but "foo" is an error.
22310  #
22311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22312  # It is also a way to make sure we got the proper file name for the real test later on.
22313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22314  if test "x$test_shortpath" = x; then
22315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22317    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22318  fi
22319
22320  # Call helper function which possibly converts this using DOS-style short mode.
22321  # If so, the updated path is stored in $new_path.
22322
22323  input_path="$new_path"
22324  # Check if we need to convert this using DOS-style short mode. If the path
22325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22326  # take no chances and rewrite it.
22327  # Note: m4 eats our [], so we need to use [ and ] instead.
22328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22329  if test "x$has_forbidden_chars" != x; then
22330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22334      # Going to short mode and back again did indeed matter. Since short mode is
22335      # case insensitive, let's make it lowercase to improve readability.
22336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22337      # Now convert it back to Unix-style (cygpath)
22338      input_path=`$CYGPATH -u "$shortmode_path"`
22339      new_path="$input_path"
22340    fi
22341  fi
22342
22343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22344  if test "x$test_cygdrive_prefix" = x; then
22345    # As a simple fix, exclude /usr/bin since it's not a real path.
22346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22348      # a path prefixed by /cygdrive for fixpath to work.
22349      new_path="$CYGWIN_ROOT_PATH$input_path"
22350    fi
22351  fi
22352
22353
22354  if test "x$path" != "x$new_path"; then
22355    BOOT_JDK="$new_path"
22356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22358  fi
22359
22360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22361
22362  path="$BOOT_JDK"
22363  has_colon=`$ECHO $path | $GREP ^.:`
22364  new_path="$path"
22365  if test "x$has_colon" = x; then
22366    # Not in mixed or Windows style, start by that.
22367    new_path=`cmd //c echo $path`
22368  fi
22369
22370
22371  input_path="$new_path"
22372  # Check if we need to convert this using DOS-style short mode. If the path
22373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22374  # take no chances and rewrite it.
22375  # Note: m4 eats our [], so we need to use [ and ] instead.
22376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22377  if test "x$has_forbidden_chars" != x; then
22378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22380  fi
22381
22382
22383  windows_path="$new_path"
22384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22385    unix_path=`$CYGPATH -u "$windows_path"`
22386    new_path="$unix_path"
22387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22389    new_path="$unix_path"
22390  fi
22391
22392  if test "x$path" != "x$new_path"; then
22393    BOOT_JDK="$new_path"
22394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22395$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22396  fi
22397
22398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22400
22401    else
22402      # We're on a unix platform. Hooray! :)
22403      path="$BOOT_JDK"
22404      has_space=`$ECHO "$path" | $GREP " "`
22405      if test "x$has_space" != x; then
22406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22409      fi
22410
22411      # Use eval to expand a potential ~
22412      eval path="$path"
22413      if test ! -f "$path" && test ! -d "$path"; then
22414        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22415      fi
22416
22417      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22418    fi
22419  fi
22420
22421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22422$as_echo_n "checking for Boot JDK... " >&6; }
22423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22424$as_echo "$BOOT_JDK" >&6; }
22425            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22426$as_echo_n "checking Boot JDK version... " >&6; }
22427            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22429$as_echo "$BOOT_JDK_VERSION" >&6; }
22430          fi # end check jdk version
22431        fi # end check javac
22432      fi # end check java
22433    fi # end check boot jdk found
22434  fi
22435
22436
22437  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22438
22439  if test "x$BOOT_JDK_FOUND" = xno; then
22440    # Now execute the test
22441
22442  # Extract the first word of "javac", so it can be a program name with args.
22443set dummy javac; ac_word=$2
22444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22445$as_echo_n "checking for $ac_word... " >&6; }
22446if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22447  $as_echo_n "(cached) " >&6
22448else
22449  case $JAVAC_CHECK in
22450  [\\/]* | ?:[\\/]*)
22451  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22452  ;;
22453  *)
22454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22455for as_dir in $PATH
22456do
22457  IFS=$as_save_IFS
22458  test -z "$as_dir" && as_dir=.
22459    for ac_exec_ext in '' $ac_executable_extensions; do
22460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22461    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22463    break 2
22464  fi
22465done
22466  done
22467IFS=$as_save_IFS
22468
22469  ;;
22470esac
22471fi
22472JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22473if test -n "$JAVAC_CHECK"; then
22474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22475$as_echo "$JAVAC_CHECK" >&6; }
22476else
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22478$as_echo "no" >&6; }
22479fi
22480
22481
22482  # Extract the first word of "java", so it can be a program name with args.
22483set dummy java; ac_word=$2
22484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22485$as_echo_n "checking for $ac_word... " >&6; }
22486if ${ac_cv_path_JAVA_CHECK+:} false; then :
22487  $as_echo_n "(cached) " >&6
22488else
22489  case $JAVA_CHECK in
22490  [\\/]* | ?:[\\/]*)
22491  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22492  ;;
22493  *)
22494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22495for as_dir in $PATH
22496do
22497  IFS=$as_save_IFS
22498  test -z "$as_dir" && as_dir=.
22499    for ac_exec_ext in '' $ac_executable_extensions; do
22500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22501    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22503    break 2
22504  fi
22505done
22506  done
22507IFS=$as_save_IFS
22508
22509  ;;
22510esac
22511fi
22512JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22513if test -n "$JAVA_CHECK"; then
22514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22515$as_echo "$JAVA_CHECK" >&6; }
22516else
22517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22518$as_echo "no" >&6; }
22519fi
22520
22521
22522  BINARY="$JAVAC_CHECK"
22523  if test "x$JAVAC_CHECK" = x; then
22524    BINARY="$JAVA_CHECK"
22525  fi
22526  if test "x$BINARY" != x; then
22527    # So there is a java(c) binary, it might be part of a JDK.
22528    # Lets find the JDK/JRE directory by following symbolic links.
22529    # Linux/GNU systems often have links from /usr/bin/java to
22530    # /etc/alternatives/java to the real JDK binary.
22531
22532  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22533    # Follow a chain of symbolic links. Use readlink
22534    # where it exists, else fall back to horribly
22535    # complicated shell code.
22536    if test "x$READLINK_TESTED" != yes; then
22537      # On MacOSX there is a readlink tool with a different
22538      # purpose than the GNU readlink tool. Check the found readlink.
22539      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22540      if test "x$ISGNU" = x; then
22541        # A readlink that we do not know how to use.
22542        # Are there other non-GNU readlinks out there?
22543        READLINK_TESTED=yes
22544        READLINK=
22545      fi
22546    fi
22547
22548    if test "x$READLINK" != x; then
22549      BINARY=`$READLINK -f $BINARY`
22550    else
22551      # Save the current directory for restoring afterwards
22552      STARTDIR=$PWD
22553      COUNTER=0
22554      sym_link_dir=`$DIRNAME $BINARY`
22555      sym_link_file=`$BASENAME $BINARY`
22556      cd $sym_link_dir
22557      # Use -P flag to resolve symlinks in directories.
22558      cd `$THEPWDCMD -P`
22559      sym_link_dir=`$THEPWDCMD -P`
22560      # Resolve file symlinks
22561      while test $COUNTER -lt 20; do
22562        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22563        if test "x$ISLINK" == x; then
22564          # This is not a symbolic link! We are done!
22565          break
22566        fi
22567        # Again resolve directory symlinks since the target of the just found
22568        # link could be in a different directory
22569        cd `$DIRNAME $ISLINK`
22570        sym_link_dir=`$THEPWDCMD -P`
22571        sym_link_file=`$BASENAME $ISLINK`
22572        let COUNTER=COUNTER+1
22573      done
22574      cd $STARTDIR
22575      BINARY=$sym_link_dir/$sym_link_file
22576    fi
22577  fi
22578
22579    BOOT_JDK=`dirname "$BINARY"`
22580    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22581    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22582      # Looks like we found ourselves an JDK
22583      BOOT_JDK_FOUND=maybe
22584      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22585$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22586    fi
22587  fi
22588
22589
22590    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22591    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22592      # Do we have a bin/java?
22593      if test ! -x "$BOOT_JDK/bin/java"; then
22594        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22596        BOOT_JDK_FOUND=no
22597      else
22598        # Do we have a bin/javac?
22599        if test ! -x "$BOOT_JDK/bin/javac"; then
22600          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22602          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22603$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22604          BOOT_JDK_FOUND=no
22605        else
22606          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22607          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22608
22609          # Extra M4 quote needed to protect [] in grep expression.
22610          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22611          if test "x$FOUND_CORRECT_VERSION" = x; then
22612            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22614            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22615$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22616            BOOT_JDK_FOUND=no
22617          else
22618            # We're done! :-)
22619            BOOT_JDK_FOUND=yes
22620
22621  # Only process if variable expands to non-empty
22622
22623  if test "x$BOOT_JDK" != x; then
22624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22625
22626  # Input might be given as Windows format, start by converting to
22627  # unix format.
22628  path="$BOOT_JDK"
22629  new_path=`$CYGPATH -u "$path"`
22630
22631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22634  # "foo.exe" is OK but "foo" is an error.
22635  #
22636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22637  # It is also a way to make sure we got the proper file name for the real test later on.
22638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22639  if test "x$test_shortpath" = x; then
22640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22643  fi
22644
22645  # Call helper function which possibly converts this using DOS-style short mode.
22646  # If so, the updated path is stored in $new_path.
22647
22648  input_path="$new_path"
22649  # Check if we need to convert this using DOS-style short mode. If the path
22650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22651  # take no chances and rewrite it.
22652  # Note: m4 eats our [], so we need to use [ and ] instead.
22653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22654  if test "x$has_forbidden_chars" != x; then
22655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22659      # Going to short mode and back again did indeed matter. Since short mode is
22660      # case insensitive, let's make it lowercase to improve readability.
22661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22662      # Now convert it back to Unix-style (cygpath)
22663      input_path=`$CYGPATH -u "$shortmode_path"`
22664      new_path="$input_path"
22665    fi
22666  fi
22667
22668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22669  if test "x$test_cygdrive_prefix" = x; then
22670    # As a simple fix, exclude /usr/bin since it's not a real path.
22671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22673      # a path prefixed by /cygdrive for fixpath to work.
22674      new_path="$CYGWIN_ROOT_PATH$input_path"
22675    fi
22676  fi
22677
22678
22679  if test "x$path" != "x$new_path"; then
22680    BOOT_JDK="$new_path"
22681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22683  fi
22684
22685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22686
22687  path="$BOOT_JDK"
22688  has_colon=`$ECHO $path | $GREP ^.:`
22689  new_path="$path"
22690  if test "x$has_colon" = x; then
22691    # Not in mixed or Windows style, start by that.
22692    new_path=`cmd //c echo $path`
22693  fi
22694
22695
22696  input_path="$new_path"
22697  # Check if we need to convert this using DOS-style short mode. If the path
22698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22699  # take no chances and rewrite it.
22700  # Note: m4 eats our [], so we need to use [ and ] instead.
22701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22702  if test "x$has_forbidden_chars" != x; then
22703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22705  fi
22706
22707
22708  windows_path="$new_path"
22709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22710    unix_path=`$CYGPATH -u "$windows_path"`
22711    new_path="$unix_path"
22712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22714    new_path="$unix_path"
22715  fi
22716
22717  if test "x$path" != "x$new_path"; then
22718    BOOT_JDK="$new_path"
22719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22721  fi
22722
22723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22725
22726    else
22727      # We're on a unix platform. Hooray! :)
22728      path="$BOOT_JDK"
22729      has_space=`$ECHO "$path" | $GREP " "`
22730      if test "x$has_space" != x; then
22731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22733        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22734      fi
22735
22736      # Use eval to expand a potential ~
22737      eval path="$path"
22738      if test ! -f "$path" && test ! -d "$path"; then
22739        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22740      fi
22741
22742      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22743    fi
22744  fi
22745
22746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22747$as_echo_n "checking for Boot JDK... " >&6; }
22748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22749$as_echo "$BOOT_JDK" >&6; }
22750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22751$as_echo_n "checking Boot JDK version... " >&6; }
22752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22754$as_echo "$BOOT_JDK_VERSION" >&6; }
22755          fi # end check jdk version
22756        fi # end check javac
22757      fi # end check java
22758    fi # end check boot jdk found
22759  fi
22760
22761
22762  # Test: Is there a JDK installed in default, well-known locations?
22763
22764  if test "x$BOOT_JDK_FOUND" = xno; then
22765    # Now execute the test
22766
22767  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22768
22769  if test "x$BOOT_JDK_FOUND" = xno; then
22770    # Now execute the test
22771
22772  if test "x$ProgramW6432" != x; then
22773    VIRTUAL_DIR="$ProgramW6432/Java"
22774
22775  windows_path="$VIRTUAL_DIR"
22776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22777    unix_path=`$CYGPATH -u "$windows_path"`
22778    VIRTUAL_DIR="$unix_path"
22779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22781    VIRTUAL_DIR="$unix_path"
22782  fi
22783
22784
22785  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22786  BOOT_JDK_SUFFIX=""
22787  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22788  if test "x$ALL_JDKS_FOUND" != x; then
22789    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22790
22791  if test "x$BOOT_JDK_FOUND" = xno; then
22792    # Now execute the test
22793
22794        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22795        if test -d "$BOOT_JDK"; then
22796          BOOT_JDK_FOUND=maybe
22797          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22798$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22799        fi
22800
22801
22802    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22803    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22804      # Do we have a bin/java?
22805      if test ! -x "$BOOT_JDK/bin/java"; then
22806        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22808        BOOT_JDK_FOUND=no
22809      else
22810        # Do we have a bin/javac?
22811        if test ! -x "$BOOT_JDK/bin/javac"; then
22812          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22814          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22815$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22816          BOOT_JDK_FOUND=no
22817        else
22818          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22819          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22820
22821          # Extra M4 quote needed to protect [] in grep expression.
22822          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22823          if test "x$FOUND_CORRECT_VERSION" = x; then
22824            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22826            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22827$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22828            BOOT_JDK_FOUND=no
22829          else
22830            # We're done! :-)
22831            BOOT_JDK_FOUND=yes
22832
22833  # Only process if variable expands to non-empty
22834
22835  if test "x$BOOT_JDK" != x; then
22836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22837
22838  # Input might be given as Windows format, start by converting to
22839  # unix format.
22840  path="$BOOT_JDK"
22841  new_path=`$CYGPATH -u "$path"`
22842
22843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22846  # "foo.exe" is OK but "foo" is an error.
22847  #
22848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22849  # It is also a way to make sure we got the proper file name for the real test later on.
22850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22851  if test "x$test_shortpath" = x; then
22852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22854    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22855  fi
22856
22857  # Call helper function which possibly converts this using DOS-style short mode.
22858  # If so, the updated path is stored in $new_path.
22859
22860  input_path="$new_path"
22861  # Check if we need to convert this using DOS-style short mode. If the path
22862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22863  # take no chances and rewrite it.
22864  # Note: m4 eats our [], so we need to use [ and ] instead.
22865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22866  if test "x$has_forbidden_chars" != x; then
22867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22871      # Going to short mode and back again did indeed matter. Since short mode is
22872      # case insensitive, let's make it lowercase to improve readability.
22873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22874      # Now convert it back to Unix-style (cygpath)
22875      input_path=`$CYGPATH -u "$shortmode_path"`
22876      new_path="$input_path"
22877    fi
22878  fi
22879
22880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22881  if test "x$test_cygdrive_prefix" = x; then
22882    # As a simple fix, exclude /usr/bin since it's not a real path.
22883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22885      # a path prefixed by /cygdrive for fixpath to work.
22886      new_path="$CYGWIN_ROOT_PATH$input_path"
22887    fi
22888  fi
22889
22890
22891  if test "x$path" != "x$new_path"; then
22892    BOOT_JDK="$new_path"
22893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22895  fi
22896
22897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22898
22899  path="$BOOT_JDK"
22900  has_colon=`$ECHO $path | $GREP ^.:`
22901  new_path="$path"
22902  if test "x$has_colon" = x; then
22903    # Not in mixed or Windows style, start by that.
22904    new_path=`cmd //c echo $path`
22905  fi
22906
22907
22908  input_path="$new_path"
22909  # Check if we need to convert this using DOS-style short mode. If the path
22910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22911  # take no chances and rewrite it.
22912  # Note: m4 eats our [], so we need to use [ and ] instead.
22913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22914  if test "x$has_forbidden_chars" != x; then
22915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22917  fi
22918
22919
22920  windows_path="$new_path"
22921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22922    unix_path=`$CYGPATH -u "$windows_path"`
22923    new_path="$unix_path"
22924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22926    new_path="$unix_path"
22927  fi
22928
22929  if test "x$path" != "x$new_path"; then
22930    BOOT_JDK="$new_path"
22931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22933  fi
22934
22935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22937
22938    else
22939      # We're on a unix platform. Hooray! :)
22940      path="$BOOT_JDK"
22941      has_space=`$ECHO "$path" | $GREP " "`
22942      if test "x$has_space" != x; then
22943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22946      fi
22947
22948      # Use eval to expand a potential ~
22949      eval path="$path"
22950      if test ! -f "$path" && test ! -d "$path"; then
22951        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22952      fi
22953
22954      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22955    fi
22956  fi
22957
22958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22959$as_echo_n "checking for Boot JDK... " >&6; }
22960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22961$as_echo "$BOOT_JDK" >&6; }
22962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22963$as_echo_n "checking Boot JDK version... " >&6; }
22964            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22966$as_echo "$BOOT_JDK_VERSION" >&6; }
22967          fi # end check jdk version
22968        fi # end check javac
22969      fi # end check java
22970    fi # end check boot jdk found
22971  fi
22972
22973    done
22974  fi
22975
22976  fi
22977
22978
22979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22981      # Do we have a bin/java?
22982      if test ! -x "$BOOT_JDK/bin/java"; then
22983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22985        BOOT_JDK_FOUND=no
22986      else
22987        # Do we have a bin/javac?
22988        if test ! -x "$BOOT_JDK/bin/javac"; then
22989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22993          BOOT_JDK_FOUND=no
22994        else
22995          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22996          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22997
22998          # Extra M4 quote needed to protect [] in grep expression.
22999          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23000          if test "x$FOUND_CORRECT_VERSION" = x; then
23001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23003            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23004$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23005            BOOT_JDK_FOUND=no
23006          else
23007            # We're done! :-)
23008            BOOT_JDK_FOUND=yes
23009
23010  # Only process if variable expands to non-empty
23011
23012  if test "x$BOOT_JDK" != x; then
23013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23014
23015  # Input might be given as Windows format, start by converting to
23016  # unix format.
23017  path="$BOOT_JDK"
23018  new_path=`$CYGPATH -u "$path"`
23019
23020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23023  # "foo.exe" is OK but "foo" is an error.
23024  #
23025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23026  # It is also a way to make sure we got the proper file name for the real test later on.
23027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23028  if test "x$test_shortpath" = x; then
23029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23031    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23032  fi
23033
23034  # Call helper function which possibly converts this using DOS-style short mode.
23035  # If so, the updated path is stored in $new_path.
23036
23037  input_path="$new_path"
23038  # Check if we need to convert this using DOS-style short mode. If the path
23039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23040  # take no chances and rewrite it.
23041  # Note: m4 eats our [], so we need to use [ and ] instead.
23042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23043  if test "x$has_forbidden_chars" != x; then
23044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23048      # Going to short mode and back again did indeed matter. Since short mode is
23049      # case insensitive, let's make it lowercase to improve readability.
23050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23051      # Now convert it back to Unix-style (cygpath)
23052      input_path=`$CYGPATH -u "$shortmode_path"`
23053      new_path="$input_path"
23054    fi
23055  fi
23056
23057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23058  if test "x$test_cygdrive_prefix" = x; then
23059    # As a simple fix, exclude /usr/bin since it's not a real path.
23060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23062      # a path prefixed by /cygdrive for fixpath to work.
23063      new_path="$CYGWIN_ROOT_PATH$input_path"
23064    fi
23065  fi
23066
23067
23068  if test "x$path" != "x$new_path"; then
23069    BOOT_JDK="$new_path"
23070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23072  fi
23073
23074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23075
23076  path="$BOOT_JDK"
23077  has_colon=`$ECHO $path | $GREP ^.:`
23078  new_path="$path"
23079  if test "x$has_colon" = x; then
23080    # Not in mixed or Windows style, start by that.
23081    new_path=`cmd //c echo $path`
23082  fi
23083
23084
23085  input_path="$new_path"
23086  # Check if we need to convert this using DOS-style short mode. If the path
23087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23088  # take no chances and rewrite it.
23089  # Note: m4 eats our [], so we need to use [ and ] instead.
23090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23091  if test "x$has_forbidden_chars" != x; then
23092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23094  fi
23095
23096
23097  windows_path="$new_path"
23098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23099    unix_path=`$CYGPATH -u "$windows_path"`
23100    new_path="$unix_path"
23101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23103    new_path="$unix_path"
23104  fi
23105
23106  if test "x$path" != "x$new_path"; then
23107    BOOT_JDK="$new_path"
23108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23110  fi
23111
23112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23114
23115    else
23116      # We're on a unix platform. Hooray! :)
23117      path="$BOOT_JDK"
23118      has_space=`$ECHO "$path" | $GREP " "`
23119      if test "x$has_space" != x; then
23120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23123      fi
23124
23125      # Use eval to expand a potential ~
23126      eval path="$path"
23127      if test ! -f "$path" && test ! -d "$path"; then
23128        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23129      fi
23130
23131      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23132    fi
23133  fi
23134
23135            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23136$as_echo_n "checking for Boot JDK... " >&6; }
23137            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23138$as_echo "$BOOT_JDK" >&6; }
23139            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23140$as_echo_n "checking Boot JDK version... " >&6; }
23141            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23143$as_echo "$BOOT_JDK_VERSION" >&6; }
23144          fi # end check jdk version
23145        fi # end check javac
23146      fi # end check java
23147    fi # end check boot jdk found
23148  fi
23149
23150
23151  if test "x$BOOT_JDK_FOUND" = xno; then
23152    # Now execute the test
23153
23154  if test "x$PROGRAMW6432" != x; then
23155    VIRTUAL_DIR="$PROGRAMW6432/Java"
23156
23157  windows_path="$VIRTUAL_DIR"
23158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23159    unix_path=`$CYGPATH -u "$windows_path"`
23160    VIRTUAL_DIR="$unix_path"
23161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23163    VIRTUAL_DIR="$unix_path"
23164  fi
23165
23166
23167  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23168  BOOT_JDK_SUFFIX=""
23169  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23170  if test "x$ALL_JDKS_FOUND" != x; then
23171    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23172
23173  if test "x$BOOT_JDK_FOUND" = xno; then
23174    # Now execute the test
23175
23176        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23177        if test -d "$BOOT_JDK"; then
23178          BOOT_JDK_FOUND=maybe
23179          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23180$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23181        fi
23182
23183
23184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23186      # Do we have a bin/java?
23187      if test ! -x "$BOOT_JDK/bin/java"; then
23188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23190        BOOT_JDK_FOUND=no
23191      else
23192        # Do we have a bin/javac?
23193        if test ! -x "$BOOT_JDK/bin/javac"; then
23194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23198          BOOT_JDK_FOUND=no
23199        else
23200          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23201          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23202
23203          # Extra M4 quote needed to protect [] in grep expression.
23204          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23205          if test "x$FOUND_CORRECT_VERSION" = x; then
23206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23208            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23210            BOOT_JDK_FOUND=no
23211          else
23212            # We're done! :-)
23213            BOOT_JDK_FOUND=yes
23214
23215  # Only process if variable expands to non-empty
23216
23217  if test "x$BOOT_JDK" != x; then
23218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23219
23220  # Input might be given as Windows format, start by converting to
23221  # unix format.
23222  path="$BOOT_JDK"
23223  new_path=`$CYGPATH -u "$path"`
23224
23225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23228  # "foo.exe" is OK but "foo" is an error.
23229  #
23230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23231  # It is also a way to make sure we got the proper file name for the real test later on.
23232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23233  if test "x$test_shortpath" = x; then
23234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23237  fi
23238
23239  # Call helper function which possibly converts this using DOS-style short mode.
23240  # If so, the updated path is stored in $new_path.
23241
23242  input_path="$new_path"
23243  # Check if we need to convert this using DOS-style short mode. If the path
23244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23245  # take no chances and rewrite it.
23246  # Note: m4 eats our [], so we need to use [ and ] instead.
23247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23248  if test "x$has_forbidden_chars" != x; then
23249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23253      # Going to short mode and back again did indeed matter. Since short mode is
23254      # case insensitive, let's make it lowercase to improve readability.
23255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23256      # Now convert it back to Unix-style (cygpath)
23257      input_path=`$CYGPATH -u "$shortmode_path"`
23258      new_path="$input_path"
23259    fi
23260  fi
23261
23262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23263  if test "x$test_cygdrive_prefix" = x; then
23264    # As a simple fix, exclude /usr/bin since it's not a real path.
23265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23267      # a path prefixed by /cygdrive for fixpath to work.
23268      new_path="$CYGWIN_ROOT_PATH$input_path"
23269    fi
23270  fi
23271
23272
23273  if test "x$path" != "x$new_path"; then
23274    BOOT_JDK="$new_path"
23275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23277  fi
23278
23279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23280
23281  path="$BOOT_JDK"
23282  has_colon=`$ECHO $path | $GREP ^.:`
23283  new_path="$path"
23284  if test "x$has_colon" = x; then
23285    # Not in mixed or Windows style, start by that.
23286    new_path=`cmd //c echo $path`
23287  fi
23288
23289
23290  input_path="$new_path"
23291  # Check if we need to convert this using DOS-style short mode. If the path
23292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23293  # take no chances and rewrite it.
23294  # Note: m4 eats our [], so we need to use [ and ] instead.
23295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23296  if test "x$has_forbidden_chars" != x; then
23297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23299  fi
23300
23301
23302  windows_path="$new_path"
23303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23304    unix_path=`$CYGPATH -u "$windows_path"`
23305    new_path="$unix_path"
23306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23308    new_path="$unix_path"
23309  fi
23310
23311  if test "x$path" != "x$new_path"; then
23312    BOOT_JDK="$new_path"
23313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23315  fi
23316
23317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23319
23320    else
23321      # We're on a unix platform. Hooray! :)
23322      path="$BOOT_JDK"
23323      has_space=`$ECHO "$path" | $GREP " "`
23324      if test "x$has_space" != x; then
23325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23328      fi
23329
23330      # Use eval to expand a potential ~
23331      eval path="$path"
23332      if test ! -f "$path" && test ! -d "$path"; then
23333        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23334      fi
23335
23336      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23337    fi
23338  fi
23339
23340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23341$as_echo_n "checking for Boot JDK... " >&6; }
23342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23343$as_echo "$BOOT_JDK" >&6; }
23344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23345$as_echo_n "checking Boot JDK version... " >&6; }
23346            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23348$as_echo "$BOOT_JDK_VERSION" >&6; }
23349          fi # end check jdk version
23350        fi # end check javac
23351      fi # end check java
23352    fi # end check boot jdk found
23353  fi
23354
23355    done
23356  fi
23357
23358  fi
23359
23360
23361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23363      # Do we have a bin/java?
23364      if test ! -x "$BOOT_JDK/bin/java"; then
23365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23367        BOOT_JDK_FOUND=no
23368      else
23369        # Do we have a bin/javac?
23370        if test ! -x "$BOOT_JDK/bin/javac"; then
23371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23375          BOOT_JDK_FOUND=no
23376        else
23377          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23378          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23379
23380          # Extra M4 quote needed to protect [] in grep expression.
23381          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23382          if test "x$FOUND_CORRECT_VERSION" = x; then
23383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23385            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23386$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23387            BOOT_JDK_FOUND=no
23388          else
23389            # We're done! :-)
23390            BOOT_JDK_FOUND=yes
23391
23392  # Only process if variable expands to non-empty
23393
23394  if test "x$BOOT_JDK" != x; then
23395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23396
23397  # Input might be given as Windows format, start by converting to
23398  # unix format.
23399  path="$BOOT_JDK"
23400  new_path=`$CYGPATH -u "$path"`
23401
23402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23405  # "foo.exe" is OK but "foo" is an error.
23406  #
23407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23408  # It is also a way to make sure we got the proper file name for the real test later on.
23409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23410  if test "x$test_shortpath" = x; then
23411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23414  fi
23415
23416  # Call helper function which possibly converts this using DOS-style short mode.
23417  # If so, the updated path is stored in $new_path.
23418
23419  input_path="$new_path"
23420  # Check if we need to convert this using DOS-style short mode. If the path
23421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23422  # take no chances and rewrite it.
23423  # Note: m4 eats our [], so we need to use [ and ] instead.
23424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23425  if test "x$has_forbidden_chars" != x; then
23426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23430      # Going to short mode and back again did indeed matter. Since short mode is
23431      # case insensitive, let's make it lowercase to improve readability.
23432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23433      # Now convert it back to Unix-style (cygpath)
23434      input_path=`$CYGPATH -u "$shortmode_path"`
23435      new_path="$input_path"
23436    fi
23437  fi
23438
23439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23440  if test "x$test_cygdrive_prefix" = x; then
23441    # As a simple fix, exclude /usr/bin since it's not a real path.
23442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23444      # a path prefixed by /cygdrive for fixpath to work.
23445      new_path="$CYGWIN_ROOT_PATH$input_path"
23446    fi
23447  fi
23448
23449
23450  if test "x$path" != "x$new_path"; then
23451    BOOT_JDK="$new_path"
23452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23454  fi
23455
23456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23457
23458  path="$BOOT_JDK"
23459  has_colon=`$ECHO $path | $GREP ^.:`
23460  new_path="$path"
23461  if test "x$has_colon" = x; then
23462    # Not in mixed or Windows style, start by that.
23463    new_path=`cmd //c echo $path`
23464  fi
23465
23466
23467  input_path="$new_path"
23468  # Check if we need to convert this using DOS-style short mode. If the path
23469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23470  # take no chances and rewrite it.
23471  # Note: m4 eats our [], so we need to use [ and ] instead.
23472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23473  if test "x$has_forbidden_chars" != x; then
23474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23476  fi
23477
23478
23479  windows_path="$new_path"
23480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23481    unix_path=`$CYGPATH -u "$windows_path"`
23482    new_path="$unix_path"
23483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23485    new_path="$unix_path"
23486  fi
23487
23488  if test "x$path" != "x$new_path"; then
23489    BOOT_JDK="$new_path"
23490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23492  fi
23493
23494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23496
23497    else
23498      # We're on a unix platform. Hooray! :)
23499      path="$BOOT_JDK"
23500      has_space=`$ECHO "$path" | $GREP " "`
23501      if test "x$has_space" != x; then
23502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23505      fi
23506
23507      # Use eval to expand a potential ~
23508      eval path="$path"
23509      if test ! -f "$path" && test ! -d "$path"; then
23510        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23511      fi
23512
23513      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23514    fi
23515  fi
23516
23517            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23518$as_echo_n "checking for Boot JDK... " >&6; }
23519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23520$as_echo "$BOOT_JDK" >&6; }
23521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23522$as_echo_n "checking Boot JDK version... " >&6; }
23523            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23525$as_echo "$BOOT_JDK_VERSION" >&6; }
23526          fi # end check jdk version
23527        fi # end check javac
23528      fi # end check java
23529    fi # end check boot jdk found
23530  fi
23531
23532
23533  if test "x$BOOT_JDK_FOUND" = xno; then
23534    # Now execute the test
23535
23536  if test "x$PROGRAMFILES" != x; then
23537    VIRTUAL_DIR="$PROGRAMFILES/Java"
23538
23539  windows_path="$VIRTUAL_DIR"
23540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23541    unix_path=`$CYGPATH -u "$windows_path"`
23542    VIRTUAL_DIR="$unix_path"
23543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23545    VIRTUAL_DIR="$unix_path"
23546  fi
23547
23548
23549  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23550  BOOT_JDK_SUFFIX=""
23551  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23552  if test "x$ALL_JDKS_FOUND" != x; then
23553    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23554
23555  if test "x$BOOT_JDK_FOUND" = xno; then
23556    # Now execute the test
23557
23558        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23559        if test -d "$BOOT_JDK"; then
23560          BOOT_JDK_FOUND=maybe
23561          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23562$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23563        fi
23564
23565
23566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23568      # Do we have a bin/java?
23569      if test ! -x "$BOOT_JDK/bin/java"; then
23570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23572        BOOT_JDK_FOUND=no
23573      else
23574        # Do we have a bin/javac?
23575        if test ! -x "$BOOT_JDK/bin/javac"; then
23576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23580          BOOT_JDK_FOUND=no
23581        else
23582          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23583          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23584
23585          # Extra M4 quote needed to protect [] in grep expression.
23586          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23587          if test "x$FOUND_CORRECT_VERSION" = x; then
23588            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23590            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23591$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23592            BOOT_JDK_FOUND=no
23593          else
23594            # We're done! :-)
23595            BOOT_JDK_FOUND=yes
23596
23597  # Only process if variable expands to non-empty
23598
23599  if test "x$BOOT_JDK" != x; then
23600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23601
23602  # Input might be given as Windows format, start by converting to
23603  # unix format.
23604  path="$BOOT_JDK"
23605  new_path=`$CYGPATH -u "$path"`
23606
23607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23610  # "foo.exe" is OK but "foo" is an error.
23611  #
23612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23613  # It is also a way to make sure we got the proper file name for the real test later on.
23614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23615  if test "x$test_shortpath" = x; then
23616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23618    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23619  fi
23620
23621  # Call helper function which possibly converts this using DOS-style short mode.
23622  # If so, the updated path is stored in $new_path.
23623
23624  input_path="$new_path"
23625  # Check if we need to convert this using DOS-style short mode. If the path
23626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23627  # take no chances and rewrite it.
23628  # Note: m4 eats our [], so we need to use [ and ] instead.
23629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23630  if test "x$has_forbidden_chars" != x; then
23631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23635      # Going to short mode and back again did indeed matter. Since short mode is
23636      # case insensitive, let's make it lowercase to improve readability.
23637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23638      # Now convert it back to Unix-style (cygpath)
23639      input_path=`$CYGPATH -u "$shortmode_path"`
23640      new_path="$input_path"
23641    fi
23642  fi
23643
23644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23645  if test "x$test_cygdrive_prefix" = x; then
23646    # As a simple fix, exclude /usr/bin since it's not a real path.
23647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23649      # a path prefixed by /cygdrive for fixpath to work.
23650      new_path="$CYGWIN_ROOT_PATH$input_path"
23651    fi
23652  fi
23653
23654
23655  if test "x$path" != "x$new_path"; then
23656    BOOT_JDK="$new_path"
23657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23659  fi
23660
23661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23662
23663  path="$BOOT_JDK"
23664  has_colon=`$ECHO $path | $GREP ^.:`
23665  new_path="$path"
23666  if test "x$has_colon" = x; then
23667    # Not in mixed or Windows style, start by that.
23668    new_path=`cmd //c echo $path`
23669  fi
23670
23671
23672  input_path="$new_path"
23673  # Check if we need to convert this using DOS-style short mode. If the path
23674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23675  # take no chances and rewrite it.
23676  # Note: m4 eats our [], so we need to use [ and ] instead.
23677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23678  if test "x$has_forbidden_chars" != x; then
23679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23681  fi
23682
23683
23684  windows_path="$new_path"
23685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23686    unix_path=`$CYGPATH -u "$windows_path"`
23687    new_path="$unix_path"
23688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23690    new_path="$unix_path"
23691  fi
23692
23693  if test "x$path" != "x$new_path"; then
23694    BOOT_JDK="$new_path"
23695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23697  fi
23698
23699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23701
23702    else
23703      # We're on a unix platform. Hooray! :)
23704      path="$BOOT_JDK"
23705      has_space=`$ECHO "$path" | $GREP " "`
23706      if test "x$has_space" != x; then
23707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23710      fi
23711
23712      # Use eval to expand a potential ~
23713      eval path="$path"
23714      if test ! -f "$path" && test ! -d "$path"; then
23715        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23716      fi
23717
23718      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23719    fi
23720  fi
23721
23722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23723$as_echo_n "checking for Boot JDK... " >&6; }
23724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23725$as_echo "$BOOT_JDK" >&6; }
23726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23727$as_echo_n "checking Boot JDK version... " >&6; }
23728            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23730$as_echo "$BOOT_JDK_VERSION" >&6; }
23731          fi # end check jdk version
23732        fi # end check javac
23733      fi # end check java
23734    fi # end check boot jdk found
23735  fi
23736
23737    done
23738  fi
23739
23740  fi
23741
23742
23743    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23744    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23745      # Do we have a bin/java?
23746      if test ! -x "$BOOT_JDK/bin/java"; then
23747        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23749        BOOT_JDK_FOUND=no
23750      else
23751        # Do we have a bin/javac?
23752        if test ! -x "$BOOT_JDK/bin/javac"; then
23753          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23755          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23756$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23757          BOOT_JDK_FOUND=no
23758        else
23759          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23760          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23761
23762          # Extra M4 quote needed to protect [] in grep expression.
23763          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23764          if test "x$FOUND_CORRECT_VERSION" = x; then
23765            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23767            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23768$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23769            BOOT_JDK_FOUND=no
23770          else
23771            # We're done! :-)
23772            BOOT_JDK_FOUND=yes
23773
23774  # Only process if variable expands to non-empty
23775
23776  if test "x$BOOT_JDK" != x; then
23777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23778
23779  # Input might be given as Windows format, start by converting to
23780  # unix format.
23781  path="$BOOT_JDK"
23782  new_path=`$CYGPATH -u "$path"`
23783
23784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23787  # "foo.exe" is OK but "foo" is an error.
23788  #
23789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23790  # It is also a way to make sure we got the proper file name for the real test later on.
23791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23792  if test "x$test_shortpath" = x; then
23793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23795    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23796  fi
23797
23798  # Call helper function which possibly converts this using DOS-style short mode.
23799  # If so, the updated path is stored in $new_path.
23800
23801  input_path="$new_path"
23802  # Check if we need to convert this using DOS-style short mode. If the path
23803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23804  # take no chances and rewrite it.
23805  # Note: m4 eats our [], so we need to use [ and ] instead.
23806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23807  if test "x$has_forbidden_chars" != x; then
23808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23812      # Going to short mode and back again did indeed matter. Since short mode is
23813      # case insensitive, let's make it lowercase to improve readability.
23814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23815      # Now convert it back to Unix-style (cygpath)
23816      input_path=`$CYGPATH -u "$shortmode_path"`
23817      new_path="$input_path"
23818    fi
23819  fi
23820
23821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23822  if test "x$test_cygdrive_prefix" = x; then
23823    # As a simple fix, exclude /usr/bin since it's not a real path.
23824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23826      # a path prefixed by /cygdrive for fixpath to work.
23827      new_path="$CYGWIN_ROOT_PATH$input_path"
23828    fi
23829  fi
23830
23831
23832  if test "x$path" != "x$new_path"; then
23833    BOOT_JDK="$new_path"
23834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23836  fi
23837
23838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23839
23840  path="$BOOT_JDK"
23841  has_colon=`$ECHO $path | $GREP ^.:`
23842  new_path="$path"
23843  if test "x$has_colon" = x; then
23844    # Not in mixed or Windows style, start by that.
23845    new_path=`cmd //c echo $path`
23846  fi
23847
23848
23849  input_path="$new_path"
23850  # Check if we need to convert this using DOS-style short mode. If the path
23851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23852  # take no chances and rewrite it.
23853  # Note: m4 eats our [], so we need to use [ and ] instead.
23854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23855  if test "x$has_forbidden_chars" != x; then
23856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23858  fi
23859
23860
23861  windows_path="$new_path"
23862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23863    unix_path=`$CYGPATH -u "$windows_path"`
23864    new_path="$unix_path"
23865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23867    new_path="$unix_path"
23868  fi
23869
23870  if test "x$path" != "x$new_path"; then
23871    BOOT_JDK="$new_path"
23872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23874  fi
23875
23876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23878
23879    else
23880      # We're on a unix platform. Hooray! :)
23881      path="$BOOT_JDK"
23882      has_space=`$ECHO "$path" | $GREP " "`
23883      if test "x$has_space" != x; then
23884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23886        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23887      fi
23888
23889      # Use eval to expand a potential ~
23890      eval path="$path"
23891      if test ! -f "$path" && test ! -d "$path"; then
23892        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23893      fi
23894
23895      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23896    fi
23897  fi
23898
23899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23900$as_echo_n "checking for Boot JDK... " >&6; }
23901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23902$as_echo "$BOOT_JDK" >&6; }
23903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23904$as_echo_n "checking Boot JDK version... " >&6; }
23905            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23907$as_echo "$BOOT_JDK_VERSION" >&6; }
23908          fi # end check jdk version
23909        fi # end check javac
23910      fi # end check java
23911    fi # end check boot jdk found
23912  fi
23913
23914
23915  if test "x$BOOT_JDK_FOUND" = xno; then
23916    # Now execute the test
23917
23918  if test "x$ProgramFiles" != x; then
23919    VIRTUAL_DIR="$ProgramFiles/Java"
23920
23921  windows_path="$VIRTUAL_DIR"
23922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23923    unix_path=`$CYGPATH -u "$windows_path"`
23924    VIRTUAL_DIR="$unix_path"
23925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23927    VIRTUAL_DIR="$unix_path"
23928  fi
23929
23930
23931  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23932  BOOT_JDK_SUFFIX=""
23933  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23934  if test "x$ALL_JDKS_FOUND" != x; then
23935    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23936
23937  if test "x$BOOT_JDK_FOUND" = xno; then
23938    # Now execute the test
23939
23940        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23941        if test -d "$BOOT_JDK"; then
23942          BOOT_JDK_FOUND=maybe
23943          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23944$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23945        fi
23946
23947
23948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23950      # Do we have a bin/java?
23951      if test ! -x "$BOOT_JDK/bin/java"; then
23952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23954        BOOT_JDK_FOUND=no
23955      else
23956        # Do we have a bin/javac?
23957        if test ! -x "$BOOT_JDK/bin/javac"; then
23958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23962          BOOT_JDK_FOUND=no
23963        else
23964          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23965          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23966
23967          # Extra M4 quote needed to protect [] in grep expression.
23968          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23969          if test "x$FOUND_CORRECT_VERSION" = x; then
23970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23972            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23973$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23974            BOOT_JDK_FOUND=no
23975          else
23976            # We're done! :-)
23977            BOOT_JDK_FOUND=yes
23978
23979  # Only process if variable expands to non-empty
23980
23981  if test "x$BOOT_JDK" != x; then
23982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23983
23984  # Input might be given as Windows format, start by converting to
23985  # unix format.
23986  path="$BOOT_JDK"
23987  new_path=`$CYGPATH -u "$path"`
23988
23989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23992  # "foo.exe" is OK but "foo" is an error.
23993  #
23994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23995  # It is also a way to make sure we got the proper file name for the real test later on.
23996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23997  if test "x$test_shortpath" = x; then
23998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24000    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24001  fi
24002
24003  # Call helper function which possibly converts this using DOS-style short mode.
24004  # If so, the updated path is stored in $new_path.
24005
24006  input_path="$new_path"
24007  # Check if we need to convert this using DOS-style short mode. If the path
24008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24009  # take no chances and rewrite it.
24010  # Note: m4 eats our [], so we need to use [ and ] instead.
24011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24012  if test "x$has_forbidden_chars" != x; then
24013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24017      # Going to short mode and back again did indeed matter. Since short mode is
24018      # case insensitive, let's make it lowercase to improve readability.
24019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24020      # Now convert it back to Unix-style (cygpath)
24021      input_path=`$CYGPATH -u "$shortmode_path"`
24022      new_path="$input_path"
24023    fi
24024  fi
24025
24026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24027  if test "x$test_cygdrive_prefix" = x; then
24028    # As a simple fix, exclude /usr/bin since it's not a real path.
24029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24031      # a path prefixed by /cygdrive for fixpath to work.
24032      new_path="$CYGWIN_ROOT_PATH$input_path"
24033    fi
24034  fi
24035
24036
24037  if test "x$path" != "x$new_path"; then
24038    BOOT_JDK="$new_path"
24039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24041  fi
24042
24043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24044
24045  path="$BOOT_JDK"
24046  has_colon=`$ECHO $path | $GREP ^.:`
24047  new_path="$path"
24048  if test "x$has_colon" = x; then
24049    # Not in mixed or Windows style, start by that.
24050    new_path=`cmd //c echo $path`
24051  fi
24052
24053
24054  input_path="$new_path"
24055  # Check if we need to convert this using DOS-style short mode. If the path
24056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24057  # take no chances and rewrite it.
24058  # Note: m4 eats our [], so we need to use [ and ] instead.
24059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24060  if test "x$has_forbidden_chars" != x; then
24061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24063  fi
24064
24065
24066  windows_path="$new_path"
24067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24068    unix_path=`$CYGPATH -u "$windows_path"`
24069    new_path="$unix_path"
24070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24072    new_path="$unix_path"
24073  fi
24074
24075  if test "x$path" != "x$new_path"; then
24076    BOOT_JDK="$new_path"
24077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24079  fi
24080
24081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24083
24084    else
24085      # We're on a unix platform. Hooray! :)
24086      path="$BOOT_JDK"
24087      has_space=`$ECHO "$path" | $GREP " "`
24088      if test "x$has_space" != x; then
24089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24092      fi
24093
24094      # Use eval to expand a potential ~
24095      eval path="$path"
24096      if test ! -f "$path" && test ! -d "$path"; then
24097        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24098      fi
24099
24100      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24101    fi
24102  fi
24103
24104            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24105$as_echo_n "checking for Boot JDK... " >&6; }
24106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24107$as_echo "$BOOT_JDK" >&6; }
24108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24109$as_echo_n "checking Boot JDK version... " >&6; }
24110            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24111            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24112$as_echo "$BOOT_JDK_VERSION" >&6; }
24113          fi # end check jdk version
24114        fi # end check javac
24115      fi # end check java
24116    fi # end check boot jdk found
24117  fi
24118
24119    done
24120  fi
24121
24122  fi
24123
24124
24125    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24126    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24127      # Do we have a bin/java?
24128      if test ! -x "$BOOT_JDK/bin/java"; then
24129        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24131        BOOT_JDK_FOUND=no
24132      else
24133        # Do we have a bin/javac?
24134        if test ! -x "$BOOT_JDK/bin/javac"; then
24135          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24137          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24138$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24139          BOOT_JDK_FOUND=no
24140        else
24141          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24142          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24143
24144          # Extra M4 quote needed to protect [] in grep expression.
24145          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24146          if test "x$FOUND_CORRECT_VERSION" = x; then
24147            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24149            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24150$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24151            BOOT_JDK_FOUND=no
24152          else
24153            # We're done! :-)
24154            BOOT_JDK_FOUND=yes
24155
24156  # Only process if variable expands to non-empty
24157
24158  if test "x$BOOT_JDK" != x; then
24159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24160
24161  # Input might be given as Windows format, start by converting to
24162  # unix format.
24163  path="$BOOT_JDK"
24164  new_path=`$CYGPATH -u "$path"`
24165
24166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24169  # "foo.exe" is OK but "foo" is an error.
24170  #
24171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24172  # It is also a way to make sure we got the proper file name for the real test later on.
24173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24174  if test "x$test_shortpath" = x; then
24175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24176$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24177    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24178  fi
24179
24180  # Call helper function which possibly converts this using DOS-style short mode.
24181  # If so, the updated path is stored in $new_path.
24182
24183  input_path="$new_path"
24184  # Check if we need to convert this using DOS-style short mode. If the path
24185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24186  # take no chances and rewrite it.
24187  # Note: m4 eats our [], so we need to use [ and ] instead.
24188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24189  if test "x$has_forbidden_chars" != x; then
24190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24194      # Going to short mode and back again did indeed matter. Since short mode is
24195      # case insensitive, let's make it lowercase to improve readability.
24196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24197      # Now convert it back to Unix-style (cygpath)
24198      input_path=`$CYGPATH -u "$shortmode_path"`
24199      new_path="$input_path"
24200    fi
24201  fi
24202
24203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24204  if test "x$test_cygdrive_prefix" = x; then
24205    # As a simple fix, exclude /usr/bin since it's not a real path.
24206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24208      # a path prefixed by /cygdrive for fixpath to work.
24209      new_path="$CYGWIN_ROOT_PATH$input_path"
24210    fi
24211  fi
24212
24213
24214  if test "x$path" != "x$new_path"; then
24215    BOOT_JDK="$new_path"
24216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24218  fi
24219
24220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24221
24222  path="$BOOT_JDK"
24223  has_colon=`$ECHO $path | $GREP ^.:`
24224  new_path="$path"
24225  if test "x$has_colon" = x; then
24226    # Not in mixed or Windows style, start by that.
24227    new_path=`cmd //c echo $path`
24228  fi
24229
24230
24231  input_path="$new_path"
24232  # Check if we need to convert this using DOS-style short mode. If the path
24233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24234  # take no chances and rewrite it.
24235  # Note: m4 eats our [], so we need to use [ and ] instead.
24236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24237  if test "x$has_forbidden_chars" != x; then
24238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24240  fi
24241
24242
24243  windows_path="$new_path"
24244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24245    unix_path=`$CYGPATH -u "$windows_path"`
24246    new_path="$unix_path"
24247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24249    new_path="$unix_path"
24250  fi
24251
24252  if test "x$path" != "x$new_path"; then
24253    BOOT_JDK="$new_path"
24254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24256  fi
24257
24258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24260
24261    else
24262      # We're on a unix platform. Hooray! :)
24263      path="$BOOT_JDK"
24264      has_space=`$ECHO "$path" | $GREP " "`
24265      if test "x$has_space" != x; then
24266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24269      fi
24270
24271      # Use eval to expand a potential ~
24272      eval path="$path"
24273      if test ! -f "$path" && test ! -d "$path"; then
24274        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24275      fi
24276
24277      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24278    fi
24279  fi
24280
24281            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24282$as_echo_n "checking for Boot JDK... " >&6; }
24283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24284$as_echo "$BOOT_JDK" >&6; }
24285            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24286$as_echo_n "checking Boot JDK version... " >&6; }
24287            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24289$as_echo "$BOOT_JDK_VERSION" >&6; }
24290          fi # end check jdk version
24291        fi # end check javac
24292      fi # end check java
24293    fi # end check boot jdk found
24294  fi
24295
24296
24297  if test "x$BOOT_JDK_FOUND" = xno; then
24298    # Now execute the test
24299
24300  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24301  BOOT_JDK_SUFFIX=""
24302  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24303  if test "x$ALL_JDKS_FOUND" != x; then
24304    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24305
24306  if test "x$BOOT_JDK_FOUND" = xno; then
24307    # Now execute the test
24308
24309        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24310        if test -d "$BOOT_JDK"; then
24311          BOOT_JDK_FOUND=maybe
24312          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24313$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24314        fi
24315
24316
24317    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24318    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24319      # Do we have a bin/java?
24320      if test ! -x "$BOOT_JDK/bin/java"; then
24321        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24323        BOOT_JDK_FOUND=no
24324      else
24325        # Do we have a bin/javac?
24326        if test ! -x "$BOOT_JDK/bin/javac"; then
24327          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24329          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24330$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24331          BOOT_JDK_FOUND=no
24332        else
24333          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24334          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24335
24336          # Extra M4 quote needed to protect [] in grep expression.
24337          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24338          if test "x$FOUND_CORRECT_VERSION" = x; then
24339            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24341            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24342$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24343            BOOT_JDK_FOUND=no
24344          else
24345            # We're done! :-)
24346            BOOT_JDK_FOUND=yes
24347
24348  # Only process if variable expands to non-empty
24349
24350  if test "x$BOOT_JDK" != x; then
24351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24352
24353  # Input might be given as Windows format, start by converting to
24354  # unix format.
24355  path="$BOOT_JDK"
24356  new_path=`$CYGPATH -u "$path"`
24357
24358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24361  # "foo.exe" is OK but "foo" is an error.
24362  #
24363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24364  # It is also a way to make sure we got the proper file name for the real test later on.
24365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24366  if test "x$test_shortpath" = x; then
24367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24369    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24370  fi
24371
24372  # Call helper function which possibly converts this using DOS-style short mode.
24373  # If so, the updated path is stored in $new_path.
24374
24375  input_path="$new_path"
24376  # Check if we need to convert this using DOS-style short mode. If the path
24377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24378  # take no chances and rewrite it.
24379  # Note: m4 eats our [], so we need to use [ and ] instead.
24380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24381  if test "x$has_forbidden_chars" != x; then
24382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24386      # Going to short mode and back again did indeed matter. Since short mode is
24387      # case insensitive, let's make it lowercase to improve readability.
24388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24389      # Now convert it back to Unix-style (cygpath)
24390      input_path=`$CYGPATH -u "$shortmode_path"`
24391      new_path="$input_path"
24392    fi
24393  fi
24394
24395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24396  if test "x$test_cygdrive_prefix" = x; then
24397    # As a simple fix, exclude /usr/bin since it's not a real path.
24398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24400      # a path prefixed by /cygdrive for fixpath to work.
24401      new_path="$CYGWIN_ROOT_PATH$input_path"
24402    fi
24403  fi
24404
24405
24406  if test "x$path" != "x$new_path"; then
24407    BOOT_JDK="$new_path"
24408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24410  fi
24411
24412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24413
24414  path="$BOOT_JDK"
24415  has_colon=`$ECHO $path | $GREP ^.:`
24416  new_path="$path"
24417  if test "x$has_colon" = x; then
24418    # Not in mixed or Windows style, start by that.
24419    new_path=`cmd //c echo $path`
24420  fi
24421
24422
24423  input_path="$new_path"
24424  # Check if we need to convert this using DOS-style short mode. If the path
24425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24426  # take no chances and rewrite it.
24427  # Note: m4 eats our [], so we need to use [ and ] instead.
24428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24429  if test "x$has_forbidden_chars" != x; then
24430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24432  fi
24433
24434
24435  windows_path="$new_path"
24436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24437    unix_path=`$CYGPATH -u "$windows_path"`
24438    new_path="$unix_path"
24439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24441    new_path="$unix_path"
24442  fi
24443
24444  if test "x$path" != "x$new_path"; then
24445    BOOT_JDK="$new_path"
24446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24448  fi
24449
24450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24452
24453    else
24454      # We're on a unix platform. Hooray! :)
24455      path="$BOOT_JDK"
24456      has_space=`$ECHO "$path" | $GREP " "`
24457      if test "x$has_space" != x; then
24458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24461      fi
24462
24463      # Use eval to expand a potential ~
24464      eval path="$path"
24465      if test ! -f "$path" && test ! -d "$path"; then
24466        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24467      fi
24468
24469      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24470    fi
24471  fi
24472
24473            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24474$as_echo_n "checking for Boot JDK... " >&6; }
24475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24476$as_echo "$BOOT_JDK" >&6; }
24477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24478$as_echo_n "checking Boot JDK version... " >&6; }
24479            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24481$as_echo "$BOOT_JDK_VERSION" >&6; }
24482          fi # end check jdk version
24483        fi # end check javac
24484      fi # end check java
24485    fi # end check boot jdk found
24486  fi
24487
24488    done
24489  fi
24490
24491
24492    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24493    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24494      # Do we have a bin/java?
24495      if test ! -x "$BOOT_JDK/bin/java"; then
24496        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24498        BOOT_JDK_FOUND=no
24499      else
24500        # Do we have a bin/javac?
24501        if test ! -x "$BOOT_JDK/bin/javac"; then
24502          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24504          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24505$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24506          BOOT_JDK_FOUND=no
24507        else
24508          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24509          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24510
24511          # Extra M4 quote needed to protect [] in grep expression.
24512          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24513          if test "x$FOUND_CORRECT_VERSION" = x; then
24514            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24516            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24517$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24518            BOOT_JDK_FOUND=no
24519          else
24520            # We're done! :-)
24521            BOOT_JDK_FOUND=yes
24522
24523  # Only process if variable expands to non-empty
24524
24525  if test "x$BOOT_JDK" != x; then
24526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24527
24528  # Input might be given as Windows format, start by converting to
24529  # unix format.
24530  path="$BOOT_JDK"
24531  new_path=`$CYGPATH -u "$path"`
24532
24533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24536  # "foo.exe" is OK but "foo" is an error.
24537  #
24538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24539  # It is also a way to make sure we got the proper file name for the real test later on.
24540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24541  if test "x$test_shortpath" = x; then
24542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24543$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24544    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24545  fi
24546
24547  # Call helper function which possibly converts this using DOS-style short mode.
24548  # If so, the updated path is stored in $new_path.
24549
24550  input_path="$new_path"
24551  # Check if we need to convert this using DOS-style short mode. If the path
24552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24553  # take no chances and rewrite it.
24554  # Note: m4 eats our [], so we need to use [ and ] instead.
24555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24556  if test "x$has_forbidden_chars" != x; then
24557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24561      # Going to short mode and back again did indeed matter. Since short mode is
24562      # case insensitive, let's make it lowercase to improve readability.
24563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24564      # Now convert it back to Unix-style (cygpath)
24565      input_path=`$CYGPATH -u "$shortmode_path"`
24566      new_path="$input_path"
24567    fi
24568  fi
24569
24570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24571  if test "x$test_cygdrive_prefix" = x; then
24572    # As a simple fix, exclude /usr/bin since it's not a real path.
24573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24575      # a path prefixed by /cygdrive for fixpath to work.
24576      new_path="$CYGWIN_ROOT_PATH$input_path"
24577    fi
24578  fi
24579
24580
24581  if test "x$path" != "x$new_path"; then
24582    BOOT_JDK="$new_path"
24583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24584$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24585  fi
24586
24587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24588
24589  path="$BOOT_JDK"
24590  has_colon=`$ECHO $path | $GREP ^.:`
24591  new_path="$path"
24592  if test "x$has_colon" = x; then
24593    # Not in mixed or Windows style, start by that.
24594    new_path=`cmd //c echo $path`
24595  fi
24596
24597
24598  input_path="$new_path"
24599  # Check if we need to convert this using DOS-style short mode. If the path
24600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24601  # take no chances and rewrite it.
24602  # Note: m4 eats our [], so we need to use [ and ] instead.
24603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24604  if test "x$has_forbidden_chars" != x; then
24605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24607  fi
24608
24609
24610  windows_path="$new_path"
24611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24612    unix_path=`$CYGPATH -u "$windows_path"`
24613    new_path="$unix_path"
24614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24616    new_path="$unix_path"
24617  fi
24618
24619  if test "x$path" != "x$new_path"; then
24620    BOOT_JDK="$new_path"
24621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24622$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24623  fi
24624
24625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24627
24628    else
24629      # We're on a unix platform. Hooray! :)
24630      path="$BOOT_JDK"
24631      has_space=`$ECHO "$path" | $GREP " "`
24632      if test "x$has_space" != x; then
24633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24636      fi
24637
24638      # Use eval to expand a potential ~
24639      eval path="$path"
24640      if test ! -f "$path" && test ! -d "$path"; then
24641        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24642      fi
24643
24644      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24645    fi
24646  fi
24647
24648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24649$as_echo_n "checking for Boot JDK... " >&6; }
24650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24651$as_echo "$BOOT_JDK" >&6; }
24652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24653$as_echo_n "checking Boot JDK version... " >&6; }
24654            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24656$as_echo "$BOOT_JDK_VERSION" >&6; }
24657          fi # end check jdk version
24658        fi # end check javac
24659      fi # end check java
24660    fi # end check boot jdk found
24661  fi
24662
24663  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24664
24665  if test "x$BOOT_JDK_FOUND" = xno; then
24666    # Now execute the test
24667
24668  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24669  BOOT_JDK_SUFFIX="/Contents/Home"
24670  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24671  if test "x$ALL_JDKS_FOUND" != x; then
24672    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24673
24674  if test "x$BOOT_JDK_FOUND" = xno; then
24675    # Now execute the test
24676
24677        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24678        if test -d "$BOOT_JDK"; then
24679          BOOT_JDK_FOUND=maybe
24680          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24681$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24682        fi
24683
24684
24685    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24686    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24687      # Do we have a bin/java?
24688      if test ! -x "$BOOT_JDK/bin/java"; then
24689        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24691        BOOT_JDK_FOUND=no
24692      else
24693        # Do we have a bin/javac?
24694        if test ! -x "$BOOT_JDK/bin/javac"; then
24695          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24697          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24698$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24699          BOOT_JDK_FOUND=no
24700        else
24701          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24702          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24703
24704          # Extra M4 quote needed to protect [] in grep expression.
24705          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24706          if test "x$FOUND_CORRECT_VERSION" = x; then
24707            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24709            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24710$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24711            BOOT_JDK_FOUND=no
24712          else
24713            # We're done! :-)
24714            BOOT_JDK_FOUND=yes
24715
24716  # Only process if variable expands to non-empty
24717
24718  if test "x$BOOT_JDK" != x; then
24719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24720
24721  # Input might be given as Windows format, start by converting to
24722  # unix format.
24723  path="$BOOT_JDK"
24724  new_path=`$CYGPATH -u "$path"`
24725
24726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24729  # "foo.exe" is OK but "foo" is an error.
24730  #
24731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24732  # It is also a way to make sure we got the proper file name for the real test later on.
24733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24734  if test "x$test_shortpath" = x; then
24735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24737    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24738  fi
24739
24740  # Call helper function which possibly converts this using DOS-style short mode.
24741  # If so, the updated path is stored in $new_path.
24742
24743  input_path="$new_path"
24744  # Check if we need to convert this using DOS-style short mode. If the path
24745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24746  # take no chances and rewrite it.
24747  # Note: m4 eats our [], so we need to use [ and ] instead.
24748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24749  if test "x$has_forbidden_chars" != x; then
24750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24754      # Going to short mode and back again did indeed matter. Since short mode is
24755      # case insensitive, let's make it lowercase to improve readability.
24756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24757      # Now convert it back to Unix-style (cygpath)
24758      input_path=`$CYGPATH -u "$shortmode_path"`
24759      new_path="$input_path"
24760    fi
24761  fi
24762
24763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24764  if test "x$test_cygdrive_prefix" = x; then
24765    # As a simple fix, exclude /usr/bin since it's not a real path.
24766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24768      # a path prefixed by /cygdrive for fixpath to work.
24769      new_path="$CYGWIN_ROOT_PATH$input_path"
24770    fi
24771  fi
24772
24773
24774  if test "x$path" != "x$new_path"; then
24775    BOOT_JDK="$new_path"
24776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24778  fi
24779
24780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24781
24782  path="$BOOT_JDK"
24783  has_colon=`$ECHO $path | $GREP ^.:`
24784  new_path="$path"
24785  if test "x$has_colon" = x; then
24786    # Not in mixed or Windows style, start by that.
24787    new_path=`cmd //c echo $path`
24788  fi
24789
24790
24791  input_path="$new_path"
24792  # Check if we need to convert this using DOS-style short mode. If the path
24793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24794  # take no chances and rewrite it.
24795  # Note: m4 eats our [], so we need to use [ and ] instead.
24796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24797  if test "x$has_forbidden_chars" != x; then
24798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24800  fi
24801
24802
24803  windows_path="$new_path"
24804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24805    unix_path=`$CYGPATH -u "$windows_path"`
24806    new_path="$unix_path"
24807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24809    new_path="$unix_path"
24810  fi
24811
24812  if test "x$path" != "x$new_path"; then
24813    BOOT_JDK="$new_path"
24814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24816  fi
24817
24818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24820
24821    else
24822      # We're on a unix platform. Hooray! :)
24823      path="$BOOT_JDK"
24824      has_space=`$ECHO "$path" | $GREP " "`
24825      if test "x$has_space" != x; then
24826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24829      fi
24830
24831      # Use eval to expand a potential ~
24832      eval path="$path"
24833      if test ! -f "$path" && test ! -d "$path"; then
24834        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24835      fi
24836
24837      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24838    fi
24839  fi
24840
24841            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24842$as_echo_n "checking for Boot JDK... " >&6; }
24843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24844$as_echo "$BOOT_JDK" >&6; }
24845            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24846$as_echo_n "checking Boot JDK version... " >&6; }
24847            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24849$as_echo "$BOOT_JDK_VERSION" >&6; }
24850          fi # end check jdk version
24851        fi # end check javac
24852      fi # end check java
24853    fi # end check boot jdk found
24854  fi
24855
24856    done
24857  fi
24858
24859
24860    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24861    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24862      # Do we have a bin/java?
24863      if test ! -x "$BOOT_JDK/bin/java"; then
24864        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24866        BOOT_JDK_FOUND=no
24867      else
24868        # Do we have a bin/javac?
24869        if test ! -x "$BOOT_JDK/bin/javac"; then
24870          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24872          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24873$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24874          BOOT_JDK_FOUND=no
24875        else
24876          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24877          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24878
24879          # Extra M4 quote needed to protect [] in grep expression.
24880          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24881          if test "x$FOUND_CORRECT_VERSION" = x; then
24882            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24884            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24885$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24886            BOOT_JDK_FOUND=no
24887          else
24888            # We're done! :-)
24889            BOOT_JDK_FOUND=yes
24890
24891  # Only process if variable expands to non-empty
24892
24893  if test "x$BOOT_JDK" != x; then
24894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24895
24896  # Input might be given as Windows format, start by converting to
24897  # unix format.
24898  path="$BOOT_JDK"
24899  new_path=`$CYGPATH -u "$path"`
24900
24901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24904  # "foo.exe" is OK but "foo" is an error.
24905  #
24906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24907  # It is also a way to make sure we got the proper file name for the real test later on.
24908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24909  if test "x$test_shortpath" = x; then
24910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24911$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24912    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24913  fi
24914
24915  # Call helper function which possibly converts this using DOS-style short mode.
24916  # If so, the updated path is stored in $new_path.
24917
24918  input_path="$new_path"
24919  # Check if we need to convert this using DOS-style short mode. If the path
24920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24921  # take no chances and rewrite it.
24922  # Note: m4 eats our [], so we need to use [ and ] instead.
24923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24924  if test "x$has_forbidden_chars" != x; then
24925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24929      # Going to short mode and back again did indeed matter. Since short mode is
24930      # case insensitive, let's make it lowercase to improve readability.
24931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24932      # Now convert it back to Unix-style (cygpath)
24933      input_path=`$CYGPATH -u "$shortmode_path"`
24934      new_path="$input_path"
24935    fi
24936  fi
24937
24938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24939  if test "x$test_cygdrive_prefix" = x; then
24940    # As a simple fix, exclude /usr/bin since it's not a real path.
24941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24943      # a path prefixed by /cygdrive for fixpath to work.
24944      new_path="$CYGWIN_ROOT_PATH$input_path"
24945    fi
24946  fi
24947
24948
24949  if test "x$path" != "x$new_path"; then
24950    BOOT_JDK="$new_path"
24951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24952$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24953  fi
24954
24955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24956
24957  path="$BOOT_JDK"
24958  has_colon=`$ECHO $path | $GREP ^.:`
24959  new_path="$path"
24960  if test "x$has_colon" = x; then
24961    # Not in mixed or Windows style, start by that.
24962    new_path=`cmd //c echo $path`
24963  fi
24964
24965
24966  input_path="$new_path"
24967  # Check if we need to convert this using DOS-style short mode. If the path
24968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24969  # take no chances and rewrite it.
24970  # Note: m4 eats our [], so we need to use [ and ] instead.
24971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24972  if test "x$has_forbidden_chars" != x; then
24973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24975  fi
24976
24977
24978  windows_path="$new_path"
24979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24980    unix_path=`$CYGPATH -u "$windows_path"`
24981    new_path="$unix_path"
24982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24984    new_path="$unix_path"
24985  fi
24986
24987  if test "x$path" != "x$new_path"; then
24988    BOOT_JDK="$new_path"
24989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24990$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24991  fi
24992
24993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24995
24996    else
24997      # We're on a unix platform. Hooray! :)
24998      path="$BOOT_JDK"
24999      has_space=`$ECHO "$path" | $GREP " "`
25000      if test "x$has_space" != x; then
25001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25003        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25004      fi
25005
25006      # Use eval to expand a potential ~
25007      eval path="$path"
25008      if test ! -f "$path" && test ! -d "$path"; then
25009        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25010      fi
25011
25012      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25013    fi
25014  fi
25015
25016            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25017$as_echo_n "checking for Boot JDK... " >&6; }
25018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25019$as_echo "$BOOT_JDK" >&6; }
25020            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25021$as_echo_n "checking Boot JDK version... " >&6; }
25022            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25023            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25024$as_echo "$BOOT_JDK_VERSION" >&6; }
25025          fi # end check jdk version
25026        fi # end check javac
25027      fi # end check java
25028    fi # end check boot jdk found
25029  fi
25030
25031
25032  if test "x$BOOT_JDK_FOUND" = xno; then
25033    # Now execute the test
25034
25035  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25036  BOOT_JDK_SUFFIX="/Contents/Home"
25037  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25038  if test "x$ALL_JDKS_FOUND" != x; then
25039    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25040
25041  if test "x$BOOT_JDK_FOUND" = xno; then
25042    # Now execute the test
25043
25044        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25045        if test -d "$BOOT_JDK"; then
25046          BOOT_JDK_FOUND=maybe
25047          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25048$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25049        fi
25050
25051
25052    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25053    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25054      # Do we have a bin/java?
25055      if test ! -x "$BOOT_JDK/bin/java"; then
25056        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25058        BOOT_JDK_FOUND=no
25059      else
25060        # Do we have a bin/javac?
25061        if test ! -x "$BOOT_JDK/bin/javac"; then
25062          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25064          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25065$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25066          BOOT_JDK_FOUND=no
25067        else
25068          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25069          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25070
25071          # Extra M4 quote needed to protect [] in grep expression.
25072          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25073          if test "x$FOUND_CORRECT_VERSION" = x; then
25074            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25076            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25077$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25078            BOOT_JDK_FOUND=no
25079          else
25080            # We're done! :-)
25081            BOOT_JDK_FOUND=yes
25082
25083  # Only process if variable expands to non-empty
25084
25085  if test "x$BOOT_JDK" != x; then
25086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25087
25088  # Input might be given as Windows format, start by converting to
25089  # unix format.
25090  path="$BOOT_JDK"
25091  new_path=`$CYGPATH -u "$path"`
25092
25093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25096  # "foo.exe" is OK but "foo" is an error.
25097  #
25098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25099  # It is also a way to make sure we got the proper file name for the real test later on.
25100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25101  if test "x$test_shortpath" = x; then
25102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25103$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25104    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25105  fi
25106
25107  # Call helper function which possibly converts this using DOS-style short mode.
25108  # If so, the updated path is stored in $new_path.
25109
25110  input_path="$new_path"
25111  # Check if we need to convert this using DOS-style short mode. If the path
25112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25113  # take no chances and rewrite it.
25114  # Note: m4 eats our [], so we need to use [ and ] instead.
25115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25116  if test "x$has_forbidden_chars" != x; then
25117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25121      # Going to short mode and back again did indeed matter. Since short mode is
25122      # case insensitive, let's make it lowercase to improve readability.
25123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25124      # Now convert it back to Unix-style (cygpath)
25125      input_path=`$CYGPATH -u "$shortmode_path"`
25126      new_path="$input_path"
25127    fi
25128  fi
25129
25130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25131  if test "x$test_cygdrive_prefix" = x; then
25132    # As a simple fix, exclude /usr/bin since it's not a real path.
25133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25135      # a path prefixed by /cygdrive for fixpath to work.
25136      new_path="$CYGWIN_ROOT_PATH$input_path"
25137    fi
25138  fi
25139
25140
25141  if test "x$path" != "x$new_path"; then
25142    BOOT_JDK="$new_path"
25143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25144$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25145  fi
25146
25147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25148
25149  path="$BOOT_JDK"
25150  has_colon=`$ECHO $path | $GREP ^.:`
25151  new_path="$path"
25152  if test "x$has_colon" = x; then
25153    # Not in mixed or Windows style, start by that.
25154    new_path=`cmd //c echo $path`
25155  fi
25156
25157
25158  input_path="$new_path"
25159  # Check if we need to convert this using DOS-style short mode. If the path
25160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25161  # take no chances and rewrite it.
25162  # Note: m4 eats our [], so we need to use [ and ] instead.
25163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25164  if test "x$has_forbidden_chars" != x; then
25165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25167  fi
25168
25169
25170  windows_path="$new_path"
25171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25172    unix_path=`$CYGPATH -u "$windows_path"`
25173    new_path="$unix_path"
25174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25176    new_path="$unix_path"
25177  fi
25178
25179  if test "x$path" != "x$new_path"; then
25180    BOOT_JDK="$new_path"
25181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25183  fi
25184
25185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25187
25188    else
25189      # We're on a unix platform. Hooray! :)
25190      path="$BOOT_JDK"
25191      has_space=`$ECHO "$path" | $GREP " "`
25192      if test "x$has_space" != x; then
25193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25196      fi
25197
25198      # Use eval to expand a potential ~
25199      eval path="$path"
25200      if test ! -f "$path" && test ! -d "$path"; then
25201        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25202      fi
25203
25204      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25205    fi
25206  fi
25207
25208            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25209$as_echo_n "checking for Boot JDK... " >&6; }
25210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25211$as_echo "$BOOT_JDK" >&6; }
25212            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25213$as_echo_n "checking Boot JDK version... " >&6; }
25214            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25216$as_echo "$BOOT_JDK_VERSION" >&6; }
25217          fi # end check jdk version
25218        fi # end check javac
25219      fi # end check java
25220    fi # end check boot jdk found
25221  fi
25222
25223    done
25224  fi
25225
25226
25227    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25228    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25229      # Do we have a bin/java?
25230      if test ! -x "$BOOT_JDK/bin/java"; then
25231        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25233        BOOT_JDK_FOUND=no
25234      else
25235        # Do we have a bin/javac?
25236        if test ! -x "$BOOT_JDK/bin/javac"; then
25237          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25239          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25240$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25241          BOOT_JDK_FOUND=no
25242        else
25243          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25244          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25245
25246          # Extra M4 quote needed to protect [] in grep expression.
25247          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25248          if test "x$FOUND_CORRECT_VERSION" = x; then
25249            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25251            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25252$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25253            BOOT_JDK_FOUND=no
25254          else
25255            # We're done! :-)
25256            BOOT_JDK_FOUND=yes
25257
25258  # Only process if variable expands to non-empty
25259
25260  if test "x$BOOT_JDK" != x; then
25261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25262
25263  # Input might be given as Windows format, start by converting to
25264  # unix format.
25265  path="$BOOT_JDK"
25266  new_path=`$CYGPATH -u "$path"`
25267
25268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25271  # "foo.exe" is OK but "foo" is an error.
25272  #
25273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25274  # It is also a way to make sure we got the proper file name for the real test later on.
25275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25276  if test "x$test_shortpath" = x; then
25277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25279    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25280  fi
25281
25282  # Call helper function which possibly converts this using DOS-style short mode.
25283  # If so, the updated path is stored in $new_path.
25284
25285  input_path="$new_path"
25286  # Check if we need to convert this using DOS-style short mode. If the path
25287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25288  # take no chances and rewrite it.
25289  # Note: m4 eats our [], so we need to use [ and ] instead.
25290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25291  if test "x$has_forbidden_chars" != x; then
25292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25296      # Going to short mode and back again did indeed matter. Since short mode is
25297      # case insensitive, let's make it lowercase to improve readability.
25298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25299      # Now convert it back to Unix-style (cygpath)
25300      input_path=`$CYGPATH -u "$shortmode_path"`
25301      new_path="$input_path"
25302    fi
25303  fi
25304
25305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25306  if test "x$test_cygdrive_prefix" = x; then
25307    # As a simple fix, exclude /usr/bin since it's not a real path.
25308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25310      # a path prefixed by /cygdrive for fixpath to work.
25311      new_path="$CYGWIN_ROOT_PATH$input_path"
25312    fi
25313  fi
25314
25315
25316  if test "x$path" != "x$new_path"; then
25317    BOOT_JDK="$new_path"
25318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25320  fi
25321
25322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25323
25324  path="$BOOT_JDK"
25325  has_colon=`$ECHO $path | $GREP ^.:`
25326  new_path="$path"
25327  if test "x$has_colon" = x; then
25328    # Not in mixed or Windows style, start by that.
25329    new_path=`cmd //c echo $path`
25330  fi
25331
25332
25333  input_path="$new_path"
25334  # Check if we need to convert this using DOS-style short mode. If the path
25335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25336  # take no chances and rewrite it.
25337  # Note: m4 eats our [], so we need to use [ and ] instead.
25338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25339  if test "x$has_forbidden_chars" != x; then
25340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25342  fi
25343
25344
25345  windows_path="$new_path"
25346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25347    unix_path=`$CYGPATH -u "$windows_path"`
25348    new_path="$unix_path"
25349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25351    new_path="$unix_path"
25352  fi
25353
25354  if test "x$path" != "x$new_path"; then
25355    BOOT_JDK="$new_path"
25356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25358  fi
25359
25360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25362
25363    else
25364      # We're on a unix platform. Hooray! :)
25365      path="$BOOT_JDK"
25366      has_space=`$ECHO "$path" | $GREP " "`
25367      if test "x$has_space" != x; then
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25370        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25371      fi
25372
25373      # Use eval to expand a potential ~
25374      eval path="$path"
25375      if test ! -f "$path" && test ! -d "$path"; then
25376        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25377      fi
25378
25379      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25380    fi
25381  fi
25382
25383            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25384$as_echo_n "checking for Boot JDK... " >&6; }
25385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25386$as_echo "$BOOT_JDK" >&6; }
25387            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25388$as_echo_n "checking Boot JDK version... " >&6; }
25389            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25391$as_echo "$BOOT_JDK_VERSION" >&6; }
25392          fi # end check jdk version
25393        fi # end check javac
25394      fi # end check java
25395    fi # end check boot jdk found
25396  fi
25397
25398  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25399
25400  if test "x$BOOT_JDK_FOUND" = xno; then
25401    # Now execute the test
25402
25403  BOOT_JDK_PREFIX="/usr/lib/jvm"
25404  BOOT_JDK_SUFFIX=""
25405  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25406  if test "x$ALL_JDKS_FOUND" != x; then
25407    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25408
25409  if test "x$BOOT_JDK_FOUND" = xno; then
25410    # Now execute the test
25411
25412        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25413        if test -d "$BOOT_JDK"; then
25414          BOOT_JDK_FOUND=maybe
25415          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25416$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25417        fi
25418
25419
25420    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25421    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25422      # Do we have a bin/java?
25423      if test ! -x "$BOOT_JDK/bin/java"; then
25424        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25426        BOOT_JDK_FOUND=no
25427      else
25428        # Do we have a bin/javac?
25429        if test ! -x "$BOOT_JDK/bin/javac"; then
25430          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25432          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25433$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25434          BOOT_JDK_FOUND=no
25435        else
25436          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25437          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25438
25439          # Extra M4 quote needed to protect [] in grep expression.
25440          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25441          if test "x$FOUND_CORRECT_VERSION" = x; then
25442            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25444            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25445$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25446            BOOT_JDK_FOUND=no
25447          else
25448            # We're done! :-)
25449            BOOT_JDK_FOUND=yes
25450
25451  # Only process if variable expands to non-empty
25452
25453  if test "x$BOOT_JDK" != x; then
25454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25455
25456  # Input might be given as Windows format, start by converting to
25457  # unix format.
25458  path="$BOOT_JDK"
25459  new_path=`$CYGPATH -u "$path"`
25460
25461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25464  # "foo.exe" is OK but "foo" is an error.
25465  #
25466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25467  # It is also a way to make sure we got the proper file name for the real test later on.
25468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25469  if test "x$test_shortpath" = x; then
25470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25472    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25473  fi
25474
25475  # Call helper function which possibly converts this using DOS-style short mode.
25476  # If so, the updated path is stored in $new_path.
25477
25478  input_path="$new_path"
25479  # Check if we need to convert this using DOS-style short mode. If the path
25480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25481  # take no chances and rewrite it.
25482  # Note: m4 eats our [], so we need to use [ and ] instead.
25483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25484  if test "x$has_forbidden_chars" != x; then
25485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25489      # Going to short mode and back again did indeed matter. Since short mode is
25490      # case insensitive, let's make it lowercase to improve readability.
25491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25492      # Now convert it back to Unix-style (cygpath)
25493      input_path=`$CYGPATH -u "$shortmode_path"`
25494      new_path="$input_path"
25495    fi
25496  fi
25497
25498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25499  if test "x$test_cygdrive_prefix" = x; then
25500    # As a simple fix, exclude /usr/bin since it's not a real path.
25501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25503      # a path prefixed by /cygdrive for fixpath to work.
25504      new_path="$CYGWIN_ROOT_PATH$input_path"
25505    fi
25506  fi
25507
25508
25509  if test "x$path" != "x$new_path"; then
25510    BOOT_JDK="$new_path"
25511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25512$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25513  fi
25514
25515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25516
25517  path="$BOOT_JDK"
25518  has_colon=`$ECHO $path | $GREP ^.:`
25519  new_path="$path"
25520  if test "x$has_colon" = x; then
25521    # Not in mixed or Windows style, start by that.
25522    new_path=`cmd //c echo $path`
25523  fi
25524
25525
25526  input_path="$new_path"
25527  # Check if we need to convert this using DOS-style short mode. If the path
25528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25529  # take no chances and rewrite it.
25530  # Note: m4 eats our [], so we need to use [ and ] instead.
25531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25532  if test "x$has_forbidden_chars" != x; then
25533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25535  fi
25536
25537
25538  windows_path="$new_path"
25539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25540    unix_path=`$CYGPATH -u "$windows_path"`
25541    new_path="$unix_path"
25542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25544    new_path="$unix_path"
25545  fi
25546
25547  if test "x$path" != "x$new_path"; then
25548    BOOT_JDK="$new_path"
25549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25550$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25551  fi
25552
25553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25555
25556    else
25557      # We're on a unix platform. Hooray! :)
25558      path="$BOOT_JDK"
25559      has_space=`$ECHO "$path" | $GREP " "`
25560      if test "x$has_space" != x; then
25561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25564      fi
25565
25566      # Use eval to expand a potential ~
25567      eval path="$path"
25568      if test ! -f "$path" && test ! -d "$path"; then
25569        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25570      fi
25571
25572      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25573    fi
25574  fi
25575
25576            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25577$as_echo_n "checking for Boot JDK... " >&6; }
25578            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25579$as_echo "$BOOT_JDK" >&6; }
25580            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25581$as_echo_n "checking Boot JDK version... " >&6; }
25582            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25584$as_echo "$BOOT_JDK_VERSION" >&6; }
25585          fi # end check jdk version
25586        fi # end check javac
25587      fi # end check java
25588    fi # end check boot jdk found
25589  fi
25590
25591    done
25592  fi
25593
25594
25595    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25596    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25597      # Do we have a bin/java?
25598      if test ! -x "$BOOT_JDK/bin/java"; then
25599        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25601        BOOT_JDK_FOUND=no
25602      else
25603        # Do we have a bin/javac?
25604        if test ! -x "$BOOT_JDK/bin/javac"; then
25605          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25607          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25608$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25609          BOOT_JDK_FOUND=no
25610        else
25611          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25612          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25613
25614          # Extra M4 quote needed to protect [] in grep expression.
25615          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25616          if test "x$FOUND_CORRECT_VERSION" = x; then
25617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25619            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25620$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25621            BOOT_JDK_FOUND=no
25622          else
25623            # We're done! :-)
25624            BOOT_JDK_FOUND=yes
25625
25626  # Only process if variable expands to non-empty
25627
25628  if test "x$BOOT_JDK" != x; then
25629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25630
25631  # Input might be given as Windows format, start by converting to
25632  # unix format.
25633  path="$BOOT_JDK"
25634  new_path=`$CYGPATH -u "$path"`
25635
25636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25639  # "foo.exe" is OK but "foo" is an error.
25640  #
25641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25642  # It is also a way to make sure we got the proper file name for the real test later on.
25643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25644  if test "x$test_shortpath" = x; then
25645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25647    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25648  fi
25649
25650  # Call helper function which possibly converts this using DOS-style short mode.
25651  # If so, the updated path is stored in $new_path.
25652
25653  input_path="$new_path"
25654  # Check if we need to convert this using DOS-style short mode. If the path
25655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25656  # take no chances and rewrite it.
25657  # Note: m4 eats our [], so we need to use [ and ] instead.
25658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25659  if test "x$has_forbidden_chars" != x; then
25660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25664      # Going to short mode and back again did indeed matter. Since short mode is
25665      # case insensitive, let's make it lowercase to improve readability.
25666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25667      # Now convert it back to Unix-style (cygpath)
25668      input_path=`$CYGPATH -u "$shortmode_path"`
25669      new_path="$input_path"
25670    fi
25671  fi
25672
25673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25674  if test "x$test_cygdrive_prefix" = x; then
25675    # As a simple fix, exclude /usr/bin since it's not a real path.
25676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25678      # a path prefixed by /cygdrive for fixpath to work.
25679      new_path="$CYGWIN_ROOT_PATH$input_path"
25680    fi
25681  fi
25682
25683
25684  if test "x$path" != "x$new_path"; then
25685    BOOT_JDK="$new_path"
25686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25688  fi
25689
25690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25691
25692  path="$BOOT_JDK"
25693  has_colon=`$ECHO $path | $GREP ^.:`
25694  new_path="$path"
25695  if test "x$has_colon" = x; then
25696    # Not in mixed or Windows style, start by that.
25697    new_path=`cmd //c echo $path`
25698  fi
25699
25700
25701  input_path="$new_path"
25702  # Check if we need to convert this using DOS-style short mode. If the path
25703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25704  # take no chances and rewrite it.
25705  # Note: m4 eats our [], so we need to use [ and ] instead.
25706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25707  if test "x$has_forbidden_chars" != x; then
25708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25710  fi
25711
25712
25713  windows_path="$new_path"
25714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25715    unix_path=`$CYGPATH -u "$windows_path"`
25716    new_path="$unix_path"
25717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25719    new_path="$unix_path"
25720  fi
25721
25722  if test "x$path" != "x$new_path"; then
25723    BOOT_JDK="$new_path"
25724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25726  fi
25727
25728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25730
25731    else
25732      # We're on a unix platform. Hooray! :)
25733      path="$BOOT_JDK"
25734      has_space=`$ECHO "$path" | $GREP " "`
25735      if test "x$has_space" != x; then
25736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25739      fi
25740
25741      # Use eval to expand a potential ~
25742      eval path="$path"
25743      if test ! -f "$path" && test ! -d "$path"; then
25744        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25745      fi
25746
25747      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25748    fi
25749  fi
25750
25751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25752$as_echo_n "checking for Boot JDK... " >&6; }
25753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25754$as_echo "$BOOT_JDK" >&6; }
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25756$as_echo_n "checking Boot JDK version... " >&6; }
25757            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25759$as_echo "$BOOT_JDK_VERSION" >&6; }
25760          fi # end check jdk version
25761        fi # end check javac
25762      fi # end check java
25763    fi # end check boot jdk found
25764  fi
25765
25766  fi
25767
25768
25769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25771      # Do we have a bin/java?
25772      if test ! -x "$BOOT_JDK/bin/java"; then
25773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25775        BOOT_JDK_FOUND=no
25776      else
25777        # Do we have a bin/javac?
25778        if test ! -x "$BOOT_JDK/bin/javac"; then
25779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25783          BOOT_JDK_FOUND=no
25784        else
25785          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25786          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25787
25788          # Extra M4 quote needed to protect [] in grep expression.
25789          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25790          if test "x$FOUND_CORRECT_VERSION" = x; then
25791            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25793            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25794$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25795            BOOT_JDK_FOUND=no
25796          else
25797            # We're done! :-)
25798            BOOT_JDK_FOUND=yes
25799
25800  # Only process if variable expands to non-empty
25801
25802  if test "x$BOOT_JDK" != x; then
25803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25804
25805  # Input might be given as Windows format, start by converting to
25806  # unix format.
25807  path="$BOOT_JDK"
25808  new_path=`$CYGPATH -u "$path"`
25809
25810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25813  # "foo.exe" is OK but "foo" is an error.
25814  #
25815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25816  # It is also a way to make sure we got the proper file name for the real test later on.
25817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25818  if test "x$test_shortpath" = x; then
25819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25821    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25822  fi
25823
25824  # Call helper function which possibly converts this using DOS-style short mode.
25825  # If so, the updated path is stored in $new_path.
25826
25827  input_path="$new_path"
25828  # Check if we need to convert this using DOS-style short mode. If the path
25829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25830  # take no chances and rewrite it.
25831  # Note: m4 eats our [], so we need to use [ and ] instead.
25832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25833  if test "x$has_forbidden_chars" != x; then
25834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25838      # Going to short mode and back again did indeed matter. Since short mode is
25839      # case insensitive, let's make it lowercase to improve readability.
25840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25841      # Now convert it back to Unix-style (cygpath)
25842      input_path=`$CYGPATH -u "$shortmode_path"`
25843      new_path="$input_path"
25844    fi
25845  fi
25846
25847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25848  if test "x$test_cygdrive_prefix" = x; then
25849    # As a simple fix, exclude /usr/bin since it's not a real path.
25850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25852      # a path prefixed by /cygdrive for fixpath to work.
25853      new_path="$CYGWIN_ROOT_PATH$input_path"
25854    fi
25855  fi
25856
25857
25858  if test "x$path" != "x$new_path"; then
25859    BOOT_JDK="$new_path"
25860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25862  fi
25863
25864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865
25866  path="$BOOT_JDK"
25867  has_colon=`$ECHO $path | $GREP ^.:`
25868  new_path="$path"
25869  if test "x$has_colon" = x; then
25870    # Not in mixed or Windows style, start by that.
25871    new_path=`cmd //c echo $path`
25872  fi
25873
25874
25875  input_path="$new_path"
25876  # Check if we need to convert this using DOS-style short mode. If the path
25877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25878  # take no chances and rewrite it.
25879  # Note: m4 eats our [], so we need to use [ and ] instead.
25880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25881  if test "x$has_forbidden_chars" != x; then
25882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25884  fi
25885
25886
25887  windows_path="$new_path"
25888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25889    unix_path=`$CYGPATH -u "$windows_path"`
25890    new_path="$unix_path"
25891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25893    new_path="$unix_path"
25894  fi
25895
25896  if test "x$path" != "x$new_path"; then
25897    BOOT_JDK="$new_path"
25898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25900  fi
25901
25902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25904
25905    else
25906      # We're on a unix platform. Hooray! :)
25907      path="$BOOT_JDK"
25908      has_space=`$ECHO "$path" | $GREP " "`
25909      if test "x$has_space" != x; then
25910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25911$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25913      fi
25914
25915      # Use eval to expand a potential ~
25916      eval path="$path"
25917      if test ! -f "$path" && test ! -d "$path"; then
25918        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25919      fi
25920
25921      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25922    fi
25923  fi
25924
25925            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25926$as_echo_n "checking for Boot JDK... " >&6; }
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25928$as_echo "$BOOT_JDK" >&6; }
25929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25930$as_echo_n "checking Boot JDK version... " >&6; }
25931            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25933$as_echo "$BOOT_JDK_VERSION" >&6; }
25934          fi # end check jdk version
25935        fi # end check javac
25936      fi # end check java
25937    fi # end check boot jdk found
25938  fi
25939
25940
25941  # If we haven't found anything yet, we've truly lost. Give up.
25942  if test "x$BOOT_JDK_FOUND" = xno; then
25943
25944  # Print a helpful message on how to acquire the necessary build dependency.
25945  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25946  MISSING_DEPENDENCY=openjdk
25947
25948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25949    cygwin_help $MISSING_DEPENDENCY
25950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25951    msys_help $MISSING_DEPENDENCY
25952  else
25953    PKGHANDLER_COMMAND=
25954
25955    case $PKGHANDLER in
25956      apt-get)
25957        apt_help     $MISSING_DEPENDENCY ;;
25958      yum)
25959        yum_help     $MISSING_DEPENDENCY ;;
25960      port)
25961        port_help    $MISSING_DEPENDENCY ;;
25962      pkgutil)
25963        pkgutil_help $MISSING_DEPENDENCY ;;
25964      pkgadd)
25965        pkgadd_help  $MISSING_DEPENDENCY ;;
25966    esac
25967
25968    if test "x$PKGHANDLER_COMMAND" != x; then
25969      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25970    fi
25971  fi
25972
25973    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25974$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25975    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25976$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25977    as_fn_error $? "Cannot continue" "$LINENO" 5
25978  fi
25979
25980
25981
25982  # Setup tools from the Boot JDK.
25983
25984  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25985
25986  # Publish this variable in the help.
25987
25988
25989  if test "x$JAVA" = x; then
25990    # The variable is not set by user, try to locate tool using the code snippet
25991
25992      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25993$as_echo_n "checking for java in Boot JDK... " >&6; }
25994      JAVA=$BOOT_JDK/bin/java
25995      if test ! -x $JAVA; then
25996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25997$as_echo "not found" >&6; }
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25999$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26000        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26001      fi
26002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26003$as_echo "ok" >&6; }
26004
26005
26006  else
26007    # The variable is set, but is it from the command line or the environment?
26008
26009    # Try to remove the string !JAVA! from our list.
26010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26012      # If it failed, the variable was not from the command line. Ignore it,
26013      # but warn the user (except for BASH, which is always set by the calling BASH).
26014      if test "xJAVA" != xBASH; then
26015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26016$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26017      fi
26018      # Try to locate tool using the code snippet
26019
26020      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26021$as_echo_n "checking for java in Boot JDK... " >&6; }
26022      JAVA=$BOOT_JDK/bin/java
26023      if test ! -x $JAVA; then
26024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26025$as_echo "not found" >&6; }
26026        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26027$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26028        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26029      fi
26030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26031$as_echo "ok" >&6; }
26032
26033
26034    else
26035      # If it succeeded, then it was overridden by the user. We will use it
26036      # for the tool.
26037
26038      # First remove it from the list of overridden variables, so we can test
26039      # for unknown variables in the end.
26040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26041
26042      # Check if the provided tool contains a complete path.
26043      tool_specified="$JAVA"
26044      tool_basename="${tool_specified##*/}"
26045      if test "x$tool_basename" = "x$tool_specified"; then
26046        # A command without a complete path is provided, search $PATH.
26047        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26048$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26049        # Extract the first word of "$tool_basename", so it can be a program name with args.
26050set dummy $tool_basename; ac_word=$2
26051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26052$as_echo_n "checking for $ac_word... " >&6; }
26053if ${ac_cv_path_JAVA+:} false; then :
26054  $as_echo_n "(cached) " >&6
26055else
26056  case $JAVA in
26057  [\\/]* | ?:[\\/]*)
26058  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26059  ;;
26060  *)
26061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26062for as_dir in $PATH
26063do
26064  IFS=$as_save_IFS
26065  test -z "$as_dir" && as_dir=.
26066    for ac_exec_ext in '' $ac_executable_extensions; do
26067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26068    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26070    break 2
26071  fi
26072done
26073  done
26074IFS=$as_save_IFS
26075
26076  ;;
26077esac
26078fi
26079JAVA=$ac_cv_path_JAVA
26080if test -n "$JAVA"; then
26081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26082$as_echo "$JAVA" >&6; }
26083else
26084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26085$as_echo "no" >&6; }
26086fi
26087
26088
26089        if test "x$JAVA" = x; then
26090          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26091        fi
26092      else
26093        # Otherwise we believe it is a complete path. Use it as it is.
26094        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26095$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26097$as_echo_n "checking for JAVA... " >&6; }
26098        if test ! -x "$tool_specified"; then
26099          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26100$as_echo "not found" >&6; }
26101          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26102        fi
26103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26104$as_echo "$tool_specified" >&6; }
26105      fi
26106    fi
26107  fi
26108
26109
26110
26111  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26112
26113  # Publish this variable in the help.
26114
26115
26116  if test "x$JAVAC" = x; then
26117    # The variable is not set by user, try to locate tool using the code snippet
26118
26119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26120$as_echo_n "checking for javac in Boot JDK... " >&6; }
26121      JAVAC=$BOOT_JDK/bin/javac
26122      if test ! -x $JAVAC; then
26123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26124$as_echo "not found" >&6; }
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26126$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26127        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26128      fi
26129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26130$as_echo "ok" >&6; }
26131
26132
26133  else
26134    # The variable is set, but is it from the command line or the environment?
26135
26136    # Try to remove the string !JAVAC! from our list.
26137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26139      # If it failed, the variable was not from the command line. Ignore it,
26140      # but warn the user (except for BASH, which is always set by the calling BASH).
26141      if test "xJAVAC" != xBASH; then
26142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26143$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26144      fi
26145      # Try to locate tool using the code snippet
26146
26147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26148$as_echo_n "checking for javac in Boot JDK... " >&6; }
26149      JAVAC=$BOOT_JDK/bin/javac
26150      if test ! -x $JAVAC; then
26151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26152$as_echo "not found" >&6; }
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26154$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26155        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26156      fi
26157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26158$as_echo "ok" >&6; }
26159
26160
26161    else
26162      # If it succeeded, then it was overridden by the user. We will use it
26163      # for the tool.
26164
26165      # First remove it from the list of overridden variables, so we can test
26166      # for unknown variables in the end.
26167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26168
26169      # Check if the provided tool contains a complete path.
26170      tool_specified="$JAVAC"
26171      tool_basename="${tool_specified##*/}"
26172      if test "x$tool_basename" = "x$tool_specified"; then
26173        # A command without a complete path is provided, search $PATH.
26174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26175$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26176        # Extract the first word of "$tool_basename", so it can be a program name with args.
26177set dummy $tool_basename; ac_word=$2
26178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26179$as_echo_n "checking for $ac_word... " >&6; }
26180if ${ac_cv_path_JAVAC+:} false; then :
26181  $as_echo_n "(cached) " >&6
26182else
26183  case $JAVAC in
26184  [\\/]* | ?:[\\/]*)
26185  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26186  ;;
26187  *)
26188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26189for as_dir in $PATH
26190do
26191  IFS=$as_save_IFS
26192  test -z "$as_dir" && as_dir=.
26193    for ac_exec_ext in '' $ac_executable_extensions; do
26194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26195    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26197    break 2
26198  fi
26199done
26200  done
26201IFS=$as_save_IFS
26202
26203  ;;
26204esac
26205fi
26206JAVAC=$ac_cv_path_JAVAC
26207if test -n "$JAVAC"; then
26208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26209$as_echo "$JAVAC" >&6; }
26210else
26211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26212$as_echo "no" >&6; }
26213fi
26214
26215
26216        if test "x$JAVAC" = x; then
26217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26218        fi
26219      else
26220        # Otherwise we believe it is a complete path. Use it as it is.
26221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26222$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26224$as_echo_n "checking for JAVAC... " >&6; }
26225        if test ! -x "$tool_specified"; then
26226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26227$as_echo "not found" >&6; }
26228          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26229        fi
26230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26231$as_echo "$tool_specified" >&6; }
26232      fi
26233    fi
26234  fi
26235
26236
26237
26238  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26239
26240  # Publish this variable in the help.
26241
26242
26243  if test "x$JAVAH" = x; then
26244    # The variable is not set by user, try to locate tool using the code snippet
26245
26246      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26247$as_echo_n "checking for javah in Boot JDK... " >&6; }
26248      JAVAH=$BOOT_JDK/bin/javah
26249      if test ! -x $JAVAH; then
26250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26251$as_echo "not found" >&6; }
26252        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26253$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26254        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26255      fi
26256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26257$as_echo "ok" >&6; }
26258
26259
26260  else
26261    # The variable is set, but is it from the command line or the environment?
26262
26263    # Try to remove the string !JAVAH! from our list.
26264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26266      # If it failed, the variable was not from the command line. Ignore it,
26267      # but warn the user (except for BASH, which is always set by the calling BASH).
26268      if test "xJAVAH" != xBASH; then
26269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26270$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26271      fi
26272      # Try to locate tool using the code snippet
26273
26274      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26275$as_echo_n "checking for javah in Boot JDK... " >&6; }
26276      JAVAH=$BOOT_JDK/bin/javah
26277      if test ! -x $JAVAH; then
26278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26279$as_echo "not found" >&6; }
26280        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26281$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26282        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26283      fi
26284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26285$as_echo "ok" >&6; }
26286
26287
26288    else
26289      # If it succeeded, then it was overridden by the user. We will use it
26290      # for the tool.
26291
26292      # First remove it from the list of overridden variables, so we can test
26293      # for unknown variables in the end.
26294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26295
26296      # Check if the provided tool contains a complete path.
26297      tool_specified="$JAVAH"
26298      tool_basename="${tool_specified##*/}"
26299      if test "x$tool_basename" = "x$tool_specified"; then
26300        # A command without a complete path is provided, search $PATH.
26301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26302$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26303        # Extract the first word of "$tool_basename", so it can be a program name with args.
26304set dummy $tool_basename; ac_word=$2
26305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26306$as_echo_n "checking for $ac_word... " >&6; }
26307if ${ac_cv_path_JAVAH+:} false; then :
26308  $as_echo_n "(cached) " >&6
26309else
26310  case $JAVAH in
26311  [\\/]* | ?:[\\/]*)
26312  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26313  ;;
26314  *)
26315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26316for as_dir in $PATH
26317do
26318  IFS=$as_save_IFS
26319  test -z "$as_dir" && as_dir=.
26320    for ac_exec_ext in '' $ac_executable_extensions; do
26321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26322    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26324    break 2
26325  fi
26326done
26327  done
26328IFS=$as_save_IFS
26329
26330  ;;
26331esac
26332fi
26333JAVAH=$ac_cv_path_JAVAH
26334if test -n "$JAVAH"; then
26335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26336$as_echo "$JAVAH" >&6; }
26337else
26338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26339$as_echo "no" >&6; }
26340fi
26341
26342
26343        if test "x$JAVAH" = x; then
26344          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26345        fi
26346      else
26347        # Otherwise we believe it is a complete path. Use it as it is.
26348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26349$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26351$as_echo_n "checking for JAVAH... " >&6; }
26352        if test ! -x "$tool_specified"; then
26353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26354$as_echo "not found" >&6; }
26355          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26356        fi
26357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26358$as_echo "$tool_specified" >&6; }
26359      fi
26360    fi
26361  fi
26362
26363
26364
26365  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26366
26367  # Publish this variable in the help.
26368
26369
26370  if test "x$JAR" = x; then
26371    # The variable is not set by user, try to locate tool using the code snippet
26372
26373      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26374$as_echo_n "checking for jar in Boot JDK... " >&6; }
26375      JAR=$BOOT_JDK/bin/jar
26376      if test ! -x $JAR; then
26377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26378$as_echo "not found" >&6; }
26379        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26380$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26381        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26382      fi
26383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26384$as_echo "ok" >&6; }
26385
26386
26387  else
26388    # The variable is set, but is it from the command line or the environment?
26389
26390    # Try to remove the string !JAR! from our list.
26391    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26392    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26393      # If it failed, the variable was not from the command line. Ignore it,
26394      # but warn the user (except for BASH, which is always set by the calling BASH).
26395      if test "xJAR" != xBASH; then
26396        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26397$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26398      fi
26399      # Try to locate tool using the code snippet
26400
26401      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26402$as_echo_n "checking for jar in Boot JDK... " >&6; }
26403      JAR=$BOOT_JDK/bin/jar
26404      if test ! -x $JAR; then
26405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26406$as_echo "not found" >&6; }
26407        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26408$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26409        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26410      fi
26411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26412$as_echo "ok" >&6; }
26413
26414
26415    else
26416      # If it succeeded, then it was overridden by the user. We will use it
26417      # for the tool.
26418
26419      # First remove it from the list of overridden variables, so we can test
26420      # for unknown variables in the end.
26421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26422
26423      # Check if the provided tool contains a complete path.
26424      tool_specified="$JAR"
26425      tool_basename="${tool_specified##*/}"
26426      if test "x$tool_basename" = "x$tool_specified"; then
26427        # A command without a complete path is provided, search $PATH.
26428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26429$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26430        # Extract the first word of "$tool_basename", so it can be a program name with args.
26431set dummy $tool_basename; ac_word=$2
26432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26433$as_echo_n "checking for $ac_word... " >&6; }
26434if ${ac_cv_path_JAR+:} false; then :
26435  $as_echo_n "(cached) " >&6
26436else
26437  case $JAR in
26438  [\\/]* | ?:[\\/]*)
26439  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26440  ;;
26441  *)
26442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26443for as_dir in $PATH
26444do
26445  IFS=$as_save_IFS
26446  test -z "$as_dir" && as_dir=.
26447    for ac_exec_ext in '' $ac_executable_extensions; do
26448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26449    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26451    break 2
26452  fi
26453done
26454  done
26455IFS=$as_save_IFS
26456
26457  ;;
26458esac
26459fi
26460JAR=$ac_cv_path_JAR
26461if test -n "$JAR"; then
26462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26463$as_echo "$JAR" >&6; }
26464else
26465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26466$as_echo "no" >&6; }
26467fi
26468
26469
26470        if test "x$JAR" = x; then
26471          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26472        fi
26473      else
26474        # Otherwise we believe it is a complete path. Use it as it is.
26475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26476$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26478$as_echo_n "checking for JAR... " >&6; }
26479        if test ! -x "$tool_specified"; then
26480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26481$as_echo "not found" >&6; }
26482          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26483        fi
26484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26485$as_echo "$tool_specified" >&6; }
26486      fi
26487    fi
26488  fi
26489
26490
26491
26492  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26493
26494  # Publish this variable in the help.
26495
26496
26497  if test "x$JARSIGNER" = x; then
26498    # The variable is not set by user, try to locate tool using the code snippet
26499
26500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26501$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26502      JARSIGNER=$BOOT_JDK/bin/jarsigner
26503      if test ! -x $JARSIGNER; then
26504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26505$as_echo "not found" >&6; }
26506        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26507$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26508        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26509      fi
26510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26511$as_echo "ok" >&6; }
26512
26513
26514  else
26515    # The variable is set, but is it from the command line or the environment?
26516
26517    # Try to remove the string !JARSIGNER! from our list.
26518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26520      # If it failed, the variable was not from the command line. Ignore it,
26521      # but warn the user (except for BASH, which is always set by the calling BASH).
26522      if test "xJARSIGNER" != xBASH; then
26523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26524$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26525      fi
26526      # Try to locate tool using the code snippet
26527
26528      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26529$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26530      JARSIGNER=$BOOT_JDK/bin/jarsigner
26531      if test ! -x $JARSIGNER; then
26532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26533$as_echo "not found" >&6; }
26534        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26535$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26536        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26537      fi
26538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26539$as_echo "ok" >&6; }
26540
26541
26542    else
26543      # If it succeeded, then it was overridden by the user. We will use it
26544      # for the tool.
26545
26546      # First remove it from the list of overridden variables, so we can test
26547      # for unknown variables in the end.
26548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26549
26550      # Check if the provided tool contains a complete path.
26551      tool_specified="$JARSIGNER"
26552      tool_basename="${tool_specified##*/}"
26553      if test "x$tool_basename" = "x$tool_specified"; then
26554        # A command without a complete path is provided, search $PATH.
26555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26556$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26557        # Extract the first word of "$tool_basename", so it can be a program name with args.
26558set dummy $tool_basename; ac_word=$2
26559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26560$as_echo_n "checking for $ac_word... " >&6; }
26561if ${ac_cv_path_JARSIGNER+:} false; then :
26562  $as_echo_n "(cached) " >&6
26563else
26564  case $JARSIGNER in
26565  [\\/]* | ?:[\\/]*)
26566  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26567  ;;
26568  *)
26569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26570for as_dir in $PATH
26571do
26572  IFS=$as_save_IFS
26573  test -z "$as_dir" && as_dir=.
26574    for ac_exec_ext in '' $ac_executable_extensions; do
26575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26576    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26578    break 2
26579  fi
26580done
26581  done
26582IFS=$as_save_IFS
26583
26584  ;;
26585esac
26586fi
26587JARSIGNER=$ac_cv_path_JARSIGNER
26588if test -n "$JARSIGNER"; then
26589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26590$as_echo "$JARSIGNER" >&6; }
26591else
26592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26593$as_echo "no" >&6; }
26594fi
26595
26596
26597        if test "x$JARSIGNER" = x; then
26598          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26599        fi
26600      else
26601        # Otherwise we believe it is a complete path. Use it as it is.
26602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26603$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26605$as_echo_n "checking for JARSIGNER... " >&6; }
26606        if test ! -x "$tool_specified"; then
26607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26608$as_echo "not found" >&6; }
26609          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26610        fi
26611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26612$as_echo "$tool_specified" >&6; }
26613      fi
26614    fi
26615  fi
26616
26617
26618
26619  # Finally, set some other options...
26620
26621  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26622  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26623
26624
26625
26626
26627###############################################################################
26628#
26629# Configure the sources to use. We can add or override individual directories.
26630#
26631###############################################################################
26632
26633
26634  # Where are the sources. Any of these can be overridden
26635  # using --with-override-corba and the likes.
26636  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26637  CORBA_TOPDIR="$SRC_ROOT/corba"
26638  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26639  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26640  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26641  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26642  JDK_TOPDIR="$SRC_ROOT/jdk"
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653  ###############################################################################
26654  #
26655  # Pickup additional source for a component from outside of the source root
26656  # or override source for a component.
26657  #
26658
26659# Check whether --with-add-source-root was given.
26660if test "${with_add_source_root+set}" = set; then :
26661  withval=$with_add_source_root;
26662fi
26663
26664
26665
26666# Check whether --with-override-source-root was given.
26667if test "${with_override_source_root+set}" = set; then :
26668  withval=$with_override_source_root;
26669fi
26670
26671
26672
26673# Check whether --with-adds-and-overrides was given.
26674if test "${with_adds_and_overrides+set}" = set; then :
26675  withval=$with_adds_and_overrides;
26676fi
26677
26678
26679  if test "x$with_adds_and_overrides" != x; then
26680    with_add_source_root="$with_adds_and_overrides/adds"
26681    with_override_source_root="$with_adds_and_overrides/overrides"
26682  fi
26683
26684  if test "x$with_add_source_root" != x; then
26685    if ! test -d $with_add_source_root; then
26686      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26687    fi
26688    CURDIR="$PWD"
26689    cd "$with_add_source_root"
26690    ADD_SRC_ROOT="`pwd`"
26691    cd "$CURDIR"
26692    # Verify that the addon source root does not have any root makefiles.
26693    # If it does, then it is usually an error, prevent this.
26694    if test -f $with_add_source_root/langtools/make/Makefile; then
26695      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
26696    fi
26697    if test -f $with_add_source_root/corba/make/Makefile; then
26698      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
26699    fi
26700    if test -f $with_add_source_root/jaxp/make/Makefile; then
26701      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
26702    fi
26703    if test -f $with_add_source_root/jaxws/make/Makefile; then
26704      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
26705    fi
26706    if test -f $with_add_source_root/hotspot/make/Makefile; then
26707      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
26708    fi
26709    if test -f $with_add_source_root/nashorn/make/Makefile; then
26710      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
26711    fi
26712    if test -f $with_add_source_root/jdk/make/Makefile; then
26713      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
26714    fi
26715  fi
26716
26717
26718  if test "x$with_override_source_root" != x; then
26719    if ! test -d $with_override_source_root; then
26720      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26721    fi
26722    CURDIR="$PWD"
26723    cd "$with_override_source_root"
26724    OVERRIDE_SRC_ROOT="`pwd`"
26725    cd "$CURDIR"
26726    if test -f $with_override_source_root/langtools/make/Makefile; then
26727      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
26728    fi
26729    if test -f $with_override_source_root/corba/make/Makefile; then
26730      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
26731    fi
26732    if test -f $with_override_source_root/jaxp/make/Makefile; then
26733      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
26734    fi
26735    if test -f $with_override_source_root/jaxws/make/Makefile; then
26736      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
26737    fi
26738    if test -f $with_override_source_root/hotspot/make/Makefile; then
26739      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
26740    fi
26741    if test -f $with_override_source_root/nashorn/make/Makefile; then
26742      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
26743    fi
26744    if test -f $with_override_source_root/jdk/make/Makefile; then
26745      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
26746    fi
26747  fi
26748
26749
26750  ###############################################################################
26751  #
26752  # Override a repo completely, this is used for example when you have 3 small
26753  # development sandboxes of the langtools sources and want to avoid having 3 full
26754  # OpenJDK sources checked out on disk.
26755  #
26756  # Assuming that the 3 langtools sandboxes are located here:
26757  # /home/fredrik/sandbox1/langtools
26758  # /home/fredrik/sandbox2/langtools
26759  # /home/fredrik/sandbox3/langtools
26760  #
26761  # From the source root you create build subdirs manually:
26762  #     mkdir -p build1 build2 build3
26763  # in each build directory run:
26764  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26765  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26766  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26767  #
26768
26769
26770# Check whether --with-override-langtools was given.
26771if test "${with_override_langtools+set}" = set; then :
26772  withval=$with_override_langtools;
26773fi
26774
26775
26776
26777# Check whether --with-override-corba was given.
26778if test "${with_override_corba+set}" = set; then :
26779  withval=$with_override_corba;
26780fi
26781
26782
26783
26784# Check whether --with-override-jaxp was given.
26785if test "${with_override_jaxp+set}" = set; then :
26786  withval=$with_override_jaxp;
26787fi
26788
26789
26790
26791# Check whether --with-override-jaxws was given.
26792if test "${with_override_jaxws+set}" = set; then :
26793  withval=$with_override_jaxws;
26794fi
26795
26796
26797
26798# Check whether --with-override-hotspot was given.
26799if test "${with_override_hotspot+set}" = set; then :
26800  withval=$with_override_hotspot;
26801fi
26802
26803
26804
26805# Check whether --with-override-nashorn was given.
26806if test "${with_override_nashorn+set}" = set; then :
26807  withval=$with_override_nashorn;
26808fi
26809
26810
26811
26812# Check whether --with-override-jdk was given.
26813if test "${with_override_jdk+set}" = set; then :
26814  withval=$with_override_jdk;
26815fi
26816
26817
26818  if test "x$with_override_langtools" != x; then
26819    CURDIR="$PWD"
26820    cd "$with_override_langtools"
26821    LANGTOOLS_TOPDIR="`pwd`"
26822    cd "$CURDIR"
26823    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26824      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26825    fi
26826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26827$as_echo_n "checking if langtools should be overridden... " >&6; }
26828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26829$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26830  fi
26831  if test "x$with_override_corba" != x; then
26832    CURDIR="$PWD"
26833    cd "$with_override_corba"
26834    CORBA_TOPDIR="`pwd`"
26835    cd "$CURDIR"
26836    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26837      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26838    fi
26839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26840$as_echo_n "checking if corba should be overridden... " >&6; }
26841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26842$as_echo "yes with $CORBA_TOPDIR" >&6; }
26843  fi
26844  if test "x$with_override_jaxp" != x; then
26845    CURDIR="$PWD"
26846    cd "$with_override_jaxp"
26847    JAXP_TOPDIR="`pwd`"
26848    cd "$CURDIR"
26849    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26850      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26851    fi
26852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26853$as_echo_n "checking if jaxp should be overridden... " >&6; }
26854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26855$as_echo "yes with $JAXP_TOPDIR" >&6; }
26856  fi
26857  if test "x$with_override_jaxws" != x; then
26858    CURDIR="$PWD"
26859    cd "$with_override_jaxws"
26860    JAXWS_TOPDIR="`pwd`"
26861    cd "$CURDIR"
26862    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26863      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26864    fi
26865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26866$as_echo_n "checking if jaxws should be overridden... " >&6; }
26867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26868$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26869  fi
26870  if test "x$with_override_hotspot" != x; then
26871    CURDIR="$PWD"
26872    cd "$with_override_hotspot"
26873    HOTSPOT_TOPDIR="`pwd`"
26874    cd "$CURDIR"
26875    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26876      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26877    fi
26878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26879$as_echo_n "checking if hotspot should be overridden... " >&6; }
26880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26881$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26882  fi
26883  if test "x$with_override_nashorn" != x; then
26884    CURDIR="$PWD"
26885    cd "$with_override_nashorn"
26886    NASHORN_TOPDIR="`pwd`"
26887    cd "$CURDIR"
26888    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26889      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26890    fi
26891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26892$as_echo_n "checking if nashorn should be overridden... " >&6; }
26893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26894$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26895  fi
26896  if test "x$with_override_jdk" != x; then
26897    CURDIR="$PWD"
26898    cd "$with_override_jdk"
26899    JDK_TOPDIR="`pwd`"
26900    cd "$CURDIR"
26901    if ! test -f $JDK_TOPDIR/make/Makefile; then
26902      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26903    fi
26904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26905$as_echo_n "checking if JDK should be overridden... " >&6; }
26906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26907$as_echo "yes with $JDK_TOPDIR" >&6; }
26908  fi
26909
26910
26911  BUILD_OUTPUT="$OUTPUT_ROOT"
26912
26913
26914  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26915  BUILD_HOTSPOT=true
26916
26917
26918
26919# Check whether --with-import-hotspot was given.
26920if test "${with_import_hotspot+set}" = set; then :
26921  withval=$with_import_hotspot;
26922fi
26923
26924  if test "x$with_import_hotspot" != x; then
26925    CURDIR="$PWD"
26926    cd "$with_import_hotspot"
26927    HOTSPOT_DIST="`pwd`"
26928    cd "$CURDIR"
26929    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26930      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26931    fi
26932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26933$as_echo_n "checking if hotspot should be imported... " >&6; }
26934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26935$as_echo "yes from $HOTSPOT_DIST" >&6; }
26936    BUILD_HOTSPOT=false
26937  fi
26938
26939  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26940
26941
26942###############################################################################
26943#
26944# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26945# native code.
26946#
26947###############################################################################
26948
26949# First determine the toolchain type (compiler family)
26950
26951
26952# Check whether --with-toolchain-type was given.
26953if test "${with_toolchain_type+set}" = set; then :
26954  withval=$with_toolchain_type;
26955fi
26956
26957
26958  # Use indirect variable referencing
26959  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26960  VALID_TOOLCHAINS=${!toolchain_var_name}
26961
26962  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26963    if test -n "$XCODEBUILD"; then
26964      # On Mac OS X, default toolchain to clang after Xcode 5
26965      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26966      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26967      if test $? -ne 0; then
26968        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26969      fi
26970      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26971          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26972          $CUT -f 1 -d .`
26973      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26974$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26975      if test $XCODE_MAJOR_VERSION -ge 5; then
26976          DEFAULT_TOOLCHAIN="clang"
26977      else
26978          DEFAULT_TOOLCHAIN="gcc"
26979      fi
26980    else
26981      # If Xcode is not installed, but the command line tools are
26982      # then we can't run xcodebuild. On these systems we should
26983      # default to clang
26984      DEFAULT_TOOLCHAIN="clang"
26985    fi
26986  else
26987    # First toolchain type in the list is the default
26988    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26989  fi
26990
26991  if test "x$with_toolchain_type" = xlist; then
26992    # List all toolchains
26993    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26994$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26995    for toolchain in $VALID_TOOLCHAINS; do
26996      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26997      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26998      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26999    done
27000
27001    exit 0
27002  elif test "x$with_toolchain_type" != x; then
27003    # User override; check that it is valid
27004    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27005      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27006$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27007      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27008$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27009      as_fn_error $? "Cannot continue." "$LINENO" 5
27010    fi
27011    TOOLCHAIN_TYPE=$with_toolchain_type
27012  else
27013    # No flag given, use default
27014    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27015  fi
27016
27017
27018  TOOLCHAIN_CC_BINARY_clang="clang"
27019  TOOLCHAIN_CC_BINARY_gcc="gcc"
27020  TOOLCHAIN_CC_BINARY_microsoft="cl"
27021  TOOLCHAIN_CC_BINARY_solstudio="cc"
27022  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27023
27024  TOOLCHAIN_CXX_BINARY_clang="clang++"
27025  TOOLCHAIN_CXX_BINARY_gcc="g++"
27026  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27027  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27028  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27029
27030  # Use indirect variable referencing
27031  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27032  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27033  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27034  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27035  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27036  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27037
27038
27039  # Define filename patterns
27040  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27041    LIBRARY_PREFIX=
27042    SHARED_LIBRARY_SUFFIX='.dll'
27043    STATIC_LIBRARY_SUFFIX='.lib'
27044    SHARED_LIBRARY='$1.dll'
27045    STATIC_LIBRARY='$1.lib'
27046    OBJ_SUFFIX='.obj'
27047    EXE_SUFFIX='.exe'
27048  else
27049    LIBRARY_PREFIX=lib
27050    SHARED_LIBRARY_SUFFIX='.so'
27051    STATIC_LIBRARY_SUFFIX='.a'
27052    SHARED_LIBRARY='lib$1.so'
27053    STATIC_LIBRARY='lib$1.a'
27054    OBJ_SUFFIX='.o'
27055    EXE_SUFFIX=''
27056    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27057      SHARED_LIBRARY='lib$1.dylib'
27058      SHARED_LIBRARY_SUFFIX='.dylib'
27059    fi
27060  fi
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27072    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27073$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27074  else
27075    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27076$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27077  fi
27078
27079
27080# Then detect the actual binaries needed
27081
27082  # FIXME: Is this needed?
27083  ac_ext=cpp
27084ac_cpp='$CXXCPP $CPPFLAGS'
27085ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27086ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27087ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27088
27089
27090  # Store the CFLAGS etc passed to the configure script.
27091  ORG_CFLAGS="$CFLAGS"
27092  ORG_CXXFLAGS="$CXXFLAGS"
27093
27094  # autoconf magic only relies on PATH, so update it if tools dir is specified
27095  OLD_PATH="$PATH"
27096
27097  # On Windows, we need to detect the visual studio installation first.
27098  # This will change the PATH, but we need to keep that new PATH even
27099  # after toolchain detection is done, since the compiler (on x86) uses
27100  # it for DLL resolution in runtime.
27101  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27102      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27103
27104  # Store path to cygwin link.exe to help excluding it when searching for
27105  # VS linker. This must be done before changing the PATH when looking for VS.
27106  # Extract the first word of "link", so it can be a program name with args.
27107set dummy link; ac_word=$2
27108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27109$as_echo_n "checking for $ac_word... " >&6; }
27110if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27111  $as_echo_n "(cached) " >&6
27112else
27113  case $CYGWIN_LINK in
27114  [\\/]* | ?:[\\/]*)
27115  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27116  ;;
27117  *)
27118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27119for as_dir in $PATH
27120do
27121  IFS=$as_save_IFS
27122  test -z "$as_dir" && as_dir=.
27123    for ac_exec_ext in '' $ac_executable_extensions; do
27124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27125    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27127    break 2
27128  fi
27129done
27130  done
27131IFS=$as_save_IFS
27132
27133  ;;
27134esac
27135fi
27136CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27137if test -n "$CYGWIN_LINK"; then
27138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27139$as_echo "$CYGWIN_LINK" >&6; }
27140else
27141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27142$as_echo "no" >&6; }
27143fi
27144
27145
27146  if test "x$CYGWIN_LINK" != x; then
27147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27148$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27149    "$CYGWIN_LINK" --version > /dev/null
27150    if test $? -eq 0 ; then
27151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27152$as_echo "yes" >&6; }
27153    else
27154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27155$as_echo "no" >&6; }
27156      # This might be the VS linker. Don't exclude it later on.
27157      CYGWIN_LINK=""
27158    fi
27159  fi
27160
27161  # First-hand choice is to locate and run the vsvars bat file.
27162
27163
27164# Check whether --with-toolchain-version was given.
27165if test "${with_toolchain_version+set}" = set; then :
27166  withval=$with_toolchain_version;
27167fi
27168
27169
27170  if test "x$with_toolchain_version" = xlist; then
27171    # List all toolchains
27172    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27173$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27174    for version in $VALID_VS_VERSIONS; do
27175      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27176      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27177    done
27178
27179    exit 0
27180  elif test "x$DEVKIT_VS_VERSION" != x; then
27181    VS_VERSION=$DEVKIT_VS_VERSION
27182    TOOLCHAIN_VERSION=$VS_VERSION
27183    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27184    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27185    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27186    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27187    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27188    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27189
27190    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27191    # can still be exported as INCLUDE for compiler invocations without
27192    # SYSROOT_CFLAGS
27193    OLDIFS="$IFS"
27194    IFS=";"
27195    for i in $DEVKIT_VS_INCLUDE; do
27196      ipath=$i
27197
27198  unix_path="$ipath"
27199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27200    windows_path=`$CYGPATH -m "$unix_path"`
27201    ipath="$windows_path"
27202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27203    windows_path=`cmd //c echo $unix_path`
27204    ipath="$windows_path"
27205  fi
27206
27207      VS_INCLUDE="$VS_INCLUDE;$ipath"
27208    done
27209    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27210    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27211    for i in $DEVKIT_VS_LIB; do
27212      libpath=$i
27213
27214  unix_path="$libpath"
27215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27216    windows_path=`$CYGPATH -m "$unix_path"`
27217    libpath="$windows_path"
27218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27219    windows_path=`cmd //c echo $unix_path`
27220    libpath="$windows_path"
27221  fi
27222
27223      VS_LIB="$VS_LIB;$libpath"
27224    done
27225    IFS="$OLDIFS"
27226
27227    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27228$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27229
27230  elif test "x$with_toolchain_version" != x; then
27231    # User override; check that it is valid
27232    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27233      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27234$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27235      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27236$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27237      as_fn_error $? "Cannot continue." "$LINENO" 5
27238    fi
27239    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27240  else
27241    # No flag given, use default
27242    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27243  fi
27244
27245  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27246
27247  VS_VERSION="$VS_VERSION"
27248  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27249  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27250  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27251  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27252
27253  # When using --with-tools-dir, assume it points to the correct and default
27254  # version of Visual Studio or that --with-toolchain-version was also set.
27255  if test "x$with_tools_dir" != x; then
27256
27257  if test "x$VS_ENV_CMD" = x; then
27258    VS_VERSION="${VS_VERSION}"
27259    VS_BASE="$with_tools_dir/../.."
27260    METHOD="--with-tools-dir"
27261
27262    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27263      VCVARSFILE="vc/bin/vcvars32.bat"
27264    else
27265      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27266    fi
27267
27268
27269  windows_path="$VS_BASE"
27270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27271    unix_path=`$CYGPATH -u "$windows_path"`
27272    VS_BASE="$unix_path"
27273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27275    VS_BASE="$unix_path"
27276  fi
27277
27278    if test -d "$VS_BASE"; then
27279      if test -f "$VS_BASE/$VCVARSFILE"; then
27280        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27281$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27282        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27283        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27284        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27285        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27286      else
27287        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27288$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27289        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27290$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27291      fi
27292    fi
27293  fi
27294
27295
27296  if test "x$VS_ENV_CMD" = x; then
27297    VS_VERSION="${VS_VERSION}"
27298    VS_BASE="$with_tools_dir/../../.."
27299    METHOD="--with-tools-dir"
27300
27301    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27302      VCVARSFILE="vc/bin/vcvars32.bat"
27303    else
27304      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27305    fi
27306
27307
27308  windows_path="$VS_BASE"
27309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27310    unix_path=`$CYGPATH -u "$windows_path"`
27311    VS_BASE="$unix_path"
27312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27314    VS_BASE="$unix_path"
27315  fi
27316
27317    if test -d "$VS_BASE"; then
27318      if test -f "$VS_BASE/$VCVARSFILE"; then
27319        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27320$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27321        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27322        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27323        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27324        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27325      else
27326        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27327$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27328        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27329$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27330      fi
27331    fi
27332  fi
27333
27334    if test "x$VS_ENV_CMD" = x; then
27335      # Having specified an argument which is incorrect will produce an instant failure;
27336      # we should not go on looking
27337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27338$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27339      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27340$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27341      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27342$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27343      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27344    fi
27345  fi
27346
27347  VS_ENV_CMD=""
27348  VS_ENV_ARGS=""
27349
27350  if test "x$VS_COMNTOOLS" != x; then
27351
27352  if test "x$VS_ENV_CMD" = x; then
27353    VS_VERSION="${VS_VERSION}"
27354    VS_BASE="$VS_COMNTOOLS/../.."
27355    METHOD="$VS_COMNTOOLS_VAR variable"
27356
27357    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27358      VCVARSFILE="vc/bin/vcvars32.bat"
27359    else
27360      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27361    fi
27362
27363
27364  windows_path="$VS_BASE"
27365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27366    unix_path=`$CYGPATH -u "$windows_path"`
27367    VS_BASE="$unix_path"
27368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27370    VS_BASE="$unix_path"
27371  fi
27372
27373    if test -d "$VS_BASE"; then
27374      if test -f "$VS_BASE/$VCVARSFILE"; then
27375        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27376$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27377        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27378        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27379        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27380        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27381      else
27382        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27383$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27384        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27385$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27386      fi
27387    fi
27388  fi
27389
27390  fi
27391  if test "x$PROGRAMFILES" != x; then
27392
27393  if test "x$VS_ENV_CMD" = x; then
27394    VS_VERSION="${VS_VERSION}"
27395    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27396    METHOD="well-known name"
27397
27398    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27399      VCVARSFILE="vc/bin/vcvars32.bat"
27400    else
27401      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27402    fi
27403
27404
27405  windows_path="$VS_BASE"
27406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27407    unix_path=`$CYGPATH -u "$windows_path"`
27408    VS_BASE="$unix_path"
27409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27411    VS_BASE="$unix_path"
27412  fi
27413
27414    if test -d "$VS_BASE"; then
27415      if test -f "$VS_BASE/$VCVARSFILE"; then
27416        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27417$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27418        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27419        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27420        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27421        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27422      else
27423        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27424$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27425        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27426$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27427      fi
27428    fi
27429  fi
27430
27431  fi
27432  # Work around the insanely named ProgramFiles(x86) env variable
27433  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27434  if test "x$PROGRAMFILES_X86" != x; then
27435
27436  if test "x$VS_ENV_CMD" = x; then
27437    VS_VERSION="${VS_VERSION}"
27438    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27439    METHOD="well-known name"
27440
27441    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27442      VCVARSFILE="vc/bin/vcvars32.bat"
27443    else
27444      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27445    fi
27446
27447
27448  windows_path="$VS_BASE"
27449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27450    unix_path=`$CYGPATH -u "$windows_path"`
27451    VS_BASE="$unix_path"
27452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27454    VS_BASE="$unix_path"
27455  fi
27456
27457    if test -d "$VS_BASE"; then
27458      if test -f "$VS_BASE/$VCVARSFILE"; then
27459        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27460$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27461        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27462        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27463        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27464        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27465      else
27466        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27467$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27468        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27469$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27470      fi
27471    fi
27472  fi
27473
27474  fi
27475
27476  if test "x$VS_ENV_CMD" = x; then
27477    VS_VERSION="${VS_VERSION}"
27478    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27479    METHOD="well-known name"
27480
27481    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27482      VCVARSFILE="vc/bin/vcvars32.bat"
27483    else
27484      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27485    fi
27486
27487
27488  windows_path="$VS_BASE"
27489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27490    unix_path=`$CYGPATH -u "$windows_path"`
27491    VS_BASE="$unix_path"
27492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27494    VS_BASE="$unix_path"
27495  fi
27496
27497    if test -d "$VS_BASE"; then
27498      if test -f "$VS_BASE/$VCVARSFILE"; then
27499        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27500$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27501        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27502        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27503        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27504        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27505      else
27506        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27507$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27508        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27509$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27510      fi
27511    fi
27512  fi
27513
27514
27515  if test "x$VS_ENV_CMD" = x; then
27516    VS_VERSION="${VS_VERSION}"
27517    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27518    METHOD="well-known name"
27519
27520    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27521      VCVARSFILE="vc/bin/vcvars32.bat"
27522    else
27523      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27524    fi
27525
27526
27527  windows_path="$VS_BASE"
27528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27529    unix_path=`$CYGPATH -u "$windows_path"`
27530    VS_BASE="$unix_path"
27531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27533    VS_BASE="$unix_path"
27534  fi
27535
27536    if test -d "$VS_BASE"; then
27537      if test -f "$VS_BASE/$VCVARSFILE"; then
27538        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27539$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27540        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27541        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27542        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27543        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27544      else
27545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27546$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27547        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27548$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27549      fi
27550    fi
27551  fi
27552
27553
27554  if test "x$SDK_INSTALL_DIR" != x; then
27555    if test "x$ProgramW6432" != x; then
27556
27557  if test "x$VS_ENV_CMD" = x; then
27558    VS_VERSION="${VS_VERSION}"
27559    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27560    METHOD="well-known name"
27561
27562  windows_path="$WIN_SDK_BASE"
27563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27564    unix_path=`$CYGPATH -u "$windows_path"`
27565    WIN_SDK_BASE="$unix_path"
27566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27568    WIN_SDK_BASE="$unix_path"
27569  fi
27570
27571    if test -d "$WIN_SDK_BASE"; then
27572      # There have been cases of partial or broken SDK installations. A missing
27573      # lib dir is not going to work.
27574      if test ! -d "$WIN_SDK_BASE/lib"; then
27575        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27576$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27577        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27578$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27579      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27580        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27581$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27582        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27583        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27584          VS_ENV_ARGS="/x86"
27585        else
27586          VS_ENV_ARGS="/x64"
27587        fi
27588        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27589        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27590        # TODO: improve detection for other versions of SDK
27591        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27592      else
27593        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27594$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27595        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27596$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27597      fi
27598    fi
27599  fi
27600
27601    fi
27602    if test "x$PROGRAMW6432" != x; then
27603
27604  if test "x$VS_ENV_CMD" = x; then
27605    VS_VERSION="${VS_VERSION}"
27606    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27607    METHOD="well-known name"
27608
27609  windows_path="$WIN_SDK_BASE"
27610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27611    unix_path=`$CYGPATH -u "$windows_path"`
27612    WIN_SDK_BASE="$unix_path"
27613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27615    WIN_SDK_BASE="$unix_path"
27616  fi
27617
27618    if test -d "$WIN_SDK_BASE"; then
27619      # There have been cases of partial or broken SDK installations. A missing
27620      # lib dir is not going to work.
27621      if test ! -d "$WIN_SDK_BASE/lib"; then
27622        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27623$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27624        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27625$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27626      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27627        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27628$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27629        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27630        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27631          VS_ENV_ARGS="/x86"
27632        else
27633          VS_ENV_ARGS="/x64"
27634        fi
27635        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27636        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27637        # TODO: improve detection for other versions of SDK
27638        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27639      else
27640        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27641$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27642        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27643$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27644      fi
27645    fi
27646  fi
27647
27648    fi
27649    if test "x$PROGRAMFILES" != x; then
27650
27651  if test "x$VS_ENV_CMD" = x; then
27652    VS_VERSION="${VS_VERSION}"
27653    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27654    METHOD="well-known name"
27655
27656  windows_path="$WIN_SDK_BASE"
27657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27658    unix_path=`$CYGPATH -u "$windows_path"`
27659    WIN_SDK_BASE="$unix_path"
27660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27662    WIN_SDK_BASE="$unix_path"
27663  fi
27664
27665    if test -d "$WIN_SDK_BASE"; then
27666      # There have been cases of partial or broken SDK installations. A missing
27667      # lib dir is not going to work.
27668      if test ! -d "$WIN_SDK_BASE/lib"; then
27669        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27670$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27671        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27672$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27673      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27674        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27675$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27676        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27677        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27678          VS_ENV_ARGS="/x86"
27679        else
27680          VS_ENV_ARGS="/x64"
27681        fi
27682        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27683        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27684        # TODO: improve detection for other versions of SDK
27685        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27686      else
27687        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27688$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27689        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27690$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27691      fi
27692    fi
27693  fi
27694
27695    fi
27696
27697  if test "x$VS_ENV_CMD" = x; then
27698    VS_VERSION="${VS_VERSION}"
27699    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27700    METHOD="well-known name"
27701
27702  windows_path="$WIN_SDK_BASE"
27703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27704    unix_path=`$CYGPATH -u "$windows_path"`
27705    WIN_SDK_BASE="$unix_path"
27706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27708    WIN_SDK_BASE="$unix_path"
27709  fi
27710
27711    if test -d "$WIN_SDK_BASE"; then
27712      # There have been cases of partial or broken SDK installations. A missing
27713      # lib dir is not going to work.
27714      if test ! -d "$WIN_SDK_BASE/lib"; then
27715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27716$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27717        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27718$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27719      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27720        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27721$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27722        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27723        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27724          VS_ENV_ARGS="/x86"
27725        else
27726          VS_ENV_ARGS="/x64"
27727        fi
27728        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27729        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27730        # TODO: improve detection for other versions of SDK
27731        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27732      else
27733        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27734$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27735        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27736$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27737      fi
27738    fi
27739  fi
27740
27741
27742  if test "x$VS_ENV_CMD" = x; then
27743    VS_VERSION="${VS_VERSION}"
27744    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27745    METHOD="well-known name"
27746
27747  windows_path="$WIN_SDK_BASE"
27748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27749    unix_path=`$CYGPATH -u "$windows_path"`
27750    WIN_SDK_BASE="$unix_path"
27751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27753    WIN_SDK_BASE="$unix_path"
27754  fi
27755
27756    if test -d "$WIN_SDK_BASE"; then
27757      # There have been cases of partial or broken SDK installations. A missing
27758      # lib dir is not going to work.
27759      if test ! -d "$WIN_SDK_BASE/lib"; then
27760        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27761$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27762        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27763$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27764      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27765        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27766$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27767        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27768        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27769          VS_ENV_ARGS="/x86"
27770        else
27771          VS_ENV_ARGS="/x64"
27772        fi
27773        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27774        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27775        # TODO: improve detection for other versions of SDK
27776        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27777      else
27778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27779$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27780        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27781$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27782      fi
27783    fi
27784  fi
27785
27786  fi
27787
27788    if test "x$VS_ENV_CMD" != x; then
27789      TOOLCHAIN_VERSION=$VS_VERSION
27790      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27791      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27792      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27793      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27794      # The rest of the variables are already evaled while probing
27795      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27796$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27797      break
27798    fi
27799  done
27800
27801
27802  # If we have a devkit, skip all of the below.
27803  if test "x$DEVKIT_VS_VERSION" = x; then
27804    if test "x$VS_ENV_CMD" != x; then
27805      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27806
27807  # Only process if variable expands to non-empty
27808
27809  if test "x$VS_ENV_CMD" != x; then
27810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27811
27812  # First separate the path from the arguments. This will split at the first
27813  # space.
27814  complete="$VS_ENV_CMD"
27815  path="${complete%% *}"
27816  tmp="$complete EOL"
27817  arguments="${tmp#* }"
27818
27819  # Input might be given as Windows format, start by converting to
27820  # unix format.
27821  new_path=`$CYGPATH -u "$path"`
27822
27823  # Now try to locate executable using which
27824  new_path=`$WHICH "$new_path" 2> /dev/null`
27825  # bat and cmd files are not always considered executable in cygwin causing which
27826  # to not find them
27827  if test "x$new_path" = x \
27828      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27829      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27830    new_path=`$CYGPATH -u "$path"`
27831  fi
27832  if test "x$new_path" = x; then
27833    # Oops. Which didn't find the executable.
27834    # The splitting of arguments from the executable at a space might have been incorrect,
27835    # since paths with space are more likely in Windows. Give it another try with the whole
27836    # argument.
27837    path="$complete"
27838    arguments="EOL"
27839    new_path=`$CYGPATH -u "$path"`
27840    new_path=`$WHICH "$new_path" 2> /dev/null`
27841    # bat and cmd files are not always considered executable in cygwin causing which
27842    # to not find them
27843    if test "x$new_path" = x \
27844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27846      new_path=`$CYGPATH -u "$path"`
27847    fi
27848    if test "x$new_path" = x; then
27849      # It's still not found. Now this is an unrecoverable error.
27850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27851$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27852      has_space=`$ECHO "$complete" | $GREP " "`
27853      if test "x$has_space" != x; then
27854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27856      fi
27857      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27858    fi
27859  fi
27860
27861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27864  # "foo.exe" is OK but "foo" is an error.
27865  #
27866  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27867  # It is also a way to make sure we got the proper file name for the real test later on.
27868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27869  if test "x$test_shortpath" = x; then
27870    # Short path failed, file does not exist as specified.
27871    # Try adding .exe or .cmd
27872    if test -f "${new_path}.exe"; then
27873      input_to_shortpath="${new_path}.exe"
27874    elif test -f "${new_path}.cmd"; then
27875      input_to_shortpath="${new_path}.cmd"
27876    else
27877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27878$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27881      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27882    fi
27883  else
27884    input_to_shortpath="$new_path"
27885  fi
27886
27887  # Call helper function which possibly converts this using DOS-style short mode.
27888  # If so, the updated path is stored in $new_path.
27889  new_path="$input_to_shortpath"
27890
27891  input_path="$input_to_shortpath"
27892  # Check if we need to convert this using DOS-style short mode. If the path
27893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27894  # take no chances and rewrite it.
27895  # Note: m4 eats our [], so we need to use [ and ] instead.
27896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27897  if test "x$has_forbidden_chars" != x; then
27898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27902      # Going to short mode and back again did indeed matter. Since short mode is
27903      # case insensitive, let's make it lowercase to improve readability.
27904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27905      # Now convert it back to Unix-style (cygpath)
27906      input_path=`$CYGPATH -u "$shortmode_path"`
27907      new_path="$input_path"
27908    fi
27909  fi
27910
27911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27912  if test "x$test_cygdrive_prefix" = x; then
27913    # As a simple fix, exclude /usr/bin since it's not a real path.
27914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27916      # a path prefixed by /cygdrive for fixpath to work.
27917      new_path="$CYGWIN_ROOT_PATH$input_path"
27918    fi
27919  fi
27920
27921  # remove trailing .exe if any
27922  new_path="${new_path/%.exe/}"
27923
27924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27925
27926  # First separate the path from the arguments. This will split at the first
27927  # space.
27928  complete="$VS_ENV_CMD"
27929  path="${complete%% *}"
27930  tmp="$complete EOL"
27931  arguments="${tmp#* }"
27932
27933  # Input might be given as Windows format, start by converting to
27934  # unix format.
27935  new_path="$path"
27936
27937  windows_path="$new_path"
27938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27939    unix_path=`$CYGPATH -u "$windows_path"`
27940    new_path="$unix_path"
27941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27943    new_path="$unix_path"
27944  fi
27945
27946
27947  # Now try to locate executable using which
27948  new_path=`$WHICH "$new_path" 2> /dev/null`
27949
27950  if test "x$new_path" = x; then
27951    # Oops. Which didn't find the executable.
27952    # The splitting of arguments from the executable at a space might have been incorrect,
27953    # since paths with space are more likely in Windows. Give it another try with the whole
27954    # argument.
27955    path="$complete"
27956    arguments="EOL"
27957    new_path="$path"
27958
27959  windows_path="$new_path"
27960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27961    unix_path=`$CYGPATH -u "$windows_path"`
27962    new_path="$unix_path"
27963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27965    new_path="$unix_path"
27966  fi
27967
27968
27969    new_path=`$WHICH "$new_path" 2> /dev/null`
27970    # bat and cmd files are not always considered executable in MSYS causing which
27971    # to not find them
27972    if test "x$new_path" = x \
27973        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27974        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27975      new_path="$path"
27976
27977  windows_path="$new_path"
27978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27979    unix_path=`$CYGPATH -u "$windows_path"`
27980    new_path="$unix_path"
27981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27983    new_path="$unix_path"
27984  fi
27985
27986    fi
27987
27988    if test "x$new_path" = x; then
27989      # It's still not found. Now this is an unrecoverable error.
27990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27991$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27992      has_space=`$ECHO "$complete" | $GREP " "`
27993      if test "x$has_space" != x; then
27994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27996      fi
27997      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27998    fi
27999  fi
28000
28001  # Now new_path has a complete unix path to the binary
28002  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28003    # Keep paths in /bin as-is, but remove trailing .exe if any
28004    new_path="${new_path/%.exe/}"
28005    # Do not save /bin paths to all_fixpath_prefixes!
28006  else
28007    # Not in mixed or Windows style, start by that.
28008    new_path=`cmd //c echo $new_path`
28009
28010  input_path="$new_path"
28011  # Check if we need to convert this using DOS-style short mode. If the path
28012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28013  # take no chances and rewrite it.
28014  # Note: m4 eats our [], so we need to use [ and ] instead.
28015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28016  if test "x$has_forbidden_chars" != x; then
28017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28019  fi
28020
28021    # Output is in $new_path
28022
28023  windows_path="$new_path"
28024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28025    unix_path=`$CYGPATH -u "$windows_path"`
28026    new_path="$unix_path"
28027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28029    new_path="$unix_path"
28030  fi
28031
28032    # remove trailing .exe if any
28033    new_path="${new_path/%.exe/}"
28034
28035    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28036    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28037  fi
28038
28039    else
28040      # We're on a unix platform. Hooray! :)
28041      # First separate the path from the arguments. This will split at the first
28042      # space.
28043      complete="$VS_ENV_CMD"
28044      path="${complete%% *}"
28045      tmp="$complete EOL"
28046      arguments="${tmp#* }"
28047
28048      # Cannot rely on the command "which" here since it doesn't always work.
28049      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28050      if test -z "$is_absolute_path"; then
28051        # Path to executable is not absolute. Find it.
28052        IFS_save="$IFS"
28053        IFS=:
28054        for p in $PATH; do
28055          if test -f "$p/$path" && test -x "$p/$path"; then
28056            new_path="$p/$path"
28057            break
28058          fi
28059        done
28060        IFS="$IFS_save"
28061      else
28062        # This is an absolute path, we can use it without further modifications.
28063        new_path="$path"
28064      fi
28065
28066      if test "x$new_path" = x; then
28067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28068$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28069        has_space=`$ECHO "$complete" | $GREP " "`
28070        if test "x$has_space" != x; then
28071          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28072$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28073        fi
28074        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28075      fi
28076    fi
28077
28078    # Now join together the path and the arguments once again
28079    if test "x$arguments" != xEOL; then
28080      new_complete="$new_path ${arguments% *}"
28081    else
28082      new_complete="$new_path"
28083    fi
28084
28085    if test "x$complete" != "x$new_complete"; then
28086      VS_ENV_CMD="$new_complete"
28087      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28088$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28089    fi
28090  fi
28091
28092
28093      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28094      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28095$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28096
28097      # We need to create a couple of temporary files.
28098      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28099      $MKDIR -p $VS_ENV_TMP_DIR
28100
28101      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28102      # Instead create a shell script which will set the relevant variables when run.
28103      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28104
28105  unix_path="$WINPATH_VS_ENV_CMD"
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107    windows_path=`$CYGPATH -m "$unix_path"`
28108    WINPATH_VS_ENV_CMD="$windows_path"
28109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110    windows_path=`cmd //c echo $unix_path`
28111    WINPATH_VS_ENV_CMD="$windows_path"
28112  fi
28113
28114      WINPATH_BASH="$BASH"
28115
28116  unix_path="$WINPATH_BASH"
28117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28118    windows_path=`$CYGPATH -m "$unix_path"`
28119    WINPATH_BASH="$windows_path"
28120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28121    windows_path=`cmd //c echo $unix_path`
28122    WINPATH_BASH="$windows_path"
28123  fi
28124
28125
28126      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28127      # script (executable by bash) that will setup the important variables.
28128      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28129      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28130      # This will end up something like:
28131      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28132      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28133      # These will end up something like:
28134      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28135      # The trailing space for everyone except PATH is no typo, but is needed due
28136      # to trailing \ in the Windows paths. These will be stripped later.
28137      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28138          >> $EXTRACT_VC_ENV_BAT_FILE
28139      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28140          >> $EXTRACT_VC_ENV_BAT_FILE
28141      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28142          >> $EXTRACT_VC_ENV_BAT_FILE
28143      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28144          >> $EXTRACT_VC_ENV_BAT_FILE
28145      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28146          >> $EXTRACT_VC_ENV_BAT_FILE
28147      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28148          >> $EXTRACT_VC_ENV_BAT_FILE
28149
28150      # Now execute the newly created bat file.
28151      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28152      # Change directory so we don't need to mess with Windows paths in redirects.
28153      cd $VS_ENV_TMP_DIR
28154      cmd /c extract-vs-env.bat | $CAT
28155      cd $CURDIR
28156
28157      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28158        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28159$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28160        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28161$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28162        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28163$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28164        as_fn_error $? "Cannot continue" "$LINENO" 5
28165      fi
28166
28167      # Now set all paths and other env variables. This will allow the rest of
28168      # the configure script to find and run the compiler in the proper way.
28169      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28170$as_echo "$as_me: Setting extracted environment variables" >&6;}
28171      . $VS_ENV_TMP_DIR/set-vs-env.sh
28172      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28173      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28174    else
28175      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28176      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28177$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28178    fi
28179  fi
28180
28181  # At this point, we should have correct variables in the environment, or we can't continue.
28182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28183$as_echo_n "checking for Visual Studio variables... " >&6; }
28184
28185  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28186      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28187    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28189$as_echo "present but broken" >&6; }
28190      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28191    else
28192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28193$as_echo "ok" >&6; }
28194      # Remove any trailing "\" ";" and " " from the variables.
28195      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28196      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28197      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28198      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28199      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28200      # Remove any paths containing # (typically F#) as that messes up make. This
28201      # is needed if visual studio was installed with F# support.
28202      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28203
28204
28205
28206
28207
28208      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28209      OLDIFS="$IFS"
28210      IFS=";"
28211      for i in $VS_INCLUDE; do
28212        ipath=$i
28213        # Only process non-empty elements
28214        if test "x$ipath" != x; then
28215          IFS="$OLDIFS"
28216          # Check that directory exists before calling fixup_path
28217          testpath=$ipath
28218
28219  windows_path="$testpath"
28220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28221    unix_path=`$CYGPATH -u "$windows_path"`
28222    testpath="$unix_path"
28223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28225    testpath="$unix_path"
28226  fi
28227
28228          if test -d "$testpath"; then
28229
28230  # Only process if variable expands to non-empty
28231
28232  if test "x$ipath" != x; then
28233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28234
28235  # Input might be given as Windows format, start by converting to
28236  # unix format.
28237  path="$ipath"
28238  new_path=`$CYGPATH -u "$path"`
28239
28240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28243  # "foo.exe" is OK but "foo" is an error.
28244  #
28245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28246  # It is also a way to make sure we got the proper file name for the real test later on.
28247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28248  if test "x$test_shortpath" = x; then
28249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28250$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28251    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28252  fi
28253
28254  # Call helper function which possibly converts this using DOS-style short mode.
28255  # If so, the updated path is stored in $new_path.
28256
28257  input_path="$new_path"
28258  # Check if we need to convert this using DOS-style short mode. If the path
28259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28260  # take no chances and rewrite it.
28261  # Note: m4 eats our [], so we need to use [ and ] instead.
28262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28263  if test "x$has_forbidden_chars" != x; then
28264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28268      # Going to short mode and back again did indeed matter. Since short mode is
28269      # case insensitive, let's make it lowercase to improve readability.
28270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28271      # Now convert it back to Unix-style (cygpath)
28272      input_path=`$CYGPATH -u "$shortmode_path"`
28273      new_path="$input_path"
28274    fi
28275  fi
28276
28277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28278  if test "x$test_cygdrive_prefix" = x; then
28279    # As a simple fix, exclude /usr/bin since it's not a real path.
28280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28282      # a path prefixed by /cygdrive for fixpath to work.
28283      new_path="$CYGWIN_ROOT_PATH$input_path"
28284    fi
28285  fi
28286
28287
28288  if test "x$path" != "x$new_path"; then
28289    ipath="$new_path"
28290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28291$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28292  fi
28293
28294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28295
28296  path="$ipath"
28297  has_colon=`$ECHO $path | $GREP ^.:`
28298  new_path="$path"
28299  if test "x$has_colon" = x; then
28300    # Not in mixed or Windows style, start by that.
28301    new_path=`cmd //c echo $path`
28302  fi
28303
28304
28305  input_path="$new_path"
28306  # Check if we need to convert this using DOS-style short mode. If the path
28307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28308  # take no chances and rewrite it.
28309  # Note: m4 eats our [], so we need to use [ and ] instead.
28310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28311  if test "x$has_forbidden_chars" != x; then
28312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28314  fi
28315
28316
28317  windows_path="$new_path"
28318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28319    unix_path=`$CYGPATH -u "$windows_path"`
28320    new_path="$unix_path"
28321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28323    new_path="$unix_path"
28324  fi
28325
28326  if test "x$path" != "x$new_path"; then
28327    ipath="$new_path"
28328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28329$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28330  fi
28331
28332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28334
28335    else
28336      # We're on a unix platform. Hooray! :)
28337      path="$ipath"
28338      has_space=`$ECHO "$path" | $GREP " "`
28339      if test "x$has_space" != x; then
28340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28341$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28343      fi
28344
28345      # Use eval to expand a potential ~
28346      eval path="$path"
28347      if test ! -f "$path" && test ! -d "$path"; then
28348        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28349      fi
28350
28351      ipath="`cd "$path"; $THEPWDCMD -L`"
28352    fi
28353  fi
28354
28355            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28356          fi
28357          IFS=";"
28358        fi
28359      done
28360      # Convert VS_LIB into SYSROOT_LDFLAGS
28361      for i in $VS_LIB; do
28362        libpath=$i
28363        # Only process non-empty elements
28364        if test "x$libpath" != x; then
28365          IFS="$OLDIFS"
28366          # Check that directory exists before calling fixup_path
28367          testpath=$libpath
28368
28369  windows_path="$testpath"
28370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28371    unix_path=`$CYGPATH -u "$windows_path"`
28372    testpath="$unix_path"
28373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28375    testpath="$unix_path"
28376  fi
28377
28378          if test -d "$testpath"; then
28379
28380  # Only process if variable expands to non-empty
28381
28382  if test "x$libpath" != x; then
28383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28384
28385  # Input might be given as Windows format, start by converting to
28386  # unix format.
28387  path="$libpath"
28388  new_path=`$CYGPATH -u "$path"`
28389
28390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28393  # "foo.exe" is OK but "foo" is an error.
28394  #
28395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28396  # It is also a way to make sure we got the proper file name for the real test later on.
28397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28398  if test "x$test_shortpath" = x; then
28399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28400$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28401    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28402  fi
28403
28404  # Call helper function which possibly converts this using DOS-style short mode.
28405  # If so, the updated path is stored in $new_path.
28406
28407  input_path="$new_path"
28408  # Check if we need to convert this using DOS-style short mode. If the path
28409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28410  # take no chances and rewrite it.
28411  # Note: m4 eats our [], so we need to use [ and ] instead.
28412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28413  if test "x$has_forbidden_chars" != x; then
28414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28418      # Going to short mode and back again did indeed matter. Since short mode is
28419      # case insensitive, let's make it lowercase to improve readability.
28420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28421      # Now convert it back to Unix-style (cygpath)
28422      input_path=`$CYGPATH -u "$shortmode_path"`
28423      new_path="$input_path"
28424    fi
28425  fi
28426
28427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28428  if test "x$test_cygdrive_prefix" = x; then
28429    # As a simple fix, exclude /usr/bin since it's not a real path.
28430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28432      # a path prefixed by /cygdrive for fixpath to work.
28433      new_path="$CYGWIN_ROOT_PATH$input_path"
28434    fi
28435  fi
28436
28437
28438  if test "x$path" != "x$new_path"; then
28439    libpath="$new_path"
28440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28441$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28442  fi
28443
28444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28445
28446  path="$libpath"
28447  has_colon=`$ECHO $path | $GREP ^.:`
28448  new_path="$path"
28449  if test "x$has_colon" = x; then
28450    # Not in mixed or Windows style, start by that.
28451    new_path=`cmd //c echo $path`
28452  fi
28453
28454
28455  input_path="$new_path"
28456  # Check if we need to convert this using DOS-style short mode. If the path
28457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28458  # take no chances and rewrite it.
28459  # Note: m4 eats our [], so we need to use [ and ] instead.
28460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28461  if test "x$has_forbidden_chars" != x; then
28462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28464  fi
28465
28466
28467  windows_path="$new_path"
28468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28469    unix_path=`$CYGPATH -u "$windows_path"`
28470    new_path="$unix_path"
28471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28473    new_path="$unix_path"
28474  fi
28475
28476  if test "x$path" != "x$new_path"; then
28477    libpath="$new_path"
28478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28479$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28480  fi
28481
28482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28484
28485    else
28486      # We're on a unix platform. Hooray! :)
28487      path="$libpath"
28488      has_space=`$ECHO "$path" | $GREP " "`
28489      if test "x$has_space" != x; then
28490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28491$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28493      fi
28494
28495      # Use eval to expand a potential ~
28496      eval path="$path"
28497      if test ! -f "$path" && test ! -d "$path"; then
28498        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28499      fi
28500
28501      libpath="`cd "$path"; $THEPWDCMD -L`"
28502    fi
28503  fi
28504
28505            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28506          fi
28507          IFS=";"
28508        fi
28509      done
28510      IFS="$OLDIFS"
28511    fi
28512  else
28513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28514$as_echo "not found" >&6; }
28515
28516    if test "x$VS_ENV_CMD" = x; then
28517      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28518$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28519      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28520$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28521    else
28522      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28523$as_echo "$as_me: Running the extraction script failed." >&6;}
28524    fi
28525    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28526$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28527    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28528$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28529    as_fn_error $? "Cannot continue" "$LINENO" 5
28530  fi
28531
28532    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28533    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28534    PATH="$VS_PATH"
28535    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28536    export INCLUDE="$VS_INCLUDE"
28537    export LIB="$VS_LIB"
28538  fi
28539
28540  # For solaris we really need solaris tools, and not the GNU equivalent.
28541  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28542  # so add that to path before starting to probe.
28543  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28544  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28545    PATH="/usr/ccs/bin:$PATH"
28546  fi
28547
28548  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28549  # override all other locations.
28550  if test "x$TOOLCHAIN_PATH" != x; then
28551    PATH=$TOOLCHAIN_PATH:$PATH
28552  fi
28553
28554
28555  #
28556  # Setup the compilers (CC and CXX)
28557  #
28558
28559  COMPILER_NAME=C
28560  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28561
28562  if test "x$CC" != x; then
28563    # User has supplied compiler name already, always let that override.
28564    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28565$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28566    if test "x`basename $CC`" = "x$CC"; then
28567      # A command without a complete path is provided, search $PATH.
28568
28569      for ac_prog in $CC
28570do
28571  # Extract the first word of "$ac_prog", so it can be a program name with args.
28572set dummy $ac_prog; ac_word=$2
28573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28574$as_echo_n "checking for $ac_word... " >&6; }
28575if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28576  $as_echo_n "(cached) " >&6
28577else
28578  case $POTENTIAL_CC in
28579  [\\/]* | ?:[\\/]*)
28580  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28581  ;;
28582  *)
28583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28584for as_dir in $PATH
28585do
28586  IFS=$as_save_IFS
28587  test -z "$as_dir" && as_dir=.
28588    for ac_exec_ext in '' $ac_executable_extensions; do
28589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28590    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28592    break 2
28593  fi
28594done
28595  done
28596IFS=$as_save_IFS
28597
28598  ;;
28599esac
28600fi
28601POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28602if test -n "$POTENTIAL_CC"; then
28603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28604$as_echo "$POTENTIAL_CC" >&6; }
28605else
28606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28607$as_echo "no" >&6; }
28608fi
28609
28610
28611  test -n "$POTENTIAL_CC" && break
28612done
28613
28614      if test "x$POTENTIAL_CC" != x; then
28615        CC=$POTENTIAL_CC
28616      else
28617        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28618      fi
28619    else
28620      # Otherwise it might already be a complete path
28621      if test ! -x "$CC"; then
28622        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28623      fi
28624    fi
28625  else
28626    # No user supplied value. Locate compiler ourselves.
28627
28628    # If we are cross compiling, assume cross compilation tools follows the
28629    # cross compilation standard where they are prefixed with the autoconf
28630    # standard name for the target. For example the binary
28631    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28632    # If we are not cross compiling, then the default compiler name will be
28633    # used.
28634
28635    CC=
28636    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28637    # before checking the rest of the PATH.
28638    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28639    # step, this should not be necessary.
28640    if test -n "$TOOLCHAIN_PATH"; then
28641      PATH_save="$PATH"
28642      PATH="$TOOLCHAIN_PATH"
28643      for ac_prog in $SEARCH_LIST
28644do
28645  # Extract the first word of "$ac_prog", so it can be a program name with args.
28646set dummy $ac_prog; ac_word=$2
28647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28648$as_echo_n "checking for $ac_word... " >&6; }
28649if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28650  $as_echo_n "(cached) " >&6
28651else
28652  case $TOOLCHAIN_PATH_CC in
28653  [\\/]* | ?:[\\/]*)
28654  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28655  ;;
28656  *)
28657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28658for as_dir in $PATH
28659do
28660  IFS=$as_save_IFS
28661  test -z "$as_dir" && as_dir=.
28662    for ac_exec_ext in '' $ac_executable_extensions; do
28663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28664    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28666    break 2
28667  fi
28668done
28669  done
28670IFS=$as_save_IFS
28671
28672  ;;
28673esac
28674fi
28675TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28676if test -n "$TOOLCHAIN_PATH_CC"; then
28677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28678$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28679else
28680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28681$as_echo "no" >&6; }
28682fi
28683
28684
28685  test -n "$TOOLCHAIN_PATH_CC" && break
28686done
28687
28688      CC=$TOOLCHAIN_PATH_CC
28689      PATH="$PATH_save"
28690    fi
28691
28692    # AC_PATH_PROGS can't be run multiple times with the same variable,
28693    # so create a new name for this run.
28694    if test "x$CC" = x; then
28695      for ac_prog in $SEARCH_LIST
28696do
28697  # Extract the first word of "$ac_prog", so it can be a program name with args.
28698set dummy $ac_prog; ac_word=$2
28699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28700$as_echo_n "checking for $ac_word... " >&6; }
28701if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28702  $as_echo_n "(cached) " >&6
28703else
28704  case $POTENTIAL_CC in
28705  [\\/]* | ?:[\\/]*)
28706  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28707  ;;
28708  *)
28709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28710for as_dir in $PATH
28711do
28712  IFS=$as_save_IFS
28713  test -z "$as_dir" && as_dir=.
28714    for ac_exec_ext in '' $ac_executable_extensions; do
28715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28716    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28718    break 2
28719  fi
28720done
28721  done
28722IFS=$as_save_IFS
28723
28724  ;;
28725esac
28726fi
28727POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28728if test -n "$POTENTIAL_CC"; then
28729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28730$as_echo "$POTENTIAL_CC" >&6; }
28731else
28732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28733$as_echo "no" >&6; }
28734fi
28735
28736
28737  test -n "$POTENTIAL_CC" && break
28738done
28739
28740      CC=$POTENTIAL_CC
28741    fi
28742
28743    if test "x$CC" = x; then
28744
28745  # Print a helpful message on how to acquire the necessary build dependency.
28746  # devkit is the help tag: freetype, cups, pulse, alsa etc
28747  MISSING_DEPENDENCY=devkit
28748
28749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28750    cygwin_help $MISSING_DEPENDENCY
28751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28752    msys_help $MISSING_DEPENDENCY
28753  else
28754    PKGHANDLER_COMMAND=
28755
28756    case $PKGHANDLER in
28757      apt-get)
28758        apt_help     $MISSING_DEPENDENCY ;;
28759      yum)
28760        yum_help     $MISSING_DEPENDENCY ;;
28761      port)
28762        port_help    $MISSING_DEPENDENCY ;;
28763      pkgutil)
28764        pkgutil_help $MISSING_DEPENDENCY ;;
28765      pkgadd)
28766        pkgadd_help  $MISSING_DEPENDENCY ;;
28767    esac
28768
28769    if test "x$PKGHANDLER_COMMAND" != x; then
28770      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28771    fi
28772  fi
28773
28774      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28775    fi
28776  fi
28777
28778  # Now we have a compiler binary in CC. Make sure it's okay.
28779
28780  # Only process if variable expands to non-empty
28781
28782  if test "x$CC" != x; then
28783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28784
28785  # First separate the path from the arguments. This will split at the first
28786  # space.
28787  complete="$CC"
28788  path="${complete%% *}"
28789  tmp="$complete EOL"
28790  arguments="${tmp#* }"
28791
28792  # Input might be given as Windows format, start by converting to
28793  # unix format.
28794  new_path=`$CYGPATH -u "$path"`
28795
28796  # Now try to locate executable using which
28797  new_path=`$WHICH "$new_path" 2> /dev/null`
28798  # bat and cmd files are not always considered executable in cygwin causing which
28799  # to not find them
28800  if test "x$new_path" = x \
28801      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28802      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28803    new_path=`$CYGPATH -u "$path"`
28804  fi
28805  if test "x$new_path" = x; then
28806    # Oops. Which didn't find the executable.
28807    # The splitting of arguments from the executable at a space might have been incorrect,
28808    # since paths with space are more likely in Windows. Give it another try with the whole
28809    # argument.
28810    path="$complete"
28811    arguments="EOL"
28812    new_path=`$CYGPATH -u "$path"`
28813    new_path=`$WHICH "$new_path" 2> /dev/null`
28814    # bat and cmd files are not always considered executable in cygwin causing which
28815    # to not find them
28816    if test "x$new_path" = x \
28817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28819      new_path=`$CYGPATH -u "$path"`
28820    fi
28821    if test "x$new_path" = x; then
28822      # It's still not found. Now this is an unrecoverable error.
28823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28824$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28825      has_space=`$ECHO "$complete" | $GREP " "`
28826      if test "x$has_space" != x; then
28827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28829      fi
28830      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28831    fi
28832  fi
28833
28834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28837  # "foo.exe" is OK but "foo" is an error.
28838  #
28839  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28840  # It is also a way to make sure we got the proper file name for the real test later on.
28841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28842  if test "x$test_shortpath" = x; then
28843    # Short path failed, file does not exist as specified.
28844    # Try adding .exe or .cmd
28845    if test -f "${new_path}.exe"; then
28846      input_to_shortpath="${new_path}.exe"
28847    elif test -f "${new_path}.cmd"; then
28848      input_to_shortpath="${new_path}.cmd"
28849    else
28850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28851$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28854      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28855    fi
28856  else
28857    input_to_shortpath="$new_path"
28858  fi
28859
28860  # Call helper function which possibly converts this using DOS-style short mode.
28861  # If so, the updated path is stored in $new_path.
28862  new_path="$input_to_shortpath"
28863
28864  input_path="$input_to_shortpath"
28865  # Check if we need to convert this using DOS-style short mode. If the path
28866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28867  # take no chances and rewrite it.
28868  # Note: m4 eats our [], so we need to use [ and ] instead.
28869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28870  if test "x$has_forbidden_chars" != x; then
28871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28875      # Going to short mode and back again did indeed matter. Since short mode is
28876      # case insensitive, let's make it lowercase to improve readability.
28877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28878      # Now convert it back to Unix-style (cygpath)
28879      input_path=`$CYGPATH -u "$shortmode_path"`
28880      new_path="$input_path"
28881    fi
28882  fi
28883
28884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28885  if test "x$test_cygdrive_prefix" = x; then
28886    # As a simple fix, exclude /usr/bin since it's not a real path.
28887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28889      # a path prefixed by /cygdrive for fixpath to work.
28890      new_path="$CYGWIN_ROOT_PATH$input_path"
28891    fi
28892  fi
28893
28894  # remove trailing .exe if any
28895  new_path="${new_path/%.exe/}"
28896
28897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28898
28899  # First separate the path from the arguments. This will split at the first
28900  # space.
28901  complete="$CC"
28902  path="${complete%% *}"
28903  tmp="$complete EOL"
28904  arguments="${tmp#* }"
28905
28906  # Input might be given as Windows format, start by converting to
28907  # unix format.
28908  new_path="$path"
28909
28910  windows_path="$new_path"
28911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28912    unix_path=`$CYGPATH -u "$windows_path"`
28913    new_path="$unix_path"
28914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28916    new_path="$unix_path"
28917  fi
28918
28919
28920  # Now try to locate executable using which
28921  new_path=`$WHICH "$new_path" 2> /dev/null`
28922
28923  if test "x$new_path" = x; then
28924    # Oops. Which didn't find the executable.
28925    # The splitting of arguments from the executable at a space might have been incorrect,
28926    # since paths with space are more likely in Windows. Give it another try with the whole
28927    # argument.
28928    path="$complete"
28929    arguments="EOL"
28930    new_path="$path"
28931
28932  windows_path="$new_path"
28933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28934    unix_path=`$CYGPATH -u "$windows_path"`
28935    new_path="$unix_path"
28936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28938    new_path="$unix_path"
28939  fi
28940
28941
28942    new_path=`$WHICH "$new_path" 2> /dev/null`
28943    # bat and cmd files are not always considered executable in MSYS causing which
28944    # to not find them
28945    if test "x$new_path" = x \
28946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28948      new_path="$path"
28949
28950  windows_path="$new_path"
28951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28952    unix_path=`$CYGPATH -u "$windows_path"`
28953    new_path="$unix_path"
28954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28956    new_path="$unix_path"
28957  fi
28958
28959    fi
28960
28961    if test "x$new_path" = x; then
28962      # It's still not found. Now this is an unrecoverable error.
28963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28964$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28965      has_space=`$ECHO "$complete" | $GREP " "`
28966      if test "x$has_space" != x; then
28967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28969      fi
28970      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28971    fi
28972  fi
28973
28974  # Now new_path has a complete unix path to the binary
28975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28976    # Keep paths in /bin as-is, but remove trailing .exe if any
28977    new_path="${new_path/%.exe/}"
28978    # Do not save /bin paths to all_fixpath_prefixes!
28979  else
28980    # Not in mixed or Windows style, start by that.
28981    new_path=`cmd //c echo $new_path`
28982
28983  input_path="$new_path"
28984  # Check if we need to convert this using DOS-style short mode. If the path
28985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28986  # take no chances and rewrite it.
28987  # Note: m4 eats our [], so we need to use [ and ] instead.
28988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28989  if test "x$has_forbidden_chars" != x; then
28990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28992  fi
28993
28994    # Output is in $new_path
28995
28996  windows_path="$new_path"
28997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28998    unix_path=`$CYGPATH -u "$windows_path"`
28999    new_path="$unix_path"
29000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29002    new_path="$unix_path"
29003  fi
29004
29005    # remove trailing .exe if any
29006    new_path="${new_path/%.exe/}"
29007
29008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29010  fi
29011
29012    else
29013      # We're on a unix platform. Hooray! :)
29014      # First separate the path from the arguments. This will split at the first
29015      # space.
29016      complete="$CC"
29017      path="${complete%% *}"
29018      tmp="$complete EOL"
29019      arguments="${tmp#* }"
29020
29021      # Cannot rely on the command "which" here since it doesn't always work.
29022      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29023      if test -z "$is_absolute_path"; then
29024        # Path to executable is not absolute. Find it.
29025        IFS_save="$IFS"
29026        IFS=:
29027        for p in $PATH; do
29028          if test -f "$p/$path" && test -x "$p/$path"; then
29029            new_path="$p/$path"
29030            break
29031          fi
29032        done
29033        IFS="$IFS_save"
29034      else
29035        # This is an absolute path, we can use it without further modifications.
29036        new_path="$path"
29037      fi
29038
29039      if test "x$new_path" = x; then
29040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29041$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29042        has_space=`$ECHO "$complete" | $GREP " "`
29043        if test "x$has_space" != x; then
29044          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29045$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29046        fi
29047        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29048      fi
29049    fi
29050
29051    # Now join together the path and the arguments once again
29052    if test "x$arguments" != xEOL; then
29053      new_complete="$new_path ${arguments% *}"
29054    else
29055      new_complete="$new_path"
29056    fi
29057
29058    if test "x$complete" != "x$new_complete"; then
29059      CC="$new_complete"
29060      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29061$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29062    fi
29063  fi
29064
29065  TEST_COMPILER="$CC"
29066  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29067  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29068  if test "x$OPENJDK_BUILD_OS" != xaix; then
29069    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29071$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29072
29073  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29074    # Follow a chain of symbolic links. Use readlink
29075    # where it exists, else fall back to horribly
29076    # complicated shell code.
29077    if test "x$READLINK_TESTED" != yes; then
29078      # On MacOSX there is a readlink tool with a different
29079      # purpose than the GNU readlink tool. Check the found readlink.
29080      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29081      if test "x$ISGNU" = x; then
29082        # A readlink that we do not know how to use.
29083        # Are there other non-GNU readlinks out there?
29084        READLINK_TESTED=yes
29085        READLINK=
29086      fi
29087    fi
29088
29089    if test "x$READLINK" != x; then
29090      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29091    else
29092      # Save the current directory for restoring afterwards
29093      STARTDIR=$PWD
29094      COUNTER=0
29095      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29096      sym_link_file=`$BASENAME $TEST_COMPILER`
29097      cd $sym_link_dir
29098      # Use -P flag to resolve symlinks in directories.
29099      cd `$THEPWDCMD -P`
29100      sym_link_dir=`$THEPWDCMD -P`
29101      # Resolve file symlinks
29102      while test $COUNTER -lt 20; do
29103        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29104        if test "x$ISLINK" == x; then
29105          # This is not a symbolic link! We are done!
29106          break
29107        fi
29108        # Again resolve directory symlinks since the target of the just found
29109        # link could be in a different directory
29110        cd `$DIRNAME $ISLINK`
29111        sym_link_dir=`$THEPWDCMD -P`
29112        sym_link_file=`$BASENAME $ISLINK`
29113        let COUNTER=COUNTER+1
29114      done
29115      cd $STARTDIR
29116      TEST_COMPILER=$sym_link_dir/$sym_link_file
29117    fi
29118  fi
29119
29120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29121$as_echo "$TEST_COMPILER" >&6; }
29122  fi
29123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29124$as_echo_n "checking if CC is disguised ccache... " >&6; }
29125
29126  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29127  if test "x$COMPILER_BASENAME" = "xccache"; then
29128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29129$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29130    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29131    # We want to control ccache invocation ourselves, so ignore this cc and try
29132    # searching again.
29133
29134    # Remove the path to the fake ccache cc from the PATH
29135    RETRY_COMPILER_SAVED_PATH="$PATH"
29136    COMPILER_DIRNAME=`$DIRNAME $CC`
29137    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29138
29139    # Try again looking for our compiler
29140    if test -n "$ac_tool_prefix"; then
29141  for ac_prog in $TOOLCHAIN_CC_BINARY
29142  do
29143    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29144set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29146$as_echo_n "checking for $ac_word... " >&6; }
29147if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29148  $as_echo_n "(cached) " >&6
29149else
29150  if test -n "$PROPER_COMPILER_CC"; then
29151  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29152else
29153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29154for as_dir in $PATH
29155do
29156  IFS=$as_save_IFS
29157  test -z "$as_dir" && as_dir=.
29158    for ac_exec_ext in '' $ac_executable_extensions; do
29159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29160    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29162    break 2
29163  fi
29164done
29165  done
29166IFS=$as_save_IFS
29167
29168fi
29169fi
29170PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29171if test -n "$PROPER_COMPILER_CC"; then
29172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29173$as_echo "$PROPER_COMPILER_CC" >&6; }
29174else
29175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29176$as_echo "no" >&6; }
29177fi
29178
29179
29180    test -n "$PROPER_COMPILER_CC" && break
29181  done
29182fi
29183if test -z "$PROPER_COMPILER_CC"; then
29184  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29185  for ac_prog in $TOOLCHAIN_CC_BINARY
29186do
29187  # Extract the first word of "$ac_prog", so it can be a program name with args.
29188set dummy $ac_prog; ac_word=$2
29189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29190$as_echo_n "checking for $ac_word... " >&6; }
29191if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29192  $as_echo_n "(cached) " >&6
29193else
29194  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29195  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29196else
29197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29198for as_dir in $PATH
29199do
29200  IFS=$as_save_IFS
29201  test -z "$as_dir" && as_dir=.
29202    for ac_exec_ext in '' $ac_executable_extensions; do
29203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29204    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29206    break 2
29207  fi
29208done
29209  done
29210IFS=$as_save_IFS
29211
29212fi
29213fi
29214ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29215if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29217$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29218else
29219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29220$as_echo "no" >&6; }
29221fi
29222
29223
29224  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29225done
29226
29227  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29228    PROPER_COMPILER_CC=""
29229  else
29230    case $cross_compiling:$ac_tool_warned in
29231yes:)
29232{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29233$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29234ac_tool_warned=yes ;;
29235esac
29236    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29237  fi
29238fi
29239
29240
29241  # Only process if variable expands to non-empty
29242
29243  if test "x$PROPER_COMPILER_CC" != x; then
29244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29245
29246  # First separate the path from the arguments. This will split at the first
29247  # space.
29248  complete="$PROPER_COMPILER_CC"
29249  path="${complete%% *}"
29250  tmp="$complete EOL"
29251  arguments="${tmp#* }"
29252
29253  # Input might be given as Windows format, start by converting to
29254  # unix format.
29255  new_path=`$CYGPATH -u "$path"`
29256
29257  # Now try to locate executable using which
29258  new_path=`$WHICH "$new_path" 2> /dev/null`
29259  # bat and cmd files are not always considered executable in cygwin causing which
29260  # to not find them
29261  if test "x$new_path" = x \
29262      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29263      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29264    new_path=`$CYGPATH -u "$path"`
29265  fi
29266  if test "x$new_path" = x; then
29267    # Oops. Which didn't find the executable.
29268    # The splitting of arguments from the executable at a space might have been incorrect,
29269    # since paths with space are more likely in Windows. Give it another try with the whole
29270    # argument.
29271    path="$complete"
29272    arguments="EOL"
29273    new_path=`$CYGPATH -u "$path"`
29274    new_path=`$WHICH "$new_path" 2> /dev/null`
29275    # bat and cmd files are not always considered executable in cygwin causing which
29276    # to not find them
29277    if test "x$new_path" = x \
29278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29280      new_path=`$CYGPATH -u "$path"`
29281    fi
29282    if test "x$new_path" = x; then
29283      # It's still not found. Now this is an unrecoverable error.
29284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29285$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29286      has_space=`$ECHO "$complete" | $GREP " "`
29287      if test "x$has_space" != x; then
29288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29290      fi
29291      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29292    fi
29293  fi
29294
29295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29298  # "foo.exe" is OK but "foo" is an error.
29299  #
29300  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29301  # It is also a way to make sure we got the proper file name for the real test later on.
29302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29303  if test "x$test_shortpath" = x; then
29304    # Short path failed, file does not exist as specified.
29305    # Try adding .exe or .cmd
29306    if test -f "${new_path}.exe"; then
29307      input_to_shortpath="${new_path}.exe"
29308    elif test -f "${new_path}.cmd"; then
29309      input_to_shortpath="${new_path}.cmd"
29310    else
29311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29312$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29315      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29316    fi
29317  else
29318    input_to_shortpath="$new_path"
29319  fi
29320
29321  # Call helper function which possibly converts this using DOS-style short mode.
29322  # If so, the updated path is stored in $new_path.
29323  new_path="$input_to_shortpath"
29324
29325  input_path="$input_to_shortpath"
29326  # Check if we need to convert this using DOS-style short mode. If the path
29327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29328  # take no chances and rewrite it.
29329  # Note: m4 eats our [], so we need to use [ and ] instead.
29330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29331  if test "x$has_forbidden_chars" != x; then
29332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29336      # Going to short mode and back again did indeed matter. Since short mode is
29337      # case insensitive, let's make it lowercase to improve readability.
29338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29339      # Now convert it back to Unix-style (cygpath)
29340      input_path=`$CYGPATH -u "$shortmode_path"`
29341      new_path="$input_path"
29342    fi
29343  fi
29344
29345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29346  if test "x$test_cygdrive_prefix" = x; then
29347    # As a simple fix, exclude /usr/bin since it's not a real path.
29348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29350      # a path prefixed by /cygdrive for fixpath to work.
29351      new_path="$CYGWIN_ROOT_PATH$input_path"
29352    fi
29353  fi
29354
29355  # remove trailing .exe if any
29356  new_path="${new_path/%.exe/}"
29357
29358    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29359
29360  # First separate the path from the arguments. This will split at the first
29361  # space.
29362  complete="$PROPER_COMPILER_CC"
29363  path="${complete%% *}"
29364  tmp="$complete EOL"
29365  arguments="${tmp#* }"
29366
29367  # Input might be given as Windows format, start by converting to
29368  # unix format.
29369  new_path="$path"
29370
29371  windows_path="$new_path"
29372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29373    unix_path=`$CYGPATH -u "$windows_path"`
29374    new_path="$unix_path"
29375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29377    new_path="$unix_path"
29378  fi
29379
29380
29381  # Now try to locate executable using which
29382  new_path=`$WHICH "$new_path" 2> /dev/null`
29383
29384  if test "x$new_path" = x; then
29385    # Oops. Which didn't find the executable.
29386    # The splitting of arguments from the executable at a space might have been incorrect,
29387    # since paths with space are more likely in Windows. Give it another try with the whole
29388    # argument.
29389    path="$complete"
29390    arguments="EOL"
29391    new_path="$path"
29392
29393  windows_path="$new_path"
29394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29395    unix_path=`$CYGPATH -u "$windows_path"`
29396    new_path="$unix_path"
29397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29399    new_path="$unix_path"
29400  fi
29401
29402
29403    new_path=`$WHICH "$new_path" 2> /dev/null`
29404    # bat and cmd files are not always considered executable in MSYS causing which
29405    # to not find them
29406    if test "x$new_path" = x \
29407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29409      new_path="$path"
29410
29411  windows_path="$new_path"
29412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29413    unix_path=`$CYGPATH -u "$windows_path"`
29414    new_path="$unix_path"
29415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29417    new_path="$unix_path"
29418  fi
29419
29420    fi
29421
29422    if test "x$new_path" = x; then
29423      # It's still not found. Now this is an unrecoverable error.
29424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29425$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29426      has_space=`$ECHO "$complete" | $GREP " "`
29427      if test "x$has_space" != x; then
29428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29430      fi
29431      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29432    fi
29433  fi
29434
29435  # Now new_path has a complete unix path to the binary
29436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29437    # Keep paths in /bin as-is, but remove trailing .exe if any
29438    new_path="${new_path/%.exe/}"
29439    # Do not save /bin paths to all_fixpath_prefixes!
29440  else
29441    # Not in mixed or Windows style, start by that.
29442    new_path=`cmd //c echo $new_path`
29443
29444  input_path="$new_path"
29445  # Check if we need to convert this using DOS-style short mode. If the path
29446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29447  # take no chances and rewrite it.
29448  # Note: m4 eats our [], so we need to use [ and ] instead.
29449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29450  if test "x$has_forbidden_chars" != x; then
29451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29453  fi
29454
29455    # Output is in $new_path
29456
29457  windows_path="$new_path"
29458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29459    unix_path=`$CYGPATH -u "$windows_path"`
29460    new_path="$unix_path"
29461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29463    new_path="$unix_path"
29464  fi
29465
29466    # remove trailing .exe if any
29467    new_path="${new_path/%.exe/}"
29468
29469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29471  fi
29472
29473    else
29474      # We're on a unix platform. Hooray! :)
29475      # First separate the path from the arguments. This will split at the first
29476      # space.
29477      complete="$PROPER_COMPILER_CC"
29478      path="${complete%% *}"
29479      tmp="$complete EOL"
29480      arguments="${tmp#* }"
29481
29482      # Cannot rely on the command "which" here since it doesn't always work.
29483      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29484      if test -z "$is_absolute_path"; then
29485        # Path to executable is not absolute. Find it.
29486        IFS_save="$IFS"
29487        IFS=:
29488        for p in $PATH; do
29489          if test -f "$p/$path" && test -x "$p/$path"; then
29490            new_path="$p/$path"
29491            break
29492          fi
29493        done
29494        IFS="$IFS_save"
29495      else
29496        # This is an absolute path, we can use it without further modifications.
29497        new_path="$path"
29498      fi
29499
29500      if test "x$new_path" = x; then
29501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29502$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29503        has_space=`$ECHO "$complete" | $GREP " "`
29504        if test "x$has_space" != x; then
29505          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29506$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29507        fi
29508        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29509      fi
29510    fi
29511
29512    # Now join together the path and the arguments once again
29513    if test "x$arguments" != xEOL; then
29514      new_complete="$new_path ${arguments% *}"
29515    else
29516      new_complete="$new_path"
29517    fi
29518
29519    if test "x$complete" != "x$new_complete"; then
29520      PROPER_COMPILER_CC="$new_complete"
29521      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29522$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29523    fi
29524  fi
29525
29526    PATH="$RETRY_COMPILER_SAVED_PATH"
29527
29528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29529$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29530
29531  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29532    # Follow a chain of symbolic links. Use readlink
29533    # where it exists, else fall back to horribly
29534    # complicated shell code.
29535    if test "x$READLINK_TESTED" != yes; then
29536      # On MacOSX there is a readlink tool with a different
29537      # purpose than the GNU readlink tool. Check the found readlink.
29538      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29539      if test "x$ISGNU" = x; then
29540        # A readlink that we do not know how to use.
29541        # Are there other non-GNU readlinks out there?
29542        READLINK_TESTED=yes
29543        READLINK=
29544      fi
29545    fi
29546
29547    if test "x$READLINK" != x; then
29548      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29549    else
29550      # Save the current directory for restoring afterwards
29551      STARTDIR=$PWD
29552      COUNTER=0
29553      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29554      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29555      cd $sym_link_dir
29556      # Use -P flag to resolve symlinks in directories.
29557      cd `$THEPWDCMD -P`
29558      sym_link_dir=`$THEPWDCMD -P`
29559      # Resolve file symlinks
29560      while test $COUNTER -lt 20; do
29561        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29562        if test "x$ISLINK" == x; then
29563          # This is not a symbolic link! We are done!
29564          break
29565        fi
29566        # Again resolve directory symlinks since the target of the just found
29567        # link could be in a different directory
29568        cd `$DIRNAME $ISLINK`
29569        sym_link_dir=`$THEPWDCMD -P`
29570        sym_link_file=`$BASENAME $ISLINK`
29571        let COUNTER=COUNTER+1
29572      done
29573      cd $STARTDIR
29574      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29575    fi
29576  fi
29577
29578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29579$as_echo "$PROPER_COMPILER_CC" >&6; }
29580    CC="$PROPER_COMPILER_CC"
29581  else
29582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29583$as_echo "no, keeping CC" >&6; }
29584  fi
29585
29586
29587  COMPILER=$CC
29588  COMPILER_NAME=$COMPILER_NAME
29589
29590  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29591    # cc -V output typically looks like
29592    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29593    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29594    # Check that this is likely to be the Solaris Studio cc.
29595    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29596    if test $? -ne 0; then
29597      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29598      { $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
29599$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29600      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29601$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29602      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29603$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29604      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29605    fi
29606    # Remove usage instructions (if present), and
29607    # collapse compiler output into a single line
29608    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29609        $SED -e 's/ *[Uu]sage:.*//'`
29610    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29611        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29612  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29613    # xlc -qversion output typically looks like
29614    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29615    #     Version: 11.01.0000.0015
29616    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29617    # Check that this is likely to be the IBM XL C compiler.
29618    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29619    if test $? -ne 0; then
29620      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29621      { $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
29622$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29623      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29624$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29625      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29626$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29627      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29628    fi
29629    # Collapse compiler output into a single line
29630    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29631    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29632        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29633  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29634    # There is no specific version flag, but all output starts with a version string.
29635    # First line typically looks something like:
29636    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29637    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29638    # Check that this is likely to be Microsoft CL.EXE.
29639    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29640    if test $? -ne 0; then
29641      { $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
29642$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29643      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29644$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29645      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29646    fi
29647    # Collapse compiler output into a single line
29648    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29649    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29650        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29651  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29652    # gcc --version output typically looks like
29653    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29654    #     Copyright (C) 2013 Free Software Foundation, Inc.
29655    #     This is free software; see the source for copying conditions.  There is NO
29656    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29657    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29658    # Check that this is likely to be GCC.
29659    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29660    if test $? -ne 0; then
29661      { $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
29662$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29663      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29664$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29665      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29666    fi
29667    # Remove Copyright and legalese from version string, and
29668    # collapse into a single line
29669    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29670        $SED -e 's/ *Copyright .*//'`
29671    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29672        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29673  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29674    # clang --version output typically looks like
29675    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29676    #    clang version 3.3 (tags/RELEASE_33/final)
29677    # or
29678    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29679    #    Target: x86_64-pc-linux-gnu
29680    #    Thread model: posix
29681    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29682    # Check that this is likely to be clang
29683    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29684    if test $? -ne 0; then
29685      { $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
29686$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29687      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29688$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29689      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29690    fi
29691    # Collapse compiler output into a single line
29692    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29693    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29694        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29695  else
29696      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29697  fi
29698  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29699  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29700  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29701  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29702
29703  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29704$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29705
29706
29707  # Now that we have resolved CC ourself, let autoconf have its go at it
29708  ac_ext=c
29709ac_cpp='$CPP $CPPFLAGS'
29710ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29711ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29712ac_compiler_gnu=$ac_cv_c_compiler_gnu
29713if test -n "$ac_tool_prefix"; then
29714  for ac_prog in $CC
29715  do
29716    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29717set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29719$as_echo_n "checking for $ac_word... " >&6; }
29720if ${ac_cv_prog_CC+:} false; then :
29721  $as_echo_n "(cached) " >&6
29722else
29723  if test -n "$CC"; then
29724  ac_cv_prog_CC="$CC" # Let the user override the test.
29725else
29726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29727for as_dir in $PATH
29728do
29729  IFS=$as_save_IFS
29730  test -z "$as_dir" && as_dir=.
29731    for ac_exec_ext in '' $ac_executable_extensions; do
29732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29733    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29735    break 2
29736  fi
29737done
29738  done
29739IFS=$as_save_IFS
29740
29741fi
29742fi
29743CC=$ac_cv_prog_CC
29744if test -n "$CC"; then
29745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29746$as_echo "$CC" >&6; }
29747else
29748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29749$as_echo "no" >&6; }
29750fi
29751
29752
29753    test -n "$CC" && break
29754  done
29755fi
29756if test -z "$CC"; then
29757  ac_ct_CC=$CC
29758  for ac_prog in $CC
29759do
29760  # Extract the first word of "$ac_prog", so it can be a program name with args.
29761set dummy $ac_prog; ac_word=$2
29762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29763$as_echo_n "checking for $ac_word... " >&6; }
29764if ${ac_cv_prog_ac_ct_CC+:} false; then :
29765  $as_echo_n "(cached) " >&6
29766else
29767  if test -n "$ac_ct_CC"; then
29768  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29769else
29770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29771for as_dir in $PATH
29772do
29773  IFS=$as_save_IFS
29774  test -z "$as_dir" && as_dir=.
29775    for ac_exec_ext in '' $ac_executable_extensions; do
29776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29777    ac_cv_prog_ac_ct_CC="$ac_prog"
29778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29779    break 2
29780  fi
29781done
29782  done
29783IFS=$as_save_IFS
29784
29785fi
29786fi
29787ac_ct_CC=$ac_cv_prog_ac_ct_CC
29788if test -n "$ac_ct_CC"; then
29789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29790$as_echo "$ac_ct_CC" >&6; }
29791else
29792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29793$as_echo "no" >&6; }
29794fi
29795
29796
29797  test -n "$ac_ct_CC" && break
29798done
29799
29800  if test "x$ac_ct_CC" = x; then
29801    CC=""
29802  else
29803    case $cross_compiling:$ac_tool_warned in
29804yes:)
29805{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29806$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29807ac_tool_warned=yes ;;
29808esac
29809    CC=$ac_ct_CC
29810  fi
29811fi
29812
29813
29814test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29816as_fn_error $? "no acceptable C compiler found in \$PATH
29817See \`config.log' for more details" "$LINENO" 5; }
29818
29819# Provide some information about the compiler.
29820$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29821set X $ac_compile
29822ac_compiler=$2
29823for ac_option in --version -v -V -qversion; do
29824  { { ac_try="$ac_compiler $ac_option >&5"
29825case "(($ac_try" in
29826  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29827  *) ac_try_echo=$ac_try;;
29828esac
29829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29830$as_echo "$ac_try_echo"; } >&5
29831  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29832  ac_status=$?
29833  if test -s conftest.err; then
29834    sed '10a\
29835... rest of stderr output deleted ...
29836         10q' conftest.err >conftest.er1
29837    cat conftest.er1 >&5
29838  fi
29839  rm -f conftest.er1 conftest.err
29840  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29841  test $ac_status = 0; }
29842done
29843
29844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29845/* end confdefs.h.  */
29846
29847int
29848main ()
29849{
29850
29851  ;
29852  return 0;
29853}
29854_ACEOF
29855ac_clean_files_save=$ac_clean_files
29856ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29857# Try to create an executable without -o first, disregard a.out.
29858# It will help us diagnose broken compilers, and finding out an intuition
29859# of exeext.
29860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29861$as_echo_n "checking whether the C compiler works... " >&6; }
29862ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29863
29864# The possible output files:
29865ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29866
29867ac_rmfiles=
29868for ac_file in $ac_files
29869do
29870  case $ac_file in
29871    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29872    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29873  esac
29874done
29875rm -f $ac_rmfiles
29876
29877if { { ac_try="$ac_link_default"
29878case "(($ac_try" in
29879  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29880  *) ac_try_echo=$ac_try;;
29881esac
29882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29883$as_echo "$ac_try_echo"; } >&5
29884  (eval "$ac_link_default") 2>&5
29885  ac_status=$?
29886  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29887  test $ac_status = 0; }; then :
29888  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29889# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29890# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29891# so that the user can short-circuit this test for compilers unknown to
29892# Autoconf.
29893for ac_file in $ac_files ''
29894do
29895  test -f "$ac_file" || continue
29896  case $ac_file in
29897    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29898	;;
29899    [ab].out )
29900	# We found the default executable, but exeext='' is most
29901	# certainly right.
29902	break;;
29903    *.* )
29904	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29905	then :; else
29906	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29907	fi
29908	# We set ac_cv_exeext here because the later test for it is not
29909	# safe: cross compilers may not add the suffix if given an `-o'
29910	# argument, so we may need to know it at that point already.
29911	# Even if this section looks crufty: it has the advantage of
29912	# actually working.
29913	break;;
29914    * )
29915	break;;
29916  esac
29917done
29918test "$ac_cv_exeext" = no && ac_cv_exeext=
29919
29920else
29921  ac_file=''
29922fi
29923if test -z "$ac_file"; then :
29924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29925$as_echo "no" >&6; }
29926$as_echo "$as_me: failed program was:" >&5
29927sed 's/^/| /' conftest.$ac_ext >&5
29928
29929{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29931as_fn_error 77 "C compiler cannot create executables
29932See \`config.log' for more details" "$LINENO" 5; }
29933else
29934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29935$as_echo "yes" >&6; }
29936fi
29937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29938$as_echo_n "checking for C compiler default output file name... " >&6; }
29939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29940$as_echo "$ac_file" >&6; }
29941ac_exeext=$ac_cv_exeext
29942
29943rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29944ac_clean_files=$ac_clean_files_save
29945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29946$as_echo_n "checking for suffix of executables... " >&6; }
29947if { { ac_try="$ac_link"
29948case "(($ac_try" in
29949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29950  *) ac_try_echo=$ac_try;;
29951esac
29952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29953$as_echo "$ac_try_echo"; } >&5
29954  (eval "$ac_link") 2>&5
29955  ac_status=$?
29956  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29957  test $ac_status = 0; }; then :
29958  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29959# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29960# work properly (i.e., refer to `conftest.exe'), while it won't with
29961# `rm'.
29962for ac_file in conftest.exe conftest conftest.*; do
29963  test -f "$ac_file" || continue
29964  case $ac_file in
29965    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29966    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29967	  break;;
29968    * ) break;;
29969  esac
29970done
29971else
29972  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29974as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29975See \`config.log' for more details" "$LINENO" 5; }
29976fi
29977rm -f conftest conftest$ac_cv_exeext
29978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29979$as_echo "$ac_cv_exeext" >&6; }
29980
29981rm -f conftest.$ac_ext
29982EXEEXT=$ac_cv_exeext
29983ac_exeext=$EXEEXT
29984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29985/* end confdefs.h.  */
29986#include <stdio.h>
29987int
29988main ()
29989{
29990FILE *f = fopen ("conftest.out", "w");
29991 return ferror (f) || fclose (f) != 0;
29992
29993  ;
29994  return 0;
29995}
29996_ACEOF
29997ac_clean_files="$ac_clean_files conftest.out"
29998# Check that the compiler produces executables we can run.  If not, either
29999# the compiler is broken, or we cross compile.
30000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30001$as_echo_n "checking whether we are cross compiling... " >&6; }
30002if test "$cross_compiling" != yes; then
30003  { { ac_try="$ac_link"
30004case "(($ac_try" in
30005  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30006  *) ac_try_echo=$ac_try;;
30007esac
30008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30009$as_echo "$ac_try_echo"; } >&5
30010  (eval "$ac_link") 2>&5
30011  ac_status=$?
30012  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30013  test $ac_status = 0; }
30014  if { ac_try='./conftest$ac_cv_exeext'
30015  { { case "(($ac_try" in
30016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30017  *) ac_try_echo=$ac_try;;
30018esac
30019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30020$as_echo "$ac_try_echo"; } >&5
30021  (eval "$ac_try") 2>&5
30022  ac_status=$?
30023  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30024  test $ac_status = 0; }; }; then
30025    cross_compiling=no
30026  else
30027    if test "$cross_compiling" = maybe; then
30028	cross_compiling=yes
30029    else
30030	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30032as_fn_error $? "cannot run C compiled programs.
30033If you meant to cross compile, use \`--host'.
30034See \`config.log' for more details" "$LINENO" 5; }
30035    fi
30036  fi
30037fi
30038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30039$as_echo "$cross_compiling" >&6; }
30040
30041rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30042ac_clean_files=$ac_clean_files_save
30043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30044$as_echo_n "checking for suffix of object files... " >&6; }
30045if ${ac_cv_objext+:} false; then :
30046  $as_echo_n "(cached) " >&6
30047else
30048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30049/* end confdefs.h.  */
30050
30051int
30052main ()
30053{
30054
30055  ;
30056  return 0;
30057}
30058_ACEOF
30059rm -f conftest.o conftest.obj
30060if { { ac_try="$ac_compile"
30061case "(($ac_try" in
30062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30063  *) ac_try_echo=$ac_try;;
30064esac
30065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30066$as_echo "$ac_try_echo"; } >&5
30067  (eval "$ac_compile") 2>&5
30068  ac_status=$?
30069  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30070  test $ac_status = 0; }; then :
30071  for ac_file in conftest.o conftest.obj conftest.*; do
30072  test -f "$ac_file" || continue;
30073  case $ac_file in
30074    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30075    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30076       break;;
30077  esac
30078done
30079else
30080  $as_echo "$as_me: failed program was:" >&5
30081sed 's/^/| /' conftest.$ac_ext >&5
30082
30083{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30085as_fn_error $? "cannot compute suffix of object files: cannot compile
30086See \`config.log' for more details" "$LINENO" 5; }
30087fi
30088rm -f conftest.$ac_cv_objext conftest.$ac_ext
30089fi
30090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30091$as_echo "$ac_cv_objext" >&6; }
30092OBJEXT=$ac_cv_objext
30093ac_objext=$OBJEXT
30094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30095$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30096if ${ac_cv_c_compiler_gnu+:} false; then :
30097  $as_echo_n "(cached) " >&6
30098else
30099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30100/* end confdefs.h.  */
30101
30102int
30103main ()
30104{
30105#ifndef __GNUC__
30106       choke me
30107#endif
30108
30109  ;
30110  return 0;
30111}
30112_ACEOF
30113if ac_fn_c_try_compile "$LINENO"; then :
30114  ac_compiler_gnu=yes
30115else
30116  ac_compiler_gnu=no
30117fi
30118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30119ac_cv_c_compiler_gnu=$ac_compiler_gnu
30120
30121fi
30122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30123$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30124if test $ac_compiler_gnu = yes; then
30125  GCC=yes
30126else
30127  GCC=
30128fi
30129ac_test_CFLAGS=${CFLAGS+set}
30130ac_save_CFLAGS=$CFLAGS
30131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30132$as_echo_n "checking whether $CC accepts -g... " >&6; }
30133if ${ac_cv_prog_cc_g+:} false; then :
30134  $as_echo_n "(cached) " >&6
30135else
30136  ac_save_c_werror_flag=$ac_c_werror_flag
30137   ac_c_werror_flag=yes
30138   ac_cv_prog_cc_g=no
30139   CFLAGS="-g"
30140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30141/* end confdefs.h.  */
30142
30143int
30144main ()
30145{
30146
30147  ;
30148  return 0;
30149}
30150_ACEOF
30151if ac_fn_c_try_compile "$LINENO"; then :
30152  ac_cv_prog_cc_g=yes
30153else
30154  CFLAGS=""
30155      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30156/* end confdefs.h.  */
30157
30158int
30159main ()
30160{
30161
30162  ;
30163  return 0;
30164}
30165_ACEOF
30166if ac_fn_c_try_compile "$LINENO"; then :
30167
30168else
30169  ac_c_werror_flag=$ac_save_c_werror_flag
30170	 CFLAGS="-g"
30171	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30172/* end confdefs.h.  */
30173
30174int
30175main ()
30176{
30177
30178  ;
30179  return 0;
30180}
30181_ACEOF
30182if ac_fn_c_try_compile "$LINENO"; then :
30183  ac_cv_prog_cc_g=yes
30184fi
30185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30186fi
30187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30188fi
30189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30190   ac_c_werror_flag=$ac_save_c_werror_flag
30191fi
30192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30193$as_echo "$ac_cv_prog_cc_g" >&6; }
30194if test "$ac_test_CFLAGS" = set; then
30195  CFLAGS=$ac_save_CFLAGS
30196elif test $ac_cv_prog_cc_g = yes; then
30197  if test "$GCC" = yes; then
30198    CFLAGS="-g -O2"
30199  else
30200    CFLAGS="-g"
30201  fi
30202else
30203  if test "$GCC" = yes; then
30204    CFLAGS="-O2"
30205  else
30206    CFLAGS=
30207  fi
30208fi
30209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30210$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30211if ${ac_cv_prog_cc_c89+:} false; then :
30212  $as_echo_n "(cached) " >&6
30213else
30214  ac_cv_prog_cc_c89=no
30215ac_save_CC=$CC
30216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30217/* end confdefs.h.  */
30218#include <stdarg.h>
30219#include <stdio.h>
30220struct stat;
30221/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30222struct buf { int x; };
30223FILE * (*rcsopen) (struct buf *, struct stat *, int);
30224static char *e (p, i)
30225     char **p;
30226     int i;
30227{
30228  return p[i];
30229}
30230static char *f (char * (*g) (char **, int), char **p, ...)
30231{
30232  char *s;
30233  va_list v;
30234  va_start (v,p);
30235  s = g (p, va_arg (v,int));
30236  va_end (v);
30237  return s;
30238}
30239
30240/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30241   function prototypes and stuff, but not '\xHH' hex character constants.
30242   These don't provoke an error unfortunately, instead are silently treated
30243   as 'x'.  The following induces an error, until -std is added to get
30244   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30245   array size at least.  It's necessary to write '\x00'==0 to get something
30246   that's true only with -std.  */
30247int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30248
30249/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30250   inside strings and character constants.  */
30251#define FOO(x) 'x'
30252int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30253
30254int test (int i, double x);
30255struct s1 {int (*f) (int a);};
30256struct s2 {int (*f) (double a);};
30257int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30258int argc;
30259char **argv;
30260int
30261main ()
30262{
30263return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30264  ;
30265  return 0;
30266}
30267_ACEOF
30268for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30269	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30270do
30271  CC="$ac_save_CC $ac_arg"
30272  if ac_fn_c_try_compile "$LINENO"; then :
30273  ac_cv_prog_cc_c89=$ac_arg
30274fi
30275rm -f core conftest.err conftest.$ac_objext
30276  test "x$ac_cv_prog_cc_c89" != "xno" && break
30277done
30278rm -f conftest.$ac_ext
30279CC=$ac_save_CC
30280
30281fi
30282# AC_CACHE_VAL
30283case "x$ac_cv_prog_cc_c89" in
30284  x)
30285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30286$as_echo "none needed" >&6; } ;;
30287  xno)
30288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30289$as_echo "unsupported" >&6; } ;;
30290  *)
30291    CC="$CC $ac_cv_prog_cc_c89"
30292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30293$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30294esac
30295if test "x$ac_cv_prog_cc_c89" != xno; then :
30296
30297fi
30298
30299ac_ext=cpp
30300ac_cpp='$CXXCPP $CPPFLAGS'
30301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30304
30305
30306
30307  COMPILER_NAME=C++
30308  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30309
30310  if test "x$CXX" != x; then
30311    # User has supplied compiler name already, always let that override.
30312    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30313$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30314    if test "x`basename $CXX`" = "x$CXX"; then
30315      # A command without a complete path is provided, search $PATH.
30316
30317      for ac_prog in $CXX
30318do
30319  # Extract the first word of "$ac_prog", so it can be a program name with args.
30320set dummy $ac_prog; ac_word=$2
30321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30322$as_echo_n "checking for $ac_word... " >&6; }
30323if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30324  $as_echo_n "(cached) " >&6
30325else
30326  case $POTENTIAL_CXX in
30327  [\\/]* | ?:[\\/]*)
30328  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30329  ;;
30330  *)
30331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30332for as_dir in $PATH
30333do
30334  IFS=$as_save_IFS
30335  test -z "$as_dir" && as_dir=.
30336    for ac_exec_ext in '' $ac_executable_extensions; do
30337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30338    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30340    break 2
30341  fi
30342done
30343  done
30344IFS=$as_save_IFS
30345
30346  ;;
30347esac
30348fi
30349POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30350if test -n "$POTENTIAL_CXX"; then
30351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30352$as_echo "$POTENTIAL_CXX" >&6; }
30353else
30354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30355$as_echo "no" >&6; }
30356fi
30357
30358
30359  test -n "$POTENTIAL_CXX" && break
30360done
30361
30362      if test "x$POTENTIAL_CXX" != x; then
30363        CXX=$POTENTIAL_CXX
30364      else
30365        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30366      fi
30367    else
30368      # Otherwise it might already be a complete path
30369      if test ! -x "$CXX"; then
30370        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30371      fi
30372    fi
30373  else
30374    # No user supplied value. Locate compiler ourselves.
30375
30376    # If we are cross compiling, assume cross compilation tools follows the
30377    # cross compilation standard where they are prefixed with the autoconf
30378    # standard name for the target. For example the binary
30379    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30380    # If we are not cross compiling, then the default compiler name will be
30381    # used.
30382
30383    CXX=
30384    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30385    # before checking the rest of the PATH.
30386    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30387    # step, this should not be necessary.
30388    if test -n "$TOOLCHAIN_PATH"; then
30389      PATH_save="$PATH"
30390      PATH="$TOOLCHAIN_PATH"
30391      for ac_prog in $SEARCH_LIST
30392do
30393  # Extract the first word of "$ac_prog", so it can be a program name with args.
30394set dummy $ac_prog; ac_word=$2
30395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30396$as_echo_n "checking for $ac_word... " >&6; }
30397if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30398  $as_echo_n "(cached) " >&6
30399else
30400  case $TOOLCHAIN_PATH_CXX in
30401  [\\/]* | ?:[\\/]*)
30402  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30403  ;;
30404  *)
30405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30406for as_dir in $PATH
30407do
30408  IFS=$as_save_IFS
30409  test -z "$as_dir" && as_dir=.
30410    for ac_exec_ext in '' $ac_executable_extensions; do
30411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30412    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30414    break 2
30415  fi
30416done
30417  done
30418IFS=$as_save_IFS
30419
30420  ;;
30421esac
30422fi
30423TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30424if test -n "$TOOLCHAIN_PATH_CXX"; then
30425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30426$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30427else
30428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30429$as_echo "no" >&6; }
30430fi
30431
30432
30433  test -n "$TOOLCHAIN_PATH_CXX" && break
30434done
30435
30436      CXX=$TOOLCHAIN_PATH_CXX
30437      PATH="$PATH_save"
30438    fi
30439
30440    # AC_PATH_PROGS can't be run multiple times with the same variable,
30441    # so create a new name for this run.
30442    if test "x$CXX" = x; then
30443      for ac_prog in $SEARCH_LIST
30444do
30445  # Extract the first word of "$ac_prog", so it can be a program name with args.
30446set dummy $ac_prog; ac_word=$2
30447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30448$as_echo_n "checking for $ac_word... " >&6; }
30449if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30450  $as_echo_n "(cached) " >&6
30451else
30452  case $POTENTIAL_CXX in
30453  [\\/]* | ?:[\\/]*)
30454  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30455  ;;
30456  *)
30457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30458for as_dir in $PATH
30459do
30460  IFS=$as_save_IFS
30461  test -z "$as_dir" && as_dir=.
30462    for ac_exec_ext in '' $ac_executable_extensions; do
30463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30464    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30466    break 2
30467  fi
30468done
30469  done
30470IFS=$as_save_IFS
30471
30472  ;;
30473esac
30474fi
30475POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30476if test -n "$POTENTIAL_CXX"; then
30477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30478$as_echo "$POTENTIAL_CXX" >&6; }
30479else
30480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30481$as_echo "no" >&6; }
30482fi
30483
30484
30485  test -n "$POTENTIAL_CXX" && break
30486done
30487
30488      CXX=$POTENTIAL_CXX
30489    fi
30490
30491    if test "x$CXX" = x; then
30492
30493  # Print a helpful message on how to acquire the necessary build dependency.
30494  # devkit is the help tag: freetype, cups, pulse, alsa etc
30495  MISSING_DEPENDENCY=devkit
30496
30497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30498    cygwin_help $MISSING_DEPENDENCY
30499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30500    msys_help $MISSING_DEPENDENCY
30501  else
30502    PKGHANDLER_COMMAND=
30503
30504    case $PKGHANDLER in
30505      apt-get)
30506        apt_help     $MISSING_DEPENDENCY ;;
30507      yum)
30508        yum_help     $MISSING_DEPENDENCY ;;
30509      port)
30510        port_help    $MISSING_DEPENDENCY ;;
30511      pkgutil)
30512        pkgutil_help $MISSING_DEPENDENCY ;;
30513      pkgadd)
30514        pkgadd_help  $MISSING_DEPENDENCY ;;
30515    esac
30516
30517    if test "x$PKGHANDLER_COMMAND" != x; then
30518      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30519    fi
30520  fi
30521
30522      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30523    fi
30524  fi
30525
30526  # Now we have a compiler binary in CXX. Make sure it's okay.
30527
30528  # Only process if variable expands to non-empty
30529
30530  if test "x$CXX" != x; then
30531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30532
30533  # First separate the path from the arguments. This will split at the first
30534  # space.
30535  complete="$CXX"
30536  path="${complete%% *}"
30537  tmp="$complete EOL"
30538  arguments="${tmp#* }"
30539
30540  # Input might be given as Windows format, start by converting to
30541  # unix format.
30542  new_path=`$CYGPATH -u "$path"`
30543
30544  # Now try to locate executable using which
30545  new_path=`$WHICH "$new_path" 2> /dev/null`
30546  # bat and cmd files are not always considered executable in cygwin causing which
30547  # to not find them
30548  if test "x$new_path" = x \
30549      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30550      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30551    new_path=`$CYGPATH -u "$path"`
30552  fi
30553  if test "x$new_path" = x; then
30554    # Oops. Which didn't find the executable.
30555    # The splitting of arguments from the executable at a space might have been incorrect,
30556    # since paths with space are more likely in Windows. Give it another try with the whole
30557    # argument.
30558    path="$complete"
30559    arguments="EOL"
30560    new_path=`$CYGPATH -u "$path"`
30561    new_path=`$WHICH "$new_path" 2> /dev/null`
30562    # bat and cmd files are not always considered executable in cygwin causing which
30563    # to not find them
30564    if test "x$new_path" = x \
30565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30567      new_path=`$CYGPATH -u "$path"`
30568    fi
30569    if test "x$new_path" = x; then
30570      # It's still not found. Now this is an unrecoverable error.
30571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30572$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30573      has_space=`$ECHO "$complete" | $GREP " "`
30574      if test "x$has_space" != x; then
30575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30577      fi
30578      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30579    fi
30580  fi
30581
30582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30585  # "foo.exe" is OK but "foo" is an error.
30586  #
30587  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30588  # It is also a way to make sure we got the proper file name for the real test later on.
30589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30590  if test "x$test_shortpath" = x; then
30591    # Short path failed, file does not exist as specified.
30592    # Try adding .exe or .cmd
30593    if test -f "${new_path}.exe"; then
30594      input_to_shortpath="${new_path}.exe"
30595    elif test -f "${new_path}.cmd"; then
30596      input_to_shortpath="${new_path}.cmd"
30597    else
30598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30599$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30602      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30603    fi
30604  else
30605    input_to_shortpath="$new_path"
30606  fi
30607
30608  # Call helper function which possibly converts this using DOS-style short mode.
30609  # If so, the updated path is stored in $new_path.
30610  new_path="$input_to_shortpath"
30611
30612  input_path="$input_to_shortpath"
30613  # Check if we need to convert this using DOS-style short mode. If the path
30614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30615  # take no chances and rewrite it.
30616  # Note: m4 eats our [], so we need to use [ and ] instead.
30617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30618  if test "x$has_forbidden_chars" != x; then
30619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30623      # Going to short mode and back again did indeed matter. Since short mode is
30624      # case insensitive, let's make it lowercase to improve readability.
30625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30626      # Now convert it back to Unix-style (cygpath)
30627      input_path=`$CYGPATH -u "$shortmode_path"`
30628      new_path="$input_path"
30629    fi
30630  fi
30631
30632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30633  if test "x$test_cygdrive_prefix" = x; then
30634    # As a simple fix, exclude /usr/bin since it's not a real path.
30635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30637      # a path prefixed by /cygdrive for fixpath to work.
30638      new_path="$CYGWIN_ROOT_PATH$input_path"
30639    fi
30640  fi
30641
30642  # remove trailing .exe if any
30643  new_path="${new_path/%.exe/}"
30644
30645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30646
30647  # First separate the path from the arguments. This will split at the first
30648  # space.
30649  complete="$CXX"
30650  path="${complete%% *}"
30651  tmp="$complete EOL"
30652  arguments="${tmp#* }"
30653
30654  # Input might be given as Windows format, start by converting to
30655  # unix format.
30656  new_path="$path"
30657
30658  windows_path="$new_path"
30659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30660    unix_path=`$CYGPATH -u "$windows_path"`
30661    new_path="$unix_path"
30662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30664    new_path="$unix_path"
30665  fi
30666
30667
30668  # Now try to locate executable using which
30669  new_path=`$WHICH "$new_path" 2> /dev/null`
30670
30671  if test "x$new_path" = x; then
30672    # Oops. Which didn't find the executable.
30673    # The splitting of arguments from the executable at a space might have been incorrect,
30674    # since paths with space are more likely in Windows. Give it another try with the whole
30675    # argument.
30676    path="$complete"
30677    arguments="EOL"
30678    new_path="$path"
30679
30680  windows_path="$new_path"
30681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30682    unix_path=`$CYGPATH -u "$windows_path"`
30683    new_path="$unix_path"
30684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30686    new_path="$unix_path"
30687  fi
30688
30689
30690    new_path=`$WHICH "$new_path" 2> /dev/null`
30691    # bat and cmd files are not always considered executable in MSYS causing which
30692    # to not find them
30693    if test "x$new_path" = x \
30694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30696      new_path="$path"
30697
30698  windows_path="$new_path"
30699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30700    unix_path=`$CYGPATH -u "$windows_path"`
30701    new_path="$unix_path"
30702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30704    new_path="$unix_path"
30705  fi
30706
30707    fi
30708
30709    if test "x$new_path" = x; then
30710      # It's still not found. Now this is an unrecoverable error.
30711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30712$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30713      has_space=`$ECHO "$complete" | $GREP " "`
30714      if test "x$has_space" != x; then
30715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30717      fi
30718      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30719    fi
30720  fi
30721
30722  # Now new_path has a complete unix path to the binary
30723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30724    # Keep paths in /bin as-is, but remove trailing .exe if any
30725    new_path="${new_path/%.exe/}"
30726    # Do not save /bin paths to all_fixpath_prefixes!
30727  else
30728    # Not in mixed or Windows style, start by that.
30729    new_path=`cmd //c echo $new_path`
30730
30731  input_path="$new_path"
30732  # Check if we need to convert this using DOS-style short mode. If the path
30733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30734  # take no chances and rewrite it.
30735  # Note: m4 eats our [], so we need to use [ and ] instead.
30736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30737  if test "x$has_forbidden_chars" != x; then
30738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30740  fi
30741
30742    # Output is in $new_path
30743
30744  windows_path="$new_path"
30745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30746    unix_path=`$CYGPATH -u "$windows_path"`
30747    new_path="$unix_path"
30748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30750    new_path="$unix_path"
30751  fi
30752
30753    # remove trailing .exe if any
30754    new_path="${new_path/%.exe/}"
30755
30756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30758  fi
30759
30760    else
30761      # We're on a unix platform. Hooray! :)
30762      # First separate the path from the arguments. This will split at the first
30763      # space.
30764      complete="$CXX"
30765      path="${complete%% *}"
30766      tmp="$complete EOL"
30767      arguments="${tmp#* }"
30768
30769      # Cannot rely on the command "which" here since it doesn't always work.
30770      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30771      if test -z "$is_absolute_path"; then
30772        # Path to executable is not absolute. Find it.
30773        IFS_save="$IFS"
30774        IFS=:
30775        for p in $PATH; do
30776          if test -f "$p/$path" && test -x "$p/$path"; then
30777            new_path="$p/$path"
30778            break
30779          fi
30780        done
30781        IFS="$IFS_save"
30782      else
30783        # This is an absolute path, we can use it without further modifications.
30784        new_path="$path"
30785      fi
30786
30787      if test "x$new_path" = x; then
30788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30789$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30790        has_space=`$ECHO "$complete" | $GREP " "`
30791        if test "x$has_space" != x; then
30792          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30794        fi
30795        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30796      fi
30797    fi
30798
30799    # Now join together the path and the arguments once again
30800    if test "x$arguments" != xEOL; then
30801      new_complete="$new_path ${arguments% *}"
30802    else
30803      new_complete="$new_path"
30804    fi
30805
30806    if test "x$complete" != "x$new_complete"; then
30807      CXX="$new_complete"
30808      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30809$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30810    fi
30811  fi
30812
30813  TEST_COMPILER="$CXX"
30814  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30815  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30816  if test "x$OPENJDK_BUILD_OS" != xaix; then
30817    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30819$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30820
30821  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30822    # Follow a chain of symbolic links. Use readlink
30823    # where it exists, else fall back to horribly
30824    # complicated shell code.
30825    if test "x$READLINK_TESTED" != yes; then
30826      # On MacOSX there is a readlink tool with a different
30827      # purpose than the GNU readlink tool. Check the found readlink.
30828      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30829      if test "x$ISGNU" = x; then
30830        # A readlink that we do not know how to use.
30831        # Are there other non-GNU readlinks out there?
30832        READLINK_TESTED=yes
30833        READLINK=
30834      fi
30835    fi
30836
30837    if test "x$READLINK" != x; then
30838      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30839    else
30840      # Save the current directory for restoring afterwards
30841      STARTDIR=$PWD
30842      COUNTER=0
30843      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30844      sym_link_file=`$BASENAME $TEST_COMPILER`
30845      cd $sym_link_dir
30846      # Use -P flag to resolve symlinks in directories.
30847      cd `$THEPWDCMD -P`
30848      sym_link_dir=`$THEPWDCMD -P`
30849      # Resolve file symlinks
30850      while test $COUNTER -lt 20; do
30851        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30852        if test "x$ISLINK" == x; then
30853          # This is not a symbolic link! We are done!
30854          break
30855        fi
30856        # Again resolve directory symlinks since the target of the just found
30857        # link could be in a different directory
30858        cd `$DIRNAME $ISLINK`
30859        sym_link_dir=`$THEPWDCMD -P`
30860        sym_link_file=`$BASENAME $ISLINK`
30861        let COUNTER=COUNTER+1
30862      done
30863      cd $STARTDIR
30864      TEST_COMPILER=$sym_link_dir/$sym_link_file
30865    fi
30866  fi
30867
30868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30869$as_echo "$TEST_COMPILER" >&6; }
30870  fi
30871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30872$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30873
30874  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30875  if test "x$COMPILER_BASENAME" = "xccache"; then
30876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30877$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30878    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30879    # We want to control ccache invocation ourselves, so ignore this cc and try
30880    # searching again.
30881
30882    # Remove the path to the fake ccache cc from the PATH
30883    RETRY_COMPILER_SAVED_PATH="$PATH"
30884    COMPILER_DIRNAME=`$DIRNAME $CXX`
30885    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30886
30887    # Try again looking for our compiler
30888    if test -n "$ac_tool_prefix"; then
30889  for ac_prog in $TOOLCHAIN_CXX_BINARY
30890  do
30891    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30892set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30894$as_echo_n "checking for $ac_word... " >&6; }
30895if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30896  $as_echo_n "(cached) " >&6
30897else
30898  if test -n "$PROPER_COMPILER_CXX"; then
30899  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30900else
30901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30902for as_dir in $PATH
30903do
30904  IFS=$as_save_IFS
30905  test -z "$as_dir" && as_dir=.
30906    for ac_exec_ext in '' $ac_executable_extensions; do
30907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30908    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30910    break 2
30911  fi
30912done
30913  done
30914IFS=$as_save_IFS
30915
30916fi
30917fi
30918PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30919if test -n "$PROPER_COMPILER_CXX"; then
30920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30921$as_echo "$PROPER_COMPILER_CXX" >&6; }
30922else
30923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30924$as_echo "no" >&6; }
30925fi
30926
30927
30928    test -n "$PROPER_COMPILER_CXX" && break
30929  done
30930fi
30931if test -z "$PROPER_COMPILER_CXX"; then
30932  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30933  for ac_prog in $TOOLCHAIN_CXX_BINARY
30934do
30935  # Extract the first word of "$ac_prog", so it can be a program name with args.
30936set dummy $ac_prog; ac_word=$2
30937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30938$as_echo_n "checking for $ac_word... " >&6; }
30939if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30940  $as_echo_n "(cached) " >&6
30941else
30942  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30943  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30944else
30945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30946for as_dir in $PATH
30947do
30948  IFS=$as_save_IFS
30949  test -z "$as_dir" && as_dir=.
30950    for ac_exec_ext in '' $ac_executable_extensions; do
30951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30952    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30954    break 2
30955  fi
30956done
30957  done
30958IFS=$as_save_IFS
30959
30960fi
30961fi
30962ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30963if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30965$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30966else
30967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30968$as_echo "no" >&6; }
30969fi
30970
30971
30972  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30973done
30974
30975  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30976    PROPER_COMPILER_CXX=""
30977  else
30978    case $cross_compiling:$ac_tool_warned in
30979yes:)
30980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30982ac_tool_warned=yes ;;
30983esac
30984    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30985  fi
30986fi
30987
30988
30989  # Only process if variable expands to non-empty
30990
30991  if test "x$PROPER_COMPILER_CXX" != x; then
30992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30993
30994  # First separate the path from the arguments. This will split at the first
30995  # space.
30996  complete="$PROPER_COMPILER_CXX"
30997  path="${complete%% *}"
30998  tmp="$complete EOL"
30999  arguments="${tmp#* }"
31000
31001  # Input might be given as Windows format, start by converting to
31002  # unix format.
31003  new_path=`$CYGPATH -u "$path"`
31004
31005  # Now try to locate executable using which
31006  new_path=`$WHICH "$new_path" 2> /dev/null`
31007  # bat and cmd files are not always considered executable in cygwin causing which
31008  # to not find them
31009  if test "x$new_path" = x \
31010      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31011      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31012    new_path=`$CYGPATH -u "$path"`
31013  fi
31014  if test "x$new_path" = x; then
31015    # Oops. Which didn't find the executable.
31016    # The splitting of arguments from the executable at a space might have been incorrect,
31017    # since paths with space are more likely in Windows. Give it another try with the whole
31018    # argument.
31019    path="$complete"
31020    arguments="EOL"
31021    new_path=`$CYGPATH -u "$path"`
31022    new_path=`$WHICH "$new_path" 2> /dev/null`
31023    # bat and cmd files are not always considered executable in cygwin causing which
31024    # to not find them
31025    if test "x$new_path" = x \
31026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31028      new_path=`$CYGPATH -u "$path"`
31029    fi
31030    if test "x$new_path" = x; then
31031      # It's still not found. Now this is an unrecoverable error.
31032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31033$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31034      has_space=`$ECHO "$complete" | $GREP " "`
31035      if test "x$has_space" != x; then
31036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31038      fi
31039      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31040    fi
31041  fi
31042
31043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31046  # "foo.exe" is OK but "foo" is an error.
31047  #
31048  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31049  # It is also a way to make sure we got the proper file name for the real test later on.
31050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31051  if test "x$test_shortpath" = x; then
31052    # Short path failed, file does not exist as specified.
31053    # Try adding .exe or .cmd
31054    if test -f "${new_path}.exe"; then
31055      input_to_shortpath="${new_path}.exe"
31056    elif test -f "${new_path}.cmd"; then
31057      input_to_shortpath="${new_path}.cmd"
31058    else
31059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31060$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31061      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31063      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31064    fi
31065  else
31066    input_to_shortpath="$new_path"
31067  fi
31068
31069  # Call helper function which possibly converts this using DOS-style short mode.
31070  # If so, the updated path is stored in $new_path.
31071  new_path="$input_to_shortpath"
31072
31073  input_path="$input_to_shortpath"
31074  # Check if we need to convert this using DOS-style short mode. If the path
31075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31076  # take no chances and rewrite it.
31077  # Note: m4 eats our [], so we need to use [ and ] instead.
31078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31079  if test "x$has_forbidden_chars" != x; then
31080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31084      # Going to short mode and back again did indeed matter. Since short mode is
31085      # case insensitive, let's make it lowercase to improve readability.
31086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31087      # Now convert it back to Unix-style (cygpath)
31088      input_path=`$CYGPATH -u "$shortmode_path"`
31089      new_path="$input_path"
31090    fi
31091  fi
31092
31093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31094  if test "x$test_cygdrive_prefix" = x; then
31095    # As a simple fix, exclude /usr/bin since it's not a real path.
31096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31098      # a path prefixed by /cygdrive for fixpath to work.
31099      new_path="$CYGWIN_ROOT_PATH$input_path"
31100    fi
31101  fi
31102
31103  # remove trailing .exe if any
31104  new_path="${new_path/%.exe/}"
31105
31106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31107
31108  # First separate the path from the arguments. This will split at the first
31109  # space.
31110  complete="$PROPER_COMPILER_CXX"
31111  path="${complete%% *}"
31112  tmp="$complete EOL"
31113  arguments="${tmp#* }"
31114
31115  # Input might be given as Windows format, start by converting to
31116  # unix format.
31117  new_path="$path"
31118
31119  windows_path="$new_path"
31120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31121    unix_path=`$CYGPATH -u "$windows_path"`
31122    new_path="$unix_path"
31123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31125    new_path="$unix_path"
31126  fi
31127
31128
31129  # Now try to locate executable using which
31130  new_path=`$WHICH "$new_path" 2> /dev/null`
31131
31132  if test "x$new_path" = x; then
31133    # Oops. Which didn't find the executable.
31134    # The splitting of arguments from the executable at a space might have been incorrect,
31135    # since paths with space are more likely in Windows. Give it another try with the whole
31136    # argument.
31137    path="$complete"
31138    arguments="EOL"
31139    new_path="$path"
31140
31141  windows_path="$new_path"
31142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31143    unix_path=`$CYGPATH -u "$windows_path"`
31144    new_path="$unix_path"
31145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31147    new_path="$unix_path"
31148  fi
31149
31150
31151    new_path=`$WHICH "$new_path" 2> /dev/null`
31152    # bat and cmd files are not always considered executable in MSYS causing which
31153    # to not find them
31154    if test "x$new_path" = x \
31155        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31156        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31157      new_path="$path"
31158
31159  windows_path="$new_path"
31160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31161    unix_path=`$CYGPATH -u "$windows_path"`
31162    new_path="$unix_path"
31163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31165    new_path="$unix_path"
31166  fi
31167
31168    fi
31169
31170    if test "x$new_path" = x; then
31171      # It's still not found. Now this is an unrecoverable error.
31172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31173$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31174      has_space=`$ECHO "$complete" | $GREP " "`
31175      if test "x$has_space" != x; then
31176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31178      fi
31179      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31180    fi
31181  fi
31182
31183  # Now new_path has a complete unix path to the binary
31184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31185    # Keep paths in /bin as-is, but remove trailing .exe if any
31186    new_path="${new_path/%.exe/}"
31187    # Do not save /bin paths to all_fixpath_prefixes!
31188  else
31189    # Not in mixed or Windows style, start by that.
31190    new_path=`cmd //c echo $new_path`
31191
31192  input_path="$new_path"
31193  # Check if we need to convert this using DOS-style short mode. If the path
31194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31195  # take no chances and rewrite it.
31196  # Note: m4 eats our [], so we need to use [ and ] instead.
31197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31198  if test "x$has_forbidden_chars" != x; then
31199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31201  fi
31202
31203    # Output is in $new_path
31204
31205  windows_path="$new_path"
31206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31207    unix_path=`$CYGPATH -u "$windows_path"`
31208    new_path="$unix_path"
31209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31211    new_path="$unix_path"
31212  fi
31213
31214    # remove trailing .exe if any
31215    new_path="${new_path/%.exe/}"
31216
31217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31219  fi
31220
31221    else
31222      # We're on a unix platform. Hooray! :)
31223      # First separate the path from the arguments. This will split at the first
31224      # space.
31225      complete="$PROPER_COMPILER_CXX"
31226      path="${complete%% *}"
31227      tmp="$complete EOL"
31228      arguments="${tmp#* }"
31229
31230      # Cannot rely on the command "which" here since it doesn't always work.
31231      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31232      if test -z "$is_absolute_path"; then
31233        # Path to executable is not absolute. Find it.
31234        IFS_save="$IFS"
31235        IFS=:
31236        for p in $PATH; do
31237          if test -f "$p/$path" && test -x "$p/$path"; then
31238            new_path="$p/$path"
31239            break
31240          fi
31241        done
31242        IFS="$IFS_save"
31243      else
31244        # This is an absolute path, we can use it without further modifications.
31245        new_path="$path"
31246      fi
31247
31248      if test "x$new_path" = x; then
31249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31250$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31251        has_space=`$ECHO "$complete" | $GREP " "`
31252        if test "x$has_space" != x; then
31253          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31255        fi
31256        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31257      fi
31258    fi
31259
31260    # Now join together the path and the arguments once again
31261    if test "x$arguments" != xEOL; then
31262      new_complete="$new_path ${arguments% *}"
31263    else
31264      new_complete="$new_path"
31265    fi
31266
31267    if test "x$complete" != "x$new_complete"; then
31268      PROPER_COMPILER_CXX="$new_complete"
31269      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31270$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31271    fi
31272  fi
31273
31274    PATH="$RETRY_COMPILER_SAVED_PATH"
31275
31276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31277$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31278
31279  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31280    # Follow a chain of symbolic links. Use readlink
31281    # where it exists, else fall back to horribly
31282    # complicated shell code.
31283    if test "x$READLINK_TESTED" != yes; then
31284      # On MacOSX there is a readlink tool with a different
31285      # purpose than the GNU readlink tool. Check the found readlink.
31286      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31287      if test "x$ISGNU" = x; then
31288        # A readlink that we do not know how to use.
31289        # Are there other non-GNU readlinks out there?
31290        READLINK_TESTED=yes
31291        READLINK=
31292      fi
31293    fi
31294
31295    if test "x$READLINK" != x; then
31296      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31297    else
31298      # Save the current directory for restoring afterwards
31299      STARTDIR=$PWD
31300      COUNTER=0
31301      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31302      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31303      cd $sym_link_dir
31304      # Use -P flag to resolve symlinks in directories.
31305      cd `$THEPWDCMD -P`
31306      sym_link_dir=`$THEPWDCMD -P`
31307      # Resolve file symlinks
31308      while test $COUNTER -lt 20; do
31309        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31310        if test "x$ISLINK" == x; then
31311          # This is not a symbolic link! We are done!
31312          break
31313        fi
31314        # Again resolve directory symlinks since the target of the just found
31315        # link could be in a different directory
31316        cd `$DIRNAME $ISLINK`
31317        sym_link_dir=`$THEPWDCMD -P`
31318        sym_link_file=`$BASENAME $ISLINK`
31319        let COUNTER=COUNTER+1
31320      done
31321      cd $STARTDIR
31322      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31323    fi
31324  fi
31325
31326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31327$as_echo "$PROPER_COMPILER_CXX" >&6; }
31328    CXX="$PROPER_COMPILER_CXX"
31329  else
31330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31331$as_echo "no, keeping CXX" >&6; }
31332  fi
31333
31334
31335  COMPILER=$CXX
31336  COMPILER_NAME=$COMPILER_NAME
31337
31338  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31339    # cc -V output typically looks like
31340    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31341    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31342    # Check that this is likely to be the Solaris Studio cc.
31343    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31344    if test $? -ne 0; then
31345      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31346      { $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
31347$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31348      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31349$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31350      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31351$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31352      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31353    fi
31354    # Remove usage instructions (if present), and
31355    # collapse compiler output into a single line
31356    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31357        $SED -e 's/ *[Uu]sage:.*//'`
31358    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31359        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31360  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31361    # xlc -qversion output typically looks like
31362    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31363    #     Version: 11.01.0000.0015
31364    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31365    # Check that this is likely to be the IBM XL C compiler.
31366    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31367    if test $? -ne 0; then
31368      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31369      { $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
31370$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31371      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31372$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31373      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31374$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31375      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31376    fi
31377    # Collapse compiler output into a single line
31378    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31379    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31380        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31381  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31382    # There is no specific version flag, but all output starts with a version string.
31383    # First line typically looks something like:
31384    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31385    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31386    # Check that this is likely to be Microsoft CL.EXE.
31387    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31388    if test $? -ne 0; then
31389      { $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
31390$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31391      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31392$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31393      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31394    fi
31395    # Collapse compiler output into a single line
31396    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31397    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31398        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31399  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31400    # gcc --version output typically looks like
31401    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31402    #     Copyright (C) 2013 Free Software Foundation, Inc.
31403    #     This is free software; see the source for copying conditions.  There is NO
31404    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31405    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31406    # Check that this is likely to be GCC.
31407    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31408    if test $? -ne 0; then
31409      { $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
31410$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31411      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31412$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31413      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31414    fi
31415    # Remove Copyright and legalese from version string, and
31416    # collapse into a single line
31417    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31418        $SED -e 's/ *Copyright .*//'`
31419    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31420        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31421  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31422    # clang --version output typically looks like
31423    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31424    #    clang version 3.3 (tags/RELEASE_33/final)
31425    # or
31426    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31427    #    Target: x86_64-pc-linux-gnu
31428    #    Thread model: posix
31429    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31430    # Check that this is likely to be clang
31431    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31432    if test $? -ne 0; then
31433      { $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
31434$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31435      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31436$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31437      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31438    fi
31439    # Collapse compiler output into a single line
31440    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31441    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31442        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31443  else
31444      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31445  fi
31446  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31447  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31448  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31449  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31450
31451  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31452$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31453
31454
31455  # Now that we have resolved CXX ourself, let autoconf have its go at it
31456  ac_ext=cpp
31457ac_cpp='$CXXCPP $CPPFLAGS'
31458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31461if test -z "$CXX"; then
31462  if test -n "$CCC"; then
31463    CXX=$CCC
31464  else
31465    if test -n "$ac_tool_prefix"; then
31466  for ac_prog in $CXX
31467  do
31468    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31469set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31471$as_echo_n "checking for $ac_word... " >&6; }
31472if ${ac_cv_prog_CXX+:} false; then :
31473  $as_echo_n "(cached) " >&6
31474else
31475  if test -n "$CXX"; then
31476  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31477else
31478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31479for as_dir in $PATH
31480do
31481  IFS=$as_save_IFS
31482  test -z "$as_dir" && as_dir=.
31483    for ac_exec_ext in '' $ac_executable_extensions; do
31484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31485    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31487    break 2
31488  fi
31489done
31490  done
31491IFS=$as_save_IFS
31492
31493fi
31494fi
31495CXX=$ac_cv_prog_CXX
31496if test -n "$CXX"; then
31497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31498$as_echo "$CXX" >&6; }
31499else
31500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31501$as_echo "no" >&6; }
31502fi
31503
31504
31505    test -n "$CXX" && break
31506  done
31507fi
31508if test -z "$CXX"; then
31509  ac_ct_CXX=$CXX
31510  for ac_prog in $CXX
31511do
31512  # Extract the first word of "$ac_prog", so it can be a program name with args.
31513set dummy $ac_prog; ac_word=$2
31514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31515$as_echo_n "checking for $ac_word... " >&6; }
31516if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31517  $as_echo_n "(cached) " >&6
31518else
31519  if test -n "$ac_ct_CXX"; then
31520  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31521else
31522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31523for as_dir in $PATH
31524do
31525  IFS=$as_save_IFS
31526  test -z "$as_dir" && as_dir=.
31527    for ac_exec_ext in '' $ac_executable_extensions; do
31528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31529    ac_cv_prog_ac_ct_CXX="$ac_prog"
31530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31531    break 2
31532  fi
31533done
31534  done
31535IFS=$as_save_IFS
31536
31537fi
31538fi
31539ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31540if test -n "$ac_ct_CXX"; then
31541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31542$as_echo "$ac_ct_CXX" >&6; }
31543else
31544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31545$as_echo "no" >&6; }
31546fi
31547
31548
31549  test -n "$ac_ct_CXX" && break
31550done
31551
31552  if test "x$ac_ct_CXX" = x; then
31553    CXX="g++"
31554  else
31555    case $cross_compiling:$ac_tool_warned in
31556yes:)
31557{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31558$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31559ac_tool_warned=yes ;;
31560esac
31561    CXX=$ac_ct_CXX
31562  fi
31563fi
31564
31565  fi
31566fi
31567# Provide some information about the compiler.
31568$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31569set X $ac_compile
31570ac_compiler=$2
31571for ac_option in --version -v -V -qversion; do
31572  { { ac_try="$ac_compiler $ac_option >&5"
31573case "(($ac_try" in
31574  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31575  *) ac_try_echo=$ac_try;;
31576esac
31577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31578$as_echo "$ac_try_echo"; } >&5
31579  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31580  ac_status=$?
31581  if test -s conftest.err; then
31582    sed '10a\
31583... rest of stderr output deleted ...
31584         10q' conftest.err >conftest.er1
31585    cat conftest.er1 >&5
31586  fi
31587  rm -f conftest.er1 conftest.err
31588  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31589  test $ac_status = 0; }
31590done
31591
31592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31593$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31594if ${ac_cv_cxx_compiler_gnu+:} false; then :
31595  $as_echo_n "(cached) " >&6
31596else
31597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31598/* end confdefs.h.  */
31599
31600int
31601main ()
31602{
31603#ifndef __GNUC__
31604       choke me
31605#endif
31606
31607  ;
31608  return 0;
31609}
31610_ACEOF
31611if ac_fn_cxx_try_compile "$LINENO"; then :
31612  ac_compiler_gnu=yes
31613else
31614  ac_compiler_gnu=no
31615fi
31616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31617ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31618
31619fi
31620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31621$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31622if test $ac_compiler_gnu = yes; then
31623  GXX=yes
31624else
31625  GXX=
31626fi
31627ac_test_CXXFLAGS=${CXXFLAGS+set}
31628ac_save_CXXFLAGS=$CXXFLAGS
31629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31630$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31631if ${ac_cv_prog_cxx_g+:} false; then :
31632  $as_echo_n "(cached) " >&6
31633else
31634  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31635   ac_cxx_werror_flag=yes
31636   ac_cv_prog_cxx_g=no
31637   CXXFLAGS="-g"
31638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31639/* end confdefs.h.  */
31640
31641int
31642main ()
31643{
31644
31645  ;
31646  return 0;
31647}
31648_ACEOF
31649if ac_fn_cxx_try_compile "$LINENO"; then :
31650  ac_cv_prog_cxx_g=yes
31651else
31652  CXXFLAGS=""
31653      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31654/* end confdefs.h.  */
31655
31656int
31657main ()
31658{
31659
31660  ;
31661  return 0;
31662}
31663_ACEOF
31664if ac_fn_cxx_try_compile "$LINENO"; then :
31665
31666else
31667  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31668	 CXXFLAGS="-g"
31669	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31670/* end confdefs.h.  */
31671
31672int
31673main ()
31674{
31675
31676  ;
31677  return 0;
31678}
31679_ACEOF
31680if ac_fn_cxx_try_compile "$LINENO"; then :
31681  ac_cv_prog_cxx_g=yes
31682fi
31683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31684fi
31685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31686fi
31687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31688   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31689fi
31690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31691$as_echo "$ac_cv_prog_cxx_g" >&6; }
31692if test "$ac_test_CXXFLAGS" = set; then
31693  CXXFLAGS=$ac_save_CXXFLAGS
31694elif test $ac_cv_prog_cxx_g = yes; then
31695  if test "$GXX" = yes; then
31696    CXXFLAGS="-g -O2"
31697  else
31698    CXXFLAGS="-g"
31699  fi
31700else
31701  if test "$GXX" = yes; then
31702    CXXFLAGS="-O2"
31703  else
31704    CXXFLAGS=
31705  fi
31706fi
31707ac_ext=cpp
31708ac_cpp='$CXXCPP $CPPFLAGS'
31709ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31710ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31711ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31712
31713
31714  #
31715  # Setup the preprocessor (CPP and CXXCPP)
31716  #
31717  ac_ext=c
31718ac_cpp='$CPP $CPPFLAGS'
31719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31721ac_compiler_gnu=$ac_cv_c_compiler_gnu
31722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31723$as_echo_n "checking how to run the C preprocessor... " >&6; }
31724# On Suns, sometimes $CPP names a directory.
31725if test -n "$CPP" && test -d "$CPP"; then
31726  CPP=
31727fi
31728if test -z "$CPP"; then
31729  if ${ac_cv_prog_CPP+:} false; then :
31730  $as_echo_n "(cached) " >&6
31731else
31732      # Double quotes because CPP needs to be expanded
31733    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31734    do
31735      ac_preproc_ok=false
31736for ac_c_preproc_warn_flag in '' yes
31737do
31738  # Use a header file that comes with gcc, so configuring glibc
31739  # with a fresh cross-compiler works.
31740  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31741  # <limits.h> exists even on freestanding compilers.
31742  # On the NeXT, cc -E runs the code through the compiler's parser,
31743  # not just through cpp. "Syntax error" is here to catch this case.
31744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31745/* end confdefs.h.  */
31746#ifdef __STDC__
31747# include <limits.h>
31748#else
31749# include <assert.h>
31750#endif
31751		     Syntax error
31752_ACEOF
31753if ac_fn_c_try_cpp "$LINENO"; then :
31754
31755else
31756  # Broken: fails on valid input.
31757continue
31758fi
31759rm -f conftest.err conftest.i conftest.$ac_ext
31760
31761  # OK, works on sane cases.  Now check whether nonexistent headers
31762  # can be detected and how.
31763  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31764/* end confdefs.h.  */
31765#include <ac_nonexistent.h>
31766_ACEOF
31767if ac_fn_c_try_cpp "$LINENO"; then :
31768  # Broken: success on invalid input.
31769continue
31770else
31771  # Passes both tests.
31772ac_preproc_ok=:
31773break
31774fi
31775rm -f conftest.err conftest.i conftest.$ac_ext
31776
31777done
31778# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31779rm -f conftest.i conftest.err conftest.$ac_ext
31780if $ac_preproc_ok; then :
31781  break
31782fi
31783
31784    done
31785    ac_cv_prog_CPP=$CPP
31786
31787fi
31788  CPP=$ac_cv_prog_CPP
31789else
31790  ac_cv_prog_CPP=$CPP
31791fi
31792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31793$as_echo "$CPP" >&6; }
31794ac_preproc_ok=false
31795for ac_c_preproc_warn_flag in '' yes
31796do
31797  # Use a header file that comes with gcc, so configuring glibc
31798  # with a fresh cross-compiler works.
31799  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31800  # <limits.h> exists even on freestanding compilers.
31801  # On the NeXT, cc -E runs the code through the compiler's parser,
31802  # not just through cpp. "Syntax error" is here to catch this case.
31803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31804/* end confdefs.h.  */
31805#ifdef __STDC__
31806# include <limits.h>
31807#else
31808# include <assert.h>
31809#endif
31810		     Syntax error
31811_ACEOF
31812if ac_fn_c_try_cpp "$LINENO"; then :
31813
31814else
31815  # Broken: fails on valid input.
31816continue
31817fi
31818rm -f conftest.err conftest.i conftest.$ac_ext
31819
31820  # OK, works on sane cases.  Now check whether nonexistent headers
31821  # can be detected and how.
31822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31823/* end confdefs.h.  */
31824#include <ac_nonexistent.h>
31825_ACEOF
31826if ac_fn_c_try_cpp "$LINENO"; then :
31827  # Broken: success on invalid input.
31828continue
31829else
31830  # Passes both tests.
31831ac_preproc_ok=:
31832break
31833fi
31834rm -f conftest.err conftest.i conftest.$ac_ext
31835
31836done
31837# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31838rm -f conftest.i conftest.err conftest.$ac_ext
31839if $ac_preproc_ok; then :
31840
31841else
31842  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31844as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31845See \`config.log' for more details" "$LINENO" 5; }
31846fi
31847
31848ac_ext=cpp
31849ac_cpp='$CXXCPP $CPPFLAGS'
31850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31853
31854
31855  # Only process if variable expands to non-empty
31856
31857  if test "x$CPP" != x; then
31858    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31859
31860  # First separate the path from the arguments. This will split at the first
31861  # space.
31862  complete="$CPP"
31863  path="${complete%% *}"
31864  tmp="$complete EOL"
31865  arguments="${tmp#* }"
31866
31867  # Input might be given as Windows format, start by converting to
31868  # unix format.
31869  new_path=`$CYGPATH -u "$path"`
31870
31871  # Now try to locate executable using which
31872  new_path=`$WHICH "$new_path" 2> /dev/null`
31873  # bat and cmd files are not always considered executable in cygwin causing which
31874  # to not find them
31875  if test "x$new_path" = x \
31876      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31877      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31878    new_path=`$CYGPATH -u "$path"`
31879  fi
31880  if test "x$new_path" = x; then
31881    # Oops. Which didn't find the executable.
31882    # The splitting of arguments from the executable at a space might have been incorrect,
31883    # since paths with space are more likely in Windows. Give it another try with the whole
31884    # argument.
31885    path="$complete"
31886    arguments="EOL"
31887    new_path=`$CYGPATH -u "$path"`
31888    new_path=`$WHICH "$new_path" 2> /dev/null`
31889    # bat and cmd files are not always considered executable in cygwin causing which
31890    # to not find them
31891    if test "x$new_path" = x \
31892        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31893        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31894      new_path=`$CYGPATH -u "$path"`
31895    fi
31896    if test "x$new_path" = x; then
31897      # It's still not found. Now this is an unrecoverable error.
31898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31899$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31900      has_space=`$ECHO "$complete" | $GREP " "`
31901      if test "x$has_space" != x; then
31902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31904      fi
31905      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31906    fi
31907  fi
31908
31909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31912  # "foo.exe" is OK but "foo" is an error.
31913  #
31914  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31915  # It is also a way to make sure we got the proper file name for the real test later on.
31916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31917  if test "x$test_shortpath" = x; then
31918    # Short path failed, file does not exist as specified.
31919    # Try adding .exe or .cmd
31920    if test -f "${new_path}.exe"; then
31921      input_to_shortpath="${new_path}.exe"
31922    elif test -f "${new_path}.cmd"; then
31923      input_to_shortpath="${new_path}.cmd"
31924    else
31925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31926$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31927      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31928$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31929      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31930    fi
31931  else
31932    input_to_shortpath="$new_path"
31933  fi
31934
31935  # Call helper function which possibly converts this using DOS-style short mode.
31936  # If so, the updated path is stored in $new_path.
31937  new_path="$input_to_shortpath"
31938
31939  input_path="$input_to_shortpath"
31940  # Check if we need to convert this using DOS-style short mode. If the path
31941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31942  # take no chances and rewrite it.
31943  # Note: m4 eats our [], so we need to use [ and ] instead.
31944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31945  if test "x$has_forbidden_chars" != x; then
31946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31950      # Going to short mode and back again did indeed matter. Since short mode is
31951      # case insensitive, let's make it lowercase to improve readability.
31952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31953      # Now convert it back to Unix-style (cygpath)
31954      input_path=`$CYGPATH -u "$shortmode_path"`
31955      new_path="$input_path"
31956    fi
31957  fi
31958
31959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31960  if test "x$test_cygdrive_prefix" = x; then
31961    # As a simple fix, exclude /usr/bin since it's not a real path.
31962    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31964      # a path prefixed by /cygdrive for fixpath to work.
31965      new_path="$CYGWIN_ROOT_PATH$input_path"
31966    fi
31967  fi
31968
31969  # remove trailing .exe if any
31970  new_path="${new_path/%.exe/}"
31971
31972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31973
31974  # First separate the path from the arguments. This will split at the first
31975  # space.
31976  complete="$CPP"
31977  path="${complete%% *}"
31978  tmp="$complete EOL"
31979  arguments="${tmp#* }"
31980
31981  # Input might be given as Windows format, start by converting to
31982  # unix format.
31983  new_path="$path"
31984
31985  windows_path="$new_path"
31986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31987    unix_path=`$CYGPATH -u "$windows_path"`
31988    new_path="$unix_path"
31989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31991    new_path="$unix_path"
31992  fi
31993
31994
31995  # Now try to locate executable using which
31996  new_path=`$WHICH "$new_path" 2> /dev/null`
31997
31998  if test "x$new_path" = x; then
31999    # Oops. Which didn't find the executable.
32000    # The splitting of arguments from the executable at a space might have been incorrect,
32001    # since paths with space are more likely in Windows. Give it another try with the whole
32002    # argument.
32003    path="$complete"
32004    arguments="EOL"
32005    new_path="$path"
32006
32007  windows_path="$new_path"
32008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32009    unix_path=`$CYGPATH -u "$windows_path"`
32010    new_path="$unix_path"
32011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32013    new_path="$unix_path"
32014  fi
32015
32016
32017    new_path=`$WHICH "$new_path" 2> /dev/null`
32018    # bat and cmd files are not always considered executable in MSYS causing which
32019    # to not find them
32020    if test "x$new_path" = x \
32021        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32022        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32023      new_path="$path"
32024
32025  windows_path="$new_path"
32026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32027    unix_path=`$CYGPATH -u "$windows_path"`
32028    new_path="$unix_path"
32029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32031    new_path="$unix_path"
32032  fi
32033
32034    fi
32035
32036    if test "x$new_path" = x; then
32037      # It's still not found. Now this is an unrecoverable error.
32038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32039$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32040      has_space=`$ECHO "$complete" | $GREP " "`
32041      if test "x$has_space" != x; then
32042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32044      fi
32045      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32046    fi
32047  fi
32048
32049  # Now new_path has a complete unix path to the binary
32050  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32051    # Keep paths in /bin as-is, but remove trailing .exe if any
32052    new_path="${new_path/%.exe/}"
32053    # Do not save /bin paths to all_fixpath_prefixes!
32054  else
32055    # Not in mixed or Windows style, start by that.
32056    new_path=`cmd //c echo $new_path`
32057
32058  input_path="$new_path"
32059  # Check if we need to convert this using DOS-style short mode. If the path
32060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32061  # take no chances and rewrite it.
32062  # Note: m4 eats our [], so we need to use [ and ] instead.
32063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32064  if test "x$has_forbidden_chars" != x; then
32065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32067  fi
32068
32069    # Output is in $new_path
32070
32071  windows_path="$new_path"
32072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32073    unix_path=`$CYGPATH -u "$windows_path"`
32074    new_path="$unix_path"
32075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32077    new_path="$unix_path"
32078  fi
32079
32080    # remove trailing .exe if any
32081    new_path="${new_path/%.exe/}"
32082
32083    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32084    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32085  fi
32086
32087    else
32088      # We're on a unix platform. Hooray! :)
32089      # First separate the path from the arguments. This will split at the first
32090      # space.
32091      complete="$CPP"
32092      path="${complete%% *}"
32093      tmp="$complete EOL"
32094      arguments="${tmp#* }"
32095
32096      # Cannot rely on the command "which" here since it doesn't always work.
32097      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32098      if test -z "$is_absolute_path"; then
32099        # Path to executable is not absolute. Find it.
32100        IFS_save="$IFS"
32101        IFS=:
32102        for p in $PATH; do
32103          if test -f "$p/$path" && test -x "$p/$path"; then
32104            new_path="$p/$path"
32105            break
32106          fi
32107        done
32108        IFS="$IFS_save"
32109      else
32110        # This is an absolute path, we can use it without further modifications.
32111        new_path="$path"
32112      fi
32113
32114      if test "x$new_path" = x; then
32115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32116$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32117        has_space=`$ECHO "$complete" | $GREP " "`
32118        if test "x$has_space" != x; then
32119          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32120$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32121        fi
32122        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32123      fi
32124    fi
32125
32126    # Now join together the path and the arguments once again
32127    if test "x$arguments" != xEOL; then
32128      new_complete="$new_path ${arguments% *}"
32129    else
32130      new_complete="$new_path"
32131    fi
32132
32133    if test "x$complete" != "x$new_complete"; then
32134      CPP="$new_complete"
32135      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32136$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32137    fi
32138  fi
32139
32140  ac_ext=cpp
32141ac_cpp='$CXXCPP $CPPFLAGS'
32142ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32143ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32144ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32146$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32147if test -z "$CXXCPP"; then
32148  if ${ac_cv_prog_CXXCPP+:} false; then :
32149  $as_echo_n "(cached) " >&6
32150else
32151      # Double quotes because CXXCPP needs to be expanded
32152    for CXXCPP in "$CXX -E" "/lib/cpp"
32153    do
32154      ac_preproc_ok=false
32155for ac_cxx_preproc_warn_flag in '' yes
32156do
32157  # Use a header file that comes with gcc, so configuring glibc
32158  # with a fresh cross-compiler works.
32159  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32160  # <limits.h> exists even on freestanding compilers.
32161  # On the NeXT, cc -E runs the code through the compiler's parser,
32162  # not just through cpp. "Syntax error" is here to catch this case.
32163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32164/* end confdefs.h.  */
32165#ifdef __STDC__
32166# include <limits.h>
32167#else
32168# include <assert.h>
32169#endif
32170		     Syntax error
32171_ACEOF
32172if ac_fn_cxx_try_cpp "$LINENO"; then :
32173
32174else
32175  # Broken: fails on valid input.
32176continue
32177fi
32178rm -f conftest.err conftest.i conftest.$ac_ext
32179
32180  # OK, works on sane cases.  Now check whether nonexistent headers
32181  # can be detected and how.
32182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32183/* end confdefs.h.  */
32184#include <ac_nonexistent.h>
32185_ACEOF
32186if ac_fn_cxx_try_cpp "$LINENO"; then :
32187  # Broken: success on invalid input.
32188continue
32189else
32190  # Passes both tests.
32191ac_preproc_ok=:
32192break
32193fi
32194rm -f conftest.err conftest.i conftest.$ac_ext
32195
32196done
32197# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32198rm -f conftest.i conftest.err conftest.$ac_ext
32199if $ac_preproc_ok; then :
32200  break
32201fi
32202
32203    done
32204    ac_cv_prog_CXXCPP=$CXXCPP
32205
32206fi
32207  CXXCPP=$ac_cv_prog_CXXCPP
32208else
32209  ac_cv_prog_CXXCPP=$CXXCPP
32210fi
32211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32212$as_echo "$CXXCPP" >&6; }
32213ac_preproc_ok=false
32214for ac_cxx_preproc_warn_flag in '' yes
32215do
32216  # Use a header file that comes with gcc, so configuring glibc
32217  # with a fresh cross-compiler works.
32218  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32219  # <limits.h> exists even on freestanding compilers.
32220  # On the NeXT, cc -E runs the code through the compiler's parser,
32221  # not just through cpp. "Syntax error" is here to catch this case.
32222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32223/* end confdefs.h.  */
32224#ifdef __STDC__
32225# include <limits.h>
32226#else
32227# include <assert.h>
32228#endif
32229		     Syntax error
32230_ACEOF
32231if ac_fn_cxx_try_cpp "$LINENO"; then :
32232
32233else
32234  # Broken: fails on valid input.
32235continue
32236fi
32237rm -f conftest.err conftest.i conftest.$ac_ext
32238
32239  # OK, works on sane cases.  Now check whether nonexistent headers
32240  # can be detected and how.
32241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32242/* end confdefs.h.  */
32243#include <ac_nonexistent.h>
32244_ACEOF
32245if ac_fn_cxx_try_cpp "$LINENO"; then :
32246  # Broken: success on invalid input.
32247continue
32248else
32249  # Passes both tests.
32250ac_preproc_ok=:
32251break
32252fi
32253rm -f conftest.err conftest.i conftest.$ac_ext
32254
32255done
32256# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32257rm -f conftest.i conftest.err conftest.$ac_ext
32258if $ac_preproc_ok; then :
32259
32260else
32261  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32263as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32264See \`config.log' for more details" "$LINENO" 5; }
32265fi
32266
32267ac_ext=cpp
32268ac_cpp='$CXXCPP $CPPFLAGS'
32269ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32270ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32271ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32272
32273
32274  # Only process if variable expands to non-empty
32275
32276  if test "x$CXXCPP" != x; then
32277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32278
32279  # First separate the path from the arguments. This will split at the first
32280  # space.
32281  complete="$CXXCPP"
32282  path="${complete%% *}"
32283  tmp="$complete EOL"
32284  arguments="${tmp#* }"
32285
32286  # Input might be given as Windows format, start by converting to
32287  # unix format.
32288  new_path=`$CYGPATH -u "$path"`
32289
32290  # Now try to locate executable using which
32291  new_path=`$WHICH "$new_path" 2> /dev/null`
32292  # bat and cmd files are not always considered executable in cygwin causing which
32293  # to not find them
32294  if test "x$new_path" = x \
32295      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32296      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32297    new_path=`$CYGPATH -u "$path"`
32298  fi
32299  if test "x$new_path" = x; then
32300    # Oops. Which didn't find the executable.
32301    # The splitting of arguments from the executable at a space might have been incorrect,
32302    # since paths with space are more likely in Windows. Give it another try with the whole
32303    # argument.
32304    path="$complete"
32305    arguments="EOL"
32306    new_path=`$CYGPATH -u "$path"`
32307    new_path=`$WHICH "$new_path" 2> /dev/null`
32308    # bat and cmd files are not always considered executable in cygwin causing which
32309    # to not find them
32310    if test "x$new_path" = x \
32311        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32312        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32313      new_path=`$CYGPATH -u "$path"`
32314    fi
32315    if test "x$new_path" = x; then
32316      # It's still not found. Now this is an unrecoverable error.
32317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32318$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32319      has_space=`$ECHO "$complete" | $GREP " "`
32320      if test "x$has_space" != x; then
32321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32323      fi
32324      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32325    fi
32326  fi
32327
32328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32331  # "foo.exe" is OK but "foo" is an error.
32332  #
32333  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32334  # It is also a way to make sure we got the proper file name for the real test later on.
32335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32336  if test "x$test_shortpath" = x; then
32337    # Short path failed, file does not exist as specified.
32338    # Try adding .exe or .cmd
32339    if test -f "${new_path}.exe"; then
32340      input_to_shortpath="${new_path}.exe"
32341    elif test -f "${new_path}.cmd"; then
32342      input_to_shortpath="${new_path}.cmd"
32343    else
32344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32345$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32346      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32347$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32348      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32349    fi
32350  else
32351    input_to_shortpath="$new_path"
32352  fi
32353
32354  # Call helper function which possibly converts this using DOS-style short mode.
32355  # If so, the updated path is stored in $new_path.
32356  new_path="$input_to_shortpath"
32357
32358  input_path="$input_to_shortpath"
32359  # Check if we need to convert this using DOS-style short mode. If the path
32360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32361  # take no chances and rewrite it.
32362  # Note: m4 eats our [], so we need to use [ and ] instead.
32363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32364  if test "x$has_forbidden_chars" != x; then
32365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32369      # Going to short mode and back again did indeed matter. Since short mode is
32370      # case insensitive, let's make it lowercase to improve readability.
32371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32372      # Now convert it back to Unix-style (cygpath)
32373      input_path=`$CYGPATH -u "$shortmode_path"`
32374      new_path="$input_path"
32375    fi
32376  fi
32377
32378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32379  if test "x$test_cygdrive_prefix" = x; then
32380    # As a simple fix, exclude /usr/bin since it's not a real path.
32381    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32383      # a path prefixed by /cygdrive for fixpath to work.
32384      new_path="$CYGWIN_ROOT_PATH$input_path"
32385    fi
32386  fi
32387
32388  # remove trailing .exe if any
32389  new_path="${new_path/%.exe/}"
32390
32391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32392
32393  # First separate the path from the arguments. This will split at the first
32394  # space.
32395  complete="$CXXCPP"
32396  path="${complete%% *}"
32397  tmp="$complete EOL"
32398  arguments="${tmp#* }"
32399
32400  # Input might be given as Windows format, start by converting to
32401  # unix format.
32402  new_path="$path"
32403
32404  windows_path="$new_path"
32405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32406    unix_path=`$CYGPATH -u "$windows_path"`
32407    new_path="$unix_path"
32408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32410    new_path="$unix_path"
32411  fi
32412
32413
32414  # Now try to locate executable using which
32415  new_path=`$WHICH "$new_path" 2> /dev/null`
32416
32417  if test "x$new_path" = x; then
32418    # Oops. Which didn't find the executable.
32419    # The splitting of arguments from the executable at a space might have been incorrect,
32420    # since paths with space are more likely in Windows. Give it another try with the whole
32421    # argument.
32422    path="$complete"
32423    arguments="EOL"
32424    new_path="$path"
32425
32426  windows_path="$new_path"
32427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32428    unix_path=`$CYGPATH -u "$windows_path"`
32429    new_path="$unix_path"
32430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32432    new_path="$unix_path"
32433  fi
32434
32435
32436    new_path=`$WHICH "$new_path" 2> /dev/null`
32437    # bat and cmd files are not always considered executable in MSYS causing which
32438    # to not find them
32439    if test "x$new_path" = x \
32440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32442      new_path="$path"
32443
32444  windows_path="$new_path"
32445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32446    unix_path=`$CYGPATH -u "$windows_path"`
32447    new_path="$unix_path"
32448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32450    new_path="$unix_path"
32451  fi
32452
32453    fi
32454
32455    if test "x$new_path" = x; then
32456      # It's still not found. Now this is an unrecoverable error.
32457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32458$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32459      has_space=`$ECHO "$complete" | $GREP " "`
32460      if test "x$has_space" != x; then
32461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32463      fi
32464      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32465    fi
32466  fi
32467
32468  # Now new_path has a complete unix path to the binary
32469  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32470    # Keep paths in /bin as-is, but remove trailing .exe if any
32471    new_path="${new_path/%.exe/}"
32472    # Do not save /bin paths to all_fixpath_prefixes!
32473  else
32474    # Not in mixed or Windows style, start by that.
32475    new_path=`cmd //c echo $new_path`
32476
32477  input_path="$new_path"
32478  # Check if we need to convert this using DOS-style short mode. If the path
32479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32480  # take no chances and rewrite it.
32481  # Note: m4 eats our [], so we need to use [ and ] instead.
32482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32483  if test "x$has_forbidden_chars" != x; then
32484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32486  fi
32487
32488    # Output is in $new_path
32489
32490  windows_path="$new_path"
32491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32492    unix_path=`$CYGPATH -u "$windows_path"`
32493    new_path="$unix_path"
32494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32496    new_path="$unix_path"
32497  fi
32498
32499    # remove trailing .exe if any
32500    new_path="${new_path/%.exe/}"
32501
32502    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32503    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32504  fi
32505
32506    else
32507      # We're on a unix platform. Hooray! :)
32508      # First separate the path from the arguments. This will split at the first
32509      # space.
32510      complete="$CXXCPP"
32511      path="${complete%% *}"
32512      tmp="$complete EOL"
32513      arguments="${tmp#* }"
32514
32515      # Cannot rely on the command "which" here since it doesn't always work.
32516      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32517      if test -z "$is_absolute_path"; then
32518        # Path to executable is not absolute. Find it.
32519        IFS_save="$IFS"
32520        IFS=:
32521        for p in $PATH; do
32522          if test -f "$p/$path" && test -x "$p/$path"; then
32523            new_path="$p/$path"
32524            break
32525          fi
32526        done
32527        IFS="$IFS_save"
32528      else
32529        # This is an absolute path, we can use it without further modifications.
32530        new_path="$path"
32531      fi
32532
32533      if test "x$new_path" = x; then
32534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32535$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32536        has_space=`$ECHO "$complete" | $GREP " "`
32537        if test "x$has_space" != x; then
32538          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32539$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32540        fi
32541        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32542      fi
32543    fi
32544
32545    # Now join together the path and the arguments once again
32546    if test "x$arguments" != xEOL; then
32547      new_complete="$new_path ${arguments% *}"
32548    else
32549      new_complete="$new_path"
32550    fi
32551
32552    if test "x$complete" != "x$new_complete"; then
32553      CXXCPP="$new_complete"
32554      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32555$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32556    fi
32557  fi
32558
32559
32560  #
32561  # Setup the linker (LD)
32562  #
32563  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32564    # In the Microsoft toolchain we have a separate LD command "link".
32565    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32566    # a cygwin program for something completely different.
32567    # Extract the first word of "link", so it can be a program name with args.
32568set dummy link; ac_word=$2
32569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32570$as_echo_n "checking for $ac_word... " >&6; }
32571if ${ac_cv_prog_LD+:} false; then :
32572  $as_echo_n "(cached) " >&6
32573else
32574  if test -n "$LD"; then
32575  ac_cv_prog_LD="$LD" # Let the user override the test.
32576else
32577  ac_prog_rejected=no
32578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32579for as_dir in $PATH
32580do
32581  IFS=$as_save_IFS
32582  test -z "$as_dir" && as_dir=.
32583    for ac_exec_ext in '' $ac_executable_extensions; do
32584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32585    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32586       ac_prog_rejected=yes
32587       continue
32588     fi
32589    ac_cv_prog_LD="link"
32590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32591    break 2
32592  fi
32593done
32594  done
32595IFS=$as_save_IFS
32596
32597if test $ac_prog_rejected = yes; then
32598  # We found a bogon in the path, so make sure we never use it.
32599  set dummy $ac_cv_prog_LD
32600  shift
32601  if test $# != 0; then
32602    # We chose a different compiler from the bogus one.
32603    # However, it has the same basename, so the bogon will be chosen
32604    # first if we set LD to just the basename; use the full file name.
32605    shift
32606    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32607  fi
32608fi
32609fi
32610fi
32611LD=$ac_cv_prog_LD
32612if test -n "$LD"; then
32613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32614$as_echo "$LD" >&6; }
32615else
32616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32617$as_echo "no" >&6; }
32618fi
32619
32620
32621
32622  # Only process if variable expands to non-empty
32623
32624  if test "x$LD" != x; then
32625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32626
32627  # First separate the path from the arguments. This will split at the first
32628  # space.
32629  complete="$LD"
32630  path="${complete%% *}"
32631  tmp="$complete EOL"
32632  arguments="${tmp#* }"
32633
32634  # Input might be given as Windows format, start by converting to
32635  # unix format.
32636  new_path=`$CYGPATH -u "$path"`
32637
32638  # Now try to locate executable using which
32639  new_path=`$WHICH "$new_path" 2> /dev/null`
32640  # bat and cmd files are not always considered executable in cygwin causing which
32641  # to not find them
32642  if test "x$new_path" = x \
32643      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32644      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32645    new_path=`$CYGPATH -u "$path"`
32646  fi
32647  if test "x$new_path" = x; then
32648    # Oops. Which didn't find the executable.
32649    # The splitting of arguments from the executable at a space might have been incorrect,
32650    # since paths with space are more likely in Windows. Give it another try with the whole
32651    # argument.
32652    path="$complete"
32653    arguments="EOL"
32654    new_path=`$CYGPATH -u "$path"`
32655    new_path=`$WHICH "$new_path" 2> /dev/null`
32656    # bat and cmd files are not always considered executable in cygwin causing which
32657    # to not find them
32658    if test "x$new_path" = x \
32659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32661      new_path=`$CYGPATH -u "$path"`
32662    fi
32663    if test "x$new_path" = x; then
32664      # It's still not found. Now this is an unrecoverable error.
32665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32666$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32667      has_space=`$ECHO "$complete" | $GREP " "`
32668      if test "x$has_space" != x; then
32669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32671      fi
32672      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32673    fi
32674  fi
32675
32676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32679  # "foo.exe" is OK but "foo" is an error.
32680  #
32681  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32682  # It is also a way to make sure we got the proper file name for the real test later on.
32683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32684  if test "x$test_shortpath" = x; then
32685    # Short path failed, file does not exist as specified.
32686    # Try adding .exe or .cmd
32687    if test -f "${new_path}.exe"; then
32688      input_to_shortpath="${new_path}.exe"
32689    elif test -f "${new_path}.cmd"; then
32690      input_to_shortpath="${new_path}.cmd"
32691    else
32692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32693$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32694      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32695$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32696      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32697    fi
32698  else
32699    input_to_shortpath="$new_path"
32700  fi
32701
32702  # Call helper function which possibly converts this using DOS-style short mode.
32703  # If so, the updated path is stored in $new_path.
32704  new_path="$input_to_shortpath"
32705
32706  input_path="$input_to_shortpath"
32707  # Check if we need to convert this using DOS-style short mode. If the path
32708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32709  # take no chances and rewrite it.
32710  # Note: m4 eats our [], so we need to use [ and ] instead.
32711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32712  if test "x$has_forbidden_chars" != x; then
32713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32717      # Going to short mode and back again did indeed matter. Since short mode is
32718      # case insensitive, let's make it lowercase to improve readability.
32719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32720      # Now convert it back to Unix-style (cygpath)
32721      input_path=`$CYGPATH -u "$shortmode_path"`
32722      new_path="$input_path"
32723    fi
32724  fi
32725
32726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32727  if test "x$test_cygdrive_prefix" = x; then
32728    # As a simple fix, exclude /usr/bin since it's not a real path.
32729    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32731      # a path prefixed by /cygdrive for fixpath to work.
32732      new_path="$CYGWIN_ROOT_PATH$input_path"
32733    fi
32734  fi
32735
32736  # remove trailing .exe if any
32737  new_path="${new_path/%.exe/}"
32738
32739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32740
32741  # First separate the path from the arguments. This will split at the first
32742  # space.
32743  complete="$LD"
32744  path="${complete%% *}"
32745  tmp="$complete EOL"
32746  arguments="${tmp#* }"
32747
32748  # Input might be given as Windows format, start by converting to
32749  # unix format.
32750  new_path="$path"
32751
32752  windows_path="$new_path"
32753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32754    unix_path=`$CYGPATH -u "$windows_path"`
32755    new_path="$unix_path"
32756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32758    new_path="$unix_path"
32759  fi
32760
32761
32762  # Now try to locate executable using which
32763  new_path=`$WHICH "$new_path" 2> /dev/null`
32764
32765  if test "x$new_path" = x; then
32766    # Oops. Which didn't find the executable.
32767    # The splitting of arguments from the executable at a space might have been incorrect,
32768    # since paths with space are more likely in Windows. Give it another try with the whole
32769    # argument.
32770    path="$complete"
32771    arguments="EOL"
32772    new_path="$path"
32773
32774  windows_path="$new_path"
32775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32776    unix_path=`$CYGPATH -u "$windows_path"`
32777    new_path="$unix_path"
32778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32780    new_path="$unix_path"
32781  fi
32782
32783
32784    new_path=`$WHICH "$new_path" 2> /dev/null`
32785    # bat and cmd files are not always considered executable in MSYS causing which
32786    # to not find them
32787    if test "x$new_path" = x \
32788        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32789        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32790      new_path="$path"
32791
32792  windows_path="$new_path"
32793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32794    unix_path=`$CYGPATH -u "$windows_path"`
32795    new_path="$unix_path"
32796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32798    new_path="$unix_path"
32799  fi
32800
32801    fi
32802
32803    if test "x$new_path" = x; then
32804      # It's still not found. Now this is an unrecoverable error.
32805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32806$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32807      has_space=`$ECHO "$complete" | $GREP " "`
32808      if test "x$has_space" != x; then
32809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32811      fi
32812      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32813    fi
32814  fi
32815
32816  # Now new_path has a complete unix path to the binary
32817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32818    # Keep paths in /bin as-is, but remove trailing .exe if any
32819    new_path="${new_path/%.exe/}"
32820    # Do not save /bin paths to all_fixpath_prefixes!
32821  else
32822    # Not in mixed or Windows style, start by that.
32823    new_path=`cmd //c echo $new_path`
32824
32825  input_path="$new_path"
32826  # Check if we need to convert this using DOS-style short mode. If the path
32827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32828  # take no chances and rewrite it.
32829  # Note: m4 eats our [], so we need to use [ and ] instead.
32830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32831  if test "x$has_forbidden_chars" != x; then
32832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32834  fi
32835
32836    # Output is in $new_path
32837
32838  windows_path="$new_path"
32839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32840    unix_path=`$CYGPATH -u "$windows_path"`
32841    new_path="$unix_path"
32842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32844    new_path="$unix_path"
32845  fi
32846
32847    # remove trailing .exe if any
32848    new_path="${new_path/%.exe/}"
32849
32850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32852  fi
32853
32854    else
32855      # We're on a unix platform. Hooray! :)
32856      # First separate the path from the arguments. This will split at the first
32857      # space.
32858      complete="$LD"
32859      path="${complete%% *}"
32860      tmp="$complete EOL"
32861      arguments="${tmp#* }"
32862
32863      # Cannot rely on the command "which" here since it doesn't always work.
32864      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32865      if test -z "$is_absolute_path"; then
32866        # Path to executable is not absolute. Find it.
32867        IFS_save="$IFS"
32868        IFS=:
32869        for p in $PATH; do
32870          if test -f "$p/$path" && test -x "$p/$path"; then
32871            new_path="$p/$path"
32872            break
32873          fi
32874        done
32875        IFS="$IFS_save"
32876      else
32877        # This is an absolute path, we can use it without further modifications.
32878        new_path="$path"
32879      fi
32880
32881      if test "x$new_path" = x; then
32882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32883$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32884        has_space=`$ECHO "$complete" | $GREP " "`
32885        if test "x$has_space" != x; then
32886          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32887$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32888        fi
32889        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32890      fi
32891    fi
32892
32893    # Now join together the path and the arguments once again
32894    if test "x$arguments" != xEOL; then
32895      new_complete="$new_path ${arguments% *}"
32896    else
32897      new_complete="$new_path"
32898    fi
32899
32900    if test "x$complete" != "x$new_complete"; then
32901      LD="$new_complete"
32902      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32903$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32904    fi
32905  fi
32906
32907    # Verify that we indeed succeeded with this trick.
32908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32909$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32910    "$LD" --version > /dev/null
32911    if test $? -eq 0 ; then
32912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32913$as_echo "no" >&6; }
32914      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32915    else
32916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32917$as_echo "yes" >&6; }
32918    fi
32919    LDCXX="$LD"
32920  else
32921    # All other toolchains use the compiler to link.
32922    LD="$CC"
32923    LDCXX="$CXX"
32924  fi
32925
32926  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32927
32928
32929  #
32930  # Setup the assembler (AS)
32931  #
32932  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32933    # FIXME: should this really be solaris, or solstudio?
32934
32935
32936  # Publish this variable in the help.
32937
32938
32939  if test "x$AS" = x; then
32940    # The variable is not set by user, try to locate tool using the code snippet
32941    for ac_prog in as
32942do
32943  # Extract the first word of "$ac_prog", so it can be a program name with args.
32944set dummy $ac_prog; ac_word=$2
32945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32946$as_echo_n "checking for $ac_word... " >&6; }
32947if ${ac_cv_path_AS+:} false; then :
32948  $as_echo_n "(cached) " >&6
32949else
32950  case $AS in
32951  [\\/]* | ?:[\\/]*)
32952  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32953  ;;
32954  *)
32955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32956for as_dir in $PATH
32957do
32958  IFS=$as_save_IFS
32959  test -z "$as_dir" && as_dir=.
32960    for ac_exec_ext in '' $ac_executable_extensions; do
32961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32962    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32964    break 2
32965  fi
32966done
32967  done
32968IFS=$as_save_IFS
32969
32970  ;;
32971esac
32972fi
32973AS=$ac_cv_path_AS
32974if test -n "$AS"; then
32975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32976$as_echo "$AS" >&6; }
32977else
32978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32979$as_echo "no" >&6; }
32980fi
32981
32982
32983  test -n "$AS" && break
32984done
32985
32986  else
32987    # The variable is set, but is it from the command line or the environment?
32988
32989    # Try to remove the string !AS! from our list.
32990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32992      # If it failed, the variable was not from the command line. Ignore it,
32993      # but warn the user (except for BASH, which is always set by the calling BASH).
32994      if test "xAS" != xBASH; then
32995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32996$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32997      fi
32998      # Try to locate tool using the code snippet
32999      for ac_prog in as
33000do
33001  # Extract the first word of "$ac_prog", so it can be a program name with args.
33002set dummy $ac_prog; ac_word=$2
33003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33004$as_echo_n "checking for $ac_word... " >&6; }
33005if ${ac_cv_path_AS+:} false; then :
33006  $as_echo_n "(cached) " >&6
33007else
33008  case $AS in
33009  [\\/]* | ?:[\\/]*)
33010  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33011  ;;
33012  *)
33013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33014for as_dir in $PATH
33015do
33016  IFS=$as_save_IFS
33017  test -z "$as_dir" && as_dir=.
33018    for ac_exec_ext in '' $ac_executable_extensions; do
33019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33020    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33022    break 2
33023  fi
33024done
33025  done
33026IFS=$as_save_IFS
33027
33028  ;;
33029esac
33030fi
33031AS=$ac_cv_path_AS
33032if test -n "$AS"; then
33033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33034$as_echo "$AS" >&6; }
33035else
33036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33037$as_echo "no" >&6; }
33038fi
33039
33040
33041  test -n "$AS" && break
33042done
33043
33044    else
33045      # If it succeeded, then it was overridden by the user. We will use it
33046      # for the tool.
33047
33048      # First remove it from the list of overridden variables, so we can test
33049      # for unknown variables in the end.
33050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33051
33052      # Check if the provided tool contains a complete path.
33053      tool_specified="$AS"
33054      tool_basename="${tool_specified##*/}"
33055      if test "x$tool_basename" = "x$tool_specified"; then
33056        # A command without a complete path is provided, search $PATH.
33057        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33058$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33059        # Extract the first word of "$tool_basename", so it can be a program name with args.
33060set dummy $tool_basename; ac_word=$2
33061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33062$as_echo_n "checking for $ac_word... " >&6; }
33063if ${ac_cv_path_AS+:} false; then :
33064  $as_echo_n "(cached) " >&6
33065else
33066  case $AS in
33067  [\\/]* | ?:[\\/]*)
33068  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33069  ;;
33070  *)
33071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33072for as_dir in $PATH
33073do
33074  IFS=$as_save_IFS
33075  test -z "$as_dir" && as_dir=.
33076    for ac_exec_ext in '' $ac_executable_extensions; do
33077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33078    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33080    break 2
33081  fi
33082done
33083  done
33084IFS=$as_save_IFS
33085
33086  ;;
33087esac
33088fi
33089AS=$ac_cv_path_AS
33090if test -n "$AS"; then
33091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33092$as_echo "$AS" >&6; }
33093else
33094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33095$as_echo "no" >&6; }
33096fi
33097
33098
33099        if test "x$AS" = x; then
33100          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33101        fi
33102      else
33103        # Otherwise we believe it is a complete path. Use it as it is.
33104        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33105$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33107$as_echo_n "checking for AS... " >&6; }
33108        if test ! -x "$tool_specified"; then
33109          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33110$as_echo "not found" >&6; }
33111          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33112        fi
33113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33114$as_echo "$tool_specified" >&6; }
33115      fi
33116    fi
33117  fi
33118
33119
33120
33121  # Only process if variable expands to non-empty
33122
33123  if test "x$AS" != x; then
33124    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33125
33126  # First separate the path from the arguments. This will split at the first
33127  # space.
33128  complete="$AS"
33129  path="${complete%% *}"
33130  tmp="$complete EOL"
33131  arguments="${tmp#* }"
33132
33133  # Input might be given as Windows format, start by converting to
33134  # unix format.
33135  new_path=`$CYGPATH -u "$path"`
33136
33137  # Now try to locate executable using which
33138  new_path=`$WHICH "$new_path" 2> /dev/null`
33139  # bat and cmd files are not always considered executable in cygwin causing which
33140  # to not find them
33141  if test "x$new_path" = x \
33142      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33143      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33144    new_path=`$CYGPATH -u "$path"`
33145  fi
33146  if test "x$new_path" = x; then
33147    # Oops. Which didn't find the executable.
33148    # The splitting of arguments from the executable at a space might have been incorrect,
33149    # since paths with space are more likely in Windows. Give it another try with the whole
33150    # argument.
33151    path="$complete"
33152    arguments="EOL"
33153    new_path=`$CYGPATH -u "$path"`
33154    new_path=`$WHICH "$new_path" 2> /dev/null`
33155    # bat and cmd files are not always considered executable in cygwin causing which
33156    # to not find them
33157    if test "x$new_path" = x \
33158        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33159        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33160      new_path=`$CYGPATH -u "$path"`
33161    fi
33162    if test "x$new_path" = x; then
33163      # It's still not found. Now this is an unrecoverable error.
33164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33165$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33166      has_space=`$ECHO "$complete" | $GREP " "`
33167      if test "x$has_space" != x; then
33168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33170      fi
33171      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33172    fi
33173  fi
33174
33175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33178  # "foo.exe" is OK but "foo" is an error.
33179  #
33180  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33181  # It is also a way to make sure we got the proper file name for the real test later on.
33182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33183  if test "x$test_shortpath" = x; then
33184    # Short path failed, file does not exist as specified.
33185    # Try adding .exe or .cmd
33186    if test -f "${new_path}.exe"; then
33187      input_to_shortpath="${new_path}.exe"
33188    elif test -f "${new_path}.cmd"; then
33189      input_to_shortpath="${new_path}.cmd"
33190    else
33191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33192$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33193      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33194$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33195      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33196    fi
33197  else
33198    input_to_shortpath="$new_path"
33199  fi
33200
33201  # Call helper function which possibly converts this using DOS-style short mode.
33202  # If so, the updated path is stored in $new_path.
33203  new_path="$input_to_shortpath"
33204
33205  input_path="$input_to_shortpath"
33206  # Check if we need to convert this using DOS-style short mode. If the path
33207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33208  # take no chances and rewrite it.
33209  # Note: m4 eats our [], so we need to use [ and ] instead.
33210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33211  if test "x$has_forbidden_chars" != x; then
33212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33216      # Going to short mode and back again did indeed matter. Since short mode is
33217      # case insensitive, let's make it lowercase to improve readability.
33218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33219      # Now convert it back to Unix-style (cygpath)
33220      input_path=`$CYGPATH -u "$shortmode_path"`
33221      new_path="$input_path"
33222    fi
33223  fi
33224
33225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33226  if test "x$test_cygdrive_prefix" = x; then
33227    # As a simple fix, exclude /usr/bin since it's not a real path.
33228    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33230      # a path prefixed by /cygdrive for fixpath to work.
33231      new_path="$CYGWIN_ROOT_PATH$input_path"
33232    fi
33233  fi
33234
33235  # remove trailing .exe if any
33236  new_path="${new_path/%.exe/}"
33237
33238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33239
33240  # First separate the path from the arguments. This will split at the first
33241  # space.
33242  complete="$AS"
33243  path="${complete%% *}"
33244  tmp="$complete EOL"
33245  arguments="${tmp#* }"
33246
33247  # Input might be given as Windows format, start by converting to
33248  # unix format.
33249  new_path="$path"
33250
33251  windows_path="$new_path"
33252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33253    unix_path=`$CYGPATH -u "$windows_path"`
33254    new_path="$unix_path"
33255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33257    new_path="$unix_path"
33258  fi
33259
33260
33261  # Now try to locate executable using which
33262  new_path=`$WHICH "$new_path" 2> /dev/null`
33263
33264  if test "x$new_path" = x; then
33265    # Oops. Which didn't find the executable.
33266    # The splitting of arguments from the executable at a space might have been incorrect,
33267    # since paths with space are more likely in Windows. Give it another try with the whole
33268    # argument.
33269    path="$complete"
33270    arguments="EOL"
33271    new_path="$path"
33272
33273  windows_path="$new_path"
33274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33275    unix_path=`$CYGPATH -u "$windows_path"`
33276    new_path="$unix_path"
33277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33279    new_path="$unix_path"
33280  fi
33281
33282
33283    new_path=`$WHICH "$new_path" 2> /dev/null`
33284    # bat and cmd files are not always considered executable in MSYS causing which
33285    # to not find them
33286    if test "x$new_path" = x \
33287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33289      new_path="$path"
33290
33291  windows_path="$new_path"
33292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33293    unix_path=`$CYGPATH -u "$windows_path"`
33294    new_path="$unix_path"
33295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33297    new_path="$unix_path"
33298  fi
33299
33300    fi
33301
33302    if test "x$new_path" = x; then
33303      # It's still not found. Now this is an unrecoverable error.
33304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33305$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33306      has_space=`$ECHO "$complete" | $GREP " "`
33307      if test "x$has_space" != x; then
33308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33310      fi
33311      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33312    fi
33313  fi
33314
33315  # Now new_path has a complete unix path to the binary
33316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33317    # Keep paths in /bin as-is, but remove trailing .exe if any
33318    new_path="${new_path/%.exe/}"
33319    # Do not save /bin paths to all_fixpath_prefixes!
33320  else
33321    # Not in mixed or Windows style, start by that.
33322    new_path=`cmd //c echo $new_path`
33323
33324  input_path="$new_path"
33325  # Check if we need to convert this using DOS-style short mode. If the path
33326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33327  # take no chances and rewrite it.
33328  # Note: m4 eats our [], so we need to use [ and ] instead.
33329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33330  if test "x$has_forbidden_chars" != x; then
33331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33333  fi
33334
33335    # Output is in $new_path
33336
33337  windows_path="$new_path"
33338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33339    unix_path=`$CYGPATH -u "$windows_path"`
33340    new_path="$unix_path"
33341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33343    new_path="$unix_path"
33344  fi
33345
33346    # remove trailing .exe if any
33347    new_path="${new_path/%.exe/}"
33348
33349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33351  fi
33352
33353    else
33354      # We're on a unix platform. Hooray! :)
33355      # First separate the path from the arguments. This will split at the first
33356      # space.
33357      complete="$AS"
33358      path="${complete%% *}"
33359      tmp="$complete EOL"
33360      arguments="${tmp#* }"
33361
33362      # Cannot rely on the command "which" here since it doesn't always work.
33363      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33364      if test -z "$is_absolute_path"; then
33365        # Path to executable is not absolute. Find it.
33366        IFS_save="$IFS"
33367        IFS=:
33368        for p in $PATH; do
33369          if test -f "$p/$path" && test -x "$p/$path"; then
33370            new_path="$p/$path"
33371            break
33372          fi
33373        done
33374        IFS="$IFS_save"
33375      else
33376        # This is an absolute path, we can use it without further modifications.
33377        new_path="$path"
33378      fi
33379
33380      if test "x$new_path" = x; then
33381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33382$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33383        has_space=`$ECHO "$complete" | $GREP " "`
33384        if test "x$has_space" != x; then
33385          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33387        fi
33388        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33389      fi
33390    fi
33391
33392    # Now join together the path and the arguments once again
33393    if test "x$arguments" != xEOL; then
33394      new_complete="$new_path ${arguments% *}"
33395    else
33396      new_complete="$new_path"
33397    fi
33398
33399    if test "x$complete" != "x$new_complete"; then
33400      AS="$new_complete"
33401      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33402$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33403    fi
33404  fi
33405
33406  else
33407    # FIXME: is this correct for microsoft?
33408    AS="$CC -c"
33409  fi
33410
33411
33412  #
33413  # Setup the archiver (AR)
33414  #
33415  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33416    # The corresponding ar tool is lib.exe (used to create static libraries)
33417    # Extract the first word of "lib", so it can be a program name with args.
33418set dummy lib; ac_word=$2
33419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33420$as_echo_n "checking for $ac_word... " >&6; }
33421if ${ac_cv_prog_AR+:} false; then :
33422  $as_echo_n "(cached) " >&6
33423else
33424  if test -n "$AR"; then
33425  ac_cv_prog_AR="$AR" # Let the user override the test.
33426else
33427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33428for as_dir in $PATH
33429do
33430  IFS=$as_save_IFS
33431  test -z "$as_dir" && as_dir=.
33432    for ac_exec_ext in '' $ac_executable_extensions; do
33433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33434    ac_cv_prog_AR="lib"
33435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33436    break 2
33437  fi
33438done
33439  done
33440IFS=$as_save_IFS
33441
33442fi
33443fi
33444AR=$ac_cv_prog_AR
33445if test -n "$AR"; then
33446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33447$as_echo "$AR" >&6; }
33448else
33449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33450$as_echo "no" >&6; }
33451fi
33452
33453
33454  else
33455
33456
33457  # Publish this variable in the help.
33458
33459
33460  if test "x$AR" = x; then
33461    # The variable is not set by user, try to locate tool using the code snippet
33462    if test -n "$ac_tool_prefix"; then
33463  for ac_prog in ar
33464  do
33465    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33466set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33468$as_echo_n "checking for $ac_word... " >&6; }
33469if ${ac_cv_prog_AR+:} false; then :
33470  $as_echo_n "(cached) " >&6
33471else
33472  if test -n "$AR"; then
33473  ac_cv_prog_AR="$AR" # Let the user override the test.
33474else
33475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33476for as_dir in $PATH
33477do
33478  IFS=$as_save_IFS
33479  test -z "$as_dir" && as_dir=.
33480    for ac_exec_ext in '' $ac_executable_extensions; do
33481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33482    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33484    break 2
33485  fi
33486done
33487  done
33488IFS=$as_save_IFS
33489
33490fi
33491fi
33492AR=$ac_cv_prog_AR
33493if test -n "$AR"; then
33494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33495$as_echo "$AR" >&6; }
33496else
33497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33498$as_echo "no" >&6; }
33499fi
33500
33501
33502    test -n "$AR" && break
33503  done
33504fi
33505if test -z "$AR"; then
33506  ac_ct_AR=$AR
33507  for ac_prog in ar
33508do
33509  # Extract the first word of "$ac_prog", so it can be a program name with args.
33510set dummy $ac_prog; ac_word=$2
33511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33512$as_echo_n "checking for $ac_word... " >&6; }
33513if ${ac_cv_prog_ac_ct_AR+:} false; then :
33514  $as_echo_n "(cached) " >&6
33515else
33516  if test -n "$ac_ct_AR"; then
33517  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33518else
33519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33520for as_dir in $PATH
33521do
33522  IFS=$as_save_IFS
33523  test -z "$as_dir" && as_dir=.
33524    for ac_exec_ext in '' $ac_executable_extensions; do
33525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33526    ac_cv_prog_ac_ct_AR="$ac_prog"
33527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33528    break 2
33529  fi
33530done
33531  done
33532IFS=$as_save_IFS
33533
33534fi
33535fi
33536ac_ct_AR=$ac_cv_prog_ac_ct_AR
33537if test -n "$ac_ct_AR"; then
33538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33539$as_echo "$ac_ct_AR" >&6; }
33540else
33541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33542$as_echo "no" >&6; }
33543fi
33544
33545
33546  test -n "$ac_ct_AR" && break
33547done
33548
33549  if test "x$ac_ct_AR" = x; then
33550    AR=""
33551  else
33552    case $cross_compiling:$ac_tool_warned in
33553yes:)
33554{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33555$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33556ac_tool_warned=yes ;;
33557esac
33558    AR=$ac_ct_AR
33559  fi
33560fi
33561
33562  else
33563    # The variable is set, but is it from the command line or the environment?
33564
33565    # Try to remove the string !AR! from our list.
33566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33568      # If it failed, the variable was not from the command line. Ignore it,
33569      # but warn the user (except for BASH, which is always set by the calling BASH).
33570      if test "xAR" != xBASH; then
33571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33572$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33573      fi
33574      # Try to locate tool using the code snippet
33575      if test -n "$ac_tool_prefix"; then
33576  for ac_prog in ar
33577  do
33578    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33581$as_echo_n "checking for $ac_word... " >&6; }
33582if ${ac_cv_prog_AR+:} false; then :
33583  $as_echo_n "(cached) " >&6
33584else
33585  if test -n "$AR"; then
33586  ac_cv_prog_AR="$AR" # Let the user override the test.
33587else
33588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33589for as_dir in $PATH
33590do
33591  IFS=$as_save_IFS
33592  test -z "$as_dir" && as_dir=.
33593    for ac_exec_ext in '' $ac_executable_extensions; do
33594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33595    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33597    break 2
33598  fi
33599done
33600  done
33601IFS=$as_save_IFS
33602
33603fi
33604fi
33605AR=$ac_cv_prog_AR
33606if test -n "$AR"; then
33607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33608$as_echo "$AR" >&6; }
33609else
33610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33611$as_echo "no" >&6; }
33612fi
33613
33614
33615    test -n "$AR" && break
33616  done
33617fi
33618if test -z "$AR"; then
33619  ac_ct_AR=$AR
33620  for ac_prog in ar
33621do
33622  # Extract the first word of "$ac_prog", so it can be a program name with args.
33623set dummy $ac_prog; ac_word=$2
33624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33625$as_echo_n "checking for $ac_word... " >&6; }
33626if ${ac_cv_prog_ac_ct_AR+:} false; then :
33627  $as_echo_n "(cached) " >&6
33628else
33629  if test -n "$ac_ct_AR"; then
33630  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33631else
33632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33633for as_dir in $PATH
33634do
33635  IFS=$as_save_IFS
33636  test -z "$as_dir" && as_dir=.
33637    for ac_exec_ext in '' $ac_executable_extensions; do
33638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33639    ac_cv_prog_ac_ct_AR="$ac_prog"
33640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33641    break 2
33642  fi
33643done
33644  done
33645IFS=$as_save_IFS
33646
33647fi
33648fi
33649ac_ct_AR=$ac_cv_prog_ac_ct_AR
33650if test -n "$ac_ct_AR"; then
33651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33652$as_echo "$ac_ct_AR" >&6; }
33653else
33654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33655$as_echo "no" >&6; }
33656fi
33657
33658
33659  test -n "$ac_ct_AR" && break
33660done
33661
33662  if test "x$ac_ct_AR" = x; then
33663    AR=""
33664  else
33665    case $cross_compiling:$ac_tool_warned in
33666yes:)
33667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33669ac_tool_warned=yes ;;
33670esac
33671    AR=$ac_ct_AR
33672  fi
33673fi
33674
33675    else
33676      # If it succeeded, then it was overridden by the user. We will use it
33677      # for the tool.
33678
33679      # First remove it from the list of overridden variables, so we can test
33680      # for unknown variables in the end.
33681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33682
33683      # Check if the provided tool contains a complete path.
33684      tool_specified="$AR"
33685      tool_basename="${tool_specified##*/}"
33686      if test "x$tool_basename" = "x$tool_specified"; then
33687        # A command without a complete path is provided, search $PATH.
33688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33689$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33690        # Extract the first word of "$tool_basename", so it can be a program name with args.
33691set dummy $tool_basename; ac_word=$2
33692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33693$as_echo_n "checking for $ac_word... " >&6; }
33694if ${ac_cv_path_AR+:} false; then :
33695  $as_echo_n "(cached) " >&6
33696else
33697  case $AR in
33698  [\\/]* | ?:[\\/]*)
33699  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33700  ;;
33701  *)
33702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33703for as_dir in $PATH
33704do
33705  IFS=$as_save_IFS
33706  test -z "$as_dir" && as_dir=.
33707    for ac_exec_ext in '' $ac_executable_extensions; do
33708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33709    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33711    break 2
33712  fi
33713done
33714  done
33715IFS=$as_save_IFS
33716
33717  ;;
33718esac
33719fi
33720AR=$ac_cv_path_AR
33721if test -n "$AR"; then
33722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33723$as_echo "$AR" >&6; }
33724else
33725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33726$as_echo "no" >&6; }
33727fi
33728
33729
33730        if test "x$AR" = x; then
33731          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33732        fi
33733      else
33734        # Otherwise we believe it is a complete path. Use it as it is.
33735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33736$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33738$as_echo_n "checking for AR... " >&6; }
33739        if test ! -x "$tool_specified"; then
33740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33741$as_echo "not found" >&6; }
33742          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33743        fi
33744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33745$as_echo "$tool_specified" >&6; }
33746      fi
33747    fi
33748  fi
33749
33750
33751  fi
33752
33753  # Only process if variable expands to non-empty
33754
33755  if test "x$AR" != x; then
33756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33757
33758  # First separate the path from the arguments. This will split at the first
33759  # space.
33760  complete="$AR"
33761  path="${complete%% *}"
33762  tmp="$complete EOL"
33763  arguments="${tmp#* }"
33764
33765  # Input might be given as Windows format, start by converting to
33766  # unix format.
33767  new_path=`$CYGPATH -u "$path"`
33768
33769  # Now try to locate executable using which
33770  new_path=`$WHICH "$new_path" 2> /dev/null`
33771  # bat and cmd files are not always considered executable in cygwin causing which
33772  # to not find them
33773  if test "x$new_path" = x \
33774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33776    new_path=`$CYGPATH -u "$path"`
33777  fi
33778  if test "x$new_path" = x; then
33779    # Oops. Which didn't find the executable.
33780    # The splitting of arguments from the executable at a space might have been incorrect,
33781    # since paths with space are more likely in Windows. Give it another try with the whole
33782    # argument.
33783    path="$complete"
33784    arguments="EOL"
33785    new_path=`$CYGPATH -u "$path"`
33786    new_path=`$WHICH "$new_path" 2> /dev/null`
33787    # bat and cmd files are not always considered executable in cygwin causing which
33788    # to not find them
33789    if test "x$new_path" = x \
33790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33792      new_path=`$CYGPATH -u "$path"`
33793    fi
33794    if test "x$new_path" = x; then
33795      # It's still not found. Now this is an unrecoverable error.
33796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33797$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33798      has_space=`$ECHO "$complete" | $GREP " "`
33799      if test "x$has_space" != x; then
33800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33802      fi
33803      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33804    fi
33805  fi
33806
33807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33810  # "foo.exe" is OK but "foo" is an error.
33811  #
33812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33813  # It is also a way to make sure we got the proper file name for the real test later on.
33814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33815  if test "x$test_shortpath" = x; then
33816    # Short path failed, file does not exist as specified.
33817    # Try adding .exe or .cmd
33818    if test -f "${new_path}.exe"; then
33819      input_to_shortpath="${new_path}.exe"
33820    elif test -f "${new_path}.cmd"; then
33821      input_to_shortpath="${new_path}.cmd"
33822    else
33823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33824$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33827      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33828    fi
33829  else
33830    input_to_shortpath="$new_path"
33831  fi
33832
33833  # Call helper function which possibly converts this using DOS-style short mode.
33834  # If so, the updated path is stored in $new_path.
33835  new_path="$input_to_shortpath"
33836
33837  input_path="$input_to_shortpath"
33838  # Check if we need to convert this using DOS-style short mode. If the path
33839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33840  # take no chances and rewrite it.
33841  # Note: m4 eats our [], so we need to use [ and ] instead.
33842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33843  if test "x$has_forbidden_chars" != x; then
33844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33848      # Going to short mode and back again did indeed matter. Since short mode is
33849      # case insensitive, let's make it lowercase to improve readability.
33850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33851      # Now convert it back to Unix-style (cygpath)
33852      input_path=`$CYGPATH -u "$shortmode_path"`
33853      new_path="$input_path"
33854    fi
33855  fi
33856
33857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33858  if test "x$test_cygdrive_prefix" = x; then
33859    # As a simple fix, exclude /usr/bin since it's not a real path.
33860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33862      # a path prefixed by /cygdrive for fixpath to work.
33863      new_path="$CYGWIN_ROOT_PATH$input_path"
33864    fi
33865  fi
33866
33867  # remove trailing .exe if any
33868  new_path="${new_path/%.exe/}"
33869
33870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33871
33872  # First separate the path from the arguments. This will split at the first
33873  # space.
33874  complete="$AR"
33875  path="${complete%% *}"
33876  tmp="$complete EOL"
33877  arguments="${tmp#* }"
33878
33879  # Input might be given as Windows format, start by converting to
33880  # unix format.
33881  new_path="$path"
33882
33883  windows_path="$new_path"
33884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33885    unix_path=`$CYGPATH -u "$windows_path"`
33886    new_path="$unix_path"
33887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33889    new_path="$unix_path"
33890  fi
33891
33892
33893  # Now try to locate executable using which
33894  new_path=`$WHICH "$new_path" 2> /dev/null`
33895
33896  if test "x$new_path" = x; then
33897    # Oops. Which didn't find the executable.
33898    # The splitting of arguments from the executable at a space might have been incorrect,
33899    # since paths with space are more likely in Windows. Give it another try with the whole
33900    # argument.
33901    path="$complete"
33902    arguments="EOL"
33903    new_path="$path"
33904
33905  windows_path="$new_path"
33906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33907    unix_path=`$CYGPATH -u "$windows_path"`
33908    new_path="$unix_path"
33909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33911    new_path="$unix_path"
33912  fi
33913
33914
33915    new_path=`$WHICH "$new_path" 2> /dev/null`
33916    # bat and cmd files are not always considered executable in MSYS causing which
33917    # to not find them
33918    if test "x$new_path" = x \
33919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33921      new_path="$path"
33922
33923  windows_path="$new_path"
33924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33925    unix_path=`$CYGPATH -u "$windows_path"`
33926    new_path="$unix_path"
33927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33929    new_path="$unix_path"
33930  fi
33931
33932    fi
33933
33934    if test "x$new_path" = x; then
33935      # It's still not found. Now this is an unrecoverable error.
33936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33937$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33938      has_space=`$ECHO "$complete" | $GREP " "`
33939      if test "x$has_space" != x; then
33940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33942      fi
33943      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33944    fi
33945  fi
33946
33947  # Now new_path has a complete unix path to the binary
33948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33949    # Keep paths in /bin as-is, but remove trailing .exe if any
33950    new_path="${new_path/%.exe/}"
33951    # Do not save /bin paths to all_fixpath_prefixes!
33952  else
33953    # Not in mixed or Windows style, start by that.
33954    new_path=`cmd //c echo $new_path`
33955
33956  input_path="$new_path"
33957  # Check if we need to convert this using DOS-style short mode. If the path
33958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33959  # take no chances and rewrite it.
33960  # Note: m4 eats our [], so we need to use [ and ] instead.
33961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33962  if test "x$has_forbidden_chars" != x; then
33963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33965  fi
33966
33967    # Output is in $new_path
33968
33969  windows_path="$new_path"
33970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33971    unix_path=`$CYGPATH -u "$windows_path"`
33972    new_path="$unix_path"
33973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33975    new_path="$unix_path"
33976  fi
33977
33978    # remove trailing .exe if any
33979    new_path="${new_path/%.exe/}"
33980
33981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33983  fi
33984
33985    else
33986      # We're on a unix platform. Hooray! :)
33987      # First separate the path from the arguments. This will split at the first
33988      # space.
33989      complete="$AR"
33990      path="${complete%% *}"
33991      tmp="$complete EOL"
33992      arguments="${tmp#* }"
33993
33994      # Cannot rely on the command "which" here since it doesn't always work.
33995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33996      if test -z "$is_absolute_path"; then
33997        # Path to executable is not absolute. Find it.
33998        IFS_save="$IFS"
33999        IFS=:
34000        for p in $PATH; do
34001          if test -f "$p/$path" && test -x "$p/$path"; then
34002            new_path="$p/$path"
34003            break
34004          fi
34005        done
34006        IFS="$IFS_save"
34007      else
34008        # This is an absolute path, we can use it without further modifications.
34009        new_path="$path"
34010      fi
34011
34012      if test "x$new_path" = x; then
34013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34014$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34015        has_space=`$ECHO "$complete" | $GREP " "`
34016        if test "x$has_space" != x; then
34017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34019        fi
34020        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34021      fi
34022    fi
34023
34024    # Now join together the path and the arguments once again
34025    if test "x$arguments" != xEOL; then
34026      new_complete="$new_path ${arguments% *}"
34027    else
34028      new_complete="$new_path"
34029    fi
34030
34031    if test "x$complete" != "x$new_complete"; then
34032      AR="$new_complete"
34033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34034$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34035    fi
34036  fi
34037
34038
34039
34040  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34041
34042
34043  # Publish this variable in the help.
34044
34045
34046  if test "x$LIPO" = x; then
34047    # The variable is not set by user, try to locate tool using the code snippet
34048    for ac_prog in lipo
34049do
34050  # Extract the first word of "$ac_prog", so it can be a program name with args.
34051set dummy $ac_prog; ac_word=$2
34052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34053$as_echo_n "checking for $ac_word... " >&6; }
34054if ${ac_cv_path_LIPO+:} false; then :
34055  $as_echo_n "(cached) " >&6
34056else
34057  case $LIPO in
34058  [\\/]* | ?:[\\/]*)
34059  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34060  ;;
34061  *)
34062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34063for as_dir in $PATH
34064do
34065  IFS=$as_save_IFS
34066  test -z "$as_dir" && as_dir=.
34067    for ac_exec_ext in '' $ac_executable_extensions; do
34068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34069    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34071    break 2
34072  fi
34073done
34074  done
34075IFS=$as_save_IFS
34076
34077  ;;
34078esac
34079fi
34080LIPO=$ac_cv_path_LIPO
34081if test -n "$LIPO"; then
34082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34083$as_echo "$LIPO" >&6; }
34084else
34085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34086$as_echo "no" >&6; }
34087fi
34088
34089
34090  test -n "$LIPO" && break
34091done
34092
34093  else
34094    # The variable is set, but is it from the command line or the environment?
34095
34096    # Try to remove the string !LIPO! from our list.
34097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34099      # If it failed, the variable was not from the command line. Ignore it,
34100      # but warn the user (except for BASH, which is always set by the calling BASH).
34101      if test "xLIPO" != xBASH; then
34102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34103$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34104      fi
34105      # Try to locate tool using the code snippet
34106      for ac_prog in lipo
34107do
34108  # Extract the first word of "$ac_prog", so it can be a program name with args.
34109set dummy $ac_prog; ac_word=$2
34110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34111$as_echo_n "checking for $ac_word... " >&6; }
34112if ${ac_cv_path_LIPO+:} false; then :
34113  $as_echo_n "(cached) " >&6
34114else
34115  case $LIPO in
34116  [\\/]* | ?:[\\/]*)
34117  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34118  ;;
34119  *)
34120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34121for as_dir in $PATH
34122do
34123  IFS=$as_save_IFS
34124  test -z "$as_dir" && as_dir=.
34125    for ac_exec_ext in '' $ac_executable_extensions; do
34126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34127    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34129    break 2
34130  fi
34131done
34132  done
34133IFS=$as_save_IFS
34134
34135  ;;
34136esac
34137fi
34138LIPO=$ac_cv_path_LIPO
34139if test -n "$LIPO"; then
34140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34141$as_echo "$LIPO" >&6; }
34142else
34143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34144$as_echo "no" >&6; }
34145fi
34146
34147
34148  test -n "$LIPO" && break
34149done
34150
34151    else
34152      # If it succeeded, then it was overridden by the user. We will use it
34153      # for the tool.
34154
34155      # First remove it from the list of overridden variables, so we can test
34156      # for unknown variables in the end.
34157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34158
34159      # Check if the provided tool contains a complete path.
34160      tool_specified="$LIPO"
34161      tool_basename="${tool_specified##*/}"
34162      if test "x$tool_basename" = "x$tool_specified"; then
34163        # A command without a complete path is provided, search $PATH.
34164        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34165$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34166        # Extract the first word of "$tool_basename", so it can be a program name with args.
34167set dummy $tool_basename; ac_word=$2
34168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34169$as_echo_n "checking for $ac_word... " >&6; }
34170if ${ac_cv_path_LIPO+:} false; then :
34171  $as_echo_n "(cached) " >&6
34172else
34173  case $LIPO in
34174  [\\/]* | ?:[\\/]*)
34175  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34176  ;;
34177  *)
34178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34179for as_dir in $PATH
34180do
34181  IFS=$as_save_IFS
34182  test -z "$as_dir" && as_dir=.
34183    for ac_exec_ext in '' $ac_executable_extensions; do
34184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34185    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34187    break 2
34188  fi
34189done
34190  done
34191IFS=$as_save_IFS
34192
34193  ;;
34194esac
34195fi
34196LIPO=$ac_cv_path_LIPO
34197if test -n "$LIPO"; then
34198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34199$as_echo "$LIPO" >&6; }
34200else
34201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34202$as_echo "no" >&6; }
34203fi
34204
34205
34206        if test "x$LIPO" = x; then
34207          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34208        fi
34209      else
34210        # Otherwise we believe it is a complete path. Use it as it is.
34211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34212$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34214$as_echo_n "checking for LIPO... " >&6; }
34215        if test ! -x "$tool_specified"; then
34216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34217$as_echo "not found" >&6; }
34218          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34219        fi
34220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34221$as_echo "$tool_specified" >&6; }
34222      fi
34223    fi
34224  fi
34225
34226
34227
34228  # Only process if variable expands to non-empty
34229
34230  if test "x$LIPO" != x; then
34231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34232
34233  # First separate the path from the arguments. This will split at the first
34234  # space.
34235  complete="$LIPO"
34236  path="${complete%% *}"
34237  tmp="$complete EOL"
34238  arguments="${tmp#* }"
34239
34240  # Input might be given as Windows format, start by converting to
34241  # unix format.
34242  new_path=`$CYGPATH -u "$path"`
34243
34244  # Now try to locate executable using which
34245  new_path=`$WHICH "$new_path" 2> /dev/null`
34246  # bat and cmd files are not always considered executable in cygwin causing which
34247  # to not find them
34248  if test "x$new_path" = x \
34249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34251    new_path=`$CYGPATH -u "$path"`
34252  fi
34253  if test "x$new_path" = x; then
34254    # Oops. Which didn't find the executable.
34255    # The splitting of arguments from the executable at a space might have been incorrect,
34256    # since paths with space are more likely in Windows. Give it another try with the whole
34257    # argument.
34258    path="$complete"
34259    arguments="EOL"
34260    new_path=`$CYGPATH -u "$path"`
34261    new_path=`$WHICH "$new_path" 2> /dev/null`
34262    # bat and cmd files are not always considered executable in cygwin causing which
34263    # to not find them
34264    if test "x$new_path" = x \
34265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34267      new_path=`$CYGPATH -u "$path"`
34268    fi
34269    if test "x$new_path" = x; then
34270      # It's still not found. Now this is an unrecoverable error.
34271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34272$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34273      has_space=`$ECHO "$complete" | $GREP " "`
34274      if test "x$has_space" != x; then
34275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34277      fi
34278      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34279    fi
34280  fi
34281
34282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34285  # "foo.exe" is OK but "foo" is an error.
34286  #
34287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34288  # It is also a way to make sure we got the proper file name for the real test later on.
34289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34290  if test "x$test_shortpath" = x; then
34291    # Short path failed, file does not exist as specified.
34292    # Try adding .exe or .cmd
34293    if test -f "${new_path}.exe"; then
34294      input_to_shortpath="${new_path}.exe"
34295    elif test -f "${new_path}.cmd"; then
34296      input_to_shortpath="${new_path}.cmd"
34297    else
34298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34299$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34302      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34303    fi
34304  else
34305    input_to_shortpath="$new_path"
34306  fi
34307
34308  # Call helper function which possibly converts this using DOS-style short mode.
34309  # If so, the updated path is stored in $new_path.
34310  new_path="$input_to_shortpath"
34311
34312  input_path="$input_to_shortpath"
34313  # Check if we need to convert this using DOS-style short mode. If the path
34314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34315  # take no chances and rewrite it.
34316  # Note: m4 eats our [], so we need to use [ and ] instead.
34317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34318  if test "x$has_forbidden_chars" != x; then
34319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34323      # Going to short mode and back again did indeed matter. Since short mode is
34324      # case insensitive, let's make it lowercase to improve readability.
34325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34326      # Now convert it back to Unix-style (cygpath)
34327      input_path=`$CYGPATH -u "$shortmode_path"`
34328      new_path="$input_path"
34329    fi
34330  fi
34331
34332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34333  if test "x$test_cygdrive_prefix" = x; then
34334    # As a simple fix, exclude /usr/bin since it's not a real path.
34335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34337      # a path prefixed by /cygdrive for fixpath to work.
34338      new_path="$CYGWIN_ROOT_PATH$input_path"
34339    fi
34340  fi
34341
34342  # remove trailing .exe if any
34343  new_path="${new_path/%.exe/}"
34344
34345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34346
34347  # First separate the path from the arguments. This will split at the first
34348  # space.
34349  complete="$LIPO"
34350  path="${complete%% *}"
34351  tmp="$complete EOL"
34352  arguments="${tmp#* }"
34353
34354  # Input might be given as Windows format, start by converting to
34355  # unix format.
34356  new_path="$path"
34357
34358  windows_path="$new_path"
34359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34360    unix_path=`$CYGPATH -u "$windows_path"`
34361    new_path="$unix_path"
34362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34364    new_path="$unix_path"
34365  fi
34366
34367
34368  # Now try to locate executable using which
34369  new_path=`$WHICH "$new_path" 2> /dev/null`
34370
34371  if test "x$new_path" = x; then
34372    # Oops. Which didn't find the executable.
34373    # The splitting of arguments from the executable at a space might have been incorrect,
34374    # since paths with space are more likely in Windows. Give it another try with the whole
34375    # argument.
34376    path="$complete"
34377    arguments="EOL"
34378    new_path="$path"
34379
34380  windows_path="$new_path"
34381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34382    unix_path=`$CYGPATH -u "$windows_path"`
34383    new_path="$unix_path"
34384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34386    new_path="$unix_path"
34387  fi
34388
34389
34390    new_path=`$WHICH "$new_path" 2> /dev/null`
34391    # bat and cmd files are not always considered executable in MSYS causing which
34392    # to not find them
34393    if test "x$new_path" = x \
34394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34396      new_path="$path"
34397
34398  windows_path="$new_path"
34399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34400    unix_path=`$CYGPATH -u "$windows_path"`
34401    new_path="$unix_path"
34402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34404    new_path="$unix_path"
34405  fi
34406
34407    fi
34408
34409    if test "x$new_path" = x; then
34410      # It's still not found. Now this is an unrecoverable error.
34411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34412$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34413      has_space=`$ECHO "$complete" | $GREP " "`
34414      if test "x$has_space" != x; then
34415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34417      fi
34418      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34419    fi
34420  fi
34421
34422  # Now new_path has a complete unix path to the binary
34423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34424    # Keep paths in /bin as-is, but remove trailing .exe if any
34425    new_path="${new_path/%.exe/}"
34426    # Do not save /bin paths to all_fixpath_prefixes!
34427  else
34428    # Not in mixed or Windows style, start by that.
34429    new_path=`cmd //c echo $new_path`
34430
34431  input_path="$new_path"
34432  # Check if we need to convert this using DOS-style short mode. If the path
34433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34434  # take no chances and rewrite it.
34435  # Note: m4 eats our [], so we need to use [ and ] instead.
34436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34437  if test "x$has_forbidden_chars" != x; then
34438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34440  fi
34441
34442    # Output is in $new_path
34443
34444  windows_path="$new_path"
34445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34446    unix_path=`$CYGPATH -u "$windows_path"`
34447    new_path="$unix_path"
34448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34450    new_path="$unix_path"
34451  fi
34452
34453    # remove trailing .exe if any
34454    new_path="${new_path/%.exe/}"
34455
34456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34458  fi
34459
34460    else
34461      # We're on a unix platform. Hooray! :)
34462      # First separate the path from the arguments. This will split at the first
34463      # space.
34464      complete="$LIPO"
34465      path="${complete%% *}"
34466      tmp="$complete EOL"
34467      arguments="${tmp#* }"
34468
34469      # Cannot rely on the command "which" here since it doesn't always work.
34470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34471      if test -z "$is_absolute_path"; then
34472        # Path to executable is not absolute. Find it.
34473        IFS_save="$IFS"
34474        IFS=:
34475        for p in $PATH; do
34476          if test -f "$p/$path" && test -x "$p/$path"; then
34477            new_path="$p/$path"
34478            break
34479          fi
34480        done
34481        IFS="$IFS_save"
34482      else
34483        # This is an absolute path, we can use it without further modifications.
34484        new_path="$path"
34485      fi
34486
34487      if test "x$new_path" = x; then
34488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34489$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34490        has_space=`$ECHO "$complete" | $GREP " "`
34491        if test "x$has_space" != x; then
34492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34494        fi
34495        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34496      fi
34497    fi
34498
34499    # Now join together the path and the arguments once again
34500    if test "x$arguments" != xEOL; then
34501      new_complete="$new_path ${arguments% *}"
34502    else
34503      new_complete="$new_path"
34504    fi
34505
34506    if test "x$complete" != "x$new_complete"; then
34507      LIPO="$new_complete"
34508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34509$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34510    fi
34511  fi
34512
34513  fi
34514
34515  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34516    # Extract the first word of "mt", so it can be a program name with args.
34517set dummy mt; ac_word=$2
34518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34519$as_echo_n "checking for $ac_word... " >&6; }
34520if ${ac_cv_prog_MT+:} false; then :
34521  $as_echo_n "(cached) " >&6
34522else
34523  if test -n "$MT"; then
34524  ac_cv_prog_MT="$MT" # Let the user override the test.
34525else
34526  ac_prog_rejected=no
34527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34528for as_dir in $PATH
34529do
34530  IFS=$as_save_IFS
34531  test -z "$as_dir" && as_dir=.
34532    for ac_exec_ext in '' $ac_executable_extensions; do
34533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34534    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34535       ac_prog_rejected=yes
34536       continue
34537     fi
34538    ac_cv_prog_MT="mt"
34539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34540    break 2
34541  fi
34542done
34543  done
34544IFS=$as_save_IFS
34545
34546if test $ac_prog_rejected = yes; then
34547  # We found a bogon in the path, so make sure we never use it.
34548  set dummy $ac_cv_prog_MT
34549  shift
34550  if test $# != 0; then
34551    # We chose a different compiler from the bogus one.
34552    # However, it has the same basename, so the bogon will be chosen
34553    # first if we set MT to just the basename; use the full file name.
34554    shift
34555    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34556  fi
34557fi
34558fi
34559fi
34560MT=$ac_cv_prog_MT
34561if test -n "$MT"; then
34562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34563$as_echo "$MT" >&6; }
34564else
34565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34566$as_echo "no" >&6; }
34567fi
34568
34569
34570
34571  # Only process if variable expands to non-empty
34572
34573  if test "x$MT" != x; then
34574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34575
34576  # First separate the path from the arguments. This will split at the first
34577  # space.
34578  complete="$MT"
34579  path="${complete%% *}"
34580  tmp="$complete EOL"
34581  arguments="${tmp#* }"
34582
34583  # Input might be given as Windows format, start by converting to
34584  # unix format.
34585  new_path=`$CYGPATH -u "$path"`
34586
34587  # Now try to locate executable using which
34588  new_path=`$WHICH "$new_path" 2> /dev/null`
34589  # bat and cmd files are not always considered executable in cygwin causing which
34590  # to not find them
34591  if test "x$new_path" = x \
34592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34594    new_path=`$CYGPATH -u "$path"`
34595  fi
34596  if test "x$new_path" = x; then
34597    # Oops. Which didn't find the executable.
34598    # The splitting of arguments from the executable at a space might have been incorrect,
34599    # since paths with space are more likely in Windows. Give it another try with the whole
34600    # argument.
34601    path="$complete"
34602    arguments="EOL"
34603    new_path=`$CYGPATH -u "$path"`
34604    new_path=`$WHICH "$new_path" 2> /dev/null`
34605    # bat and cmd files are not always considered executable in cygwin causing which
34606    # to not find them
34607    if test "x$new_path" = x \
34608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34610      new_path=`$CYGPATH -u "$path"`
34611    fi
34612    if test "x$new_path" = x; then
34613      # It's still not found. Now this is an unrecoverable error.
34614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34615$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34616      has_space=`$ECHO "$complete" | $GREP " "`
34617      if test "x$has_space" != x; then
34618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34620      fi
34621      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34622    fi
34623  fi
34624
34625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34628  # "foo.exe" is OK but "foo" is an error.
34629  #
34630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34631  # It is also a way to make sure we got the proper file name for the real test later on.
34632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34633  if test "x$test_shortpath" = x; then
34634    # Short path failed, file does not exist as specified.
34635    # Try adding .exe or .cmd
34636    if test -f "${new_path}.exe"; then
34637      input_to_shortpath="${new_path}.exe"
34638    elif test -f "${new_path}.cmd"; then
34639      input_to_shortpath="${new_path}.cmd"
34640    else
34641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34642$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34645      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34646    fi
34647  else
34648    input_to_shortpath="$new_path"
34649  fi
34650
34651  # Call helper function which possibly converts this using DOS-style short mode.
34652  # If so, the updated path is stored in $new_path.
34653  new_path="$input_to_shortpath"
34654
34655  input_path="$input_to_shortpath"
34656  # Check if we need to convert this using DOS-style short mode. If the path
34657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34658  # take no chances and rewrite it.
34659  # Note: m4 eats our [], so we need to use [ and ] instead.
34660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34661  if test "x$has_forbidden_chars" != x; then
34662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34666      # Going to short mode and back again did indeed matter. Since short mode is
34667      # case insensitive, let's make it lowercase to improve readability.
34668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34669      # Now convert it back to Unix-style (cygpath)
34670      input_path=`$CYGPATH -u "$shortmode_path"`
34671      new_path="$input_path"
34672    fi
34673  fi
34674
34675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34676  if test "x$test_cygdrive_prefix" = x; then
34677    # As a simple fix, exclude /usr/bin since it's not a real path.
34678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34680      # a path prefixed by /cygdrive for fixpath to work.
34681      new_path="$CYGWIN_ROOT_PATH$input_path"
34682    fi
34683  fi
34684
34685  # remove trailing .exe if any
34686  new_path="${new_path/%.exe/}"
34687
34688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34689
34690  # First separate the path from the arguments. This will split at the first
34691  # space.
34692  complete="$MT"
34693  path="${complete%% *}"
34694  tmp="$complete EOL"
34695  arguments="${tmp#* }"
34696
34697  # Input might be given as Windows format, start by converting to
34698  # unix format.
34699  new_path="$path"
34700
34701  windows_path="$new_path"
34702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34703    unix_path=`$CYGPATH -u "$windows_path"`
34704    new_path="$unix_path"
34705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34707    new_path="$unix_path"
34708  fi
34709
34710
34711  # Now try to locate executable using which
34712  new_path=`$WHICH "$new_path" 2> /dev/null`
34713
34714  if test "x$new_path" = x; then
34715    # Oops. Which didn't find the executable.
34716    # The splitting of arguments from the executable at a space might have been incorrect,
34717    # since paths with space are more likely in Windows. Give it another try with the whole
34718    # argument.
34719    path="$complete"
34720    arguments="EOL"
34721    new_path="$path"
34722
34723  windows_path="$new_path"
34724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34725    unix_path=`$CYGPATH -u "$windows_path"`
34726    new_path="$unix_path"
34727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34729    new_path="$unix_path"
34730  fi
34731
34732
34733    new_path=`$WHICH "$new_path" 2> /dev/null`
34734    # bat and cmd files are not always considered executable in MSYS causing which
34735    # to not find them
34736    if test "x$new_path" = x \
34737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34739      new_path="$path"
34740
34741  windows_path="$new_path"
34742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34743    unix_path=`$CYGPATH -u "$windows_path"`
34744    new_path="$unix_path"
34745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34747    new_path="$unix_path"
34748  fi
34749
34750    fi
34751
34752    if test "x$new_path" = x; then
34753      # It's still not found. Now this is an unrecoverable error.
34754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34755$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34756      has_space=`$ECHO "$complete" | $GREP " "`
34757      if test "x$has_space" != x; then
34758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34760      fi
34761      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34762    fi
34763  fi
34764
34765  # Now new_path has a complete unix path to the binary
34766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34767    # Keep paths in /bin as-is, but remove trailing .exe if any
34768    new_path="${new_path/%.exe/}"
34769    # Do not save /bin paths to all_fixpath_prefixes!
34770  else
34771    # Not in mixed or Windows style, start by that.
34772    new_path=`cmd //c echo $new_path`
34773
34774  input_path="$new_path"
34775  # Check if we need to convert this using DOS-style short mode. If the path
34776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34777  # take no chances and rewrite it.
34778  # Note: m4 eats our [], so we need to use [ and ] instead.
34779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34780  if test "x$has_forbidden_chars" != x; then
34781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34783  fi
34784
34785    # Output is in $new_path
34786
34787  windows_path="$new_path"
34788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34789    unix_path=`$CYGPATH -u "$windows_path"`
34790    new_path="$unix_path"
34791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34793    new_path="$unix_path"
34794  fi
34795
34796    # remove trailing .exe if any
34797    new_path="${new_path/%.exe/}"
34798
34799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34801  fi
34802
34803    else
34804      # We're on a unix platform. Hooray! :)
34805      # First separate the path from the arguments. This will split at the first
34806      # space.
34807      complete="$MT"
34808      path="${complete%% *}"
34809      tmp="$complete EOL"
34810      arguments="${tmp#* }"
34811
34812      # Cannot rely on the command "which" here since it doesn't always work.
34813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34814      if test -z "$is_absolute_path"; then
34815        # Path to executable is not absolute. Find it.
34816        IFS_save="$IFS"
34817        IFS=:
34818        for p in $PATH; do
34819          if test -f "$p/$path" && test -x "$p/$path"; then
34820            new_path="$p/$path"
34821            break
34822          fi
34823        done
34824        IFS="$IFS_save"
34825      else
34826        # This is an absolute path, we can use it without further modifications.
34827        new_path="$path"
34828      fi
34829
34830      if test "x$new_path" = x; then
34831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34832$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34833        has_space=`$ECHO "$complete" | $GREP " "`
34834        if test "x$has_space" != x; then
34835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34837        fi
34838        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34839      fi
34840    fi
34841
34842    # Now join together the path and the arguments once again
34843    if test "x$arguments" != xEOL; then
34844      new_complete="$new_path ${arguments% *}"
34845    else
34846      new_complete="$new_path"
34847    fi
34848
34849    if test "x$complete" != "x$new_complete"; then
34850      MT="$new_complete"
34851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34852$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34853    fi
34854  fi
34855
34856    # Setup the resource compiler (RC)
34857    # Extract the first word of "rc", so it can be a program name with args.
34858set dummy rc; ac_word=$2
34859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34860$as_echo_n "checking for $ac_word... " >&6; }
34861if ${ac_cv_prog_RC+:} false; then :
34862  $as_echo_n "(cached) " >&6
34863else
34864  if test -n "$RC"; then
34865  ac_cv_prog_RC="$RC" # Let the user override the test.
34866else
34867  ac_prog_rejected=no
34868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34869for as_dir in $PATH
34870do
34871  IFS=$as_save_IFS
34872  test -z "$as_dir" && as_dir=.
34873    for ac_exec_ext in '' $ac_executable_extensions; do
34874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34875    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34876       ac_prog_rejected=yes
34877       continue
34878     fi
34879    ac_cv_prog_RC="rc"
34880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34881    break 2
34882  fi
34883done
34884  done
34885IFS=$as_save_IFS
34886
34887if test $ac_prog_rejected = yes; then
34888  # We found a bogon in the path, so make sure we never use it.
34889  set dummy $ac_cv_prog_RC
34890  shift
34891  if test $# != 0; then
34892    # We chose a different compiler from the bogus one.
34893    # However, it has the same basename, so the bogon will be chosen
34894    # first if we set RC to just the basename; use the full file name.
34895    shift
34896    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34897  fi
34898fi
34899fi
34900fi
34901RC=$ac_cv_prog_RC
34902if test -n "$RC"; then
34903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34904$as_echo "$RC" >&6; }
34905else
34906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34907$as_echo "no" >&6; }
34908fi
34909
34910
34911
34912  # Only process if variable expands to non-empty
34913
34914  if test "x$RC" != x; then
34915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34916
34917  # First separate the path from the arguments. This will split at the first
34918  # space.
34919  complete="$RC"
34920  path="${complete%% *}"
34921  tmp="$complete EOL"
34922  arguments="${tmp#* }"
34923
34924  # Input might be given as Windows format, start by converting to
34925  # unix format.
34926  new_path=`$CYGPATH -u "$path"`
34927
34928  # Now try to locate executable using which
34929  new_path=`$WHICH "$new_path" 2> /dev/null`
34930  # bat and cmd files are not always considered executable in cygwin causing which
34931  # to not find them
34932  if test "x$new_path" = x \
34933      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34934      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34935    new_path=`$CYGPATH -u "$path"`
34936  fi
34937  if test "x$new_path" = x; then
34938    # Oops. Which didn't find the executable.
34939    # The splitting of arguments from the executable at a space might have been incorrect,
34940    # since paths with space are more likely in Windows. Give it another try with the whole
34941    # argument.
34942    path="$complete"
34943    arguments="EOL"
34944    new_path=`$CYGPATH -u "$path"`
34945    new_path=`$WHICH "$new_path" 2> /dev/null`
34946    # bat and cmd files are not always considered executable in cygwin causing which
34947    # to not find them
34948    if test "x$new_path" = x \
34949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34951      new_path=`$CYGPATH -u "$path"`
34952    fi
34953    if test "x$new_path" = x; then
34954      # It's still not found. Now this is an unrecoverable error.
34955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34956$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34957      has_space=`$ECHO "$complete" | $GREP " "`
34958      if test "x$has_space" != x; then
34959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34961      fi
34962      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34963    fi
34964  fi
34965
34966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34969  # "foo.exe" is OK but "foo" is an error.
34970  #
34971  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34972  # It is also a way to make sure we got the proper file name for the real test later on.
34973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34974  if test "x$test_shortpath" = x; then
34975    # Short path failed, file does not exist as specified.
34976    # Try adding .exe or .cmd
34977    if test -f "${new_path}.exe"; then
34978      input_to_shortpath="${new_path}.exe"
34979    elif test -f "${new_path}.cmd"; then
34980      input_to_shortpath="${new_path}.cmd"
34981    else
34982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34983$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34984      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34985$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34986      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34987    fi
34988  else
34989    input_to_shortpath="$new_path"
34990  fi
34991
34992  # Call helper function which possibly converts this using DOS-style short mode.
34993  # If so, the updated path is stored in $new_path.
34994  new_path="$input_to_shortpath"
34995
34996  input_path="$input_to_shortpath"
34997  # Check if we need to convert this using DOS-style short mode. If the path
34998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34999  # take no chances and rewrite it.
35000  # Note: m4 eats our [], so we need to use [ and ] instead.
35001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35002  if test "x$has_forbidden_chars" != x; then
35003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35007      # Going to short mode and back again did indeed matter. Since short mode is
35008      # case insensitive, let's make it lowercase to improve readability.
35009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35010      # Now convert it back to Unix-style (cygpath)
35011      input_path=`$CYGPATH -u "$shortmode_path"`
35012      new_path="$input_path"
35013    fi
35014  fi
35015
35016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35017  if test "x$test_cygdrive_prefix" = x; then
35018    # As a simple fix, exclude /usr/bin since it's not a real path.
35019    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35021      # a path prefixed by /cygdrive for fixpath to work.
35022      new_path="$CYGWIN_ROOT_PATH$input_path"
35023    fi
35024  fi
35025
35026  # remove trailing .exe if any
35027  new_path="${new_path/%.exe/}"
35028
35029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35030
35031  # First separate the path from the arguments. This will split at the first
35032  # space.
35033  complete="$RC"
35034  path="${complete%% *}"
35035  tmp="$complete EOL"
35036  arguments="${tmp#* }"
35037
35038  # Input might be given as Windows format, start by converting to
35039  # unix format.
35040  new_path="$path"
35041
35042  windows_path="$new_path"
35043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35044    unix_path=`$CYGPATH -u "$windows_path"`
35045    new_path="$unix_path"
35046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35048    new_path="$unix_path"
35049  fi
35050
35051
35052  # Now try to locate executable using which
35053  new_path=`$WHICH "$new_path" 2> /dev/null`
35054
35055  if test "x$new_path" = x; then
35056    # Oops. Which didn't find the executable.
35057    # The splitting of arguments from the executable at a space might have been incorrect,
35058    # since paths with space are more likely in Windows. Give it another try with the whole
35059    # argument.
35060    path="$complete"
35061    arguments="EOL"
35062    new_path="$path"
35063
35064  windows_path="$new_path"
35065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35066    unix_path=`$CYGPATH -u "$windows_path"`
35067    new_path="$unix_path"
35068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35070    new_path="$unix_path"
35071  fi
35072
35073
35074    new_path=`$WHICH "$new_path" 2> /dev/null`
35075    # bat and cmd files are not always considered executable in MSYS causing which
35076    # to not find them
35077    if test "x$new_path" = x \
35078        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35079        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35080      new_path="$path"
35081
35082  windows_path="$new_path"
35083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35084    unix_path=`$CYGPATH -u "$windows_path"`
35085    new_path="$unix_path"
35086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35088    new_path="$unix_path"
35089  fi
35090
35091    fi
35092
35093    if test "x$new_path" = x; then
35094      # It's still not found. Now this is an unrecoverable error.
35095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35096$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35097      has_space=`$ECHO "$complete" | $GREP " "`
35098      if test "x$has_space" != x; then
35099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35101      fi
35102      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35103    fi
35104  fi
35105
35106  # Now new_path has a complete unix path to the binary
35107  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35108    # Keep paths in /bin as-is, but remove trailing .exe if any
35109    new_path="${new_path/%.exe/}"
35110    # Do not save /bin paths to all_fixpath_prefixes!
35111  else
35112    # Not in mixed or Windows style, start by that.
35113    new_path=`cmd //c echo $new_path`
35114
35115  input_path="$new_path"
35116  # Check if we need to convert this using DOS-style short mode. If the path
35117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35118  # take no chances and rewrite it.
35119  # Note: m4 eats our [], so we need to use [ and ] instead.
35120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35121  if test "x$has_forbidden_chars" != x; then
35122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35124  fi
35125
35126    # Output is in $new_path
35127
35128  windows_path="$new_path"
35129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35130    unix_path=`$CYGPATH -u "$windows_path"`
35131    new_path="$unix_path"
35132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35134    new_path="$unix_path"
35135  fi
35136
35137    # remove trailing .exe if any
35138    new_path="${new_path/%.exe/}"
35139
35140    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35141    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35142  fi
35143
35144    else
35145      # We're on a unix platform. Hooray! :)
35146      # First separate the path from the arguments. This will split at the first
35147      # space.
35148      complete="$RC"
35149      path="${complete%% *}"
35150      tmp="$complete EOL"
35151      arguments="${tmp#* }"
35152
35153      # Cannot rely on the command "which" here since it doesn't always work.
35154      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35155      if test -z "$is_absolute_path"; then
35156        # Path to executable is not absolute. Find it.
35157        IFS_save="$IFS"
35158        IFS=:
35159        for p in $PATH; do
35160          if test -f "$p/$path" && test -x "$p/$path"; then
35161            new_path="$p/$path"
35162            break
35163          fi
35164        done
35165        IFS="$IFS_save"
35166      else
35167        # This is an absolute path, we can use it without further modifications.
35168        new_path="$path"
35169      fi
35170
35171      if test "x$new_path" = x; then
35172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35173$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35174        has_space=`$ECHO "$complete" | $GREP " "`
35175        if test "x$has_space" != x; then
35176          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35177$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35178        fi
35179        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35180      fi
35181    fi
35182
35183    # Now join together the path and the arguments once again
35184    if test "x$arguments" != xEOL; then
35185      new_complete="$new_path ${arguments% *}"
35186    else
35187      new_complete="$new_path"
35188    fi
35189
35190    if test "x$complete" != "x$new_complete"; then
35191      RC="$new_complete"
35192      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35193$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35194    fi
35195  fi
35196
35197    # Extract the first word of "dumpbin", so it can be a program name with args.
35198set dummy dumpbin; ac_word=$2
35199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35200$as_echo_n "checking for $ac_word... " >&6; }
35201if ${ac_cv_prog_DUMPBIN+:} false; then :
35202  $as_echo_n "(cached) " >&6
35203else
35204  if test -n "$DUMPBIN"; then
35205  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35206else
35207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35208for as_dir in $PATH
35209do
35210  IFS=$as_save_IFS
35211  test -z "$as_dir" && as_dir=.
35212    for ac_exec_ext in '' $ac_executable_extensions; do
35213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35214    ac_cv_prog_DUMPBIN="dumpbin"
35215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35216    break 2
35217  fi
35218done
35219  done
35220IFS=$as_save_IFS
35221
35222fi
35223fi
35224DUMPBIN=$ac_cv_prog_DUMPBIN
35225if test -n "$DUMPBIN"; then
35226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35227$as_echo "$DUMPBIN" >&6; }
35228else
35229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35230$as_echo "no" >&6; }
35231fi
35232
35233
35234
35235  # Only process if variable expands to non-empty
35236
35237  if test "x$DUMPBIN" != x; then
35238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35239
35240  # First separate the path from the arguments. This will split at the first
35241  # space.
35242  complete="$DUMPBIN"
35243  path="${complete%% *}"
35244  tmp="$complete EOL"
35245  arguments="${tmp#* }"
35246
35247  # Input might be given as Windows format, start by converting to
35248  # unix format.
35249  new_path=`$CYGPATH -u "$path"`
35250
35251  # Now try to locate executable using which
35252  new_path=`$WHICH "$new_path" 2> /dev/null`
35253  # bat and cmd files are not always considered executable in cygwin causing which
35254  # to not find them
35255  if test "x$new_path" = x \
35256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35258    new_path=`$CYGPATH -u "$path"`
35259  fi
35260  if test "x$new_path" = x; then
35261    # Oops. Which didn't find the executable.
35262    # The splitting of arguments from the executable at a space might have been incorrect,
35263    # since paths with space are more likely in Windows. Give it another try with the whole
35264    # argument.
35265    path="$complete"
35266    arguments="EOL"
35267    new_path=`$CYGPATH -u "$path"`
35268    new_path=`$WHICH "$new_path" 2> /dev/null`
35269    # bat and cmd files are not always considered executable in cygwin causing which
35270    # to not find them
35271    if test "x$new_path" = x \
35272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35274      new_path=`$CYGPATH -u "$path"`
35275    fi
35276    if test "x$new_path" = x; then
35277      # It's still not found. Now this is an unrecoverable error.
35278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35279$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35280      has_space=`$ECHO "$complete" | $GREP " "`
35281      if test "x$has_space" != x; then
35282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35284      fi
35285      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35286    fi
35287  fi
35288
35289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35292  # "foo.exe" is OK but "foo" is an error.
35293  #
35294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35295  # It is also a way to make sure we got the proper file name for the real test later on.
35296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35297  if test "x$test_shortpath" = x; then
35298    # Short path failed, file does not exist as specified.
35299    # Try adding .exe or .cmd
35300    if test -f "${new_path}.exe"; then
35301      input_to_shortpath="${new_path}.exe"
35302    elif test -f "${new_path}.cmd"; then
35303      input_to_shortpath="${new_path}.cmd"
35304    else
35305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35306$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35309      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35310    fi
35311  else
35312    input_to_shortpath="$new_path"
35313  fi
35314
35315  # Call helper function which possibly converts this using DOS-style short mode.
35316  # If so, the updated path is stored in $new_path.
35317  new_path="$input_to_shortpath"
35318
35319  input_path="$input_to_shortpath"
35320  # Check if we need to convert this using DOS-style short mode. If the path
35321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35322  # take no chances and rewrite it.
35323  # Note: m4 eats our [], so we need to use [ and ] instead.
35324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35325  if test "x$has_forbidden_chars" != x; then
35326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35330      # Going to short mode and back again did indeed matter. Since short mode is
35331      # case insensitive, let's make it lowercase to improve readability.
35332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35333      # Now convert it back to Unix-style (cygpath)
35334      input_path=`$CYGPATH -u "$shortmode_path"`
35335      new_path="$input_path"
35336    fi
35337  fi
35338
35339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35340  if test "x$test_cygdrive_prefix" = x; then
35341    # As a simple fix, exclude /usr/bin since it's not a real path.
35342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35344      # a path prefixed by /cygdrive for fixpath to work.
35345      new_path="$CYGWIN_ROOT_PATH$input_path"
35346    fi
35347  fi
35348
35349  # remove trailing .exe if any
35350  new_path="${new_path/%.exe/}"
35351
35352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35353
35354  # First separate the path from the arguments. This will split at the first
35355  # space.
35356  complete="$DUMPBIN"
35357  path="${complete%% *}"
35358  tmp="$complete EOL"
35359  arguments="${tmp#* }"
35360
35361  # Input might be given as Windows format, start by converting to
35362  # unix format.
35363  new_path="$path"
35364
35365  windows_path="$new_path"
35366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35367    unix_path=`$CYGPATH -u "$windows_path"`
35368    new_path="$unix_path"
35369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35371    new_path="$unix_path"
35372  fi
35373
35374
35375  # Now try to locate executable using which
35376  new_path=`$WHICH "$new_path" 2> /dev/null`
35377
35378  if test "x$new_path" = x; then
35379    # Oops. Which didn't find the executable.
35380    # The splitting of arguments from the executable at a space might have been incorrect,
35381    # since paths with space are more likely in Windows. Give it another try with the whole
35382    # argument.
35383    path="$complete"
35384    arguments="EOL"
35385    new_path="$path"
35386
35387  windows_path="$new_path"
35388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35389    unix_path=`$CYGPATH -u "$windows_path"`
35390    new_path="$unix_path"
35391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35393    new_path="$unix_path"
35394  fi
35395
35396
35397    new_path=`$WHICH "$new_path" 2> /dev/null`
35398    # bat and cmd files are not always considered executable in MSYS causing which
35399    # to not find them
35400    if test "x$new_path" = x \
35401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35403      new_path="$path"
35404
35405  windows_path="$new_path"
35406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35407    unix_path=`$CYGPATH -u "$windows_path"`
35408    new_path="$unix_path"
35409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35411    new_path="$unix_path"
35412  fi
35413
35414    fi
35415
35416    if test "x$new_path" = x; then
35417      # It's still not found. Now this is an unrecoverable error.
35418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35419$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35420      has_space=`$ECHO "$complete" | $GREP " "`
35421      if test "x$has_space" != x; then
35422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35424      fi
35425      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35426    fi
35427  fi
35428
35429  # Now new_path has a complete unix path to the binary
35430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35431    # Keep paths in /bin as-is, but remove trailing .exe if any
35432    new_path="${new_path/%.exe/}"
35433    # Do not save /bin paths to all_fixpath_prefixes!
35434  else
35435    # Not in mixed or Windows style, start by that.
35436    new_path=`cmd //c echo $new_path`
35437
35438  input_path="$new_path"
35439  # Check if we need to convert this using DOS-style short mode. If the path
35440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35441  # take no chances and rewrite it.
35442  # Note: m4 eats our [], so we need to use [ and ] instead.
35443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35444  if test "x$has_forbidden_chars" != x; then
35445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35447  fi
35448
35449    # Output is in $new_path
35450
35451  windows_path="$new_path"
35452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35453    unix_path=`$CYGPATH -u "$windows_path"`
35454    new_path="$unix_path"
35455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35457    new_path="$unix_path"
35458  fi
35459
35460    # remove trailing .exe if any
35461    new_path="${new_path/%.exe/}"
35462
35463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35465  fi
35466
35467    else
35468      # We're on a unix platform. Hooray! :)
35469      # First separate the path from the arguments. This will split at the first
35470      # space.
35471      complete="$DUMPBIN"
35472      path="${complete%% *}"
35473      tmp="$complete EOL"
35474      arguments="${tmp#* }"
35475
35476      # Cannot rely on the command "which" here since it doesn't always work.
35477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35478      if test -z "$is_absolute_path"; then
35479        # Path to executable is not absolute. Find it.
35480        IFS_save="$IFS"
35481        IFS=:
35482        for p in $PATH; do
35483          if test -f "$p/$path" && test -x "$p/$path"; then
35484            new_path="$p/$path"
35485            break
35486          fi
35487        done
35488        IFS="$IFS_save"
35489      else
35490        # This is an absolute path, we can use it without further modifications.
35491        new_path="$path"
35492      fi
35493
35494      if test "x$new_path" = x; then
35495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35496$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35497        has_space=`$ECHO "$complete" | $GREP " "`
35498        if test "x$has_space" != x; then
35499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35501        fi
35502        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35503      fi
35504    fi
35505
35506    # Now join together the path and the arguments once again
35507    if test "x$arguments" != xEOL; then
35508      new_complete="$new_path ${arguments% *}"
35509    else
35510      new_complete="$new_path"
35511    fi
35512
35513    if test "x$complete" != "x$new_complete"; then
35514      DUMPBIN="$new_complete"
35515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35516$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35517    fi
35518  fi
35519
35520    # We need to check for 'msbuild.exe' because at the place where we expect to
35521    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35522    # won't find the 'msbuild.exe' executable in that case (and the
35523    # 'ac_executable_extensions' is unusable due to performance reasons).
35524    # Notice that we intentionally don't fix up the path to MSBUILD because we
35525    # will call it in a DOS shell during freetype detection on Windows (see
35526    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35527    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35528set dummy msbuild.exe; ac_word=$2
35529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35530$as_echo_n "checking for $ac_word... " >&6; }
35531if ${ac_cv_prog_MSBUILD+:} false; then :
35532  $as_echo_n "(cached) " >&6
35533else
35534  if test -n "$MSBUILD"; then
35535  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35536else
35537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35538for as_dir in $PATH
35539do
35540  IFS=$as_save_IFS
35541  test -z "$as_dir" && as_dir=.
35542    for ac_exec_ext in '' $ac_executable_extensions; do
35543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35544    ac_cv_prog_MSBUILD="msbuild.exe"
35545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35546    break 2
35547  fi
35548done
35549  done
35550IFS=$as_save_IFS
35551
35552fi
35553fi
35554MSBUILD=$ac_cv_prog_MSBUILD
35555if test -n "$MSBUILD"; then
35556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35557$as_echo "$MSBUILD" >&6; }
35558else
35559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35560$as_echo "no" >&6; }
35561fi
35562
35563
35564  fi
35565
35566  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35567
35568
35569  # Publish this variable in the help.
35570
35571
35572  if test "x$STRIP" = x; then
35573    # The variable is not set by user, try to locate tool using the code snippet
35574    for ac_prog in strip
35575do
35576  # Extract the first word of "$ac_prog", so it can be a program name with args.
35577set dummy $ac_prog; ac_word=$2
35578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35579$as_echo_n "checking for $ac_word... " >&6; }
35580if ${ac_cv_path_STRIP+:} false; then :
35581  $as_echo_n "(cached) " >&6
35582else
35583  case $STRIP in
35584  [\\/]* | ?:[\\/]*)
35585  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35586  ;;
35587  *)
35588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35589for as_dir in $PATH
35590do
35591  IFS=$as_save_IFS
35592  test -z "$as_dir" && as_dir=.
35593    for ac_exec_ext in '' $ac_executable_extensions; do
35594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35595    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35597    break 2
35598  fi
35599done
35600  done
35601IFS=$as_save_IFS
35602
35603  ;;
35604esac
35605fi
35606STRIP=$ac_cv_path_STRIP
35607if test -n "$STRIP"; then
35608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35609$as_echo "$STRIP" >&6; }
35610else
35611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35612$as_echo "no" >&6; }
35613fi
35614
35615
35616  test -n "$STRIP" && break
35617done
35618
35619  else
35620    # The variable is set, but is it from the command line or the environment?
35621
35622    # Try to remove the string !STRIP! from our list.
35623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35625      # If it failed, the variable was not from the command line. Ignore it,
35626      # but warn the user (except for BASH, which is always set by the calling BASH).
35627      if test "xSTRIP" != xBASH; then
35628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35629$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35630      fi
35631      # Try to locate tool using the code snippet
35632      for ac_prog in strip
35633do
35634  # Extract the first word of "$ac_prog", so it can be a program name with args.
35635set dummy $ac_prog; ac_word=$2
35636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35637$as_echo_n "checking for $ac_word... " >&6; }
35638if ${ac_cv_path_STRIP+:} false; then :
35639  $as_echo_n "(cached) " >&6
35640else
35641  case $STRIP in
35642  [\\/]* | ?:[\\/]*)
35643  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35644  ;;
35645  *)
35646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35647for as_dir in $PATH
35648do
35649  IFS=$as_save_IFS
35650  test -z "$as_dir" && as_dir=.
35651    for ac_exec_ext in '' $ac_executable_extensions; do
35652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35653    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35655    break 2
35656  fi
35657done
35658  done
35659IFS=$as_save_IFS
35660
35661  ;;
35662esac
35663fi
35664STRIP=$ac_cv_path_STRIP
35665if test -n "$STRIP"; then
35666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35667$as_echo "$STRIP" >&6; }
35668else
35669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35670$as_echo "no" >&6; }
35671fi
35672
35673
35674  test -n "$STRIP" && break
35675done
35676
35677    else
35678      # If it succeeded, then it was overridden by the user. We will use it
35679      # for the tool.
35680
35681      # First remove it from the list of overridden variables, so we can test
35682      # for unknown variables in the end.
35683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35684
35685      # Check if the provided tool contains a complete path.
35686      tool_specified="$STRIP"
35687      tool_basename="${tool_specified##*/}"
35688      if test "x$tool_basename" = "x$tool_specified"; then
35689        # A command without a complete path is provided, search $PATH.
35690        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35691$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35692        # Extract the first word of "$tool_basename", so it can be a program name with args.
35693set dummy $tool_basename; ac_word=$2
35694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35695$as_echo_n "checking for $ac_word... " >&6; }
35696if ${ac_cv_path_STRIP+:} false; then :
35697  $as_echo_n "(cached) " >&6
35698else
35699  case $STRIP in
35700  [\\/]* | ?:[\\/]*)
35701  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35702  ;;
35703  *)
35704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35705for as_dir in $PATH
35706do
35707  IFS=$as_save_IFS
35708  test -z "$as_dir" && as_dir=.
35709    for ac_exec_ext in '' $ac_executable_extensions; do
35710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35711    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35713    break 2
35714  fi
35715done
35716  done
35717IFS=$as_save_IFS
35718
35719  ;;
35720esac
35721fi
35722STRIP=$ac_cv_path_STRIP
35723if test -n "$STRIP"; then
35724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35725$as_echo "$STRIP" >&6; }
35726else
35727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35728$as_echo "no" >&6; }
35729fi
35730
35731
35732        if test "x$STRIP" = x; then
35733          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35734        fi
35735      else
35736        # Otherwise we believe it is a complete path. Use it as it is.
35737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35738$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35740$as_echo_n "checking for STRIP... " >&6; }
35741        if test ! -x "$tool_specified"; then
35742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35743$as_echo "not found" >&6; }
35744          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35745        fi
35746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35747$as_echo "$tool_specified" >&6; }
35748      fi
35749    fi
35750  fi
35751
35752
35753
35754  # Only process if variable expands to non-empty
35755
35756  if test "x$STRIP" != x; then
35757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35758
35759  # First separate the path from the arguments. This will split at the first
35760  # space.
35761  complete="$STRIP"
35762  path="${complete%% *}"
35763  tmp="$complete EOL"
35764  arguments="${tmp#* }"
35765
35766  # Input might be given as Windows format, start by converting to
35767  # unix format.
35768  new_path=`$CYGPATH -u "$path"`
35769
35770  # Now try to locate executable using which
35771  new_path=`$WHICH "$new_path" 2> /dev/null`
35772  # bat and cmd files are not always considered executable in cygwin causing which
35773  # to not find them
35774  if test "x$new_path" = x \
35775      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35776      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35777    new_path=`$CYGPATH -u "$path"`
35778  fi
35779  if test "x$new_path" = x; then
35780    # Oops. Which didn't find the executable.
35781    # The splitting of arguments from the executable at a space might have been incorrect,
35782    # since paths with space are more likely in Windows. Give it another try with the whole
35783    # argument.
35784    path="$complete"
35785    arguments="EOL"
35786    new_path=`$CYGPATH -u "$path"`
35787    new_path=`$WHICH "$new_path" 2> /dev/null`
35788    # bat and cmd files are not always considered executable in cygwin causing which
35789    # to not find them
35790    if test "x$new_path" = x \
35791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35793      new_path=`$CYGPATH -u "$path"`
35794    fi
35795    if test "x$new_path" = x; then
35796      # It's still not found. Now this is an unrecoverable error.
35797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35798$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35799      has_space=`$ECHO "$complete" | $GREP " "`
35800      if test "x$has_space" != x; then
35801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35803      fi
35804      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35805    fi
35806  fi
35807
35808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35811  # "foo.exe" is OK but "foo" is an error.
35812  #
35813  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35814  # It is also a way to make sure we got the proper file name for the real test later on.
35815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35816  if test "x$test_shortpath" = x; then
35817    # Short path failed, file does not exist as specified.
35818    # Try adding .exe or .cmd
35819    if test -f "${new_path}.exe"; then
35820      input_to_shortpath="${new_path}.exe"
35821    elif test -f "${new_path}.cmd"; then
35822      input_to_shortpath="${new_path}.cmd"
35823    else
35824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35825$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35826      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35827$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35828      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35829    fi
35830  else
35831    input_to_shortpath="$new_path"
35832  fi
35833
35834  # Call helper function which possibly converts this using DOS-style short mode.
35835  # If so, the updated path is stored in $new_path.
35836  new_path="$input_to_shortpath"
35837
35838  input_path="$input_to_shortpath"
35839  # Check if we need to convert this using DOS-style short mode. If the path
35840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35841  # take no chances and rewrite it.
35842  # Note: m4 eats our [], so we need to use [ and ] instead.
35843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35844  if test "x$has_forbidden_chars" != x; then
35845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35849      # Going to short mode and back again did indeed matter. Since short mode is
35850      # case insensitive, let's make it lowercase to improve readability.
35851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35852      # Now convert it back to Unix-style (cygpath)
35853      input_path=`$CYGPATH -u "$shortmode_path"`
35854      new_path="$input_path"
35855    fi
35856  fi
35857
35858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35859  if test "x$test_cygdrive_prefix" = x; then
35860    # As a simple fix, exclude /usr/bin since it's not a real path.
35861    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35863      # a path prefixed by /cygdrive for fixpath to work.
35864      new_path="$CYGWIN_ROOT_PATH$input_path"
35865    fi
35866  fi
35867
35868  # remove trailing .exe if any
35869  new_path="${new_path/%.exe/}"
35870
35871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35872
35873  # First separate the path from the arguments. This will split at the first
35874  # space.
35875  complete="$STRIP"
35876  path="${complete%% *}"
35877  tmp="$complete EOL"
35878  arguments="${tmp#* }"
35879
35880  # Input might be given as Windows format, start by converting to
35881  # unix format.
35882  new_path="$path"
35883
35884  windows_path="$new_path"
35885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35886    unix_path=`$CYGPATH -u "$windows_path"`
35887    new_path="$unix_path"
35888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35890    new_path="$unix_path"
35891  fi
35892
35893
35894  # Now try to locate executable using which
35895  new_path=`$WHICH "$new_path" 2> /dev/null`
35896
35897  if test "x$new_path" = x; then
35898    # Oops. Which didn't find the executable.
35899    # The splitting of arguments from the executable at a space might have been incorrect,
35900    # since paths with space are more likely in Windows. Give it another try with the whole
35901    # argument.
35902    path="$complete"
35903    arguments="EOL"
35904    new_path="$path"
35905
35906  windows_path="$new_path"
35907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35908    unix_path=`$CYGPATH -u "$windows_path"`
35909    new_path="$unix_path"
35910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35912    new_path="$unix_path"
35913  fi
35914
35915
35916    new_path=`$WHICH "$new_path" 2> /dev/null`
35917    # bat and cmd files are not always considered executable in MSYS causing which
35918    # to not find them
35919    if test "x$new_path" = x \
35920        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35921        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35922      new_path="$path"
35923
35924  windows_path="$new_path"
35925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35926    unix_path=`$CYGPATH -u "$windows_path"`
35927    new_path="$unix_path"
35928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35930    new_path="$unix_path"
35931  fi
35932
35933    fi
35934
35935    if test "x$new_path" = x; then
35936      # It's still not found. Now this is an unrecoverable error.
35937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35938$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35939      has_space=`$ECHO "$complete" | $GREP " "`
35940      if test "x$has_space" != x; then
35941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35943      fi
35944      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35945    fi
35946  fi
35947
35948  # Now new_path has a complete unix path to the binary
35949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35950    # Keep paths in /bin as-is, but remove trailing .exe if any
35951    new_path="${new_path/%.exe/}"
35952    # Do not save /bin paths to all_fixpath_prefixes!
35953  else
35954    # Not in mixed or Windows style, start by that.
35955    new_path=`cmd //c echo $new_path`
35956
35957  input_path="$new_path"
35958  # Check if we need to convert this using DOS-style short mode. If the path
35959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35960  # take no chances and rewrite it.
35961  # Note: m4 eats our [], so we need to use [ and ] instead.
35962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35963  if test "x$has_forbidden_chars" != x; then
35964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35966  fi
35967
35968    # Output is in $new_path
35969
35970  windows_path="$new_path"
35971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35972    unix_path=`$CYGPATH -u "$windows_path"`
35973    new_path="$unix_path"
35974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35976    new_path="$unix_path"
35977  fi
35978
35979    # remove trailing .exe if any
35980    new_path="${new_path/%.exe/}"
35981
35982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35984  fi
35985
35986    else
35987      # We're on a unix platform. Hooray! :)
35988      # First separate the path from the arguments. This will split at the first
35989      # space.
35990      complete="$STRIP"
35991      path="${complete%% *}"
35992      tmp="$complete EOL"
35993      arguments="${tmp#* }"
35994
35995      # Cannot rely on the command "which" here since it doesn't always work.
35996      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35997      if test -z "$is_absolute_path"; then
35998        # Path to executable is not absolute. Find it.
35999        IFS_save="$IFS"
36000        IFS=:
36001        for p in $PATH; do
36002          if test -f "$p/$path" && test -x "$p/$path"; then
36003            new_path="$p/$path"
36004            break
36005          fi
36006        done
36007        IFS="$IFS_save"
36008      else
36009        # This is an absolute path, we can use it without further modifications.
36010        new_path="$path"
36011      fi
36012
36013      if test "x$new_path" = x; then
36014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36015$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36016        has_space=`$ECHO "$complete" | $GREP " "`
36017        if test "x$has_space" != x; then
36018          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36019$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36020        fi
36021        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36022      fi
36023    fi
36024
36025    # Now join together the path and the arguments once again
36026    if test "x$arguments" != xEOL; then
36027      new_complete="$new_path ${arguments% *}"
36028    else
36029      new_complete="$new_path"
36030    fi
36031
36032    if test "x$complete" != "x$new_complete"; then
36033      STRIP="$new_complete"
36034      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36035$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36036    fi
36037  fi
36038
36039
36040
36041  # Publish this variable in the help.
36042
36043
36044  if test "x$NM" = x; then
36045    # The variable is not set by user, try to locate tool using the code snippet
36046    for ac_prog in nm
36047do
36048  # Extract the first word of "$ac_prog", so it can be a program name with args.
36049set dummy $ac_prog; ac_word=$2
36050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36051$as_echo_n "checking for $ac_word... " >&6; }
36052if ${ac_cv_path_NM+:} false; then :
36053  $as_echo_n "(cached) " >&6
36054else
36055  case $NM in
36056  [\\/]* | ?:[\\/]*)
36057  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36058  ;;
36059  *)
36060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36061for as_dir in $PATH
36062do
36063  IFS=$as_save_IFS
36064  test -z "$as_dir" && as_dir=.
36065    for ac_exec_ext in '' $ac_executable_extensions; do
36066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36067    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36069    break 2
36070  fi
36071done
36072  done
36073IFS=$as_save_IFS
36074
36075  ;;
36076esac
36077fi
36078NM=$ac_cv_path_NM
36079if test -n "$NM"; then
36080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36081$as_echo "$NM" >&6; }
36082else
36083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36084$as_echo "no" >&6; }
36085fi
36086
36087
36088  test -n "$NM" && break
36089done
36090
36091  else
36092    # The variable is set, but is it from the command line or the environment?
36093
36094    # Try to remove the string !NM! from our list.
36095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36097      # If it failed, the variable was not from the command line. Ignore it,
36098      # but warn the user (except for BASH, which is always set by the calling BASH).
36099      if test "xNM" != xBASH; then
36100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36101$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36102      fi
36103      # Try to locate tool using the code snippet
36104      for ac_prog in nm
36105do
36106  # Extract the first word of "$ac_prog", so it can be a program name with args.
36107set dummy $ac_prog; ac_word=$2
36108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36109$as_echo_n "checking for $ac_word... " >&6; }
36110if ${ac_cv_path_NM+:} false; then :
36111  $as_echo_n "(cached) " >&6
36112else
36113  case $NM in
36114  [\\/]* | ?:[\\/]*)
36115  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36116  ;;
36117  *)
36118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36119for as_dir in $PATH
36120do
36121  IFS=$as_save_IFS
36122  test -z "$as_dir" && as_dir=.
36123    for ac_exec_ext in '' $ac_executable_extensions; do
36124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36125    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36127    break 2
36128  fi
36129done
36130  done
36131IFS=$as_save_IFS
36132
36133  ;;
36134esac
36135fi
36136NM=$ac_cv_path_NM
36137if test -n "$NM"; then
36138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36139$as_echo "$NM" >&6; }
36140else
36141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36142$as_echo "no" >&6; }
36143fi
36144
36145
36146  test -n "$NM" && break
36147done
36148
36149    else
36150      # If it succeeded, then it was overridden by the user. We will use it
36151      # for the tool.
36152
36153      # First remove it from the list of overridden variables, so we can test
36154      # for unknown variables in the end.
36155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36156
36157      # Check if the provided tool contains a complete path.
36158      tool_specified="$NM"
36159      tool_basename="${tool_specified##*/}"
36160      if test "x$tool_basename" = "x$tool_specified"; then
36161        # A command without a complete path is provided, search $PATH.
36162        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36163$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36164        # Extract the first word of "$tool_basename", so it can be a program name with args.
36165set dummy $tool_basename; ac_word=$2
36166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36167$as_echo_n "checking for $ac_word... " >&6; }
36168if ${ac_cv_path_NM+:} false; then :
36169  $as_echo_n "(cached) " >&6
36170else
36171  case $NM in
36172  [\\/]* | ?:[\\/]*)
36173  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36174  ;;
36175  *)
36176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36177for as_dir in $PATH
36178do
36179  IFS=$as_save_IFS
36180  test -z "$as_dir" && as_dir=.
36181    for ac_exec_ext in '' $ac_executable_extensions; do
36182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36183    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36185    break 2
36186  fi
36187done
36188  done
36189IFS=$as_save_IFS
36190
36191  ;;
36192esac
36193fi
36194NM=$ac_cv_path_NM
36195if test -n "$NM"; then
36196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36197$as_echo "$NM" >&6; }
36198else
36199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36200$as_echo "no" >&6; }
36201fi
36202
36203
36204        if test "x$NM" = x; then
36205          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36206        fi
36207      else
36208        # Otherwise we believe it is a complete path. Use it as it is.
36209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36210$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36212$as_echo_n "checking for NM... " >&6; }
36213        if test ! -x "$tool_specified"; then
36214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36215$as_echo "not found" >&6; }
36216          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36217        fi
36218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36219$as_echo "$tool_specified" >&6; }
36220      fi
36221    fi
36222  fi
36223
36224
36225
36226  # Only process if variable expands to non-empty
36227
36228  if test "x$NM" != x; then
36229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36230
36231  # First separate the path from the arguments. This will split at the first
36232  # space.
36233  complete="$NM"
36234  path="${complete%% *}"
36235  tmp="$complete EOL"
36236  arguments="${tmp#* }"
36237
36238  # Input might be given as Windows format, start by converting to
36239  # unix format.
36240  new_path=`$CYGPATH -u "$path"`
36241
36242  # Now try to locate executable using which
36243  new_path=`$WHICH "$new_path" 2> /dev/null`
36244  # bat and cmd files are not always considered executable in cygwin causing which
36245  # to not find them
36246  if test "x$new_path" = x \
36247      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36248      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36249    new_path=`$CYGPATH -u "$path"`
36250  fi
36251  if test "x$new_path" = x; then
36252    # Oops. Which didn't find the executable.
36253    # The splitting of arguments from the executable at a space might have been incorrect,
36254    # since paths with space are more likely in Windows. Give it another try with the whole
36255    # argument.
36256    path="$complete"
36257    arguments="EOL"
36258    new_path=`$CYGPATH -u "$path"`
36259    new_path=`$WHICH "$new_path" 2> /dev/null`
36260    # bat and cmd files are not always considered executable in cygwin causing which
36261    # to not find them
36262    if test "x$new_path" = x \
36263        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36264        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36265      new_path=`$CYGPATH -u "$path"`
36266    fi
36267    if test "x$new_path" = x; then
36268      # It's still not found. Now this is an unrecoverable error.
36269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36270$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36271      has_space=`$ECHO "$complete" | $GREP " "`
36272      if test "x$has_space" != x; then
36273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36275      fi
36276      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36277    fi
36278  fi
36279
36280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36283  # "foo.exe" is OK but "foo" is an error.
36284  #
36285  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36286  # It is also a way to make sure we got the proper file name for the real test later on.
36287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36288  if test "x$test_shortpath" = x; then
36289    # Short path failed, file does not exist as specified.
36290    # Try adding .exe or .cmd
36291    if test -f "${new_path}.exe"; then
36292      input_to_shortpath="${new_path}.exe"
36293    elif test -f "${new_path}.cmd"; then
36294      input_to_shortpath="${new_path}.cmd"
36295    else
36296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36297$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36300      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36301    fi
36302  else
36303    input_to_shortpath="$new_path"
36304  fi
36305
36306  # Call helper function which possibly converts this using DOS-style short mode.
36307  # If so, the updated path is stored in $new_path.
36308  new_path="$input_to_shortpath"
36309
36310  input_path="$input_to_shortpath"
36311  # Check if we need to convert this using DOS-style short mode. If the path
36312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36313  # take no chances and rewrite it.
36314  # Note: m4 eats our [], so we need to use [ and ] instead.
36315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36316  if test "x$has_forbidden_chars" != x; then
36317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36321      # Going to short mode and back again did indeed matter. Since short mode is
36322      # case insensitive, let's make it lowercase to improve readability.
36323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36324      # Now convert it back to Unix-style (cygpath)
36325      input_path=`$CYGPATH -u "$shortmode_path"`
36326      new_path="$input_path"
36327    fi
36328  fi
36329
36330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36331  if test "x$test_cygdrive_prefix" = x; then
36332    # As a simple fix, exclude /usr/bin since it's not a real path.
36333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36335      # a path prefixed by /cygdrive for fixpath to work.
36336      new_path="$CYGWIN_ROOT_PATH$input_path"
36337    fi
36338  fi
36339
36340  # remove trailing .exe if any
36341  new_path="${new_path/%.exe/}"
36342
36343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36344
36345  # First separate the path from the arguments. This will split at the first
36346  # space.
36347  complete="$NM"
36348  path="${complete%% *}"
36349  tmp="$complete EOL"
36350  arguments="${tmp#* }"
36351
36352  # Input might be given as Windows format, start by converting to
36353  # unix format.
36354  new_path="$path"
36355
36356  windows_path="$new_path"
36357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36358    unix_path=`$CYGPATH -u "$windows_path"`
36359    new_path="$unix_path"
36360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36362    new_path="$unix_path"
36363  fi
36364
36365
36366  # Now try to locate executable using which
36367  new_path=`$WHICH "$new_path" 2> /dev/null`
36368
36369  if test "x$new_path" = x; then
36370    # Oops. Which didn't find the executable.
36371    # The splitting of arguments from the executable at a space might have been incorrect,
36372    # since paths with space are more likely in Windows. Give it another try with the whole
36373    # argument.
36374    path="$complete"
36375    arguments="EOL"
36376    new_path="$path"
36377
36378  windows_path="$new_path"
36379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36380    unix_path=`$CYGPATH -u "$windows_path"`
36381    new_path="$unix_path"
36382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36384    new_path="$unix_path"
36385  fi
36386
36387
36388    new_path=`$WHICH "$new_path" 2> /dev/null`
36389    # bat and cmd files are not always considered executable in MSYS causing which
36390    # to not find them
36391    if test "x$new_path" = x \
36392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36394      new_path="$path"
36395
36396  windows_path="$new_path"
36397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36398    unix_path=`$CYGPATH -u "$windows_path"`
36399    new_path="$unix_path"
36400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36402    new_path="$unix_path"
36403  fi
36404
36405    fi
36406
36407    if test "x$new_path" = x; then
36408      # It's still not found. Now this is an unrecoverable error.
36409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36410$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36411      has_space=`$ECHO "$complete" | $GREP " "`
36412      if test "x$has_space" != x; then
36413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36415      fi
36416      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36417    fi
36418  fi
36419
36420  # Now new_path has a complete unix path to the binary
36421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36422    # Keep paths in /bin as-is, but remove trailing .exe if any
36423    new_path="${new_path/%.exe/}"
36424    # Do not save /bin paths to all_fixpath_prefixes!
36425  else
36426    # Not in mixed or Windows style, start by that.
36427    new_path=`cmd //c echo $new_path`
36428
36429  input_path="$new_path"
36430  # Check if we need to convert this using DOS-style short mode. If the path
36431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36432  # take no chances and rewrite it.
36433  # Note: m4 eats our [], so we need to use [ and ] instead.
36434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36435  if test "x$has_forbidden_chars" != x; then
36436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36438  fi
36439
36440    # Output is in $new_path
36441
36442  windows_path="$new_path"
36443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36444    unix_path=`$CYGPATH -u "$windows_path"`
36445    new_path="$unix_path"
36446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36448    new_path="$unix_path"
36449  fi
36450
36451    # remove trailing .exe if any
36452    new_path="${new_path/%.exe/}"
36453
36454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36456  fi
36457
36458    else
36459      # We're on a unix platform. Hooray! :)
36460      # First separate the path from the arguments. This will split at the first
36461      # space.
36462      complete="$NM"
36463      path="${complete%% *}"
36464      tmp="$complete EOL"
36465      arguments="${tmp#* }"
36466
36467      # Cannot rely on the command "which" here since it doesn't always work.
36468      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36469      if test -z "$is_absolute_path"; then
36470        # Path to executable is not absolute. Find it.
36471        IFS_save="$IFS"
36472        IFS=:
36473        for p in $PATH; do
36474          if test -f "$p/$path" && test -x "$p/$path"; then
36475            new_path="$p/$path"
36476            break
36477          fi
36478        done
36479        IFS="$IFS_save"
36480      else
36481        # This is an absolute path, we can use it without further modifications.
36482        new_path="$path"
36483      fi
36484
36485      if test "x$new_path" = x; then
36486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36487$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36488        has_space=`$ECHO "$complete" | $GREP " "`
36489        if test "x$has_space" != x; then
36490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36492        fi
36493        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36494      fi
36495    fi
36496
36497    # Now join together the path and the arguments once again
36498    if test "x$arguments" != xEOL; then
36499      new_complete="$new_path ${arguments% *}"
36500    else
36501      new_complete="$new_path"
36502    fi
36503
36504    if test "x$complete" != "x$new_complete"; then
36505      NM="$new_complete"
36506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36507$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36508    fi
36509  fi
36510
36511
36512
36513  # Publish this variable in the help.
36514
36515
36516  if test "x$GNM" = x; then
36517    # The variable is not set by user, try to locate tool using the code snippet
36518    for ac_prog in gnm
36519do
36520  # Extract the first word of "$ac_prog", so it can be a program name with args.
36521set dummy $ac_prog; ac_word=$2
36522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36523$as_echo_n "checking for $ac_word... " >&6; }
36524if ${ac_cv_path_GNM+:} false; then :
36525  $as_echo_n "(cached) " >&6
36526else
36527  case $GNM in
36528  [\\/]* | ?:[\\/]*)
36529  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36530  ;;
36531  *)
36532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36533for as_dir in $PATH
36534do
36535  IFS=$as_save_IFS
36536  test -z "$as_dir" && as_dir=.
36537    for ac_exec_ext in '' $ac_executable_extensions; do
36538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36539    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36541    break 2
36542  fi
36543done
36544  done
36545IFS=$as_save_IFS
36546
36547  ;;
36548esac
36549fi
36550GNM=$ac_cv_path_GNM
36551if test -n "$GNM"; then
36552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36553$as_echo "$GNM" >&6; }
36554else
36555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36556$as_echo "no" >&6; }
36557fi
36558
36559
36560  test -n "$GNM" && break
36561done
36562
36563  else
36564    # The variable is set, but is it from the command line or the environment?
36565
36566    # Try to remove the string !GNM! from our list.
36567    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36568    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36569      # If it failed, the variable was not from the command line. Ignore it,
36570      # but warn the user (except for BASH, which is always set by the calling BASH).
36571      if test "xGNM" != xBASH; then
36572        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36573$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36574      fi
36575      # Try to locate tool using the code snippet
36576      for ac_prog in gnm
36577do
36578  # Extract the first word of "$ac_prog", so it can be a program name with args.
36579set dummy $ac_prog; ac_word=$2
36580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36581$as_echo_n "checking for $ac_word... " >&6; }
36582if ${ac_cv_path_GNM+:} false; then :
36583  $as_echo_n "(cached) " >&6
36584else
36585  case $GNM in
36586  [\\/]* | ?:[\\/]*)
36587  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36588  ;;
36589  *)
36590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36591for as_dir in $PATH
36592do
36593  IFS=$as_save_IFS
36594  test -z "$as_dir" && as_dir=.
36595    for ac_exec_ext in '' $ac_executable_extensions; do
36596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36597    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36599    break 2
36600  fi
36601done
36602  done
36603IFS=$as_save_IFS
36604
36605  ;;
36606esac
36607fi
36608GNM=$ac_cv_path_GNM
36609if test -n "$GNM"; then
36610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36611$as_echo "$GNM" >&6; }
36612else
36613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36614$as_echo "no" >&6; }
36615fi
36616
36617
36618  test -n "$GNM" && break
36619done
36620
36621    else
36622      # If it succeeded, then it was overridden by the user. We will use it
36623      # for the tool.
36624
36625      # First remove it from the list of overridden variables, so we can test
36626      # for unknown variables in the end.
36627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36628
36629      # Check if the provided tool contains a complete path.
36630      tool_specified="$GNM"
36631      tool_basename="${tool_specified##*/}"
36632      if test "x$tool_basename" = "x$tool_specified"; then
36633        # A command without a complete path is provided, search $PATH.
36634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36635$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36636        # Extract the first word of "$tool_basename", so it can be a program name with args.
36637set dummy $tool_basename; ac_word=$2
36638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36639$as_echo_n "checking for $ac_word... " >&6; }
36640if ${ac_cv_path_GNM+:} false; then :
36641  $as_echo_n "(cached) " >&6
36642else
36643  case $GNM in
36644  [\\/]* | ?:[\\/]*)
36645  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36646  ;;
36647  *)
36648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36649for as_dir in $PATH
36650do
36651  IFS=$as_save_IFS
36652  test -z "$as_dir" && as_dir=.
36653    for ac_exec_ext in '' $ac_executable_extensions; do
36654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36655    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36657    break 2
36658  fi
36659done
36660  done
36661IFS=$as_save_IFS
36662
36663  ;;
36664esac
36665fi
36666GNM=$ac_cv_path_GNM
36667if test -n "$GNM"; then
36668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36669$as_echo "$GNM" >&6; }
36670else
36671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36672$as_echo "no" >&6; }
36673fi
36674
36675
36676        if test "x$GNM" = x; then
36677          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36678        fi
36679      else
36680        # Otherwise we believe it is a complete path. Use it as it is.
36681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36682$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36684$as_echo_n "checking for GNM... " >&6; }
36685        if test ! -x "$tool_specified"; then
36686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36687$as_echo "not found" >&6; }
36688          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36689        fi
36690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36691$as_echo "$tool_specified" >&6; }
36692      fi
36693    fi
36694  fi
36695
36696
36697
36698  # Only process if variable expands to non-empty
36699
36700  if test "x$GNM" != x; then
36701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36702
36703  # First separate the path from the arguments. This will split at the first
36704  # space.
36705  complete="$GNM"
36706  path="${complete%% *}"
36707  tmp="$complete EOL"
36708  arguments="${tmp#* }"
36709
36710  # Input might be given as Windows format, start by converting to
36711  # unix format.
36712  new_path=`$CYGPATH -u "$path"`
36713
36714  # Now try to locate executable using which
36715  new_path=`$WHICH "$new_path" 2> /dev/null`
36716  # bat and cmd files are not always considered executable in cygwin causing which
36717  # to not find them
36718  if test "x$new_path" = x \
36719      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36720      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36721    new_path=`$CYGPATH -u "$path"`
36722  fi
36723  if test "x$new_path" = x; then
36724    # Oops. Which didn't find the executable.
36725    # The splitting of arguments from the executable at a space might have been incorrect,
36726    # since paths with space are more likely in Windows. Give it another try with the whole
36727    # argument.
36728    path="$complete"
36729    arguments="EOL"
36730    new_path=`$CYGPATH -u "$path"`
36731    new_path=`$WHICH "$new_path" 2> /dev/null`
36732    # bat and cmd files are not always considered executable in cygwin causing which
36733    # to not find them
36734    if test "x$new_path" = x \
36735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36737      new_path=`$CYGPATH -u "$path"`
36738    fi
36739    if test "x$new_path" = x; then
36740      # It's still not found. Now this is an unrecoverable error.
36741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36742$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36743      has_space=`$ECHO "$complete" | $GREP " "`
36744      if test "x$has_space" != x; then
36745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36747      fi
36748      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36749    fi
36750  fi
36751
36752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36755  # "foo.exe" is OK but "foo" is an error.
36756  #
36757  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36758  # It is also a way to make sure we got the proper file name for the real test later on.
36759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36760  if test "x$test_shortpath" = x; then
36761    # Short path failed, file does not exist as specified.
36762    # Try adding .exe or .cmd
36763    if test -f "${new_path}.exe"; then
36764      input_to_shortpath="${new_path}.exe"
36765    elif test -f "${new_path}.cmd"; then
36766      input_to_shortpath="${new_path}.cmd"
36767    else
36768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36769$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36770      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36771$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36772      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36773    fi
36774  else
36775    input_to_shortpath="$new_path"
36776  fi
36777
36778  # Call helper function which possibly converts this using DOS-style short mode.
36779  # If so, the updated path is stored in $new_path.
36780  new_path="$input_to_shortpath"
36781
36782  input_path="$input_to_shortpath"
36783  # Check if we need to convert this using DOS-style short mode. If the path
36784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36785  # take no chances and rewrite it.
36786  # Note: m4 eats our [], so we need to use [ and ] instead.
36787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36788  if test "x$has_forbidden_chars" != x; then
36789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36793      # Going to short mode and back again did indeed matter. Since short mode is
36794      # case insensitive, let's make it lowercase to improve readability.
36795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36796      # Now convert it back to Unix-style (cygpath)
36797      input_path=`$CYGPATH -u "$shortmode_path"`
36798      new_path="$input_path"
36799    fi
36800  fi
36801
36802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36803  if test "x$test_cygdrive_prefix" = x; then
36804    # As a simple fix, exclude /usr/bin since it's not a real path.
36805    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36807      # a path prefixed by /cygdrive for fixpath to work.
36808      new_path="$CYGWIN_ROOT_PATH$input_path"
36809    fi
36810  fi
36811
36812  # remove trailing .exe if any
36813  new_path="${new_path/%.exe/}"
36814
36815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36816
36817  # First separate the path from the arguments. This will split at the first
36818  # space.
36819  complete="$GNM"
36820  path="${complete%% *}"
36821  tmp="$complete EOL"
36822  arguments="${tmp#* }"
36823
36824  # Input might be given as Windows format, start by converting to
36825  # unix format.
36826  new_path="$path"
36827
36828  windows_path="$new_path"
36829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36830    unix_path=`$CYGPATH -u "$windows_path"`
36831    new_path="$unix_path"
36832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36834    new_path="$unix_path"
36835  fi
36836
36837
36838  # Now try to locate executable using which
36839  new_path=`$WHICH "$new_path" 2> /dev/null`
36840
36841  if test "x$new_path" = x; then
36842    # Oops. Which didn't find the executable.
36843    # The splitting of arguments from the executable at a space might have been incorrect,
36844    # since paths with space are more likely in Windows. Give it another try with the whole
36845    # argument.
36846    path="$complete"
36847    arguments="EOL"
36848    new_path="$path"
36849
36850  windows_path="$new_path"
36851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36852    unix_path=`$CYGPATH -u "$windows_path"`
36853    new_path="$unix_path"
36854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36856    new_path="$unix_path"
36857  fi
36858
36859
36860    new_path=`$WHICH "$new_path" 2> /dev/null`
36861    # bat and cmd files are not always considered executable in MSYS causing which
36862    # to not find them
36863    if test "x$new_path" = x \
36864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36866      new_path="$path"
36867
36868  windows_path="$new_path"
36869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36870    unix_path=`$CYGPATH -u "$windows_path"`
36871    new_path="$unix_path"
36872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36874    new_path="$unix_path"
36875  fi
36876
36877    fi
36878
36879    if test "x$new_path" = x; then
36880      # It's still not found. Now this is an unrecoverable error.
36881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36882$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36883      has_space=`$ECHO "$complete" | $GREP " "`
36884      if test "x$has_space" != x; then
36885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36887      fi
36888      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36889    fi
36890  fi
36891
36892  # Now new_path has a complete unix path to the binary
36893  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36894    # Keep paths in /bin as-is, but remove trailing .exe if any
36895    new_path="${new_path/%.exe/}"
36896    # Do not save /bin paths to all_fixpath_prefixes!
36897  else
36898    # Not in mixed or Windows style, start by that.
36899    new_path=`cmd //c echo $new_path`
36900
36901  input_path="$new_path"
36902  # Check if we need to convert this using DOS-style short mode. If the path
36903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36904  # take no chances and rewrite it.
36905  # Note: m4 eats our [], so we need to use [ and ] instead.
36906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36907  if test "x$has_forbidden_chars" != x; then
36908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36910  fi
36911
36912    # Output is in $new_path
36913
36914  windows_path="$new_path"
36915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36916    unix_path=`$CYGPATH -u "$windows_path"`
36917    new_path="$unix_path"
36918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36920    new_path="$unix_path"
36921  fi
36922
36923    # remove trailing .exe if any
36924    new_path="${new_path/%.exe/}"
36925
36926    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36927    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36928  fi
36929
36930    else
36931      # We're on a unix platform. Hooray! :)
36932      # First separate the path from the arguments. This will split at the first
36933      # space.
36934      complete="$GNM"
36935      path="${complete%% *}"
36936      tmp="$complete EOL"
36937      arguments="${tmp#* }"
36938
36939      # Cannot rely on the command "which" here since it doesn't always work.
36940      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36941      if test -z "$is_absolute_path"; then
36942        # Path to executable is not absolute. Find it.
36943        IFS_save="$IFS"
36944        IFS=:
36945        for p in $PATH; do
36946          if test -f "$p/$path" && test -x "$p/$path"; then
36947            new_path="$p/$path"
36948            break
36949          fi
36950        done
36951        IFS="$IFS_save"
36952      else
36953        # This is an absolute path, we can use it without further modifications.
36954        new_path="$path"
36955      fi
36956
36957      if test "x$new_path" = x; then
36958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36959$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36960        has_space=`$ECHO "$complete" | $GREP " "`
36961        if test "x$has_space" != x; then
36962          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36963$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36964        fi
36965        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36966      fi
36967    fi
36968
36969    # Now join together the path and the arguments once again
36970    if test "x$arguments" != xEOL; then
36971      new_complete="$new_path ${arguments% *}"
36972    else
36973      new_complete="$new_path"
36974    fi
36975
36976    if test "x$complete" != "x$new_complete"; then
36977      GNM="$new_complete"
36978      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36979$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36980    fi
36981  fi
36982
36983  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36984    # FIXME: we should unify this with the solaris case above.
36985
36986
36987  # Publish this variable in the help.
36988
36989
36990  if test "x$STRIP" = x; then
36991    # The variable is not set by user, try to locate tool using the code snippet
36992    if test -n "$ac_tool_prefix"; then
36993  for ac_prog in strip
36994  do
36995    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36996set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36998$as_echo_n "checking for $ac_word... " >&6; }
36999if ${ac_cv_prog_STRIP+:} false; then :
37000  $as_echo_n "(cached) " >&6
37001else
37002  if test -n "$STRIP"; then
37003  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37004else
37005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37006for as_dir in $PATH
37007do
37008  IFS=$as_save_IFS
37009  test -z "$as_dir" && as_dir=.
37010    for ac_exec_ext in '' $ac_executable_extensions; do
37011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37012    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37014    break 2
37015  fi
37016done
37017  done
37018IFS=$as_save_IFS
37019
37020fi
37021fi
37022STRIP=$ac_cv_prog_STRIP
37023if test -n "$STRIP"; then
37024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37025$as_echo "$STRIP" >&6; }
37026else
37027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37028$as_echo "no" >&6; }
37029fi
37030
37031
37032    test -n "$STRIP" && break
37033  done
37034fi
37035if test -z "$STRIP"; then
37036  ac_ct_STRIP=$STRIP
37037  for ac_prog in strip
37038do
37039  # Extract the first word of "$ac_prog", so it can be a program name with args.
37040set dummy $ac_prog; ac_word=$2
37041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37042$as_echo_n "checking for $ac_word... " >&6; }
37043if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37044  $as_echo_n "(cached) " >&6
37045else
37046  if test -n "$ac_ct_STRIP"; then
37047  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37048else
37049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37050for as_dir in $PATH
37051do
37052  IFS=$as_save_IFS
37053  test -z "$as_dir" && as_dir=.
37054    for ac_exec_ext in '' $ac_executable_extensions; do
37055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37056    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37058    break 2
37059  fi
37060done
37061  done
37062IFS=$as_save_IFS
37063
37064fi
37065fi
37066ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37067if test -n "$ac_ct_STRIP"; then
37068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37069$as_echo "$ac_ct_STRIP" >&6; }
37070else
37071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37072$as_echo "no" >&6; }
37073fi
37074
37075
37076  test -n "$ac_ct_STRIP" && break
37077done
37078
37079  if test "x$ac_ct_STRIP" = x; then
37080    STRIP=""
37081  else
37082    case $cross_compiling:$ac_tool_warned in
37083yes:)
37084{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37085$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37086ac_tool_warned=yes ;;
37087esac
37088    STRIP=$ac_ct_STRIP
37089  fi
37090fi
37091
37092  else
37093    # The variable is set, but is it from the command line or the environment?
37094
37095    # Try to remove the string !STRIP! from our list.
37096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37098      # If it failed, the variable was not from the command line. Ignore it,
37099      # but warn the user (except for BASH, which is always set by the calling BASH).
37100      if test "xSTRIP" != xBASH; then
37101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37102$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37103      fi
37104      # Try to locate tool using the code snippet
37105      if test -n "$ac_tool_prefix"; then
37106  for ac_prog in strip
37107  do
37108    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37109set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37111$as_echo_n "checking for $ac_word... " >&6; }
37112if ${ac_cv_prog_STRIP+:} false; then :
37113  $as_echo_n "(cached) " >&6
37114else
37115  if test -n "$STRIP"; then
37116  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37117else
37118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37119for as_dir in $PATH
37120do
37121  IFS=$as_save_IFS
37122  test -z "$as_dir" && as_dir=.
37123    for ac_exec_ext in '' $ac_executable_extensions; do
37124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37125    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37127    break 2
37128  fi
37129done
37130  done
37131IFS=$as_save_IFS
37132
37133fi
37134fi
37135STRIP=$ac_cv_prog_STRIP
37136if test -n "$STRIP"; then
37137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37138$as_echo "$STRIP" >&6; }
37139else
37140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37141$as_echo "no" >&6; }
37142fi
37143
37144
37145    test -n "$STRIP" && break
37146  done
37147fi
37148if test -z "$STRIP"; then
37149  ac_ct_STRIP=$STRIP
37150  for ac_prog in strip
37151do
37152  # Extract the first word of "$ac_prog", so it can be a program name with args.
37153set dummy $ac_prog; ac_word=$2
37154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37155$as_echo_n "checking for $ac_word... " >&6; }
37156if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37157  $as_echo_n "(cached) " >&6
37158else
37159  if test -n "$ac_ct_STRIP"; then
37160  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37161else
37162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37163for as_dir in $PATH
37164do
37165  IFS=$as_save_IFS
37166  test -z "$as_dir" && as_dir=.
37167    for ac_exec_ext in '' $ac_executable_extensions; do
37168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37169    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37171    break 2
37172  fi
37173done
37174  done
37175IFS=$as_save_IFS
37176
37177fi
37178fi
37179ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37180if test -n "$ac_ct_STRIP"; then
37181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37182$as_echo "$ac_ct_STRIP" >&6; }
37183else
37184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37185$as_echo "no" >&6; }
37186fi
37187
37188
37189  test -n "$ac_ct_STRIP" && break
37190done
37191
37192  if test "x$ac_ct_STRIP" = x; then
37193    STRIP=""
37194  else
37195    case $cross_compiling:$ac_tool_warned in
37196yes:)
37197{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37198$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37199ac_tool_warned=yes ;;
37200esac
37201    STRIP=$ac_ct_STRIP
37202  fi
37203fi
37204
37205    else
37206      # If it succeeded, then it was overridden by the user. We will use it
37207      # for the tool.
37208
37209      # First remove it from the list of overridden variables, so we can test
37210      # for unknown variables in the end.
37211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37212
37213      # Check if the provided tool contains a complete path.
37214      tool_specified="$STRIP"
37215      tool_basename="${tool_specified##*/}"
37216      if test "x$tool_basename" = "x$tool_specified"; then
37217        # A command without a complete path is provided, search $PATH.
37218        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37219$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37220        # Extract the first word of "$tool_basename", so it can be a program name with args.
37221set dummy $tool_basename; ac_word=$2
37222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37223$as_echo_n "checking for $ac_word... " >&6; }
37224if ${ac_cv_path_STRIP+:} false; then :
37225  $as_echo_n "(cached) " >&6
37226else
37227  case $STRIP in
37228  [\\/]* | ?:[\\/]*)
37229  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37230  ;;
37231  *)
37232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37233for as_dir in $PATH
37234do
37235  IFS=$as_save_IFS
37236  test -z "$as_dir" && as_dir=.
37237    for ac_exec_ext in '' $ac_executable_extensions; do
37238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37239    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37241    break 2
37242  fi
37243done
37244  done
37245IFS=$as_save_IFS
37246
37247  ;;
37248esac
37249fi
37250STRIP=$ac_cv_path_STRIP
37251if test -n "$STRIP"; then
37252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37253$as_echo "$STRIP" >&6; }
37254else
37255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37256$as_echo "no" >&6; }
37257fi
37258
37259
37260        if test "x$STRIP" = x; then
37261          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37262        fi
37263      else
37264        # Otherwise we believe it is a complete path. Use it as it is.
37265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37266$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37268$as_echo_n "checking for STRIP... " >&6; }
37269        if test ! -x "$tool_specified"; then
37270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37271$as_echo "not found" >&6; }
37272          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37273        fi
37274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37275$as_echo "$tool_specified" >&6; }
37276      fi
37277    fi
37278  fi
37279
37280
37281
37282  # Only process if variable expands to non-empty
37283
37284  if test "x$STRIP" != x; then
37285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37286
37287  # First separate the path from the arguments. This will split at the first
37288  # space.
37289  complete="$STRIP"
37290  path="${complete%% *}"
37291  tmp="$complete EOL"
37292  arguments="${tmp#* }"
37293
37294  # Input might be given as Windows format, start by converting to
37295  # unix format.
37296  new_path=`$CYGPATH -u "$path"`
37297
37298  # Now try to locate executable using which
37299  new_path=`$WHICH "$new_path" 2> /dev/null`
37300  # bat and cmd files are not always considered executable in cygwin causing which
37301  # to not find them
37302  if test "x$new_path" = x \
37303      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37304      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37305    new_path=`$CYGPATH -u "$path"`
37306  fi
37307  if test "x$new_path" = x; then
37308    # Oops. Which didn't find the executable.
37309    # The splitting of arguments from the executable at a space might have been incorrect,
37310    # since paths with space are more likely in Windows. Give it another try with the whole
37311    # argument.
37312    path="$complete"
37313    arguments="EOL"
37314    new_path=`$CYGPATH -u "$path"`
37315    new_path=`$WHICH "$new_path" 2> /dev/null`
37316    # bat and cmd files are not always considered executable in cygwin causing which
37317    # to not find them
37318    if test "x$new_path" = x \
37319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37321      new_path=`$CYGPATH -u "$path"`
37322    fi
37323    if test "x$new_path" = x; then
37324      # It's still not found. Now this is an unrecoverable error.
37325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37326$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37327      has_space=`$ECHO "$complete" | $GREP " "`
37328      if test "x$has_space" != x; then
37329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37331      fi
37332      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37333    fi
37334  fi
37335
37336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37339  # "foo.exe" is OK but "foo" is an error.
37340  #
37341  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37342  # It is also a way to make sure we got the proper file name for the real test later on.
37343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37344  if test "x$test_shortpath" = x; then
37345    # Short path failed, file does not exist as specified.
37346    # Try adding .exe or .cmd
37347    if test -f "${new_path}.exe"; then
37348      input_to_shortpath="${new_path}.exe"
37349    elif test -f "${new_path}.cmd"; then
37350      input_to_shortpath="${new_path}.cmd"
37351    else
37352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37353$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37354      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37355$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37356      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37357    fi
37358  else
37359    input_to_shortpath="$new_path"
37360  fi
37361
37362  # Call helper function which possibly converts this using DOS-style short mode.
37363  # If so, the updated path is stored in $new_path.
37364  new_path="$input_to_shortpath"
37365
37366  input_path="$input_to_shortpath"
37367  # Check if we need to convert this using DOS-style short mode. If the path
37368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37369  # take no chances and rewrite it.
37370  # Note: m4 eats our [], so we need to use [ and ] instead.
37371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37372  if test "x$has_forbidden_chars" != x; then
37373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37377      # Going to short mode and back again did indeed matter. Since short mode is
37378      # case insensitive, let's make it lowercase to improve readability.
37379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37380      # Now convert it back to Unix-style (cygpath)
37381      input_path=`$CYGPATH -u "$shortmode_path"`
37382      new_path="$input_path"
37383    fi
37384  fi
37385
37386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37387  if test "x$test_cygdrive_prefix" = x; then
37388    # As a simple fix, exclude /usr/bin since it's not a real path.
37389    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37391      # a path prefixed by /cygdrive for fixpath to work.
37392      new_path="$CYGWIN_ROOT_PATH$input_path"
37393    fi
37394  fi
37395
37396  # remove trailing .exe if any
37397  new_path="${new_path/%.exe/}"
37398
37399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37400
37401  # First separate the path from the arguments. This will split at the first
37402  # space.
37403  complete="$STRIP"
37404  path="${complete%% *}"
37405  tmp="$complete EOL"
37406  arguments="${tmp#* }"
37407
37408  # Input might be given as Windows format, start by converting to
37409  # unix format.
37410  new_path="$path"
37411
37412  windows_path="$new_path"
37413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37414    unix_path=`$CYGPATH -u "$windows_path"`
37415    new_path="$unix_path"
37416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37418    new_path="$unix_path"
37419  fi
37420
37421
37422  # Now try to locate executable using which
37423  new_path=`$WHICH "$new_path" 2> /dev/null`
37424
37425  if test "x$new_path" = x; then
37426    # Oops. Which didn't find the executable.
37427    # The splitting of arguments from the executable at a space might have been incorrect,
37428    # since paths with space are more likely in Windows. Give it another try with the whole
37429    # argument.
37430    path="$complete"
37431    arguments="EOL"
37432    new_path="$path"
37433
37434  windows_path="$new_path"
37435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37436    unix_path=`$CYGPATH -u "$windows_path"`
37437    new_path="$unix_path"
37438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37440    new_path="$unix_path"
37441  fi
37442
37443
37444    new_path=`$WHICH "$new_path" 2> /dev/null`
37445    # bat and cmd files are not always considered executable in MSYS causing which
37446    # to not find them
37447    if test "x$new_path" = x \
37448        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37449        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37450      new_path="$path"
37451
37452  windows_path="$new_path"
37453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37454    unix_path=`$CYGPATH -u "$windows_path"`
37455    new_path="$unix_path"
37456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37458    new_path="$unix_path"
37459  fi
37460
37461    fi
37462
37463    if test "x$new_path" = x; then
37464      # It's still not found. Now this is an unrecoverable error.
37465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37466$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37467      has_space=`$ECHO "$complete" | $GREP " "`
37468      if test "x$has_space" != x; then
37469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37471      fi
37472      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37473    fi
37474  fi
37475
37476  # Now new_path has a complete unix path to the binary
37477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37478    # Keep paths in /bin as-is, but remove trailing .exe if any
37479    new_path="${new_path/%.exe/}"
37480    # Do not save /bin paths to all_fixpath_prefixes!
37481  else
37482    # Not in mixed or Windows style, start by that.
37483    new_path=`cmd //c echo $new_path`
37484
37485  input_path="$new_path"
37486  # Check if we need to convert this using DOS-style short mode. If the path
37487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37488  # take no chances and rewrite it.
37489  # Note: m4 eats our [], so we need to use [ and ] instead.
37490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37491  if test "x$has_forbidden_chars" != x; then
37492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37494  fi
37495
37496    # Output is in $new_path
37497
37498  windows_path="$new_path"
37499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37500    unix_path=`$CYGPATH -u "$windows_path"`
37501    new_path="$unix_path"
37502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37504    new_path="$unix_path"
37505  fi
37506
37507    # remove trailing .exe if any
37508    new_path="${new_path/%.exe/}"
37509
37510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37512  fi
37513
37514    else
37515      # We're on a unix platform. Hooray! :)
37516      # First separate the path from the arguments. This will split at the first
37517      # space.
37518      complete="$STRIP"
37519      path="${complete%% *}"
37520      tmp="$complete EOL"
37521      arguments="${tmp#* }"
37522
37523      # Cannot rely on the command "which" here since it doesn't always work.
37524      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37525      if test -z "$is_absolute_path"; then
37526        # Path to executable is not absolute. Find it.
37527        IFS_save="$IFS"
37528        IFS=:
37529        for p in $PATH; do
37530          if test -f "$p/$path" && test -x "$p/$path"; then
37531            new_path="$p/$path"
37532            break
37533          fi
37534        done
37535        IFS="$IFS_save"
37536      else
37537        # This is an absolute path, we can use it without further modifications.
37538        new_path="$path"
37539      fi
37540
37541      if test "x$new_path" = x; then
37542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37543$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37544        has_space=`$ECHO "$complete" | $GREP " "`
37545        if test "x$has_space" != x; then
37546          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37547$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37548        fi
37549        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37550      fi
37551    fi
37552
37553    # Now join together the path and the arguments once again
37554    if test "x$arguments" != xEOL; then
37555      new_complete="$new_path ${arguments% *}"
37556    else
37557      new_complete="$new_path"
37558    fi
37559
37560    if test "x$complete" != "x$new_complete"; then
37561      STRIP="$new_complete"
37562      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37563$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37564    fi
37565  fi
37566
37567
37568
37569  # Publish this variable in the help.
37570
37571
37572  if test "x$NM" = x; then
37573    # The variable is not set by user, try to locate tool using the code snippet
37574    if test -n "$ac_tool_prefix"; then
37575  for ac_prog in nm
37576  do
37577    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37578set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37580$as_echo_n "checking for $ac_word... " >&6; }
37581if ${ac_cv_prog_NM+:} false; then :
37582  $as_echo_n "(cached) " >&6
37583else
37584  if test -n "$NM"; then
37585  ac_cv_prog_NM="$NM" # Let the user override the test.
37586else
37587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37588for as_dir in $PATH
37589do
37590  IFS=$as_save_IFS
37591  test -z "$as_dir" && as_dir=.
37592    for ac_exec_ext in '' $ac_executable_extensions; do
37593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37594    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37596    break 2
37597  fi
37598done
37599  done
37600IFS=$as_save_IFS
37601
37602fi
37603fi
37604NM=$ac_cv_prog_NM
37605if test -n "$NM"; then
37606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37607$as_echo "$NM" >&6; }
37608else
37609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37610$as_echo "no" >&6; }
37611fi
37612
37613
37614    test -n "$NM" && break
37615  done
37616fi
37617if test -z "$NM"; then
37618  ac_ct_NM=$NM
37619  for ac_prog in nm
37620do
37621  # Extract the first word of "$ac_prog", so it can be a program name with args.
37622set dummy $ac_prog; ac_word=$2
37623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37624$as_echo_n "checking for $ac_word... " >&6; }
37625if ${ac_cv_prog_ac_ct_NM+:} false; then :
37626  $as_echo_n "(cached) " >&6
37627else
37628  if test -n "$ac_ct_NM"; then
37629  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37630else
37631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37632for as_dir in $PATH
37633do
37634  IFS=$as_save_IFS
37635  test -z "$as_dir" && as_dir=.
37636    for ac_exec_ext in '' $ac_executable_extensions; do
37637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37638    ac_cv_prog_ac_ct_NM="$ac_prog"
37639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37640    break 2
37641  fi
37642done
37643  done
37644IFS=$as_save_IFS
37645
37646fi
37647fi
37648ac_ct_NM=$ac_cv_prog_ac_ct_NM
37649if test -n "$ac_ct_NM"; then
37650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37651$as_echo "$ac_ct_NM" >&6; }
37652else
37653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37654$as_echo "no" >&6; }
37655fi
37656
37657
37658  test -n "$ac_ct_NM" && break
37659done
37660
37661  if test "x$ac_ct_NM" = x; then
37662    NM=""
37663  else
37664    case $cross_compiling:$ac_tool_warned in
37665yes:)
37666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37668ac_tool_warned=yes ;;
37669esac
37670    NM=$ac_ct_NM
37671  fi
37672fi
37673
37674  else
37675    # The variable is set, but is it from the command line or the environment?
37676
37677    # Try to remove the string !NM! from our list.
37678    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37679    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37680      # If it failed, the variable was not from the command line. Ignore it,
37681      # but warn the user (except for BASH, which is always set by the calling BASH).
37682      if test "xNM" != xBASH; then
37683        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37684$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37685      fi
37686      # Try to locate tool using the code snippet
37687      if test -n "$ac_tool_prefix"; then
37688  for ac_prog in nm
37689  do
37690    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37691set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37693$as_echo_n "checking for $ac_word... " >&6; }
37694if ${ac_cv_prog_NM+:} false; then :
37695  $as_echo_n "(cached) " >&6
37696else
37697  if test -n "$NM"; then
37698  ac_cv_prog_NM="$NM" # Let the user override the test.
37699else
37700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37701for as_dir in $PATH
37702do
37703  IFS=$as_save_IFS
37704  test -z "$as_dir" && as_dir=.
37705    for ac_exec_ext in '' $ac_executable_extensions; do
37706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37707    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37709    break 2
37710  fi
37711done
37712  done
37713IFS=$as_save_IFS
37714
37715fi
37716fi
37717NM=$ac_cv_prog_NM
37718if test -n "$NM"; then
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37720$as_echo "$NM" >&6; }
37721else
37722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37723$as_echo "no" >&6; }
37724fi
37725
37726
37727    test -n "$NM" && break
37728  done
37729fi
37730if test -z "$NM"; then
37731  ac_ct_NM=$NM
37732  for ac_prog in nm
37733do
37734  # Extract the first word of "$ac_prog", so it can be a program name with args.
37735set dummy $ac_prog; ac_word=$2
37736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37737$as_echo_n "checking for $ac_word... " >&6; }
37738if ${ac_cv_prog_ac_ct_NM+:} false; then :
37739  $as_echo_n "(cached) " >&6
37740else
37741  if test -n "$ac_ct_NM"; then
37742  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37743else
37744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37745for as_dir in $PATH
37746do
37747  IFS=$as_save_IFS
37748  test -z "$as_dir" && as_dir=.
37749    for ac_exec_ext in '' $ac_executable_extensions; do
37750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37751    ac_cv_prog_ac_ct_NM="$ac_prog"
37752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37753    break 2
37754  fi
37755done
37756  done
37757IFS=$as_save_IFS
37758
37759fi
37760fi
37761ac_ct_NM=$ac_cv_prog_ac_ct_NM
37762if test -n "$ac_ct_NM"; then
37763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37764$as_echo "$ac_ct_NM" >&6; }
37765else
37766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37767$as_echo "no" >&6; }
37768fi
37769
37770
37771  test -n "$ac_ct_NM" && break
37772done
37773
37774  if test "x$ac_ct_NM" = x; then
37775    NM=""
37776  else
37777    case $cross_compiling:$ac_tool_warned in
37778yes:)
37779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37781ac_tool_warned=yes ;;
37782esac
37783    NM=$ac_ct_NM
37784  fi
37785fi
37786
37787    else
37788      # If it succeeded, then it was overridden by the user. We will use it
37789      # for the tool.
37790
37791      # First remove it from the list of overridden variables, so we can test
37792      # for unknown variables in the end.
37793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37794
37795      # Check if the provided tool contains a complete path.
37796      tool_specified="$NM"
37797      tool_basename="${tool_specified##*/}"
37798      if test "x$tool_basename" = "x$tool_specified"; then
37799        # A command without a complete path is provided, search $PATH.
37800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37801$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37802        # Extract the first word of "$tool_basename", so it can be a program name with args.
37803set dummy $tool_basename; ac_word=$2
37804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37805$as_echo_n "checking for $ac_word... " >&6; }
37806if ${ac_cv_path_NM+:} false; then :
37807  $as_echo_n "(cached) " >&6
37808else
37809  case $NM in
37810  [\\/]* | ?:[\\/]*)
37811  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37812  ;;
37813  *)
37814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37815for as_dir in $PATH
37816do
37817  IFS=$as_save_IFS
37818  test -z "$as_dir" && as_dir=.
37819    for ac_exec_ext in '' $ac_executable_extensions; do
37820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37821    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37823    break 2
37824  fi
37825done
37826  done
37827IFS=$as_save_IFS
37828
37829  ;;
37830esac
37831fi
37832NM=$ac_cv_path_NM
37833if test -n "$NM"; then
37834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37835$as_echo "$NM" >&6; }
37836else
37837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37838$as_echo "no" >&6; }
37839fi
37840
37841
37842        if test "x$NM" = x; then
37843          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37844        fi
37845      else
37846        # Otherwise we believe it is a complete path. Use it as it is.
37847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37848$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37849        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37850$as_echo_n "checking for NM... " >&6; }
37851        if test ! -x "$tool_specified"; then
37852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37853$as_echo "not found" >&6; }
37854          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37855        fi
37856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37857$as_echo "$tool_specified" >&6; }
37858      fi
37859    fi
37860  fi
37861
37862
37863
37864  # Only process if variable expands to non-empty
37865
37866  if test "x$NM" != x; then
37867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37868
37869  # First separate the path from the arguments. This will split at the first
37870  # space.
37871  complete="$NM"
37872  path="${complete%% *}"
37873  tmp="$complete EOL"
37874  arguments="${tmp#* }"
37875
37876  # Input might be given as Windows format, start by converting to
37877  # unix format.
37878  new_path=`$CYGPATH -u "$path"`
37879
37880  # Now try to locate executable using which
37881  new_path=`$WHICH "$new_path" 2> /dev/null`
37882  # bat and cmd files are not always considered executable in cygwin causing which
37883  # to not find them
37884  if test "x$new_path" = x \
37885      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37886      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37887    new_path=`$CYGPATH -u "$path"`
37888  fi
37889  if test "x$new_path" = x; then
37890    # Oops. Which didn't find the executable.
37891    # The splitting of arguments from the executable at a space might have been incorrect,
37892    # since paths with space are more likely in Windows. Give it another try with the whole
37893    # argument.
37894    path="$complete"
37895    arguments="EOL"
37896    new_path=`$CYGPATH -u "$path"`
37897    new_path=`$WHICH "$new_path" 2> /dev/null`
37898    # bat and cmd files are not always considered executable in cygwin causing which
37899    # to not find them
37900    if test "x$new_path" = x \
37901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37903      new_path=`$CYGPATH -u "$path"`
37904    fi
37905    if test "x$new_path" = x; then
37906      # It's still not found. Now this is an unrecoverable error.
37907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37908$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37909      has_space=`$ECHO "$complete" | $GREP " "`
37910      if test "x$has_space" != x; then
37911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37913      fi
37914      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37915    fi
37916  fi
37917
37918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37921  # "foo.exe" is OK but "foo" is an error.
37922  #
37923  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37924  # It is also a way to make sure we got the proper file name for the real test later on.
37925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37926  if test "x$test_shortpath" = x; then
37927    # Short path failed, file does not exist as specified.
37928    # Try adding .exe or .cmd
37929    if test -f "${new_path}.exe"; then
37930      input_to_shortpath="${new_path}.exe"
37931    elif test -f "${new_path}.cmd"; then
37932      input_to_shortpath="${new_path}.cmd"
37933    else
37934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37935$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37936      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37937$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37938      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37939    fi
37940  else
37941    input_to_shortpath="$new_path"
37942  fi
37943
37944  # Call helper function which possibly converts this using DOS-style short mode.
37945  # If so, the updated path is stored in $new_path.
37946  new_path="$input_to_shortpath"
37947
37948  input_path="$input_to_shortpath"
37949  # Check if we need to convert this using DOS-style short mode. If the path
37950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37951  # take no chances and rewrite it.
37952  # Note: m4 eats our [], so we need to use [ and ] instead.
37953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37954  if test "x$has_forbidden_chars" != x; then
37955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37959      # Going to short mode and back again did indeed matter. Since short mode is
37960      # case insensitive, let's make it lowercase to improve readability.
37961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37962      # Now convert it back to Unix-style (cygpath)
37963      input_path=`$CYGPATH -u "$shortmode_path"`
37964      new_path="$input_path"
37965    fi
37966  fi
37967
37968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37969  if test "x$test_cygdrive_prefix" = x; then
37970    # As a simple fix, exclude /usr/bin since it's not a real path.
37971    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37973      # a path prefixed by /cygdrive for fixpath to work.
37974      new_path="$CYGWIN_ROOT_PATH$input_path"
37975    fi
37976  fi
37977
37978  # remove trailing .exe if any
37979  new_path="${new_path/%.exe/}"
37980
37981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37982
37983  # First separate the path from the arguments. This will split at the first
37984  # space.
37985  complete="$NM"
37986  path="${complete%% *}"
37987  tmp="$complete EOL"
37988  arguments="${tmp#* }"
37989
37990  # Input might be given as Windows format, start by converting to
37991  # unix format.
37992  new_path="$path"
37993
37994  windows_path="$new_path"
37995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37996    unix_path=`$CYGPATH -u "$windows_path"`
37997    new_path="$unix_path"
37998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38000    new_path="$unix_path"
38001  fi
38002
38003
38004  # Now try to locate executable using which
38005  new_path=`$WHICH "$new_path" 2> /dev/null`
38006
38007  if test "x$new_path" = x; then
38008    # Oops. Which didn't find the executable.
38009    # The splitting of arguments from the executable at a space might have been incorrect,
38010    # since paths with space are more likely in Windows. Give it another try with the whole
38011    # argument.
38012    path="$complete"
38013    arguments="EOL"
38014    new_path="$path"
38015
38016  windows_path="$new_path"
38017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38018    unix_path=`$CYGPATH -u "$windows_path"`
38019    new_path="$unix_path"
38020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38022    new_path="$unix_path"
38023  fi
38024
38025
38026    new_path=`$WHICH "$new_path" 2> /dev/null`
38027    # bat and cmd files are not always considered executable in MSYS causing which
38028    # to not find them
38029    if test "x$new_path" = x \
38030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38032      new_path="$path"
38033
38034  windows_path="$new_path"
38035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38036    unix_path=`$CYGPATH -u "$windows_path"`
38037    new_path="$unix_path"
38038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38040    new_path="$unix_path"
38041  fi
38042
38043    fi
38044
38045    if test "x$new_path" = x; then
38046      # It's still not found. Now this is an unrecoverable error.
38047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38048$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38049      has_space=`$ECHO "$complete" | $GREP " "`
38050      if test "x$has_space" != x; then
38051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38053      fi
38054      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38055    fi
38056  fi
38057
38058  # Now new_path has a complete unix path to the binary
38059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38060    # Keep paths in /bin as-is, but remove trailing .exe if any
38061    new_path="${new_path/%.exe/}"
38062    # Do not save /bin paths to all_fixpath_prefixes!
38063  else
38064    # Not in mixed or Windows style, start by that.
38065    new_path=`cmd //c echo $new_path`
38066
38067  input_path="$new_path"
38068  # Check if we need to convert this using DOS-style short mode. If the path
38069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38070  # take no chances and rewrite it.
38071  # Note: m4 eats our [], so we need to use [ and ] instead.
38072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38073  if test "x$has_forbidden_chars" != x; then
38074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38076  fi
38077
38078    # Output is in $new_path
38079
38080  windows_path="$new_path"
38081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38082    unix_path=`$CYGPATH -u "$windows_path"`
38083    new_path="$unix_path"
38084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38086    new_path="$unix_path"
38087  fi
38088
38089    # remove trailing .exe if any
38090    new_path="${new_path/%.exe/}"
38091
38092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38094  fi
38095
38096    else
38097      # We're on a unix platform. Hooray! :)
38098      # First separate the path from the arguments. This will split at the first
38099      # space.
38100      complete="$NM"
38101      path="${complete%% *}"
38102      tmp="$complete EOL"
38103      arguments="${tmp#* }"
38104
38105      # Cannot rely on the command "which" here since it doesn't always work.
38106      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38107      if test -z "$is_absolute_path"; then
38108        # Path to executable is not absolute. Find it.
38109        IFS_save="$IFS"
38110        IFS=:
38111        for p in $PATH; do
38112          if test -f "$p/$path" && test -x "$p/$path"; then
38113            new_path="$p/$path"
38114            break
38115          fi
38116        done
38117        IFS="$IFS_save"
38118      else
38119        # This is an absolute path, we can use it without further modifications.
38120        new_path="$path"
38121      fi
38122
38123      if test "x$new_path" = x; then
38124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38125$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38126        has_space=`$ECHO "$complete" | $GREP " "`
38127        if test "x$has_space" != x; then
38128          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38130        fi
38131        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38132      fi
38133    fi
38134
38135    # Now join together the path and the arguments once again
38136    if test "x$arguments" != xEOL; then
38137      new_complete="$new_path ${arguments% *}"
38138    else
38139      new_complete="$new_path"
38140    fi
38141
38142    if test "x$complete" != "x$new_complete"; then
38143      NM="$new_complete"
38144      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38145$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38146    fi
38147  fi
38148
38149    GNM="$NM"
38150
38151  fi
38152
38153  # objcopy is used for moving debug symbols to separate files when
38154  # full debug symbols are enabled.
38155  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38156
38157
38158  # Publish this variable in the help.
38159
38160
38161  if test "x$OBJCOPY" = x; then
38162    # The variable is not set by user, try to locate tool using the code snippet
38163    if test -n "$ac_tool_prefix"; then
38164  for ac_prog in gobjcopy objcopy
38165  do
38166    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38167set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38169$as_echo_n "checking for $ac_word... " >&6; }
38170if ${ac_cv_prog_OBJCOPY+:} false; then :
38171  $as_echo_n "(cached) " >&6
38172else
38173  if test -n "$OBJCOPY"; then
38174  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38175else
38176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38177for as_dir in $PATH
38178do
38179  IFS=$as_save_IFS
38180  test -z "$as_dir" && as_dir=.
38181    for ac_exec_ext in '' $ac_executable_extensions; do
38182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38183    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38185    break 2
38186  fi
38187done
38188  done
38189IFS=$as_save_IFS
38190
38191fi
38192fi
38193OBJCOPY=$ac_cv_prog_OBJCOPY
38194if test -n "$OBJCOPY"; then
38195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38196$as_echo "$OBJCOPY" >&6; }
38197else
38198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38199$as_echo "no" >&6; }
38200fi
38201
38202
38203    test -n "$OBJCOPY" && break
38204  done
38205fi
38206if test -z "$OBJCOPY"; then
38207  ac_ct_OBJCOPY=$OBJCOPY
38208  for ac_prog in gobjcopy objcopy
38209do
38210  # Extract the first word of "$ac_prog", so it can be a program name with args.
38211set dummy $ac_prog; ac_word=$2
38212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38213$as_echo_n "checking for $ac_word... " >&6; }
38214if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38215  $as_echo_n "(cached) " >&6
38216else
38217  if test -n "$ac_ct_OBJCOPY"; then
38218  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38219else
38220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38221for as_dir in $PATH
38222do
38223  IFS=$as_save_IFS
38224  test -z "$as_dir" && as_dir=.
38225    for ac_exec_ext in '' $ac_executable_extensions; do
38226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38227    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38229    break 2
38230  fi
38231done
38232  done
38233IFS=$as_save_IFS
38234
38235fi
38236fi
38237ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38238if test -n "$ac_ct_OBJCOPY"; then
38239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38240$as_echo "$ac_ct_OBJCOPY" >&6; }
38241else
38242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38243$as_echo "no" >&6; }
38244fi
38245
38246
38247  test -n "$ac_ct_OBJCOPY" && break
38248done
38249
38250  if test "x$ac_ct_OBJCOPY" = x; then
38251    OBJCOPY=""
38252  else
38253    case $cross_compiling:$ac_tool_warned in
38254yes:)
38255{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38256$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38257ac_tool_warned=yes ;;
38258esac
38259    OBJCOPY=$ac_ct_OBJCOPY
38260  fi
38261fi
38262
38263  else
38264    # The variable is set, but is it from the command line or the environment?
38265
38266    # Try to remove the string !OBJCOPY! from our list.
38267    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38268    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38269      # If it failed, the variable was not from the command line. Ignore it,
38270      # but warn the user (except for BASH, which is always set by the calling BASH).
38271      if test "xOBJCOPY" != xBASH; then
38272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38273$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38274      fi
38275      # Try to locate tool using the code snippet
38276      if test -n "$ac_tool_prefix"; then
38277  for ac_prog in gobjcopy objcopy
38278  do
38279    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38280set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38282$as_echo_n "checking for $ac_word... " >&6; }
38283if ${ac_cv_prog_OBJCOPY+:} false; then :
38284  $as_echo_n "(cached) " >&6
38285else
38286  if test -n "$OBJCOPY"; then
38287  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38288else
38289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38290for as_dir in $PATH
38291do
38292  IFS=$as_save_IFS
38293  test -z "$as_dir" && as_dir=.
38294    for ac_exec_ext in '' $ac_executable_extensions; do
38295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38296    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38298    break 2
38299  fi
38300done
38301  done
38302IFS=$as_save_IFS
38303
38304fi
38305fi
38306OBJCOPY=$ac_cv_prog_OBJCOPY
38307if test -n "$OBJCOPY"; then
38308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38309$as_echo "$OBJCOPY" >&6; }
38310else
38311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38312$as_echo "no" >&6; }
38313fi
38314
38315
38316    test -n "$OBJCOPY" && break
38317  done
38318fi
38319if test -z "$OBJCOPY"; then
38320  ac_ct_OBJCOPY=$OBJCOPY
38321  for ac_prog in gobjcopy objcopy
38322do
38323  # Extract the first word of "$ac_prog", so it can be a program name with args.
38324set dummy $ac_prog; ac_word=$2
38325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38326$as_echo_n "checking for $ac_word... " >&6; }
38327if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38328  $as_echo_n "(cached) " >&6
38329else
38330  if test -n "$ac_ct_OBJCOPY"; then
38331  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38332else
38333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38334for as_dir in $PATH
38335do
38336  IFS=$as_save_IFS
38337  test -z "$as_dir" && as_dir=.
38338    for ac_exec_ext in '' $ac_executable_extensions; do
38339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38340    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38342    break 2
38343  fi
38344done
38345  done
38346IFS=$as_save_IFS
38347
38348fi
38349fi
38350ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38351if test -n "$ac_ct_OBJCOPY"; then
38352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38353$as_echo "$ac_ct_OBJCOPY" >&6; }
38354else
38355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38356$as_echo "no" >&6; }
38357fi
38358
38359
38360  test -n "$ac_ct_OBJCOPY" && break
38361done
38362
38363  if test "x$ac_ct_OBJCOPY" = x; then
38364    OBJCOPY=""
38365  else
38366    case $cross_compiling:$ac_tool_warned in
38367yes:)
38368{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38369$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38370ac_tool_warned=yes ;;
38371esac
38372    OBJCOPY=$ac_ct_OBJCOPY
38373  fi
38374fi
38375
38376    else
38377      # If it succeeded, then it was overridden by the user. We will use it
38378      # for the tool.
38379
38380      # First remove it from the list of overridden variables, so we can test
38381      # for unknown variables in the end.
38382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38383
38384      # Check if the provided tool contains a complete path.
38385      tool_specified="$OBJCOPY"
38386      tool_basename="${tool_specified##*/}"
38387      if test "x$tool_basename" = "x$tool_specified"; then
38388        # A command without a complete path is provided, search $PATH.
38389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38390$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38391        # Extract the first word of "$tool_basename", so it can be a program name with args.
38392set dummy $tool_basename; ac_word=$2
38393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38394$as_echo_n "checking for $ac_word... " >&6; }
38395if ${ac_cv_path_OBJCOPY+:} false; then :
38396  $as_echo_n "(cached) " >&6
38397else
38398  case $OBJCOPY in
38399  [\\/]* | ?:[\\/]*)
38400  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38401  ;;
38402  *)
38403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38404for as_dir in $PATH
38405do
38406  IFS=$as_save_IFS
38407  test -z "$as_dir" && as_dir=.
38408    for ac_exec_ext in '' $ac_executable_extensions; do
38409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38410    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38412    break 2
38413  fi
38414done
38415  done
38416IFS=$as_save_IFS
38417
38418  ;;
38419esac
38420fi
38421OBJCOPY=$ac_cv_path_OBJCOPY
38422if test -n "$OBJCOPY"; then
38423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38424$as_echo "$OBJCOPY" >&6; }
38425else
38426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38427$as_echo "no" >&6; }
38428fi
38429
38430
38431        if test "x$OBJCOPY" = x; then
38432          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38433        fi
38434      else
38435        # Otherwise we believe it is a complete path. Use it as it is.
38436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38437$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38439$as_echo_n "checking for OBJCOPY... " >&6; }
38440        if test ! -x "$tool_specified"; then
38441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38442$as_echo "not found" >&6; }
38443          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38444        fi
38445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38446$as_echo "$tool_specified" >&6; }
38447      fi
38448    fi
38449  fi
38450
38451
38452    # Only call fixup if objcopy was found.
38453    if test -n "$OBJCOPY"; then
38454
38455  # Only process if variable expands to non-empty
38456
38457  if test "x$OBJCOPY" != x; then
38458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38459
38460  # First separate the path from the arguments. This will split at the first
38461  # space.
38462  complete="$OBJCOPY"
38463  path="${complete%% *}"
38464  tmp="$complete EOL"
38465  arguments="${tmp#* }"
38466
38467  # Input might be given as Windows format, start by converting to
38468  # unix format.
38469  new_path=`$CYGPATH -u "$path"`
38470
38471  # Now try to locate executable using which
38472  new_path=`$WHICH "$new_path" 2> /dev/null`
38473  # bat and cmd files are not always considered executable in cygwin causing which
38474  # to not find them
38475  if test "x$new_path" = x \
38476      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38477      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38478    new_path=`$CYGPATH -u "$path"`
38479  fi
38480  if test "x$new_path" = x; then
38481    # Oops. Which didn't find the executable.
38482    # The splitting of arguments from the executable at a space might have been incorrect,
38483    # since paths with space are more likely in Windows. Give it another try with the whole
38484    # argument.
38485    path="$complete"
38486    arguments="EOL"
38487    new_path=`$CYGPATH -u "$path"`
38488    new_path=`$WHICH "$new_path" 2> /dev/null`
38489    # bat and cmd files are not always considered executable in cygwin causing which
38490    # to not find them
38491    if test "x$new_path" = x \
38492        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38493        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38494      new_path=`$CYGPATH -u "$path"`
38495    fi
38496    if test "x$new_path" = x; then
38497      # It's still not found. Now this is an unrecoverable error.
38498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38499$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38500      has_space=`$ECHO "$complete" | $GREP " "`
38501      if test "x$has_space" != x; then
38502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38504      fi
38505      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38506    fi
38507  fi
38508
38509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38512  # "foo.exe" is OK but "foo" is an error.
38513  #
38514  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38515  # It is also a way to make sure we got the proper file name for the real test later on.
38516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38517  if test "x$test_shortpath" = x; then
38518    # Short path failed, file does not exist as specified.
38519    # Try adding .exe or .cmd
38520    if test -f "${new_path}.exe"; then
38521      input_to_shortpath="${new_path}.exe"
38522    elif test -f "${new_path}.cmd"; then
38523      input_to_shortpath="${new_path}.cmd"
38524    else
38525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38526$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38527      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38528$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38529      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38530    fi
38531  else
38532    input_to_shortpath="$new_path"
38533  fi
38534
38535  # Call helper function which possibly converts this using DOS-style short mode.
38536  # If so, the updated path is stored in $new_path.
38537  new_path="$input_to_shortpath"
38538
38539  input_path="$input_to_shortpath"
38540  # Check if we need to convert this using DOS-style short mode. If the path
38541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38542  # take no chances and rewrite it.
38543  # Note: m4 eats our [], so we need to use [ and ] instead.
38544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38545  if test "x$has_forbidden_chars" != x; then
38546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38550      # Going to short mode and back again did indeed matter. Since short mode is
38551      # case insensitive, let's make it lowercase to improve readability.
38552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38553      # Now convert it back to Unix-style (cygpath)
38554      input_path=`$CYGPATH -u "$shortmode_path"`
38555      new_path="$input_path"
38556    fi
38557  fi
38558
38559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38560  if test "x$test_cygdrive_prefix" = x; then
38561    # As a simple fix, exclude /usr/bin since it's not a real path.
38562    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38564      # a path prefixed by /cygdrive for fixpath to work.
38565      new_path="$CYGWIN_ROOT_PATH$input_path"
38566    fi
38567  fi
38568
38569  # remove trailing .exe if any
38570  new_path="${new_path/%.exe/}"
38571
38572    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38573
38574  # First separate the path from the arguments. This will split at the first
38575  # space.
38576  complete="$OBJCOPY"
38577  path="${complete%% *}"
38578  tmp="$complete EOL"
38579  arguments="${tmp#* }"
38580
38581  # Input might be given as Windows format, start by converting to
38582  # unix format.
38583  new_path="$path"
38584
38585  windows_path="$new_path"
38586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38587    unix_path=`$CYGPATH -u "$windows_path"`
38588    new_path="$unix_path"
38589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38591    new_path="$unix_path"
38592  fi
38593
38594
38595  # Now try to locate executable using which
38596  new_path=`$WHICH "$new_path" 2> /dev/null`
38597
38598  if test "x$new_path" = x; then
38599    # Oops. Which didn't find the executable.
38600    # The splitting of arguments from the executable at a space might have been incorrect,
38601    # since paths with space are more likely in Windows. Give it another try with the whole
38602    # argument.
38603    path="$complete"
38604    arguments="EOL"
38605    new_path="$path"
38606
38607  windows_path="$new_path"
38608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38609    unix_path=`$CYGPATH -u "$windows_path"`
38610    new_path="$unix_path"
38611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38613    new_path="$unix_path"
38614  fi
38615
38616
38617    new_path=`$WHICH "$new_path" 2> /dev/null`
38618    # bat and cmd files are not always considered executable in MSYS causing which
38619    # to not find them
38620    if test "x$new_path" = x \
38621        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38622        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38623      new_path="$path"
38624
38625  windows_path="$new_path"
38626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38627    unix_path=`$CYGPATH -u "$windows_path"`
38628    new_path="$unix_path"
38629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38631    new_path="$unix_path"
38632  fi
38633
38634    fi
38635
38636    if test "x$new_path" = x; then
38637      # It's still not found. Now this is an unrecoverable error.
38638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38639$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38640      has_space=`$ECHO "$complete" | $GREP " "`
38641      if test "x$has_space" != x; then
38642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38644      fi
38645      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38646    fi
38647  fi
38648
38649  # Now new_path has a complete unix path to the binary
38650  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38651    # Keep paths in /bin as-is, but remove trailing .exe if any
38652    new_path="${new_path/%.exe/}"
38653    # Do not save /bin paths to all_fixpath_prefixes!
38654  else
38655    # Not in mixed or Windows style, start by that.
38656    new_path=`cmd //c echo $new_path`
38657
38658  input_path="$new_path"
38659  # Check if we need to convert this using DOS-style short mode. If the path
38660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38661  # take no chances and rewrite it.
38662  # Note: m4 eats our [], so we need to use [ and ] instead.
38663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38664  if test "x$has_forbidden_chars" != x; then
38665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38667  fi
38668
38669    # Output is in $new_path
38670
38671  windows_path="$new_path"
38672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38673    unix_path=`$CYGPATH -u "$windows_path"`
38674    new_path="$unix_path"
38675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38677    new_path="$unix_path"
38678  fi
38679
38680    # remove trailing .exe if any
38681    new_path="${new_path/%.exe/}"
38682
38683    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38684    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38685  fi
38686
38687    else
38688      # We're on a unix platform. Hooray! :)
38689      # First separate the path from the arguments. This will split at the first
38690      # space.
38691      complete="$OBJCOPY"
38692      path="${complete%% *}"
38693      tmp="$complete EOL"
38694      arguments="${tmp#* }"
38695
38696      # Cannot rely on the command "which" here since it doesn't always work.
38697      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38698      if test -z "$is_absolute_path"; then
38699        # Path to executable is not absolute. Find it.
38700        IFS_save="$IFS"
38701        IFS=:
38702        for p in $PATH; do
38703          if test -f "$p/$path" && test -x "$p/$path"; then
38704            new_path="$p/$path"
38705            break
38706          fi
38707        done
38708        IFS="$IFS_save"
38709      else
38710        # This is an absolute path, we can use it without further modifications.
38711        new_path="$path"
38712      fi
38713
38714      if test "x$new_path" = x; then
38715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38716$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38717        has_space=`$ECHO "$complete" | $GREP " "`
38718        if test "x$has_space" != x; then
38719          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38720$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38721        fi
38722        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38723      fi
38724    fi
38725
38726    # Now join together the path and the arguments once again
38727    if test "x$arguments" != xEOL; then
38728      new_complete="$new_path ${arguments% *}"
38729    else
38730      new_complete="$new_path"
38731    fi
38732
38733    if test "x$complete" != "x$new_complete"; then
38734      OBJCOPY="$new_complete"
38735      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38736$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38737    fi
38738  fi
38739
38740    fi
38741  fi
38742
38743
38744
38745  # Publish this variable in the help.
38746
38747
38748  if test "x$OBJDUMP" = x; then
38749    # The variable is not set by user, try to locate tool using the code snippet
38750    if test -n "$ac_tool_prefix"; then
38751  for ac_prog in gobjdump objdump
38752  do
38753    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38754set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38756$as_echo_n "checking for $ac_word... " >&6; }
38757if ${ac_cv_prog_OBJDUMP+:} false; then :
38758  $as_echo_n "(cached) " >&6
38759else
38760  if test -n "$OBJDUMP"; then
38761  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38762else
38763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38764for as_dir in $PATH
38765do
38766  IFS=$as_save_IFS
38767  test -z "$as_dir" && as_dir=.
38768    for ac_exec_ext in '' $ac_executable_extensions; do
38769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38770    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38772    break 2
38773  fi
38774done
38775  done
38776IFS=$as_save_IFS
38777
38778fi
38779fi
38780OBJDUMP=$ac_cv_prog_OBJDUMP
38781if test -n "$OBJDUMP"; then
38782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38783$as_echo "$OBJDUMP" >&6; }
38784else
38785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38786$as_echo "no" >&6; }
38787fi
38788
38789
38790    test -n "$OBJDUMP" && break
38791  done
38792fi
38793if test -z "$OBJDUMP"; then
38794  ac_ct_OBJDUMP=$OBJDUMP
38795  for ac_prog in gobjdump objdump
38796do
38797  # Extract the first word of "$ac_prog", so it can be a program name with args.
38798set dummy $ac_prog; ac_word=$2
38799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38800$as_echo_n "checking for $ac_word... " >&6; }
38801if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38802  $as_echo_n "(cached) " >&6
38803else
38804  if test -n "$ac_ct_OBJDUMP"; then
38805  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38806else
38807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38808for as_dir in $PATH
38809do
38810  IFS=$as_save_IFS
38811  test -z "$as_dir" && as_dir=.
38812    for ac_exec_ext in '' $ac_executable_extensions; do
38813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38814    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38816    break 2
38817  fi
38818done
38819  done
38820IFS=$as_save_IFS
38821
38822fi
38823fi
38824ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38825if test -n "$ac_ct_OBJDUMP"; then
38826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38827$as_echo "$ac_ct_OBJDUMP" >&6; }
38828else
38829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38830$as_echo "no" >&6; }
38831fi
38832
38833
38834  test -n "$ac_ct_OBJDUMP" && break
38835done
38836
38837  if test "x$ac_ct_OBJDUMP" = x; then
38838    OBJDUMP=""
38839  else
38840    case $cross_compiling:$ac_tool_warned in
38841yes:)
38842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38844ac_tool_warned=yes ;;
38845esac
38846    OBJDUMP=$ac_ct_OBJDUMP
38847  fi
38848fi
38849
38850  else
38851    # The variable is set, but is it from the command line or the environment?
38852
38853    # Try to remove the string !OBJDUMP! from our list.
38854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38856      # If it failed, the variable was not from the command line. Ignore it,
38857      # but warn the user (except for BASH, which is always set by the calling BASH).
38858      if test "xOBJDUMP" != xBASH; then
38859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38860$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38861      fi
38862      # Try to locate tool using the code snippet
38863      if test -n "$ac_tool_prefix"; then
38864  for ac_prog in gobjdump objdump
38865  do
38866    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38867set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38869$as_echo_n "checking for $ac_word... " >&6; }
38870if ${ac_cv_prog_OBJDUMP+:} false; then :
38871  $as_echo_n "(cached) " >&6
38872else
38873  if test -n "$OBJDUMP"; then
38874  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38875else
38876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38877for as_dir in $PATH
38878do
38879  IFS=$as_save_IFS
38880  test -z "$as_dir" && as_dir=.
38881    for ac_exec_ext in '' $ac_executable_extensions; do
38882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38883    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38885    break 2
38886  fi
38887done
38888  done
38889IFS=$as_save_IFS
38890
38891fi
38892fi
38893OBJDUMP=$ac_cv_prog_OBJDUMP
38894if test -n "$OBJDUMP"; then
38895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38896$as_echo "$OBJDUMP" >&6; }
38897else
38898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38899$as_echo "no" >&6; }
38900fi
38901
38902
38903    test -n "$OBJDUMP" && break
38904  done
38905fi
38906if test -z "$OBJDUMP"; then
38907  ac_ct_OBJDUMP=$OBJDUMP
38908  for ac_prog in gobjdump objdump
38909do
38910  # Extract the first word of "$ac_prog", so it can be a program name with args.
38911set dummy $ac_prog; ac_word=$2
38912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38913$as_echo_n "checking for $ac_word... " >&6; }
38914if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38915  $as_echo_n "(cached) " >&6
38916else
38917  if test -n "$ac_ct_OBJDUMP"; then
38918  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38919else
38920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38921for as_dir in $PATH
38922do
38923  IFS=$as_save_IFS
38924  test -z "$as_dir" && as_dir=.
38925    for ac_exec_ext in '' $ac_executable_extensions; do
38926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38927    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38929    break 2
38930  fi
38931done
38932  done
38933IFS=$as_save_IFS
38934
38935fi
38936fi
38937ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38938if test -n "$ac_ct_OBJDUMP"; then
38939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38940$as_echo "$ac_ct_OBJDUMP" >&6; }
38941else
38942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38943$as_echo "no" >&6; }
38944fi
38945
38946
38947  test -n "$ac_ct_OBJDUMP" && break
38948done
38949
38950  if test "x$ac_ct_OBJDUMP" = x; then
38951    OBJDUMP=""
38952  else
38953    case $cross_compiling:$ac_tool_warned in
38954yes:)
38955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38957ac_tool_warned=yes ;;
38958esac
38959    OBJDUMP=$ac_ct_OBJDUMP
38960  fi
38961fi
38962
38963    else
38964      # If it succeeded, then it was overridden by the user. We will use it
38965      # for the tool.
38966
38967      # First remove it from the list of overridden variables, so we can test
38968      # for unknown variables in the end.
38969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38970
38971      # Check if the provided tool contains a complete path.
38972      tool_specified="$OBJDUMP"
38973      tool_basename="${tool_specified##*/}"
38974      if test "x$tool_basename" = "x$tool_specified"; then
38975        # A command without a complete path is provided, search $PATH.
38976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38977$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38978        # Extract the first word of "$tool_basename", so it can be a program name with args.
38979set dummy $tool_basename; ac_word=$2
38980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38981$as_echo_n "checking for $ac_word... " >&6; }
38982if ${ac_cv_path_OBJDUMP+:} false; then :
38983  $as_echo_n "(cached) " >&6
38984else
38985  case $OBJDUMP in
38986  [\\/]* | ?:[\\/]*)
38987  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38988  ;;
38989  *)
38990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38991for as_dir in $PATH
38992do
38993  IFS=$as_save_IFS
38994  test -z "$as_dir" && as_dir=.
38995    for ac_exec_ext in '' $ac_executable_extensions; do
38996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38997    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38999    break 2
39000  fi
39001done
39002  done
39003IFS=$as_save_IFS
39004
39005  ;;
39006esac
39007fi
39008OBJDUMP=$ac_cv_path_OBJDUMP
39009if test -n "$OBJDUMP"; then
39010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39011$as_echo "$OBJDUMP" >&6; }
39012else
39013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39014$as_echo "no" >&6; }
39015fi
39016
39017
39018        if test "x$OBJDUMP" = x; then
39019          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39020        fi
39021      else
39022        # Otherwise we believe it is a complete path. Use it as it is.
39023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39024$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39026$as_echo_n "checking for OBJDUMP... " >&6; }
39027        if test ! -x "$tool_specified"; then
39028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39029$as_echo "not found" >&6; }
39030          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39031        fi
39032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39033$as_echo "$tool_specified" >&6; }
39034      fi
39035    fi
39036  fi
39037
39038
39039  if test "x$OBJDUMP" != x; then
39040    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39041    # bails if argument is missing.
39042
39043  # Only process if variable expands to non-empty
39044
39045  if test "x$OBJDUMP" != x; then
39046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39047
39048  # First separate the path from the arguments. This will split at the first
39049  # space.
39050  complete="$OBJDUMP"
39051  path="${complete%% *}"
39052  tmp="$complete EOL"
39053  arguments="${tmp#* }"
39054
39055  # Input might be given as Windows format, start by converting to
39056  # unix format.
39057  new_path=`$CYGPATH -u "$path"`
39058
39059  # Now try to locate executable using which
39060  new_path=`$WHICH "$new_path" 2> /dev/null`
39061  # bat and cmd files are not always considered executable in cygwin causing which
39062  # to not find them
39063  if test "x$new_path" = x \
39064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39066    new_path=`$CYGPATH -u "$path"`
39067  fi
39068  if test "x$new_path" = x; then
39069    # Oops. Which didn't find the executable.
39070    # The splitting of arguments from the executable at a space might have been incorrect,
39071    # since paths with space are more likely in Windows. Give it another try with the whole
39072    # argument.
39073    path="$complete"
39074    arguments="EOL"
39075    new_path=`$CYGPATH -u "$path"`
39076    new_path=`$WHICH "$new_path" 2> /dev/null`
39077    # bat and cmd files are not always considered executable in cygwin causing which
39078    # to not find them
39079    if test "x$new_path" = x \
39080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39082      new_path=`$CYGPATH -u "$path"`
39083    fi
39084    if test "x$new_path" = x; then
39085      # It's still not found. Now this is an unrecoverable error.
39086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39087$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39088      has_space=`$ECHO "$complete" | $GREP " "`
39089      if test "x$has_space" != x; then
39090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39092      fi
39093      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39094    fi
39095  fi
39096
39097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39100  # "foo.exe" is OK but "foo" is an error.
39101  #
39102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39103  # It is also a way to make sure we got the proper file name for the real test later on.
39104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39105  if test "x$test_shortpath" = x; then
39106    # Short path failed, file does not exist as specified.
39107    # Try adding .exe or .cmd
39108    if test -f "${new_path}.exe"; then
39109      input_to_shortpath="${new_path}.exe"
39110    elif test -f "${new_path}.cmd"; then
39111      input_to_shortpath="${new_path}.cmd"
39112    else
39113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39114$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39117      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39118    fi
39119  else
39120    input_to_shortpath="$new_path"
39121  fi
39122
39123  # Call helper function which possibly converts this using DOS-style short mode.
39124  # If so, the updated path is stored in $new_path.
39125  new_path="$input_to_shortpath"
39126
39127  input_path="$input_to_shortpath"
39128  # Check if we need to convert this using DOS-style short mode. If the path
39129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39130  # take no chances and rewrite it.
39131  # Note: m4 eats our [], so we need to use [ and ] instead.
39132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39133  if test "x$has_forbidden_chars" != x; then
39134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39138      # Going to short mode and back again did indeed matter. Since short mode is
39139      # case insensitive, let's make it lowercase to improve readability.
39140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39141      # Now convert it back to Unix-style (cygpath)
39142      input_path=`$CYGPATH -u "$shortmode_path"`
39143      new_path="$input_path"
39144    fi
39145  fi
39146
39147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39148  if test "x$test_cygdrive_prefix" = x; then
39149    # As a simple fix, exclude /usr/bin since it's not a real path.
39150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39152      # a path prefixed by /cygdrive for fixpath to work.
39153      new_path="$CYGWIN_ROOT_PATH$input_path"
39154    fi
39155  fi
39156
39157  # remove trailing .exe if any
39158  new_path="${new_path/%.exe/}"
39159
39160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39161
39162  # First separate the path from the arguments. This will split at the first
39163  # space.
39164  complete="$OBJDUMP"
39165  path="${complete%% *}"
39166  tmp="$complete EOL"
39167  arguments="${tmp#* }"
39168
39169  # Input might be given as Windows format, start by converting to
39170  # unix format.
39171  new_path="$path"
39172
39173  windows_path="$new_path"
39174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39175    unix_path=`$CYGPATH -u "$windows_path"`
39176    new_path="$unix_path"
39177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39179    new_path="$unix_path"
39180  fi
39181
39182
39183  # Now try to locate executable using which
39184  new_path=`$WHICH "$new_path" 2> /dev/null`
39185
39186  if test "x$new_path" = x; then
39187    # Oops. Which didn't find the executable.
39188    # The splitting of arguments from the executable at a space might have been incorrect,
39189    # since paths with space are more likely in Windows. Give it another try with the whole
39190    # argument.
39191    path="$complete"
39192    arguments="EOL"
39193    new_path="$path"
39194
39195  windows_path="$new_path"
39196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39197    unix_path=`$CYGPATH -u "$windows_path"`
39198    new_path="$unix_path"
39199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39201    new_path="$unix_path"
39202  fi
39203
39204
39205    new_path=`$WHICH "$new_path" 2> /dev/null`
39206    # bat and cmd files are not always considered executable in MSYS causing which
39207    # to not find them
39208    if test "x$new_path" = x \
39209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39211      new_path="$path"
39212
39213  windows_path="$new_path"
39214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39215    unix_path=`$CYGPATH -u "$windows_path"`
39216    new_path="$unix_path"
39217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39219    new_path="$unix_path"
39220  fi
39221
39222    fi
39223
39224    if test "x$new_path" = x; then
39225      # It's still not found. Now this is an unrecoverable error.
39226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39227$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39228      has_space=`$ECHO "$complete" | $GREP " "`
39229      if test "x$has_space" != x; then
39230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39232      fi
39233      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39234    fi
39235  fi
39236
39237  # Now new_path has a complete unix path to the binary
39238  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39239    # Keep paths in /bin as-is, but remove trailing .exe if any
39240    new_path="${new_path/%.exe/}"
39241    # Do not save /bin paths to all_fixpath_prefixes!
39242  else
39243    # Not in mixed or Windows style, start by that.
39244    new_path=`cmd //c echo $new_path`
39245
39246  input_path="$new_path"
39247  # Check if we need to convert this using DOS-style short mode. If the path
39248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39249  # take no chances and rewrite it.
39250  # Note: m4 eats our [], so we need to use [ and ] instead.
39251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39252  if test "x$has_forbidden_chars" != x; then
39253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39255  fi
39256
39257    # Output is in $new_path
39258
39259  windows_path="$new_path"
39260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39261    unix_path=`$CYGPATH -u "$windows_path"`
39262    new_path="$unix_path"
39263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39265    new_path="$unix_path"
39266  fi
39267
39268    # remove trailing .exe if any
39269    new_path="${new_path/%.exe/}"
39270
39271    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39272    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39273  fi
39274
39275    else
39276      # We're on a unix platform. Hooray! :)
39277      # First separate the path from the arguments. This will split at the first
39278      # space.
39279      complete="$OBJDUMP"
39280      path="${complete%% *}"
39281      tmp="$complete EOL"
39282      arguments="${tmp#* }"
39283
39284      # Cannot rely on the command "which" here since it doesn't always work.
39285      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39286      if test -z "$is_absolute_path"; then
39287        # Path to executable is not absolute. Find it.
39288        IFS_save="$IFS"
39289        IFS=:
39290        for p in $PATH; do
39291          if test -f "$p/$path" && test -x "$p/$path"; then
39292            new_path="$p/$path"
39293            break
39294          fi
39295        done
39296        IFS="$IFS_save"
39297      else
39298        # This is an absolute path, we can use it without further modifications.
39299        new_path="$path"
39300      fi
39301
39302      if test "x$new_path" = x; then
39303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39304$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39305        has_space=`$ECHO "$complete" | $GREP " "`
39306        if test "x$has_space" != x; then
39307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39309        fi
39310        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39311      fi
39312    fi
39313
39314    # Now join together the path and the arguments once again
39315    if test "x$arguments" != xEOL; then
39316      new_complete="$new_path ${arguments% *}"
39317    else
39318      new_complete="$new_path"
39319    fi
39320
39321    if test "x$complete" != "x$new_complete"; then
39322      OBJDUMP="$new_complete"
39323      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39324$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39325    fi
39326  fi
39327
39328  fi
39329
39330
39331  # Restore old path.
39332  PATH="$OLD_PATH"
39333
39334  # Restore the flags to the user specified values.
39335  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39336  CFLAGS="$ORG_CFLAGS"
39337  CXXFLAGS="$ORG_CXXFLAGS"
39338
39339
39340# Finally do some processing after the detection phase
39341
39342  if test "x$COMPILE_TYPE" = "xcross"; then
39343    # Now we need to find a C/C++ compiler that can build executables for the
39344    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39345    # used once. Also, we need to do this without adding a tools dir to the
39346    # path, otherwise we might pick up cross-compilers which don't use standard
39347    # naming.
39348
39349    # FIXME: we should list the discovered compilers as an exclude pattern!
39350    # If we do that, we can do this detection before POST_DETECTION, and still
39351    # find the build compilers in the tools dir, if needed.
39352
39353
39354  # Publish this variable in the help.
39355
39356
39357  if test "x$BUILD_CC" = x; then
39358    # The variable is not set by user, try to locate tool using the code snippet
39359    for ac_prog in cl cc gcc
39360do
39361  # Extract the first word of "$ac_prog", so it can be a program name with args.
39362set dummy $ac_prog; ac_word=$2
39363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39364$as_echo_n "checking for $ac_word... " >&6; }
39365if ${ac_cv_path_BUILD_CC+:} false; then :
39366  $as_echo_n "(cached) " >&6
39367else
39368  case $BUILD_CC in
39369  [\\/]* | ?:[\\/]*)
39370  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39371  ;;
39372  *)
39373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39374for as_dir in $PATH
39375do
39376  IFS=$as_save_IFS
39377  test -z "$as_dir" && as_dir=.
39378    for ac_exec_ext in '' $ac_executable_extensions; do
39379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39380    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39382    break 2
39383  fi
39384done
39385  done
39386IFS=$as_save_IFS
39387
39388  ;;
39389esac
39390fi
39391BUILD_CC=$ac_cv_path_BUILD_CC
39392if test -n "$BUILD_CC"; then
39393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39394$as_echo "$BUILD_CC" >&6; }
39395else
39396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39397$as_echo "no" >&6; }
39398fi
39399
39400
39401  test -n "$BUILD_CC" && break
39402done
39403
39404  else
39405    # The variable is set, but is it from the command line or the environment?
39406
39407    # Try to remove the string !BUILD_CC! from our list.
39408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39410      # If it failed, the variable was not from the command line. Ignore it,
39411      # but warn the user (except for BASH, which is always set by the calling BASH).
39412      if test "xBUILD_CC" != xBASH; then
39413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39414$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39415      fi
39416      # Try to locate tool using the code snippet
39417      for ac_prog in cl cc gcc
39418do
39419  # Extract the first word of "$ac_prog", so it can be a program name with args.
39420set dummy $ac_prog; ac_word=$2
39421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39422$as_echo_n "checking for $ac_word... " >&6; }
39423if ${ac_cv_path_BUILD_CC+:} false; then :
39424  $as_echo_n "(cached) " >&6
39425else
39426  case $BUILD_CC in
39427  [\\/]* | ?:[\\/]*)
39428  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39429  ;;
39430  *)
39431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39432for as_dir in $PATH
39433do
39434  IFS=$as_save_IFS
39435  test -z "$as_dir" && as_dir=.
39436    for ac_exec_ext in '' $ac_executable_extensions; do
39437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39438    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39440    break 2
39441  fi
39442done
39443  done
39444IFS=$as_save_IFS
39445
39446  ;;
39447esac
39448fi
39449BUILD_CC=$ac_cv_path_BUILD_CC
39450if test -n "$BUILD_CC"; then
39451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39452$as_echo "$BUILD_CC" >&6; }
39453else
39454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39455$as_echo "no" >&6; }
39456fi
39457
39458
39459  test -n "$BUILD_CC" && break
39460done
39461
39462    else
39463      # If it succeeded, then it was overridden by the user. We will use it
39464      # for the tool.
39465
39466      # First remove it from the list of overridden variables, so we can test
39467      # for unknown variables in the end.
39468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39469
39470      # Check if the provided tool contains a complete path.
39471      tool_specified="$BUILD_CC"
39472      tool_basename="${tool_specified##*/}"
39473      if test "x$tool_basename" = "x$tool_specified"; then
39474        # A command without a complete path is provided, search $PATH.
39475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39476$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39477        # Extract the first word of "$tool_basename", so it can be a program name with args.
39478set dummy $tool_basename; ac_word=$2
39479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39480$as_echo_n "checking for $ac_word... " >&6; }
39481if ${ac_cv_path_BUILD_CC+:} false; then :
39482  $as_echo_n "(cached) " >&6
39483else
39484  case $BUILD_CC in
39485  [\\/]* | ?:[\\/]*)
39486  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39487  ;;
39488  *)
39489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39490for as_dir in $PATH
39491do
39492  IFS=$as_save_IFS
39493  test -z "$as_dir" && as_dir=.
39494    for ac_exec_ext in '' $ac_executable_extensions; do
39495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39496    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39498    break 2
39499  fi
39500done
39501  done
39502IFS=$as_save_IFS
39503
39504  ;;
39505esac
39506fi
39507BUILD_CC=$ac_cv_path_BUILD_CC
39508if test -n "$BUILD_CC"; then
39509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39510$as_echo "$BUILD_CC" >&6; }
39511else
39512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39513$as_echo "no" >&6; }
39514fi
39515
39516
39517        if test "x$BUILD_CC" = x; then
39518          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39519        fi
39520      else
39521        # Otherwise we believe it is a complete path. Use it as it is.
39522        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39523$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39525$as_echo_n "checking for BUILD_CC... " >&6; }
39526        if test ! -x "$tool_specified"; then
39527          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39528$as_echo "not found" >&6; }
39529          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39530        fi
39531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39532$as_echo "$tool_specified" >&6; }
39533      fi
39534    fi
39535  fi
39536
39537
39538
39539  # Only process if variable expands to non-empty
39540
39541  if test "x$BUILD_CC" != x; then
39542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39543
39544  # First separate the path from the arguments. This will split at the first
39545  # space.
39546  complete="$BUILD_CC"
39547  path="${complete%% *}"
39548  tmp="$complete EOL"
39549  arguments="${tmp#* }"
39550
39551  # Input might be given as Windows format, start by converting to
39552  # unix format.
39553  new_path=`$CYGPATH -u "$path"`
39554
39555  # Now try to locate executable using which
39556  new_path=`$WHICH "$new_path" 2> /dev/null`
39557  # bat and cmd files are not always considered executable in cygwin causing which
39558  # to not find them
39559  if test "x$new_path" = x \
39560      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39561      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39562    new_path=`$CYGPATH -u "$path"`
39563  fi
39564  if test "x$new_path" = x; then
39565    # Oops. Which didn't find the executable.
39566    # The splitting of arguments from the executable at a space might have been incorrect,
39567    # since paths with space are more likely in Windows. Give it another try with the whole
39568    # argument.
39569    path="$complete"
39570    arguments="EOL"
39571    new_path=`$CYGPATH -u "$path"`
39572    new_path=`$WHICH "$new_path" 2> /dev/null`
39573    # bat and cmd files are not always considered executable in cygwin causing which
39574    # to not find them
39575    if test "x$new_path" = x \
39576        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39577        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39578      new_path=`$CYGPATH -u "$path"`
39579    fi
39580    if test "x$new_path" = x; then
39581      # It's still not found. Now this is an unrecoverable error.
39582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39583$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39584      has_space=`$ECHO "$complete" | $GREP " "`
39585      if test "x$has_space" != x; then
39586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39588      fi
39589      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39590    fi
39591  fi
39592
39593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39596  # "foo.exe" is OK but "foo" is an error.
39597  #
39598  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39599  # It is also a way to make sure we got the proper file name for the real test later on.
39600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39601  if test "x$test_shortpath" = x; then
39602    # Short path failed, file does not exist as specified.
39603    # Try adding .exe or .cmd
39604    if test -f "${new_path}.exe"; then
39605      input_to_shortpath="${new_path}.exe"
39606    elif test -f "${new_path}.cmd"; then
39607      input_to_shortpath="${new_path}.cmd"
39608    else
39609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39610$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39611      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39612$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39613      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39614    fi
39615  else
39616    input_to_shortpath="$new_path"
39617  fi
39618
39619  # Call helper function which possibly converts this using DOS-style short mode.
39620  # If so, the updated path is stored in $new_path.
39621  new_path="$input_to_shortpath"
39622
39623  input_path="$input_to_shortpath"
39624  # Check if we need to convert this using DOS-style short mode. If the path
39625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39626  # take no chances and rewrite it.
39627  # Note: m4 eats our [], so we need to use [ and ] instead.
39628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39629  if test "x$has_forbidden_chars" != x; then
39630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39634      # Going to short mode and back again did indeed matter. Since short mode is
39635      # case insensitive, let's make it lowercase to improve readability.
39636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39637      # Now convert it back to Unix-style (cygpath)
39638      input_path=`$CYGPATH -u "$shortmode_path"`
39639      new_path="$input_path"
39640    fi
39641  fi
39642
39643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39644  if test "x$test_cygdrive_prefix" = x; then
39645    # As a simple fix, exclude /usr/bin since it's not a real path.
39646    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39648      # a path prefixed by /cygdrive for fixpath to work.
39649      new_path="$CYGWIN_ROOT_PATH$input_path"
39650    fi
39651  fi
39652
39653  # remove trailing .exe if any
39654  new_path="${new_path/%.exe/}"
39655
39656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39657
39658  # First separate the path from the arguments. This will split at the first
39659  # space.
39660  complete="$BUILD_CC"
39661  path="${complete%% *}"
39662  tmp="$complete EOL"
39663  arguments="${tmp#* }"
39664
39665  # Input might be given as Windows format, start by converting to
39666  # unix format.
39667  new_path="$path"
39668
39669  windows_path="$new_path"
39670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39671    unix_path=`$CYGPATH -u "$windows_path"`
39672    new_path="$unix_path"
39673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39675    new_path="$unix_path"
39676  fi
39677
39678
39679  # Now try to locate executable using which
39680  new_path=`$WHICH "$new_path" 2> /dev/null`
39681
39682  if test "x$new_path" = x; then
39683    # Oops. Which didn't find the executable.
39684    # The splitting of arguments from the executable at a space might have been incorrect,
39685    # since paths with space are more likely in Windows. Give it another try with the whole
39686    # argument.
39687    path="$complete"
39688    arguments="EOL"
39689    new_path="$path"
39690
39691  windows_path="$new_path"
39692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39693    unix_path=`$CYGPATH -u "$windows_path"`
39694    new_path="$unix_path"
39695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39697    new_path="$unix_path"
39698  fi
39699
39700
39701    new_path=`$WHICH "$new_path" 2> /dev/null`
39702    # bat and cmd files are not always considered executable in MSYS causing which
39703    # to not find them
39704    if test "x$new_path" = x \
39705        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39706        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39707      new_path="$path"
39708
39709  windows_path="$new_path"
39710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39711    unix_path=`$CYGPATH -u "$windows_path"`
39712    new_path="$unix_path"
39713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39715    new_path="$unix_path"
39716  fi
39717
39718    fi
39719
39720    if test "x$new_path" = x; then
39721      # It's still not found. Now this is an unrecoverable error.
39722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39723$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39724      has_space=`$ECHO "$complete" | $GREP " "`
39725      if test "x$has_space" != x; then
39726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39728      fi
39729      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39730    fi
39731  fi
39732
39733  # Now new_path has a complete unix path to the binary
39734  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39735    # Keep paths in /bin as-is, but remove trailing .exe if any
39736    new_path="${new_path/%.exe/}"
39737    # Do not save /bin paths to all_fixpath_prefixes!
39738  else
39739    # Not in mixed or Windows style, start by that.
39740    new_path=`cmd //c echo $new_path`
39741
39742  input_path="$new_path"
39743  # Check if we need to convert this using DOS-style short mode. If the path
39744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39745  # take no chances and rewrite it.
39746  # Note: m4 eats our [], so we need to use [ and ] instead.
39747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39748  if test "x$has_forbidden_chars" != x; then
39749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39751  fi
39752
39753    # Output is in $new_path
39754
39755  windows_path="$new_path"
39756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39757    unix_path=`$CYGPATH -u "$windows_path"`
39758    new_path="$unix_path"
39759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39761    new_path="$unix_path"
39762  fi
39763
39764    # remove trailing .exe if any
39765    new_path="${new_path/%.exe/}"
39766
39767    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39768    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39769  fi
39770
39771    else
39772      # We're on a unix platform. Hooray! :)
39773      # First separate the path from the arguments. This will split at the first
39774      # space.
39775      complete="$BUILD_CC"
39776      path="${complete%% *}"
39777      tmp="$complete EOL"
39778      arguments="${tmp#* }"
39779
39780      # Cannot rely on the command "which" here since it doesn't always work.
39781      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39782      if test -z "$is_absolute_path"; then
39783        # Path to executable is not absolute. Find it.
39784        IFS_save="$IFS"
39785        IFS=:
39786        for p in $PATH; do
39787          if test -f "$p/$path" && test -x "$p/$path"; then
39788            new_path="$p/$path"
39789            break
39790          fi
39791        done
39792        IFS="$IFS_save"
39793      else
39794        # This is an absolute path, we can use it without further modifications.
39795        new_path="$path"
39796      fi
39797
39798      if test "x$new_path" = x; then
39799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39800$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39801        has_space=`$ECHO "$complete" | $GREP " "`
39802        if test "x$has_space" != x; then
39803          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39804$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39805        fi
39806        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39807      fi
39808    fi
39809
39810    # Now join together the path and the arguments once again
39811    if test "x$arguments" != xEOL; then
39812      new_complete="$new_path ${arguments% *}"
39813    else
39814      new_complete="$new_path"
39815    fi
39816
39817    if test "x$complete" != "x$new_complete"; then
39818      BUILD_CC="$new_complete"
39819      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39820$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39821    fi
39822  fi
39823
39824
39825
39826  # Publish this variable in the help.
39827
39828
39829  if test "x$BUILD_CXX" = x; then
39830    # The variable is not set by user, try to locate tool using the code snippet
39831    for ac_prog in cl CC g++
39832do
39833  # Extract the first word of "$ac_prog", so it can be a program name with args.
39834set dummy $ac_prog; ac_word=$2
39835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39836$as_echo_n "checking for $ac_word... " >&6; }
39837if ${ac_cv_path_BUILD_CXX+:} false; then :
39838  $as_echo_n "(cached) " >&6
39839else
39840  case $BUILD_CXX in
39841  [\\/]* | ?:[\\/]*)
39842  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39843  ;;
39844  *)
39845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39846for as_dir in $PATH
39847do
39848  IFS=$as_save_IFS
39849  test -z "$as_dir" && as_dir=.
39850    for ac_exec_ext in '' $ac_executable_extensions; do
39851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39852    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39854    break 2
39855  fi
39856done
39857  done
39858IFS=$as_save_IFS
39859
39860  ;;
39861esac
39862fi
39863BUILD_CXX=$ac_cv_path_BUILD_CXX
39864if test -n "$BUILD_CXX"; then
39865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39866$as_echo "$BUILD_CXX" >&6; }
39867else
39868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39869$as_echo "no" >&6; }
39870fi
39871
39872
39873  test -n "$BUILD_CXX" && break
39874done
39875
39876  else
39877    # The variable is set, but is it from the command line or the environment?
39878
39879    # Try to remove the string !BUILD_CXX! from our list.
39880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39882      # If it failed, the variable was not from the command line. Ignore it,
39883      # but warn the user (except for BASH, which is always set by the calling BASH).
39884      if test "xBUILD_CXX" != xBASH; then
39885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39886$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39887      fi
39888      # Try to locate tool using the code snippet
39889      for ac_prog in cl CC g++
39890do
39891  # Extract the first word of "$ac_prog", so it can be a program name with args.
39892set dummy $ac_prog; ac_word=$2
39893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39894$as_echo_n "checking for $ac_word... " >&6; }
39895if ${ac_cv_path_BUILD_CXX+:} false; then :
39896  $as_echo_n "(cached) " >&6
39897else
39898  case $BUILD_CXX in
39899  [\\/]* | ?:[\\/]*)
39900  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39901  ;;
39902  *)
39903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39904for as_dir in $PATH
39905do
39906  IFS=$as_save_IFS
39907  test -z "$as_dir" && as_dir=.
39908    for ac_exec_ext in '' $ac_executable_extensions; do
39909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39910    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39912    break 2
39913  fi
39914done
39915  done
39916IFS=$as_save_IFS
39917
39918  ;;
39919esac
39920fi
39921BUILD_CXX=$ac_cv_path_BUILD_CXX
39922if test -n "$BUILD_CXX"; then
39923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39924$as_echo "$BUILD_CXX" >&6; }
39925else
39926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39927$as_echo "no" >&6; }
39928fi
39929
39930
39931  test -n "$BUILD_CXX" && break
39932done
39933
39934    else
39935      # If it succeeded, then it was overridden by the user. We will use it
39936      # for the tool.
39937
39938      # First remove it from the list of overridden variables, so we can test
39939      # for unknown variables in the end.
39940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39941
39942      # Check if the provided tool contains a complete path.
39943      tool_specified="$BUILD_CXX"
39944      tool_basename="${tool_specified##*/}"
39945      if test "x$tool_basename" = "x$tool_specified"; then
39946        # A command without a complete path is provided, search $PATH.
39947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39948$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39949        # Extract the first word of "$tool_basename", so it can be a program name with args.
39950set dummy $tool_basename; ac_word=$2
39951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39952$as_echo_n "checking for $ac_word... " >&6; }
39953if ${ac_cv_path_BUILD_CXX+:} false; then :
39954  $as_echo_n "(cached) " >&6
39955else
39956  case $BUILD_CXX in
39957  [\\/]* | ?:[\\/]*)
39958  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39959  ;;
39960  *)
39961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39962for as_dir in $PATH
39963do
39964  IFS=$as_save_IFS
39965  test -z "$as_dir" && as_dir=.
39966    for ac_exec_ext in '' $ac_executable_extensions; do
39967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39968    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39970    break 2
39971  fi
39972done
39973  done
39974IFS=$as_save_IFS
39975
39976  ;;
39977esac
39978fi
39979BUILD_CXX=$ac_cv_path_BUILD_CXX
39980if test -n "$BUILD_CXX"; then
39981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39982$as_echo "$BUILD_CXX" >&6; }
39983else
39984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39985$as_echo "no" >&6; }
39986fi
39987
39988
39989        if test "x$BUILD_CXX" = x; then
39990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39991        fi
39992      else
39993        # Otherwise we believe it is a complete path. Use it as it is.
39994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39995$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39997$as_echo_n "checking for BUILD_CXX... " >&6; }
39998        if test ! -x "$tool_specified"; then
39999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40000$as_echo "not found" >&6; }
40001          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40002        fi
40003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40004$as_echo "$tool_specified" >&6; }
40005      fi
40006    fi
40007  fi
40008
40009
40010
40011  # Only process if variable expands to non-empty
40012
40013  if test "x$BUILD_CXX" != x; then
40014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40015
40016  # First separate the path from the arguments. This will split at the first
40017  # space.
40018  complete="$BUILD_CXX"
40019  path="${complete%% *}"
40020  tmp="$complete EOL"
40021  arguments="${tmp#* }"
40022
40023  # Input might be given as Windows format, start by converting to
40024  # unix format.
40025  new_path=`$CYGPATH -u "$path"`
40026
40027  # Now try to locate executable using which
40028  new_path=`$WHICH "$new_path" 2> /dev/null`
40029  # bat and cmd files are not always considered executable in cygwin causing which
40030  # to not find them
40031  if test "x$new_path" = x \
40032      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40033      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40034    new_path=`$CYGPATH -u "$path"`
40035  fi
40036  if test "x$new_path" = x; then
40037    # Oops. Which didn't find the executable.
40038    # The splitting of arguments from the executable at a space might have been incorrect,
40039    # since paths with space are more likely in Windows. Give it another try with the whole
40040    # argument.
40041    path="$complete"
40042    arguments="EOL"
40043    new_path=`$CYGPATH -u "$path"`
40044    new_path=`$WHICH "$new_path" 2> /dev/null`
40045    # bat and cmd files are not always considered executable in cygwin causing which
40046    # to not find them
40047    if test "x$new_path" = x \
40048        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40049        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40050      new_path=`$CYGPATH -u "$path"`
40051    fi
40052    if test "x$new_path" = x; then
40053      # It's still not found. Now this is an unrecoverable error.
40054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40055$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40056      has_space=`$ECHO "$complete" | $GREP " "`
40057      if test "x$has_space" != x; then
40058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40060      fi
40061      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40062    fi
40063  fi
40064
40065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40068  # "foo.exe" is OK but "foo" is an error.
40069  #
40070  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40071  # It is also a way to make sure we got the proper file name for the real test later on.
40072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40073  if test "x$test_shortpath" = x; then
40074    # Short path failed, file does not exist as specified.
40075    # Try adding .exe or .cmd
40076    if test -f "${new_path}.exe"; then
40077      input_to_shortpath="${new_path}.exe"
40078    elif test -f "${new_path}.cmd"; then
40079      input_to_shortpath="${new_path}.cmd"
40080    else
40081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40082$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40083      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40084$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40085      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40086    fi
40087  else
40088    input_to_shortpath="$new_path"
40089  fi
40090
40091  # Call helper function which possibly converts this using DOS-style short mode.
40092  # If so, the updated path is stored in $new_path.
40093  new_path="$input_to_shortpath"
40094
40095  input_path="$input_to_shortpath"
40096  # Check if we need to convert this using DOS-style short mode. If the path
40097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40098  # take no chances and rewrite it.
40099  # Note: m4 eats our [], so we need to use [ and ] instead.
40100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40101  if test "x$has_forbidden_chars" != x; then
40102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40106      # Going to short mode and back again did indeed matter. Since short mode is
40107      # case insensitive, let's make it lowercase to improve readability.
40108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40109      # Now convert it back to Unix-style (cygpath)
40110      input_path=`$CYGPATH -u "$shortmode_path"`
40111      new_path="$input_path"
40112    fi
40113  fi
40114
40115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40116  if test "x$test_cygdrive_prefix" = x; then
40117    # As a simple fix, exclude /usr/bin since it's not a real path.
40118    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40120      # a path prefixed by /cygdrive for fixpath to work.
40121      new_path="$CYGWIN_ROOT_PATH$input_path"
40122    fi
40123  fi
40124
40125  # remove trailing .exe if any
40126  new_path="${new_path/%.exe/}"
40127
40128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40129
40130  # First separate the path from the arguments. This will split at the first
40131  # space.
40132  complete="$BUILD_CXX"
40133  path="${complete%% *}"
40134  tmp="$complete EOL"
40135  arguments="${tmp#* }"
40136
40137  # Input might be given as Windows format, start by converting to
40138  # unix format.
40139  new_path="$path"
40140
40141  windows_path="$new_path"
40142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40143    unix_path=`$CYGPATH -u "$windows_path"`
40144    new_path="$unix_path"
40145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40147    new_path="$unix_path"
40148  fi
40149
40150
40151  # Now try to locate executable using which
40152  new_path=`$WHICH "$new_path" 2> /dev/null`
40153
40154  if test "x$new_path" = x; then
40155    # Oops. Which didn't find the executable.
40156    # The splitting of arguments from the executable at a space might have been incorrect,
40157    # since paths with space are more likely in Windows. Give it another try with the whole
40158    # argument.
40159    path="$complete"
40160    arguments="EOL"
40161    new_path="$path"
40162
40163  windows_path="$new_path"
40164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40165    unix_path=`$CYGPATH -u "$windows_path"`
40166    new_path="$unix_path"
40167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40169    new_path="$unix_path"
40170  fi
40171
40172
40173    new_path=`$WHICH "$new_path" 2> /dev/null`
40174    # bat and cmd files are not always considered executable in MSYS causing which
40175    # to not find them
40176    if test "x$new_path" = x \
40177        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40178        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40179      new_path="$path"
40180
40181  windows_path="$new_path"
40182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40183    unix_path=`$CYGPATH -u "$windows_path"`
40184    new_path="$unix_path"
40185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40187    new_path="$unix_path"
40188  fi
40189
40190    fi
40191
40192    if test "x$new_path" = x; then
40193      # It's still not found. Now this is an unrecoverable error.
40194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40195$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40196      has_space=`$ECHO "$complete" | $GREP " "`
40197      if test "x$has_space" != x; then
40198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40200      fi
40201      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40202    fi
40203  fi
40204
40205  # Now new_path has a complete unix path to the binary
40206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40207    # Keep paths in /bin as-is, but remove trailing .exe if any
40208    new_path="${new_path/%.exe/}"
40209    # Do not save /bin paths to all_fixpath_prefixes!
40210  else
40211    # Not in mixed or Windows style, start by that.
40212    new_path=`cmd //c echo $new_path`
40213
40214  input_path="$new_path"
40215  # Check if we need to convert this using DOS-style short mode. If the path
40216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40217  # take no chances and rewrite it.
40218  # Note: m4 eats our [], so we need to use [ and ] instead.
40219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40220  if test "x$has_forbidden_chars" != x; then
40221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40223  fi
40224
40225    # Output is in $new_path
40226
40227  windows_path="$new_path"
40228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40229    unix_path=`$CYGPATH -u "$windows_path"`
40230    new_path="$unix_path"
40231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40233    new_path="$unix_path"
40234  fi
40235
40236    # remove trailing .exe if any
40237    new_path="${new_path/%.exe/}"
40238
40239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40241  fi
40242
40243    else
40244      # We're on a unix platform. Hooray! :)
40245      # First separate the path from the arguments. This will split at the first
40246      # space.
40247      complete="$BUILD_CXX"
40248      path="${complete%% *}"
40249      tmp="$complete EOL"
40250      arguments="${tmp#* }"
40251
40252      # Cannot rely on the command "which" here since it doesn't always work.
40253      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40254      if test -z "$is_absolute_path"; then
40255        # Path to executable is not absolute. Find it.
40256        IFS_save="$IFS"
40257        IFS=:
40258        for p in $PATH; do
40259          if test -f "$p/$path" && test -x "$p/$path"; then
40260            new_path="$p/$path"
40261            break
40262          fi
40263        done
40264        IFS="$IFS_save"
40265      else
40266        # This is an absolute path, we can use it without further modifications.
40267        new_path="$path"
40268      fi
40269
40270      if test "x$new_path" = x; then
40271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40272$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40273        has_space=`$ECHO "$complete" | $GREP " "`
40274        if test "x$has_space" != x; then
40275          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40277        fi
40278        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40279      fi
40280    fi
40281
40282    # Now join together the path and the arguments once again
40283    if test "x$arguments" != xEOL; then
40284      new_complete="$new_path ${arguments% *}"
40285    else
40286      new_complete="$new_path"
40287    fi
40288
40289    if test "x$complete" != "x$new_complete"; then
40290      BUILD_CXX="$new_complete"
40291      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40292$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40293    fi
40294  fi
40295
40296
40297
40298  # Publish this variable in the help.
40299
40300
40301  if test "x$BUILD_LD" = x; then
40302    # The variable is not set by user, try to locate tool using the code snippet
40303    for ac_prog in ld
40304do
40305  # Extract the first word of "$ac_prog", so it can be a program name with args.
40306set dummy $ac_prog; ac_word=$2
40307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40308$as_echo_n "checking for $ac_word... " >&6; }
40309if ${ac_cv_path_BUILD_LD+:} false; then :
40310  $as_echo_n "(cached) " >&6
40311else
40312  case $BUILD_LD in
40313  [\\/]* | ?:[\\/]*)
40314  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40315  ;;
40316  *)
40317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40318for as_dir in $PATH
40319do
40320  IFS=$as_save_IFS
40321  test -z "$as_dir" && as_dir=.
40322    for ac_exec_ext in '' $ac_executable_extensions; do
40323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40324    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40326    break 2
40327  fi
40328done
40329  done
40330IFS=$as_save_IFS
40331
40332  ;;
40333esac
40334fi
40335BUILD_LD=$ac_cv_path_BUILD_LD
40336if test -n "$BUILD_LD"; then
40337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40338$as_echo "$BUILD_LD" >&6; }
40339else
40340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40341$as_echo "no" >&6; }
40342fi
40343
40344
40345  test -n "$BUILD_LD" && break
40346done
40347
40348  else
40349    # The variable is set, but is it from the command line or the environment?
40350
40351    # Try to remove the string !BUILD_LD! from our list.
40352    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40353    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40354      # If it failed, the variable was not from the command line. Ignore it,
40355      # but warn the user (except for BASH, which is always set by the calling BASH).
40356      if test "xBUILD_LD" != xBASH; then
40357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40358$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40359      fi
40360      # Try to locate tool using the code snippet
40361      for ac_prog in ld
40362do
40363  # Extract the first word of "$ac_prog", so it can be a program name with args.
40364set dummy $ac_prog; ac_word=$2
40365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40366$as_echo_n "checking for $ac_word... " >&6; }
40367if ${ac_cv_path_BUILD_LD+:} false; then :
40368  $as_echo_n "(cached) " >&6
40369else
40370  case $BUILD_LD in
40371  [\\/]* | ?:[\\/]*)
40372  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40373  ;;
40374  *)
40375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40376for as_dir in $PATH
40377do
40378  IFS=$as_save_IFS
40379  test -z "$as_dir" && as_dir=.
40380    for ac_exec_ext in '' $ac_executable_extensions; do
40381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40382    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40384    break 2
40385  fi
40386done
40387  done
40388IFS=$as_save_IFS
40389
40390  ;;
40391esac
40392fi
40393BUILD_LD=$ac_cv_path_BUILD_LD
40394if test -n "$BUILD_LD"; then
40395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40396$as_echo "$BUILD_LD" >&6; }
40397else
40398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40399$as_echo "no" >&6; }
40400fi
40401
40402
40403  test -n "$BUILD_LD" && break
40404done
40405
40406    else
40407      # If it succeeded, then it was overridden by the user. We will use it
40408      # for the tool.
40409
40410      # First remove it from the list of overridden variables, so we can test
40411      # for unknown variables in the end.
40412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40413
40414      # Check if the provided tool contains a complete path.
40415      tool_specified="$BUILD_LD"
40416      tool_basename="${tool_specified##*/}"
40417      if test "x$tool_basename" = "x$tool_specified"; then
40418        # A command without a complete path is provided, search $PATH.
40419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40420$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40421        # Extract the first word of "$tool_basename", so it can be a program name with args.
40422set dummy $tool_basename; ac_word=$2
40423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40424$as_echo_n "checking for $ac_word... " >&6; }
40425if ${ac_cv_path_BUILD_LD+:} false; then :
40426  $as_echo_n "(cached) " >&6
40427else
40428  case $BUILD_LD in
40429  [\\/]* | ?:[\\/]*)
40430  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40431  ;;
40432  *)
40433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40434for as_dir in $PATH
40435do
40436  IFS=$as_save_IFS
40437  test -z "$as_dir" && as_dir=.
40438    for ac_exec_ext in '' $ac_executable_extensions; do
40439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40440    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40442    break 2
40443  fi
40444done
40445  done
40446IFS=$as_save_IFS
40447
40448  ;;
40449esac
40450fi
40451BUILD_LD=$ac_cv_path_BUILD_LD
40452if test -n "$BUILD_LD"; then
40453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40454$as_echo "$BUILD_LD" >&6; }
40455else
40456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40457$as_echo "no" >&6; }
40458fi
40459
40460
40461        if test "x$BUILD_LD" = x; then
40462          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40463        fi
40464      else
40465        # Otherwise we believe it is a complete path. Use it as it is.
40466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40467$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40469$as_echo_n "checking for BUILD_LD... " >&6; }
40470        if test ! -x "$tool_specified"; then
40471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40472$as_echo "not found" >&6; }
40473          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40474        fi
40475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40476$as_echo "$tool_specified" >&6; }
40477      fi
40478    fi
40479  fi
40480
40481
40482
40483  # Only process if variable expands to non-empty
40484
40485  if test "x$BUILD_LD" != x; then
40486    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40487
40488  # First separate the path from the arguments. This will split at the first
40489  # space.
40490  complete="$BUILD_LD"
40491  path="${complete%% *}"
40492  tmp="$complete EOL"
40493  arguments="${tmp#* }"
40494
40495  # Input might be given as Windows format, start by converting to
40496  # unix format.
40497  new_path=`$CYGPATH -u "$path"`
40498
40499  # Now try to locate executable using which
40500  new_path=`$WHICH "$new_path" 2> /dev/null`
40501  # bat and cmd files are not always considered executable in cygwin causing which
40502  # to not find them
40503  if test "x$new_path" = x \
40504      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40505      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40506    new_path=`$CYGPATH -u "$path"`
40507  fi
40508  if test "x$new_path" = x; then
40509    # Oops. Which didn't find the executable.
40510    # The splitting of arguments from the executable at a space might have been incorrect,
40511    # since paths with space are more likely in Windows. Give it another try with the whole
40512    # argument.
40513    path="$complete"
40514    arguments="EOL"
40515    new_path=`$CYGPATH -u "$path"`
40516    new_path=`$WHICH "$new_path" 2> /dev/null`
40517    # bat and cmd files are not always considered executable in cygwin causing which
40518    # to not find them
40519    if test "x$new_path" = x \
40520        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40521        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40522      new_path=`$CYGPATH -u "$path"`
40523    fi
40524    if test "x$new_path" = x; then
40525      # It's still not found. Now this is an unrecoverable error.
40526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40527$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40528      has_space=`$ECHO "$complete" | $GREP " "`
40529      if test "x$has_space" != x; then
40530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40532      fi
40533      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40534    fi
40535  fi
40536
40537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40540  # "foo.exe" is OK but "foo" is an error.
40541  #
40542  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40543  # It is also a way to make sure we got the proper file name for the real test later on.
40544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40545  if test "x$test_shortpath" = x; then
40546    # Short path failed, file does not exist as specified.
40547    # Try adding .exe or .cmd
40548    if test -f "${new_path}.exe"; then
40549      input_to_shortpath="${new_path}.exe"
40550    elif test -f "${new_path}.cmd"; then
40551      input_to_shortpath="${new_path}.cmd"
40552    else
40553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40554$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40555      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40556$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40557      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40558    fi
40559  else
40560    input_to_shortpath="$new_path"
40561  fi
40562
40563  # Call helper function which possibly converts this using DOS-style short mode.
40564  # If so, the updated path is stored in $new_path.
40565  new_path="$input_to_shortpath"
40566
40567  input_path="$input_to_shortpath"
40568  # Check if we need to convert this using DOS-style short mode. If the path
40569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40570  # take no chances and rewrite it.
40571  # Note: m4 eats our [], so we need to use [ and ] instead.
40572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40573  if test "x$has_forbidden_chars" != x; then
40574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40578      # Going to short mode and back again did indeed matter. Since short mode is
40579      # case insensitive, let's make it lowercase to improve readability.
40580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40581      # Now convert it back to Unix-style (cygpath)
40582      input_path=`$CYGPATH -u "$shortmode_path"`
40583      new_path="$input_path"
40584    fi
40585  fi
40586
40587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40588  if test "x$test_cygdrive_prefix" = x; then
40589    # As a simple fix, exclude /usr/bin since it's not a real path.
40590    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40592      # a path prefixed by /cygdrive for fixpath to work.
40593      new_path="$CYGWIN_ROOT_PATH$input_path"
40594    fi
40595  fi
40596
40597  # remove trailing .exe if any
40598  new_path="${new_path/%.exe/}"
40599
40600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40601
40602  # First separate the path from the arguments. This will split at the first
40603  # space.
40604  complete="$BUILD_LD"
40605  path="${complete%% *}"
40606  tmp="$complete EOL"
40607  arguments="${tmp#* }"
40608
40609  # Input might be given as Windows format, start by converting to
40610  # unix format.
40611  new_path="$path"
40612
40613  windows_path="$new_path"
40614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40615    unix_path=`$CYGPATH -u "$windows_path"`
40616    new_path="$unix_path"
40617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40619    new_path="$unix_path"
40620  fi
40621
40622
40623  # Now try to locate executable using which
40624  new_path=`$WHICH "$new_path" 2> /dev/null`
40625
40626  if test "x$new_path" = x; then
40627    # Oops. Which didn't find the executable.
40628    # The splitting of arguments from the executable at a space might have been incorrect,
40629    # since paths with space are more likely in Windows. Give it another try with the whole
40630    # argument.
40631    path="$complete"
40632    arguments="EOL"
40633    new_path="$path"
40634
40635  windows_path="$new_path"
40636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40637    unix_path=`$CYGPATH -u "$windows_path"`
40638    new_path="$unix_path"
40639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40641    new_path="$unix_path"
40642  fi
40643
40644
40645    new_path=`$WHICH "$new_path" 2> /dev/null`
40646    # bat and cmd files are not always considered executable in MSYS causing which
40647    # to not find them
40648    if test "x$new_path" = x \
40649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40651      new_path="$path"
40652
40653  windows_path="$new_path"
40654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40655    unix_path=`$CYGPATH -u "$windows_path"`
40656    new_path="$unix_path"
40657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40659    new_path="$unix_path"
40660  fi
40661
40662    fi
40663
40664    if test "x$new_path" = x; then
40665      # It's still not found. Now this is an unrecoverable error.
40666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40667$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40668      has_space=`$ECHO "$complete" | $GREP " "`
40669      if test "x$has_space" != x; then
40670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40672      fi
40673      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40674    fi
40675  fi
40676
40677  # Now new_path has a complete unix path to the binary
40678  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40679    # Keep paths in /bin as-is, but remove trailing .exe if any
40680    new_path="${new_path/%.exe/}"
40681    # Do not save /bin paths to all_fixpath_prefixes!
40682  else
40683    # Not in mixed or Windows style, start by that.
40684    new_path=`cmd //c echo $new_path`
40685
40686  input_path="$new_path"
40687  # Check if we need to convert this using DOS-style short mode. If the path
40688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40689  # take no chances and rewrite it.
40690  # Note: m4 eats our [], so we need to use [ and ] instead.
40691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40692  if test "x$has_forbidden_chars" != x; then
40693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40695  fi
40696
40697    # Output is in $new_path
40698
40699  windows_path="$new_path"
40700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40701    unix_path=`$CYGPATH -u "$windows_path"`
40702    new_path="$unix_path"
40703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40705    new_path="$unix_path"
40706  fi
40707
40708    # remove trailing .exe if any
40709    new_path="${new_path/%.exe/}"
40710
40711    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40712    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40713  fi
40714
40715    else
40716      # We're on a unix platform. Hooray! :)
40717      # First separate the path from the arguments. This will split at the first
40718      # space.
40719      complete="$BUILD_LD"
40720      path="${complete%% *}"
40721      tmp="$complete EOL"
40722      arguments="${tmp#* }"
40723
40724      # Cannot rely on the command "which" here since it doesn't always work.
40725      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40726      if test -z "$is_absolute_path"; then
40727        # Path to executable is not absolute. Find it.
40728        IFS_save="$IFS"
40729        IFS=:
40730        for p in $PATH; do
40731          if test -f "$p/$path" && test -x "$p/$path"; then
40732            new_path="$p/$path"
40733            break
40734          fi
40735        done
40736        IFS="$IFS_save"
40737      else
40738        # This is an absolute path, we can use it without further modifications.
40739        new_path="$path"
40740      fi
40741
40742      if test "x$new_path" = x; then
40743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40744$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40745        has_space=`$ECHO "$complete" | $GREP " "`
40746        if test "x$has_space" != x; then
40747          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40748$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40749        fi
40750        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40751      fi
40752    fi
40753
40754    # Now join together the path and the arguments once again
40755    if test "x$arguments" != xEOL; then
40756      new_complete="$new_path ${arguments% *}"
40757    else
40758      new_complete="$new_path"
40759    fi
40760
40761    if test "x$complete" != "x$new_complete"; then
40762      BUILD_LD="$new_complete"
40763      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40764$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40765    fi
40766  fi
40767
40768  else
40769    # If we are not cross compiling, use the normal target compilers for
40770    # building the build platform executables.
40771    BUILD_CC="$CC"
40772    BUILD_CXX="$CXX"
40773    BUILD_LD="$LD"
40774  fi
40775
40776
40777
40778
40779
40780
40781  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40782    # For hotspot, we need these in Windows mixed path,
40783    # so rewrite them all. Need added .exe suffix.
40784    HOTSPOT_CXX="$CXX.exe"
40785    HOTSPOT_LD="$LD.exe"
40786    HOTSPOT_MT="$MT.exe"
40787    HOTSPOT_RC="$RC.exe"
40788
40789  unix_path="$HOTSPOT_CXX"
40790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40791    windows_path=`$CYGPATH -m "$unix_path"`
40792    HOTSPOT_CXX="$windows_path"
40793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40794    windows_path=`cmd //c echo $unix_path`
40795    HOTSPOT_CXX="$windows_path"
40796  fi
40797
40798
40799  unix_path="$HOTSPOT_LD"
40800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40801    windows_path=`$CYGPATH -m "$unix_path"`
40802    HOTSPOT_LD="$windows_path"
40803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40804    windows_path=`cmd //c echo $unix_path`
40805    HOTSPOT_LD="$windows_path"
40806  fi
40807
40808
40809  unix_path="$HOTSPOT_MT"
40810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40811    windows_path=`$CYGPATH -m "$unix_path"`
40812    HOTSPOT_MT="$windows_path"
40813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40814    windows_path=`cmd //c echo $unix_path`
40815    HOTSPOT_MT="$windows_path"
40816  fi
40817
40818
40819  unix_path="$HOTSPOT_RC"
40820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40821    windows_path=`$CYGPATH -m "$unix_path"`
40822    HOTSPOT_RC="$windows_path"
40823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40824    windows_path=`cmd //c echo $unix_path`
40825    HOTSPOT_RC="$windows_path"
40826  fi
40827
40828
40829
40830  else
40831    HOTSPOT_CXX="$CXX"
40832    HOTSPOT_LD="$LD"
40833  fi
40834
40835
40836
40837  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40838    USE_CLANG=true
40839  fi
40840
40841
40842
40843
40844
40845  # The package path is used only on macosx?
40846  # FIXME: clean this up, and/or move it elsewhere.
40847  PACKAGE_PATH=/opt/local
40848
40849
40850  # Check for extra potential brokenness.
40851  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40852    # On Windows, double-check that we got the right compiler.
40853    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40854    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40855    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40856      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40857        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
40858      fi
40859    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40860      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40861        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40862      fi
40863    fi
40864  fi
40865
40866  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40867    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40868    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40869    # This is later checked when setting flags.
40870
40871    # "-Og" suppported for GCC 4.8 and later
40872    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40873
40874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40875$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40876  supports=yes
40877
40878  saved_cflags="$CFLAGS"
40879  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40880  ac_ext=c
40881ac_cpp='$CPP $CPPFLAGS'
40882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40884ac_compiler_gnu=$ac_cv_c_compiler_gnu
40885
40886  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40887/* end confdefs.h.  */
40888int i;
40889_ACEOF
40890if ac_fn_c_try_compile "$LINENO"; then :
40891
40892else
40893  supports=no
40894fi
40895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40896  ac_ext=cpp
40897ac_cpp='$CXXCPP $CPPFLAGS'
40898ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40899ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40900ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40901
40902  CFLAGS="$saved_cflags"
40903
40904  saved_cxxflags="$CXXFLAGS"
40905  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40906  ac_ext=cpp
40907ac_cpp='$CXXCPP $CPPFLAGS'
40908ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40909ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40910ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40911
40912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40913/* end confdefs.h.  */
40914int i;
40915_ACEOF
40916if ac_fn_cxx_try_compile "$LINENO"; then :
40917
40918else
40919  supports=no
40920fi
40921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40922  ac_ext=cpp
40923ac_cpp='$CXXCPP $CPPFLAGS'
40924ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40925ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40926ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40927
40928  CXXFLAGS="$saved_cxxflags"
40929
40930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40931$as_echo "$supports" >&6; }
40932  if test "x$supports" = "xyes" ; then
40933    HAS_CFLAG_OPTIMIZE_DEBUG=true
40934  else
40935    HAS_CFLAG_OPTIMIZE_DEBUG=false
40936  fi
40937
40938
40939    # "-z relro" supported in GNU binutils 2.17 and later
40940    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40941
40942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40943$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40944  supports=yes
40945
40946  saved_ldflags="$LDFLAGS"
40947  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40948  ac_ext=c
40949ac_cpp='$CPP $CPPFLAGS'
40950ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40951ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40952ac_compiler_gnu=$ac_cv_c_compiler_gnu
40953
40954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40955/* end confdefs.h.  */
40956
40957int
40958main ()
40959{
40960
40961  ;
40962  return 0;
40963}
40964_ACEOF
40965if ac_fn_c_try_link "$LINENO"; then :
40966
40967else
40968  supports=no
40969fi
40970rm -f core conftest.err conftest.$ac_objext \
40971    conftest$ac_exeext conftest.$ac_ext
40972  ac_ext=cpp
40973ac_cpp='$CXXCPP $CPPFLAGS'
40974ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40975ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40976ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40977
40978  LDFLAGS="$saved_ldflags"
40979
40980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40981$as_echo "$supports" >&6; }
40982  if test "x$supports" = "xyes" ; then
40983    HAS_LINKER_RELRO=true
40984  else
40985    HAS_LINKER_RELRO=false
40986  fi
40987
40988
40989    # "-z now" supported in GNU binutils 2.11 and later
40990    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40991
40992  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40993$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40994  supports=yes
40995
40996  saved_ldflags="$LDFLAGS"
40997  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40998  ac_ext=c
40999ac_cpp='$CPP $CPPFLAGS'
41000ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41001ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41002ac_compiler_gnu=$ac_cv_c_compiler_gnu
41003
41004  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41005/* end confdefs.h.  */
41006
41007int
41008main ()
41009{
41010
41011  ;
41012  return 0;
41013}
41014_ACEOF
41015if ac_fn_c_try_link "$LINENO"; then :
41016
41017else
41018  supports=no
41019fi
41020rm -f core conftest.err conftest.$ac_objext \
41021    conftest$ac_exeext conftest.$ac_ext
41022  ac_ext=cpp
41023ac_cpp='$CXXCPP $CPPFLAGS'
41024ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41025ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41026ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41027
41028  LDFLAGS="$saved_ldflags"
41029
41030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41031$as_echo "$supports" >&6; }
41032  if test "x$supports" = "xyes" ; then
41033    HAS_LINKER_NOW=true
41034  else
41035    HAS_LINKER_NOW=false
41036  fi
41037
41038  fi
41039
41040  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41041  # in executable.'
41042  USING_BROKEN_SUSE_LD=no
41043  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41045$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41046    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41047    $ECHO "int main() { }" > main.c
41048    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41050$as_echo "no" >&6; }
41051      USING_BROKEN_SUSE_LD=no
41052    else
41053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41054$as_echo "yes" >&6; }
41055      USING_BROKEN_SUSE_LD=yes
41056    fi
41057    rm -rf version-script.map main.c a.out
41058  fi
41059
41060
41061
41062# Setup the JTReg Regression Test Harness.
41063
41064
41065# Check whether --with-jtreg was given.
41066if test "${with_jtreg+set}" = set; then :
41067  withval=$with_jtreg;
41068else
41069  with_jtreg=no
41070fi
41071
41072
41073  if test "x$with_jtreg" = xno; then
41074    # jtreg disabled
41075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41076$as_echo_n "checking for jtreg... " >&6; }
41077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41078$as_echo "no" >&6; }
41079  else
41080    if test "x$with_jtreg" != xyes; then
41081      # with path specified.
41082      JT_HOME="$with_jtreg"
41083    fi
41084
41085    if test "x$JT_HOME" != x; then
41086      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41087$as_echo_n "checking for jtreg... " >&6; }
41088
41089      # use JT_HOME enviroment var.
41090
41091  # Only process if variable expands to non-empty
41092
41093  if test "x$JT_HOME" != x; then
41094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41095
41096  # Input might be given as Windows format, start by converting to
41097  # unix format.
41098  path="$JT_HOME"
41099  new_path=`$CYGPATH -u "$path"`
41100
41101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41104  # "foo.exe" is OK but "foo" is an error.
41105  #
41106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41107  # It is also a way to make sure we got the proper file name for the real test later on.
41108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41109  if test "x$test_shortpath" = x; then
41110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41111$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41112    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41113  fi
41114
41115  # Call helper function which possibly converts this using DOS-style short mode.
41116  # If so, the updated path is stored in $new_path.
41117
41118  input_path="$new_path"
41119  # Check if we need to convert this using DOS-style short mode. If the path
41120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41121  # take no chances and rewrite it.
41122  # Note: m4 eats our [], so we need to use [ and ] instead.
41123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41124  if test "x$has_forbidden_chars" != x; then
41125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41129      # Going to short mode and back again did indeed matter. Since short mode is
41130      # case insensitive, let's make it lowercase to improve readability.
41131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41132      # Now convert it back to Unix-style (cygpath)
41133      input_path=`$CYGPATH -u "$shortmode_path"`
41134      new_path="$input_path"
41135    fi
41136  fi
41137
41138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41139  if test "x$test_cygdrive_prefix" = x; then
41140    # As a simple fix, exclude /usr/bin since it's not a real path.
41141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41143      # a path prefixed by /cygdrive for fixpath to work.
41144      new_path="$CYGWIN_ROOT_PATH$input_path"
41145    fi
41146  fi
41147
41148
41149  if test "x$path" != "x$new_path"; then
41150    JT_HOME="$new_path"
41151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41152$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41153  fi
41154
41155    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41156
41157  path="$JT_HOME"
41158  has_colon=`$ECHO $path | $GREP ^.:`
41159  new_path="$path"
41160  if test "x$has_colon" = x; then
41161    # Not in mixed or Windows style, start by that.
41162    new_path=`cmd //c echo $path`
41163  fi
41164
41165
41166  input_path="$new_path"
41167  # Check if we need to convert this using DOS-style short mode. If the path
41168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41169  # take no chances and rewrite it.
41170  # Note: m4 eats our [], so we need to use [ and ] instead.
41171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41172  if test "x$has_forbidden_chars" != x; then
41173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41175  fi
41176
41177
41178  windows_path="$new_path"
41179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41180    unix_path=`$CYGPATH -u "$windows_path"`
41181    new_path="$unix_path"
41182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41184    new_path="$unix_path"
41185  fi
41186
41187  if test "x$path" != "x$new_path"; then
41188    JT_HOME="$new_path"
41189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41190$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41191  fi
41192
41193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41195
41196    else
41197      # We're on a unix platform. Hooray! :)
41198      path="$JT_HOME"
41199      has_space=`$ECHO "$path" | $GREP " "`
41200      if test "x$has_space" != x; then
41201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41202$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41203        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41204      fi
41205
41206      # Use eval to expand a potential ~
41207      eval path="$path"
41208      if test ! -f "$path" && test ! -d "$path"; then
41209        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41210      fi
41211
41212      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41213    fi
41214  fi
41215
41216
41217      # jtreg win32 script works for everybody
41218      JTREGEXE="$JT_HOME/bin/jtreg"
41219
41220      if test ! -f "$JTREGEXE"; then
41221        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41222      fi
41223
41224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41225$as_echo "$JTREGEXE" >&6; }
41226    else
41227      # try to find jtreg on path
41228
41229
41230
41231  # Publish this variable in the help.
41232
41233
41234  if test "x$JTREGEXE" = x; then
41235    # The variable is not set by user, try to locate tool using the code snippet
41236    for ac_prog in jtreg
41237do
41238  # Extract the first word of "$ac_prog", so it can be a program name with args.
41239set dummy $ac_prog; ac_word=$2
41240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41241$as_echo_n "checking for $ac_word... " >&6; }
41242if ${ac_cv_path_JTREGEXE+:} false; then :
41243  $as_echo_n "(cached) " >&6
41244else
41245  case $JTREGEXE in
41246  [\\/]* | ?:[\\/]*)
41247  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41248  ;;
41249  *)
41250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41251for as_dir in $PATH
41252do
41253  IFS=$as_save_IFS
41254  test -z "$as_dir" && as_dir=.
41255    for ac_exec_ext in '' $ac_executable_extensions; do
41256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41257    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41259    break 2
41260  fi
41261done
41262  done
41263IFS=$as_save_IFS
41264
41265  ;;
41266esac
41267fi
41268JTREGEXE=$ac_cv_path_JTREGEXE
41269if test -n "$JTREGEXE"; then
41270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41271$as_echo "$JTREGEXE" >&6; }
41272else
41273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41274$as_echo "no" >&6; }
41275fi
41276
41277
41278  test -n "$JTREGEXE" && break
41279done
41280
41281  else
41282    # The variable is set, but is it from the command line or the environment?
41283
41284    # Try to remove the string !JTREGEXE! from our list.
41285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41287      # If it failed, the variable was not from the command line. Ignore it,
41288      # but warn the user (except for BASH, which is always set by the calling BASH).
41289      if test "xJTREGEXE" != xBASH; then
41290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41291$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41292      fi
41293      # Try to locate tool using the code snippet
41294      for ac_prog in jtreg
41295do
41296  # Extract the first word of "$ac_prog", so it can be a program name with args.
41297set dummy $ac_prog; ac_word=$2
41298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41299$as_echo_n "checking for $ac_word... " >&6; }
41300if ${ac_cv_path_JTREGEXE+:} false; then :
41301  $as_echo_n "(cached) " >&6
41302else
41303  case $JTREGEXE in
41304  [\\/]* | ?:[\\/]*)
41305  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41306  ;;
41307  *)
41308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41309for as_dir in $PATH
41310do
41311  IFS=$as_save_IFS
41312  test -z "$as_dir" && as_dir=.
41313    for ac_exec_ext in '' $ac_executable_extensions; do
41314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41315    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41317    break 2
41318  fi
41319done
41320  done
41321IFS=$as_save_IFS
41322
41323  ;;
41324esac
41325fi
41326JTREGEXE=$ac_cv_path_JTREGEXE
41327if test -n "$JTREGEXE"; then
41328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41329$as_echo "$JTREGEXE" >&6; }
41330else
41331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41332$as_echo "no" >&6; }
41333fi
41334
41335
41336  test -n "$JTREGEXE" && break
41337done
41338
41339    else
41340      # If it succeeded, then it was overridden by the user. We will use it
41341      # for the tool.
41342
41343      # First remove it from the list of overridden variables, so we can test
41344      # for unknown variables in the end.
41345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41346
41347      # Check if the provided tool contains a complete path.
41348      tool_specified="$JTREGEXE"
41349      tool_basename="${tool_specified##*/}"
41350      if test "x$tool_basename" = "x$tool_specified"; then
41351        # A command without a complete path is provided, search $PATH.
41352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41353$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41354        # Extract the first word of "$tool_basename", so it can be a program name with args.
41355set dummy $tool_basename; ac_word=$2
41356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41357$as_echo_n "checking for $ac_word... " >&6; }
41358if ${ac_cv_path_JTREGEXE+:} false; then :
41359  $as_echo_n "(cached) " >&6
41360else
41361  case $JTREGEXE in
41362  [\\/]* | ?:[\\/]*)
41363  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41364  ;;
41365  *)
41366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41367for as_dir in $PATH
41368do
41369  IFS=$as_save_IFS
41370  test -z "$as_dir" && as_dir=.
41371    for ac_exec_ext in '' $ac_executable_extensions; do
41372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41373    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41375    break 2
41376  fi
41377done
41378  done
41379IFS=$as_save_IFS
41380
41381  ;;
41382esac
41383fi
41384JTREGEXE=$ac_cv_path_JTREGEXE
41385if test -n "$JTREGEXE"; then
41386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41387$as_echo "$JTREGEXE" >&6; }
41388else
41389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41390$as_echo "no" >&6; }
41391fi
41392
41393
41394        if test "x$JTREGEXE" = x; then
41395          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41396        fi
41397      else
41398        # Otherwise we believe it is a complete path. Use it as it is.
41399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41400$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41402$as_echo_n "checking for JTREGEXE... " >&6; }
41403        if test ! -x "$tool_specified"; then
41404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41405$as_echo "not found" >&6; }
41406          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41407        fi
41408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41409$as_echo "$tool_specified" >&6; }
41410      fi
41411    fi
41412  fi
41413
41414
41415
41416  if test "x$JTREGEXE" = x; then
41417    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41418  fi
41419
41420
41421      JT_HOME="`$DIRNAME $JTREGEXE`"
41422    fi
41423  fi
41424
41425
41426
41427
41428
41429
41430  # Option used to tell the compiler whether to create 32- or 64-bit executables
41431  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41432    COMPILER_TARGET_BITS_FLAG="-q"
41433  else
41434    COMPILER_TARGET_BITS_FLAG="-m"
41435  fi
41436
41437
41438  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41439  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41440    ARFLAGS="-r"
41441  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41442    ARFLAGS="-X64"
41443  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41444    # lib.exe is used as AR to create static libraries.
41445    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41446  else
41447    ARFLAGS=""
41448  fi
41449
41450
41451  ## Setup strip.
41452  # FIXME: should this really be per platform, or should it be per toolchain type?
41453  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41454  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41455  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41456    STRIPFLAGS="-g"
41457  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41458    STRIPFLAGS="-x"
41459  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41460    STRIPFLAGS="-S"
41461  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41462    STRIPFLAGS="-X32_64"
41463  fi
41464
41465  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41466    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41467  fi
41468
41469
41470  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41471    CC_OUT_OPTION=-Fo
41472    EXE_OUT_OPTION=-out:
41473    LD_OUT_OPTION=-out:
41474    AR_OUT_OPTION=-out:
41475  else
41476    # The option used to specify the target .o,.a or .so file.
41477    # When compiling, how to specify the to be created object file.
41478    CC_OUT_OPTION='-o$(SPACE)'
41479    # When linking, how to specify the to be created executable.
41480    EXE_OUT_OPTION='-o$(SPACE)'
41481    # When linking, how to specify the to be created dynamically linkable library.
41482    LD_OUT_OPTION='-o$(SPACE)'
41483    # When archiving, how to specify the to be create static archive for object files.
41484    AR_OUT_OPTION='rcs$(SPACE)'
41485  fi
41486
41487
41488
41489
41490
41491  # On Windows, we need to set RC flags.
41492  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41493    RC_FLAGS="-nologo -l0x409"
41494    if test "x$VARIANT" = xOPT; then
41495      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41496    fi
41497
41498    # The version variables used to create RC_FLAGS may be overridden
41499    # in a custom configure script, or possibly the command line.
41500    # Let those variables be expanded at make time in spec.gmk.
41501    # The \$ are escaped to the shell, and the $(...) variables
41502    # are evaluated by make.
41503    RC_FLAGS="$RC_FLAGS \
41504        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41505        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41506        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41507        -D\"JDK_VER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
41508        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41509        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41510        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41511  fi
41512
41513
41514  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41515    # silence copyright notice and other headers.
41516    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41517  fi
41518
41519  if test "x$SYSROOT" != "x"; then
41520    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41521      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41522        # Solaris Studio does not have a concept of sysroot. Instead we must
41523        # make sure the default include and lib dirs are appended to each
41524        # compile and link command line.
41525        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41526        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41527            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41528            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41529      fi
41530    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41531      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41532      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41533      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41534    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41535      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41536      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41537    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41538      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41539      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41540    fi
41541    # Propagate the sysroot args to hotspot
41542    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41543    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41544    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41545  fi
41546
41547  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41548  # set this here so it doesn't have to be peppered throughout the forest
41549  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41550    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41551    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41552  fi
41553
41554
41555
41556
41557
41558# FIXME: Currently we must test this after toolchain but before flags. Fix!
41559
41560# Now we can test some aspects on the target using configure macros.
41561
41562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41563$as_echo_n "checking for ANSI C header files... " >&6; }
41564if ${ac_cv_header_stdc+:} false; then :
41565  $as_echo_n "(cached) " >&6
41566else
41567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41568/* end confdefs.h.  */
41569#include <stdlib.h>
41570#include <stdarg.h>
41571#include <string.h>
41572#include <float.h>
41573
41574int
41575main ()
41576{
41577
41578  ;
41579  return 0;
41580}
41581_ACEOF
41582if ac_fn_cxx_try_compile "$LINENO"; then :
41583  ac_cv_header_stdc=yes
41584else
41585  ac_cv_header_stdc=no
41586fi
41587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41588
41589if test $ac_cv_header_stdc = yes; then
41590  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41592/* end confdefs.h.  */
41593#include <string.h>
41594
41595_ACEOF
41596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41597  $EGREP "memchr" >/dev/null 2>&1; then :
41598
41599else
41600  ac_cv_header_stdc=no
41601fi
41602rm -f conftest*
41603
41604fi
41605
41606if test $ac_cv_header_stdc = yes; then
41607  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41609/* end confdefs.h.  */
41610#include <stdlib.h>
41611
41612_ACEOF
41613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41614  $EGREP "free" >/dev/null 2>&1; then :
41615
41616else
41617  ac_cv_header_stdc=no
41618fi
41619rm -f conftest*
41620
41621fi
41622
41623if test $ac_cv_header_stdc = yes; then
41624  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41625  if test "$cross_compiling" = yes; then :
41626  :
41627else
41628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41629/* end confdefs.h.  */
41630#include <ctype.h>
41631#include <stdlib.h>
41632#if ((' ' & 0x0FF) == 0x020)
41633# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41634# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41635#else
41636# define ISLOWER(c) \
41637		   (('a' <= (c) && (c) <= 'i') \
41638		     || ('j' <= (c) && (c) <= 'r') \
41639		     || ('s' <= (c) && (c) <= 'z'))
41640# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41641#endif
41642
41643#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41644int
41645main ()
41646{
41647  int i;
41648  for (i = 0; i < 256; i++)
41649    if (XOR (islower (i), ISLOWER (i))
41650	|| toupper (i) != TOUPPER (i))
41651      return 2;
41652  return 0;
41653}
41654_ACEOF
41655if ac_fn_cxx_try_run "$LINENO"; then :
41656
41657else
41658  ac_cv_header_stdc=no
41659fi
41660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41661  conftest.$ac_objext conftest.beam conftest.$ac_ext
41662fi
41663
41664fi
41665fi
41666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41667$as_echo "$ac_cv_header_stdc" >&6; }
41668if test $ac_cv_header_stdc = yes; then
41669
41670$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41671
41672fi
41673
41674# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41675for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41676		  inttypes.h stdint.h unistd.h
41677do :
41678  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41679ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41680"
41681if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41682  cat >>confdefs.h <<_ACEOF
41683#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41684_ACEOF
41685
41686fi
41687
41688done
41689
41690
41691
41692  ###############################################################################
41693  #
41694  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41695  # (The JVM can use 32 or 64 bit Java pointers but that decision
41696  # is made at runtime.)
41697  #
41698
41699  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41700    # Always specify -m flag on Solaris
41701    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41702
41703  # When we add flags to the "official" CFLAGS etc, we need to
41704  # keep track of these additions in ADDED_CFLAGS etc. These
41705  # will later be checked to make sure only controlled additions
41706  # have been made to CFLAGS etc.
41707  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41708  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41709  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41710
41711  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41712  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41713  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41714
41715  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41716  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41717  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41718
41719  elif test "x$COMPILE_TYPE" = xreduced; then
41720    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41721      # Specify -m if running reduced on unix platforms
41722
41723  # When we add flags to the "official" CFLAGS etc, we need to
41724  # keep track of these additions in ADDED_CFLAGS etc. These
41725  # will later be checked to make sure only controlled additions
41726  # have been made to CFLAGS etc.
41727  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41728  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41729  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41730
41731  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41732  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41733  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41734
41735  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41736  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41737  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41738
41739    fi
41740  fi
41741
41742  # Make compilation sanity check
41743  for ac_header in stdio.h
41744do :
41745  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41746if test "x$ac_cv_header_stdio_h" = xyes; then :
41747  cat >>confdefs.h <<_ACEOF
41748#define HAVE_STDIO_H 1
41749_ACEOF
41750
41751else
41752
41753    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41754$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41755    if test "x$COMPILE_TYPE" = xreduced; then
41756      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41757$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41758    elif test "x$COMPILE_TYPE" = xcross; then
41759      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41760$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41761    fi
41762    as_fn_error $? "Cannot continue." "$LINENO" 5
41763
41764fi
41765
41766done
41767
41768
41769  # The cast to long int works around a bug in the HP C Compiler
41770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41772# This bug is HP SR number 8606223364.
41773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41774$as_echo_n "checking size of int *... " >&6; }
41775if ${ac_cv_sizeof_int_p+:} false; then :
41776  $as_echo_n "(cached) " >&6
41777else
41778  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41779
41780else
41781  if test "$ac_cv_type_int_p" = yes; then
41782     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41784as_fn_error 77 "cannot compute sizeof (int *)
41785See \`config.log' for more details" "$LINENO" 5; }
41786   else
41787     ac_cv_sizeof_int_p=0
41788   fi
41789fi
41790
41791fi
41792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41793$as_echo "$ac_cv_sizeof_int_p" >&6; }
41794
41795
41796
41797cat >>confdefs.h <<_ACEOF
41798#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41799_ACEOF
41800
41801
41802
41803  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41804  if test "x$ac_cv_sizeof_int_p" = x; then
41805    # The test failed, lets stick to the assumed value.
41806    { $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
41807$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41808  else
41809    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41810
41811    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41812      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41813      # Let's try to implicitely set the compilers target architecture and retry the test
41814      { $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
41815$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;}
41816      { $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
41817$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;}
41818
41819  # When we add flags to the "official" CFLAGS etc, we need to
41820  # keep track of these additions in ADDED_CFLAGS etc. These
41821  # will later be checked to make sure only controlled additions
41822  # have been made to CFLAGS etc.
41823  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41824  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41825  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41826
41827  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41828  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41829  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41830
41831  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41832  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41833  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41834
41835
41836      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41837      unset ac_cv_sizeof_int_p
41838      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41839      cat >>confdefs.h <<_ACEOF
41840#undef SIZEOF_INT_P
41841_ACEOF
41842
41843      # The cast to long int works around a bug in the HP C Compiler
41844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41846# This bug is HP SR number 8606223364.
41847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41848$as_echo_n "checking size of int *... " >&6; }
41849if ${ac_cv_sizeof_int_p+:} false; then :
41850  $as_echo_n "(cached) " >&6
41851else
41852  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41853
41854else
41855  if test "$ac_cv_type_int_p" = yes; then
41856     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41858as_fn_error 77 "cannot compute sizeof (int *)
41859See \`config.log' for more details" "$LINENO" 5; }
41860   else
41861     ac_cv_sizeof_int_p=0
41862   fi
41863fi
41864
41865fi
41866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41867$as_echo "$ac_cv_sizeof_int_p" >&6; }
41868
41869
41870
41871cat >>confdefs.h <<_ACEOF
41872#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41873_ACEOF
41874
41875
41876
41877      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41878
41879      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41880        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
41881      fi
41882    fi
41883  fi
41884
41885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41886$as_echo_n "checking for target address size... " >&6; }
41887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41888$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41889
41890
41891  ###############################################################################
41892  #
41893  # Is the target little of big endian?
41894  #
41895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41896$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41897if ${ac_cv_c_bigendian+:} false; then :
41898  $as_echo_n "(cached) " >&6
41899else
41900  ac_cv_c_bigendian=unknown
41901    # See if we're dealing with a universal compiler.
41902    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41903/* end confdefs.h.  */
41904#ifndef __APPLE_CC__
41905	       not a universal capable compiler
41906	     #endif
41907	     typedef int dummy;
41908
41909_ACEOF
41910if ac_fn_cxx_try_compile "$LINENO"; then :
41911
41912	# Check for potential -arch flags.  It is not universal unless
41913	# there are at least two -arch flags with different values.
41914	ac_arch=
41915	ac_prev=
41916	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41917	 if test -n "$ac_prev"; then
41918	   case $ac_word in
41919	     i?86 | x86_64 | ppc | ppc64)
41920	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41921		 ac_arch=$ac_word
41922	       else
41923		 ac_cv_c_bigendian=universal
41924		 break
41925	       fi
41926	       ;;
41927	   esac
41928	   ac_prev=
41929	 elif test "x$ac_word" = "x-arch"; then
41930	   ac_prev=arch
41931	 fi
41932       done
41933fi
41934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41935    if test $ac_cv_c_bigendian = unknown; then
41936      # See if sys/param.h defines the BYTE_ORDER macro.
41937      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41938/* end confdefs.h.  */
41939#include <sys/types.h>
41940	     #include <sys/param.h>
41941
41942int
41943main ()
41944{
41945#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41946		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41947		     && LITTLE_ENDIAN)
41948	      bogus endian macros
41949	     #endif
41950
41951  ;
41952  return 0;
41953}
41954_ACEOF
41955if ac_fn_cxx_try_compile "$LINENO"; then :
41956  # It does; now see whether it defined to BIG_ENDIAN or not.
41957	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41958/* end confdefs.h.  */
41959#include <sys/types.h>
41960		#include <sys/param.h>
41961
41962int
41963main ()
41964{
41965#if BYTE_ORDER != BIG_ENDIAN
41966		 not big endian
41967		#endif
41968
41969  ;
41970  return 0;
41971}
41972_ACEOF
41973if ac_fn_cxx_try_compile "$LINENO"; then :
41974  ac_cv_c_bigendian=yes
41975else
41976  ac_cv_c_bigendian=no
41977fi
41978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41979fi
41980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41981    fi
41982    if test $ac_cv_c_bigendian = unknown; then
41983      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41984      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41985/* end confdefs.h.  */
41986#include <limits.h>
41987
41988int
41989main ()
41990{
41991#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41992	      bogus endian macros
41993	     #endif
41994
41995  ;
41996  return 0;
41997}
41998_ACEOF
41999if ac_fn_cxx_try_compile "$LINENO"; then :
42000  # It does; now see whether it defined to _BIG_ENDIAN or not.
42001	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42002/* end confdefs.h.  */
42003#include <limits.h>
42004
42005int
42006main ()
42007{
42008#ifndef _BIG_ENDIAN
42009		 not big endian
42010		#endif
42011
42012  ;
42013  return 0;
42014}
42015_ACEOF
42016if ac_fn_cxx_try_compile "$LINENO"; then :
42017  ac_cv_c_bigendian=yes
42018else
42019  ac_cv_c_bigendian=no
42020fi
42021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42022fi
42023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42024    fi
42025    if test $ac_cv_c_bigendian = unknown; then
42026      # Compile a test program.
42027      if test "$cross_compiling" = yes; then :
42028  # Try to guess by grepping values from an object file.
42029	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42030/* end confdefs.h.  */
42031short int ascii_mm[] =
42032		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42033		short int ascii_ii[] =
42034		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42035		int use_ascii (int i) {
42036		  return ascii_mm[i] + ascii_ii[i];
42037		}
42038		short int ebcdic_ii[] =
42039		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42040		short int ebcdic_mm[] =
42041		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42042		int use_ebcdic (int i) {
42043		  return ebcdic_mm[i] + ebcdic_ii[i];
42044		}
42045		extern int foo;
42046
42047int
42048main ()
42049{
42050return use_ascii (foo) == use_ebcdic (foo);
42051  ;
42052  return 0;
42053}
42054_ACEOF
42055if ac_fn_cxx_try_compile "$LINENO"; then :
42056  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42057	      ac_cv_c_bigendian=yes
42058	    fi
42059	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42060	      if test "$ac_cv_c_bigendian" = unknown; then
42061		ac_cv_c_bigendian=no
42062	      else
42063		# finding both strings is unlikely to happen, but who knows?
42064		ac_cv_c_bigendian=unknown
42065	      fi
42066	    fi
42067fi
42068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42069else
42070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42071/* end confdefs.h.  */
42072$ac_includes_default
42073int
42074main ()
42075{
42076
42077	     /* Are we little or big endian?  From Harbison&Steele.  */
42078	     union
42079	     {
42080	       long int l;
42081	       char c[sizeof (long int)];
42082	     } u;
42083	     u.l = 1;
42084	     return u.c[sizeof (long int) - 1] == 1;
42085
42086  ;
42087  return 0;
42088}
42089_ACEOF
42090if ac_fn_cxx_try_run "$LINENO"; then :
42091  ac_cv_c_bigendian=no
42092else
42093  ac_cv_c_bigendian=yes
42094fi
42095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42096  conftest.$ac_objext conftest.beam conftest.$ac_ext
42097fi
42098
42099    fi
42100fi
42101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42102$as_echo "$ac_cv_c_bigendian" >&6; }
42103 case $ac_cv_c_bigendian in #(
42104   yes)
42105     ENDIAN="big";; #(
42106   no)
42107     ENDIAN="little" ;; #(
42108   universal)
42109     ENDIAN="universal_endianness"
42110     ;; #(
42111   *)
42112     ENDIAN="unknown" ;;
42113 esac
42114
42115
42116  if test "x$ENDIAN" = xuniversal_endianness; then
42117    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42118  fi
42119  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42120    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
42121  fi
42122
42123
42124# Configure flags for the tools
42125
42126  ###############################################################################
42127  #
42128  # How to compile shared libraries.
42129  #
42130
42131  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42132    PICFLAG="-fPIC"
42133    C_FLAG_REORDER=''
42134    CXX_FLAG_REORDER=''
42135
42136    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42137      # Linking is different on MacOSX
42138      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42139      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42140      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42141      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42142      SET_SHARED_LIBRARY_MAPFILE=''
42143    else
42144      # Default works for linux, might work on other platforms as well.
42145      SHARED_LIBRARY_FLAGS='-shared'
42146      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42147      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42148      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42149      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42150    fi
42151  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42152    PICFLAG=''
42153    C_FLAG_REORDER=''
42154    CXX_FLAG_REORDER=''
42155
42156    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42157      # Linking is different on MacOSX
42158      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42159      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42160      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42161      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42162      SET_SHARED_LIBRARY_MAPFILE=''
42163    else
42164      # Default works for linux, might work on other platforms as well.
42165      SHARED_LIBRARY_FLAGS='-shared'
42166      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42167      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42168      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42169      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42170    fi
42171  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42172    PICFLAG="-KPIC"
42173    C_FLAG_REORDER='-xF'
42174    CXX_FLAG_REORDER='-xF'
42175    SHARED_LIBRARY_FLAGS="-G"
42176    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42177    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42178    SET_SHARED_LIBRARY_NAME=''
42179    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42180  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42181    PICFLAG="-qpic=large"
42182    C_FLAG_REORDER=''
42183    CXX_FLAG_REORDER=''
42184    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42185    SET_EXECUTABLE_ORIGIN=""
42186    SET_SHARED_LIBRARY_ORIGIN=''
42187    SET_SHARED_LIBRARY_NAME=''
42188    SET_SHARED_LIBRARY_MAPFILE=''
42189  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42190    PICFLAG=""
42191    C_FLAG_REORDER=''
42192    CXX_FLAG_REORDER=''
42193    SHARED_LIBRARY_FLAGS="-LD"
42194    SET_EXECUTABLE_ORIGIN=''
42195    SET_SHARED_LIBRARY_ORIGIN=''
42196    SET_SHARED_LIBRARY_NAME=''
42197    SET_SHARED_LIBRARY_MAPFILE=''
42198  fi
42199
42200
42201
42202
42203
42204
42205
42206
42207  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42208    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42209    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42210    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42211  fi
42212  # The (cross) compiler is now configured, we can now test capabilities
42213  # of the target platform.
42214
42215
42216
42217  ###############################################################################
42218  #
42219  # Setup the opt flags for different compilers
42220  # and different operating systems.
42221  #
42222
42223  # FIXME: this was indirectly the old default, but just inherited.
42224  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42225  #   C_FLAG_DEPS="-MMD -MF"
42226  # fi
42227
42228  # Generate make dependency files
42229  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42230    C_FLAG_DEPS="-MMD -MF"
42231  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42232    C_FLAG_DEPS="-MMD -MF"
42233  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42234    C_FLAG_DEPS="-xMMD -xMF"
42235  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42236    C_FLAG_DEPS="-qmakedep=gcc -MF"
42237  fi
42238  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42239
42240
42241
42242  # Debug symbols
42243  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42244    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42245      # reduce from default "-g2" option to save space
42246      CFLAGS_DEBUG_SYMBOLS="-g1"
42247      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42248    else
42249      CFLAGS_DEBUG_SYMBOLS="-g"
42250      CXXFLAGS_DEBUG_SYMBOLS="-g"
42251    fi
42252  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42253    CFLAGS_DEBUG_SYMBOLS="-g"
42254    CXXFLAGS_DEBUG_SYMBOLS="-g"
42255  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42256    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42257    # FIXME: likely a bug, this disables debug symbols rather than enables them
42258    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42259  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42260    CFLAGS_DEBUG_SYMBOLS="-g"
42261    CXXFLAGS_DEBUG_SYMBOLS="-g"
42262  fi
42263
42264
42265
42266  # bounds, memory and behavior checking options
42267  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42268    case $DEBUG_LEVEL in
42269    release )
42270      # no adjustment
42271      ;;
42272    fastdebug )
42273      # no adjustment
42274      ;;
42275    slowdebug )
42276      # Add runtime stack smashing and undefined behavior checks.
42277      # Not all versions of gcc support -fstack-protector
42278      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42279
42280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42281$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42282  supports=yes
42283
42284  saved_cflags="$CFLAGS"
42285  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42286  ac_ext=c
42287ac_cpp='$CPP $CPPFLAGS'
42288ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42289ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42290ac_compiler_gnu=$ac_cv_c_compiler_gnu
42291
42292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42293/* end confdefs.h.  */
42294int i;
42295_ACEOF
42296if ac_fn_c_try_compile "$LINENO"; then :
42297
42298else
42299  supports=no
42300fi
42301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42302  ac_ext=cpp
42303ac_cpp='$CXXCPP $CPPFLAGS'
42304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42307
42308  CFLAGS="$saved_cflags"
42309
42310  saved_cxxflags="$CXXFLAGS"
42311  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42312  ac_ext=cpp
42313ac_cpp='$CXXCPP $CPPFLAGS'
42314ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42315ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42316ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42317
42318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42319/* end confdefs.h.  */
42320int i;
42321_ACEOF
42322if ac_fn_cxx_try_compile "$LINENO"; then :
42323
42324else
42325  supports=no
42326fi
42327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42328  ac_ext=cpp
42329ac_cpp='$CXXCPP $CPPFLAGS'
42330ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42331ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42332ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42333
42334  CXXFLAGS="$saved_cxxflags"
42335
42336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42337$as_echo "$supports" >&6; }
42338  if test "x$supports" = "xyes" ; then
42339    :
42340  else
42341    STACK_PROTECTOR_CFLAG=""
42342  fi
42343
42344
42345      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42346      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42347      ;;
42348    esac
42349  fi
42350
42351  # Optimization levels
42352  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42353    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42354
42355    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42356      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42357      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42358      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42359      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42360      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42361      C_O_FLAG_NONE="-xregs=no%frameptr"
42362      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42363      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42364      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42365      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42366      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42367      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42368        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42369        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42370      fi
42371    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42372      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42373      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42374      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42375      C_O_FLAG_DEBUG=""
42376      C_O_FLAG_NONE=""
42377      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42378      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42379      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42380      C_O_FLAG_DEBUG=""
42381      CXX_O_FLAG_NONE=""
42382    fi
42383  else
42384    # The remaining toolchains share opt flags between CC and CXX;
42385    # setup for C and duplicate afterwards.
42386    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42387      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42388        # On MacOSX we optimize for size, something
42389        # we should do for all platforms?
42390        C_O_FLAG_HIGHEST="-Os"
42391        C_O_FLAG_HI="-Os"
42392        C_O_FLAG_NORM="-Os"
42393      else
42394        C_O_FLAG_HIGHEST="-O3"
42395        C_O_FLAG_HI="-O3"
42396        C_O_FLAG_NORM="-O2"
42397      fi
42398      C_O_FLAG_DEBUG="-O0"
42399      C_O_FLAG_NONE="-O0"
42400    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42401      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42402        # On MacOSX we optimize for size, something
42403        # we should do for all platforms?
42404        C_O_FLAG_HIGHEST="-Os"
42405        C_O_FLAG_HI="-Os"
42406        C_O_FLAG_NORM="-Os"
42407      else
42408        C_O_FLAG_HIGHEST="-O3"
42409        C_O_FLAG_HI="-O3"
42410        C_O_FLAG_NORM="-O2"
42411      fi
42412      C_O_FLAG_DEBUG="-O0"
42413      C_O_FLAG_NONE="-O0"
42414    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42415      C_O_FLAG_HIGHEST="-O3"
42416      C_O_FLAG_HI="-O3 -qstrict"
42417      C_O_FLAG_NORM="-O2"
42418      C_O_FLAG_DEBUG="-qnoopt"
42419      C_O_FLAG_NONE="-qnoop"
42420    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42421      C_O_FLAG_HIGHEST="-O2"
42422      C_O_FLAG_HI="-O1"
42423      C_O_FLAG_NORM="-O1"
42424      C_O_FLAG_DEBUG="-Od"
42425      C_O_FLAG_NONE="-Od"
42426    fi
42427    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42428    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42429    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42430    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42431    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42432  fi
42433
42434  # Adjust optimization flags according to debug level.
42435  case $DEBUG_LEVEL in
42436    release )
42437      # no adjustment
42438      ;;
42439    fastdebug )
42440      # Not quite so much optimization
42441      C_O_FLAG_HI="$C_O_FLAG_NORM"
42442      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42443      ;;
42444    slowdebug )
42445      # Disable optimization
42446      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42447      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42448      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42449      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42450      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42451      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42452      ;;
42453  esac
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467  # Special extras...
42468  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42469    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42470      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42471      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42472    fi
42473    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42474    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42475  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42476    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42477    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42478  fi
42479
42480  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42482$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42483  fi
42484
42485  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42487$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42488  fi
42489
42490  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42491    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42492$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42493  fi
42494
42495
42496# Check whether --with-extra-cflags was given.
42497if test "${with_extra_cflags+set}" = set; then :
42498  withval=$with_extra_cflags;
42499fi
42500
42501
42502
42503# Check whether --with-extra-cxxflags was given.
42504if test "${with_extra_cxxflags+set}" = set; then :
42505  withval=$with_extra_cxxflags;
42506fi
42507
42508
42509
42510# Check whether --with-extra-ldflags was given.
42511if test "${with_extra_ldflags+set}" = set; then :
42512  withval=$with_extra_ldflags;
42513fi
42514
42515
42516  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42517  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42518  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42519
42520  # Hotspot needs these set in their legacy form
42521  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42522  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42523  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42524
42525
42526
42527
42528
42529  ###############################################################################
42530  #
42531  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42532  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42533  #
42534
42535  # Setup compiler/platform specific flags into
42536  #    CFLAGS_JDK    - C Compiler flags
42537  #    CXXFLAGS_JDK  - C++ Compiler flags
42538  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42539  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42540    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42541      # Force compatibility with i586 on 32 bit intel platforms.
42542      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42543    fi
42544    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42545        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42546    case $OPENJDK_TARGET_CPU_ARCH in
42547      arm )
42548        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42549        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42550        ;;
42551      ppc )
42552        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42553        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42554        ;;
42555      * )
42556        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42557        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42558        ;;
42559    esac
42560  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42561    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42562    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42563      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42564    fi
42565
42566    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42567    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42568  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42569    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42570    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42571  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42572    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42573        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42574        -DWIN32_LEAN_AND_MEAN \
42575        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42576        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42577        -DWIN32 -DIAL"
42578    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42579      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42580    else
42581      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42582    fi
42583    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42584    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42585    # studio.
42586    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42587      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42588          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42589    fi
42590  fi
42591
42592  ###############################################################################
42593
42594  # Adjust flags according to debug level.
42595  case $DEBUG_LEVEL in
42596    fastdebug | slowdebug )
42597      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42598      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42599      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42600      ;;
42601    release )
42602      ;;
42603    * )
42604      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42605      ;;
42606  esac
42607
42608  # Setup LP64
42609  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42610
42611  # Set some common defines. These works for all compilers, but assume
42612  # -D is universally accepted.
42613
42614  # Setup endianness
42615  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42616    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42617    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42618    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42619    #   Note: -Dmacro         is the same as    #define macro 1
42620    #         -Dmacro=        is the same as    #define macro
42621    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42622      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42623    else
42624      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42625    fi
42626  else
42627    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42628    # are defined in the system?
42629    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42630      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42631    else
42632      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42633    fi
42634  fi
42635
42636  # Setup target OS define. Use OS target name but in upper case.
42637  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42638  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42639
42640  # Setup target CPU
42641  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42642
42643  # Setup debug/release defines
42644  if test "x$DEBUG_LEVEL" = xrelease; then
42645    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42646    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42647      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42648    fi
42649  else
42650    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42651  fi
42652
42653  # Set some additional per-OS defines.
42654  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42655    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42656  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42657    # FIXME: PPC64 should not be here.
42658    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42659  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42660    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42661  fi
42662
42663  # Additional macosx handling
42664  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42665    # Setting these parameters makes it an error to link to macosx APIs that are
42666    # newer than the given OS version and makes the linked binaries compatible
42667    # even if built on a newer version of the OS.
42668    # The expected format is X.Y.Z
42669    MACOSX_VERSION_MIN=10.7.0
42670
42671
42672    # The macro takes the version with no dots, ex: 1070
42673    # Let the flags variables get resolved in make for easier override on make
42674    # command line.
42675    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42676    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42677  fi
42678
42679  # Setup some hard coded includes
42680  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42681      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42682      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42683      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42684
42685  # The shared libraries are compiled using the picflag.
42686  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42687  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42688
42689  # Executable flags
42690  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42691  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42692
42693
42694
42695
42696
42697
42698  # Flags for compiling test libraries
42699  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42700  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42701
42702  # Flags for compiling test executables
42703  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42704  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42705
42706
42707
42708
42709
42710
42711  # Setup LDFLAGS et al.
42712  #
42713
42714  # Now this is odd. The JDK native libraries have to link against libjvm.so
42715  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42716  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42717  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42718  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42719  # libraries will link to whatever is in memory. Yuck.
42720  #
42721  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42722  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42723    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42724    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42725      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42726    fi
42727    # TODO: make -debug optional "--disable-full-debug-symbols"
42728    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42729  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42730    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42731    # We have previously set HAS_GNU_HASH if this is the case
42732    if test -n "$HAS_GNU_HASH"; then
42733      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42734    fi
42735    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42736      # And since we now know that the linker is gnu, then add -z defs, to forbid
42737      # undefined symbols in object files.
42738      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42739      case $DEBUG_LEVEL in
42740        release )
42741          # tell linker to optimize libraries.
42742          # Should this be supplied to the OSS linker as well?
42743          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42744          ;;
42745        slowdebug )
42746          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42747            # do relocations at load
42748            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42749            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42750          fi
42751          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42752            # mark relocations read only
42753            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42754            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42755          fi
42756          ;;
42757        fastdebug )
42758          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42759            # mark relocations read only
42760            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42761            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42762          fi
42763          ;;
42764        * )
42765          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42766          ;;
42767        esac
42768    fi
42769  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42770    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42771    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42772  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42773    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42774  fi
42775
42776  # Customize LDFLAGS for executables
42777
42778  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42779
42780  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42781    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42782      LDFLAGS_STACK_SIZE=1048576
42783    else
42784      LDFLAGS_STACK_SIZE=327680
42785    fi
42786    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42787  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42788    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42789  fi
42790
42791  # Customize LDFLAGS for libs
42792  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42793
42794  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42795    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42796    LDFLAGS_JDKLIB_SUFFIX=""
42797  else
42798    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42799        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42800
42801    # On some platforms (mac) the linker warns about non existing -L dirs.
42802    # Add server first if available. Linking aginst client does not always produce the same results.
42803    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42804    # Default to server for other variants.
42805    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42806      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42807    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42808      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42809    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42810      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42811    else
42812      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42813    fi
42814
42815    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42816    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42817      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42818    fi
42819  fi
42820
42821
42822
42823
42824
42825
42826
42827  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42828  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42829  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42830  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42831
42832
42833
42834
42835
42836
42837
42838  # Some Zero and Shark settings.
42839  # ZERO_ARCHFLAG tells the compiler which mode to build for
42840  case "${OPENJDK_TARGET_CPU}" in
42841    s390)
42842      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42843      ;;
42844    *)
42845      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42846  esac
42847
42848  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42849$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42850  supports=yes
42851
42852  saved_cflags="$CFLAGS"
42853  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42854  ac_ext=c
42855ac_cpp='$CPP $CPPFLAGS'
42856ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42857ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42858ac_compiler_gnu=$ac_cv_c_compiler_gnu
42859
42860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42861/* end confdefs.h.  */
42862int i;
42863_ACEOF
42864if ac_fn_c_try_compile "$LINENO"; then :
42865
42866else
42867  supports=no
42868fi
42869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42870  ac_ext=cpp
42871ac_cpp='$CXXCPP $CPPFLAGS'
42872ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42873ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42874ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42875
42876  CFLAGS="$saved_cflags"
42877
42878  saved_cxxflags="$CXXFLAGS"
42879  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42880  ac_ext=cpp
42881ac_cpp='$CXXCPP $CPPFLAGS'
42882ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42883ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42884ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42885
42886  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42887/* end confdefs.h.  */
42888int i;
42889_ACEOF
42890if ac_fn_cxx_try_compile "$LINENO"; then :
42891
42892else
42893  supports=no
42894fi
42895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42896  ac_ext=cpp
42897ac_cpp='$CXXCPP $CPPFLAGS'
42898ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42899ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42900ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42901
42902  CXXFLAGS="$saved_cxxflags"
42903
42904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42905$as_echo "$supports" >&6; }
42906  if test "x$supports" = "xyes" ; then
42907    :
42908  else
42909    ZERO_ARCHFLAG=""
42910  fi
42911
42912
42913
42914  # Check that the compiler supports -mX (or -qX on AIX) flags
42915  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42916
42917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42918$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42919  supports=yes
42920
42921  saved_cflags="$CFLAGS"
42922  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42923  ac_ext=c
42924ac_cpp='$CPP $CPPFLAGS'
42925ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42926ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42927ac_compiler_gnu=$ac_cv_c_compiler_gnu
42928
42929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42930/* end confdefs.h.  */
42931int i;
42932_ACEOF
42933if ac_fn_c_try_compile "$LINENO"; then :
42934
42935else
42936  supports=no
42937fi
42938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42939  ac_ext=cpp
42940ac_cpp='$CXXCPP $CPPFLAGS'
42941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42944
42945  CFLAGS="$saved_cflags"
42946
42947  saved_cxxflags="$CXXFLAGS"
42948  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42949  ac_ext=cpp
42950ac_cpp='$CXXCPP $CPPFLAGS'
42951ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42952ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42953ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42954
42955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42956/* end confdefs.h.  */
42957int i;
42958_ACEOF
42959if ac_fn_cxx_try_compile "$LINENO"; then :
42960
42961else
42962  supports=no
42963fi
42964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42965  ac_ext=cpp
42966ac_cpp='$CXXCPP $CPPFLAGS'
42967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42970
42971  CXXFLAGS="$saved_cxxflags"
42972
42973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42974$as_echo "$supports" >&6; }
42975  if test "x$supports" = "xyes" ; then
42976    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42977  else
42978    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42979  fi
42980
42981
42982
42983  # Check whether --enable-warnings-as-errors was given.
42984if test "${enable_warnings_as_errors+set}" = set; then :
42985  enableval=$enable_warnings_as_errors;
42986fi
42987
42988
42989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42990$as_echo_n "checking if native warnings are errors... " >&6; }
42991  if test "x$enable_warnings_as_errors" = "xyes"; then
42992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42993$as_echo "yes (explicitely set)" >&6; }
42994    WARNINGS_AS_ERRORS=true
42995  elif test "x$enable_warnings_as_errors" = "xno"; then
42996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42997$as_echo "no" >&6; }
42998    WARNINGS_AS_ERRORS=false
42999  elif test "x$enable_warnings_as_errors" = "x"; then
43000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43001$as_echo "yes (default)" >&6; }
43002    WARNINGS_AS_ERRORS=true
43003  else
43004    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43005  fi
43006
43007
43008  case "${TOOLCHAIN_TYPE}" in
43009    microsoft)
43010      DISABLE_WARNING_PREFIX="-wd"
43011      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43012      ;;
43013    solstudio)
43014      DISABLE_WARNING_PREFIX="-erroff="
43015      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43016      ;;
43017    gcc)
43018      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43019
43020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43021$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43022  supports=yes
43023
43024  saved_cflags="$CFLAGS"
43025  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43026  ac_ext=c
43027ac_cpp='$CPP $CPPFLAGS'
43028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43030ac_compiler_gnu=$ac_cv_c_compiler_gnu
43031
43032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43033/* end confdefs.h.  */
43034int i;
43035_ACEOF
43036if ac_fn_c_try_compile "$LINENO"; then :
43037
43038else
43039  supports=no
43040fi
43041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43042  ac_ext=cpp
43043ac_cpp='$CXXCPP $CPPFLAGS'
43044ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43045ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43046ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43047
43048  CFLAGS="$saved_cflags"
43049
43050  saved_cxxflags="$CXXFLAGS"
43051  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43052  ac_ext=cpp
43053ac_cpp='$CXXCPP $CPPFLAGS'
43054ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43055ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43056ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43057
43058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43059/* end confdefs.h.  */
43060int i;
43061_ACEOF
43062if ac_fn_cxx_try_compile "$LINENO"; then :
43063
43064else
43065  supports=no
43066fi
43067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43068  ac_ext=cpp
43069ac_cpp='$CXXCPP $CPPFLAGS'
43070ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43071ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43072ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43073
43074  CXXFLAGS="$saved_cxxflags"
43075
43076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43077$as_echo "$supports" >&6; }
43078  if test "x$supports" = "xyes" ; then
43079    GCC_CAN_DISABLE_WARNINGS=true
43080  else
43081    GCC_CAN_DISABLE_WARNINGS=false
43082
43083  fi
43084
43085      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43086        DISABLE_WARNING_PREFIX="-Wno-"
43087      else
43088        DISABLE_WARNING_PREFIX=
43089      fi
43090      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43091      ;;
43092    clang)
43093      DISABLE_WARNING_PREFIX="-Wno-"
43094      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43095      ;;
43096  esac
43097
43098
43099
43100
43101# Setup debug symbols (need objcopy from the toolchain for that)
43102
43103  #
43104  # ENABLE_DEBUG_SYMBOLS
43105  # This must be done after the toolchain is setup, since we're looking at objcopy.
43106  #
43107  # Check whether --enable-debug-symbols was given.
43108if test "${enable_debug_symbols+set}" = set; then :
43109  enableval=$enable_debug_symbols;
43110fi
43111
43112
43113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43114$as_echo_n "checking if we should generate debug symbols... " >&6; }
43115
43116  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43117    # explicit enabling of enable-debug-symbols and can't find objcopy
43118    #   this is an error
43119    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43120  fi
43121
43122  if test "x$enable_debug_symbols" = "xyes"; then
43123    ENABLE_DEBUG_SYMBOLS=true
43124  elif test "x$enable_debug_symbols" = "xno"; then
43125    ENABLE_DEBUG_SYMBOLS=false
43126  else
43127    # Default is on if objcopy is found
43128    if test "x$OBJCOPY" != x; then
43129      ENABLE_DEBUG_SYMBOLS=true
43130    # MacOS X and Windows don't use objcopy but default is on for those OSes
43131    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43132      ENABLE_DEBUG_SYMBOLS=true
43133    else
43134      ENABLE_DEBUG_SYMBOLS=false
43135    fi
43136  fi
43137
43138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43139$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43140
43141  #
43142  # ZIP_DEBUGINFO_FILES
43143  #
43144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43145$as_echo_n "checking if we should zip debug-info files... " >&6; }
43146  # Check whether --enable-zip-debug-info was given.
43147if test "${enable_zip_debug_info+set}" = set; then :
43148  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43149else
43150  enable_zip_debug_info="yes"
43151fi
43152
43153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43154$as_echo "${enable_zip_debug_info}" >&6; }
43155
43156  if test "x${enable_zip_debug_info}" = "xno"; then
43157    ZIP_DEBUGINFO_FILES=false
43158  else
43159    ZIP_DEBUGINFO_FILES=true
43160  fi
43161
43162
43163
43164
43165
43166  # Check whether --enable-native-coverage was given.
43167if test "${enable_native_coverage+set}" = set; then :
43168  enableval=$enable_native_coverage;
43169fi
43170
43171  GCOV_ENABLED="false"
43172  if test "x$enable_native_coverage" = "xyes"; then
43173    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43175$as_echo_n "checking if native coverage is enabled... " >&6; }
43176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43177$as_echo "yes" >&6; }
43178      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43179      GCOV_LDFLAGS="-fprofile-arcs"
43180      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43181      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43182      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43183      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43184      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43185      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43186      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43187      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43188      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43189      GCOV_ENABLED="true"
43190    else
43191      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43192    fi
43193  elif test "x$enable_native_coverage" = "xno"; then
43194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43195$as_echo_n "checking if native coverage is enabled... " >&6; }
43196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43197$as_echo "no" >&6; }
43198  elif test "x$enable_native_coverage" != "x"; then
43199    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43200  fi
43201
43202
43203
43204
43205###############################################################################
43206#
43207# Check dependencies for external and internal libraries.
43208#
43209###############################################################################
43210
43211# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43212
43213  # When using cygwin or msys, we need a wrapper binary that renames
43214  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43215  # @files and rewrites these too! This wrapper binary is
43216  # called fixpath.
43217  FIXPATH=
43218  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43220$as_echo_n "checking if fixpath can be created... " >&6; }
43221    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43222    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43223    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43224    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43225      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43226      FIXPATH="$FIXPATH_BIN -c"
43227    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43228      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43229      # @ was chosen as separator to minimize risk of other tools messing around with it
43230      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43231          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43232      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43233      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43234    fi
43235    FIXPATH_SRC_W="$FIXPATH_SRC"
43236    FIXPATH_BIN_W="$FIXPATH_BIN"
43237
43238  unix_path="$FIXPATH_SRC_W"
43239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43240    windows_path=`$CYGPATH -m "$unix_path"`
43241    FIXPATH_SRC_W="$windows_path"
43242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43243    windows_path=`cmd //c echo $unix_path`
43244    FIXPATH_SRC_W="$windows_path"
43245  fi
43246
43247
43248  unix_path="$FIXPATH_BIN_W"
43249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43250    windows_path=`$CYGPATH -m "$unix_path"`
43251    FIXPATH_BIN_W="$windows_path"
43252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43253    windows_path=`cmd //c echo $unix_path`
43254    FIXPATH_BIN_W="$windows_path"
43255  fi
43256
43257    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43258    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43259    cd $FIXPATH_DIR
43260    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43261    cd $CURDIR
43262
43263    if test ! -x $FIXPATH_BIN; then
43264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43265$as_echo "no" >&6; }
43266      cat $FIXPATH_DIR/fixpath1.log
43267      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43268    fi
43269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43270$as_echo "yes" >&6; }
43271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43272$as_echo_n "checking if fixpath.exe works... " >&6; }
43273    cd $FIXPATH_DIR
43274    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43275        > $FIXPATH_DIR/fixpath2.log 2>&1
43276    cd $CURDIR
43277    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43279$as_echo "no" >&6; }
43280      cat $FIXPATH_DIR/fixpath2.log
43281      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43282    fi
43283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43284$as_echo "yes" >&6; }
43285  fi
43286
43287
43288
43289
43290
43291
43292  ###############################################################################
43293  #
43294  # OS specific settings that we never will need to probe.
43295  #
43296  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43298$as_echo_n "checking what is not needed on Linux?... " >&6; }
43299    PULSE_NOT_NEEDED=yes
43300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43301$as_echo "pulse" >&6; }
43302  fi
43303
43304  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43306$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43307    ALSA_NOT_NEEDED=yes
43308    PULSE_NOT_NEEDED=yes
43309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43310$as_echo "alsa pulse" >&6; }
43311  fi
43312
43313  if test "x$OPENJDK_TARGET_OS" = xaix; then
43314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43315$as_echo_n "checking what is not needed on AIX?... " >&6; }
43316    ALSA_NOT_NEEDED=yes
43317    PULSE_NOT_NEEDED=yes
43318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43319$as_echo "alsa pulse" >&6; }
43320  fi
43321
43322
43323  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43325$as_echo_n "checking what is not needed on Windows?... " >&6; }
43326    CUPS_NOT_NEEDED=yes
43327    ALSA_NOT_NEEDED=yes
43328    PULSE_NOT_NEEDED=yes
43329    X11_NOT_NEEDED=yes
43330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43331$as_echo "alsa cups pulse x11" >&6; }
43332  fi
43333
43334  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43336$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43337    ALSA_NOT_NEEDED=yes
43338    PULSE_NOT_NEEDED=yes
43339    X11_NOT_NEEDED=yes
43340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43341$as_echo "alsa pulse x11" >&6; }
43342  fi
43343
43344  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43346$as_echo_n "checking what is not needed on bsd?... " >&6; }
43347    ALSA_NOT_NEEDED=yes
43348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43349$as_echo "alsa" >&6; }
43350  fi
43351
43352  if test "x$OPENJDK" = "xfalse"; then
43353    FREETYPE_NOT_NEEDED=yes
43354  fi
43355
43356  if test "x$SUPPORT_HEADFUL" = xno; then
43357    X11_NOT_NEEDED=yes
43358  fi
43359
43360
43361
43362  ###############################################################################
43363  #
43364  # Check for X Windows
43365  #
43366
43367  if test "x$X11_NOT_NEEDED" = xyes; then
43368    if test "x${with_x}" != x; then
43369      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43370$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43371    fi
43372    X_CFLAGS=
43373    X_LIBS=
43374  else
43375    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43376    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43377    # --x-libraries for the sysroot, if that seems to be correct.
43378    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43379      if test "x$SYSROOT" != "x"; then
43380        if test "x$x_includes" = xNONE; then
43381          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43382            x_includes="$SYSROOT/usr/X11R6/include"
43383          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43384            x_includes="$SYSROOT/usr/include"
43385          fi
43386        fi
43387        if test "x$x_libraries" = xNONE; then
43388          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43389            x_libraries="$SYSROOT/usr/X11R6/lib"
43390          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43391            x_libraries="$SYSROOT/usr/lib64"
43392          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43393            x_libraries="$SYSROOT/usr/lib"
43394          fi
43395        fi
43396      fi
43397    fi
43398
43399    # Now let autoconf do it's magic
43400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43401$as_echo_n "checking for X... " >&6; }
43402
43403
43404# Check whether --with-x was given.
43405if test "${with_x+set}" = set; then :
43406  withval=$with_x;
43407fi
43408
43409# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43410if test "x$with_x" = xno; then
43411  # The user explicitly disabled X.
43412  have_x=disabled
43413else
43414  case $x_includes,$x_libraries in #(
43415    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43416    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43417  $as_echo_n "(cached) " >&6
43418else
43419  # One or both of the vars are not set, and there is no cached value.
43420ac_x_includes=no ac_x_libraries=no
43421rm -f -r conftest.dir
43422if mkdir conftest.dir; then
43423  cd conftest.dir
43424  cat >Imakefile <<'_ACEOF'
43425incroot:
43426	@echo incroot='${INCROOT}'
43427usrlibdir:
43428	@echo usrlibdir='${USRLIBDIR}'
43429libdir:
43430	@echo libdir='${LIBDIR}'
43431_ACEOF
43432  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43433    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43434    for ac_var in incroot usrlibdir libdir; do
43435      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43436    done
43437    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43438    for ac_extension in a so sl dylib la dll; do
43439      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43440	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43441	ac_im_usrlibdir=$ac_im_libdir; break
43442      fi
43443    done
43444    # Screen out bogus values from the imake configuration.  They are
43445    # bogus both because they are the default anyway, and because
43446    # using them would break gcc on systems where it needs fixed includes.
43447    case $ac_im_incroot in
43448	/usr/include) ac_x_includes= ;;
43449	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43450    esac
43451    case $ac_im_usrlibdir in
43452	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43453	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43454    esac
43455  fi
43456  cd ..
43457  rm -f -r conftest.dir
43458fi
43459
43460# Standard set of common directories for X headers.
43461# Check X11 before X11Rn because it is often a symlink to the current release.
43462ac_x_header_dirs='
43463/usr/X11/include
43464/usr/X11R7/include
43465/usr/X11R6/include
43466/usr/X11R5/include
43467/usr/X11R4/include
43468
43469/usr/include/X11
43470/usr/include/X11R7
43471/usr/include/X11R6
43472/usr/include/X11R5
43473/usr/include/X11R4
43474
43475/usr/local/X11/include
43476/usr/local/X11R7/include
43477/usr/local/X11R6/include
43478/usr/local/X11R5/include
43479/usr/local/X11R4/include
43480
43481/usr/local/include/X11
43482/usr/local/include/X11R7
43483/usr/local/include/X11R6
43484/usr/local/include/X11R5
43485/usr/local/include/X11R4
43486
43487/usr/X386/include
43488/usr/x386/include
43489/usr/XFree86/include/X11
43490
43491/usr/include
43492/usr/local/include
43493/usr/unsupported/include
43494/usr/athena/include
43495/usr/local/x11r5/include
43496/usr/lpp/Xamples/include
43497
43498/usr/openwin/include
43499/usr/openwin/share/include'
43500
43501if test "$ac_x_includes" = no; then
43502  # Guess where to find include files, by looking for Xlib.h.
43503  # First, try using that file with no special directory specified.
43504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43505/* end confdefs.h.  */
43506#include <X11/Xlib.h>
43507_ACEOF
43508if ac_fn_cxx_try_cpp "$LINENO"; then :
43509  # We can compile using X headers with no special include directory.
43510ac_x_includes=
43511else
43512  for ac_dir in $ac_x_header_dirs; do
43513  if test -r "$ac_dir/X11/Xlib.h"; then
43514    ac_x_includes=$ac_dir
43515    break
43516  fi
43517done
43518fi
43519rm -f conftest.err conftest.i conftest.$ac_ext
43520fi # $ac_x_includes = no
43521
43522if test "$ac_x_libraries" = no; then
43523  # Check for the libraries.
43524  # See if we find them without any special options.
43525  # Don't add to $LIBS permanently.
43526  ac_save_LIBS=$LIBS
43527  LIBS="-lX11 $LIBS"
43528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43529/* end confdefs.h.  */
43530#include <X11/Xlib.h>
43531int
43532main ()
43533{
43534XrmInitialize ()
43535  ;
43536  return 0;
43537}
43538_ACEOF
43539if ac_fn_cxx_try_link "$LINENO"; then :
43540  LIBS=$ac_save_LIBS
43541# We can link X programs with no special library path.
43542ac_x_libraries=
43543else
43544  LIBS=$ac_save_LIBS
43545for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43546do
43547  # Don't even attempt the hair of trying to link an X program!
43548  for ac_extension in a so sl dylib la dll; do
43549    if test -r "$ac_dir/libX11.$ac_extension"; then
43550      ac_x_libraries=$ac_dir
43551      break 2
43552    fi
43553  done
43554done
43555fi
43556rm -f core conftest.err conftest.$ac_objext \
43557    conftest$ac_exeext conftest.$ac_ext
43558fi # $ac_x_libraries = no
43559
43560case $ac_x_includes,$ac_x_libraries in #(
43561  no,* | *,no | *\'*)
43562    # Didn't find X, or a directory has "'" in its name.
43563    ac_cv_have_x="have_x=no";; #(
43564  *)
43565    # Record where we found X for the cache.
43566    ac_cv_have_x="have_x=yes\
43567	ac_x_includes='$ac_x_includes'\
43568	ac_x_libraries='$ac_x_libraries'"
43569esac
43570fi
43571;; #(
43572    *) have_x=yes;;
43573  esac
43574  eval "$ac_cv_have_x"
43575fi # $with_x != no
43576
43577if test "$have_x" != yes; then
43578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43579$as_echo "$have_x" >&6; }
43580  no_x=yes
43581else
43582  # If each of the values was on the command line, it overrides each guess.
43583  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43584  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43585  # Update the cache value to reflect the command line values.
43586  ac_cv_have_x="have_x=yes\
43587	ac_x_includes='$x_includes'\
43588	ac_x_libraries='$x_libraries'"
43589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43590$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43591fi
43592
43593    if test "$no_x" = yes; then
43594  # Not all programs may use this symbol, but it does not hurt to define it.
43595
43596$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43597
43598  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43599else
43600  if test -n "$x_includes"; then
43601    X_CFLAGS="$X_CFLAGS -I$x_includes"
43602  fi
43603
43604  # It would also be nice to do this for all -L options, not just this one.
43605  if test -n "$x_libraries"; then
43606    X_LIBS="$X_LIBS -L$x_libraries"
43607    # For Solaris; some versions of Sun CC require a space after -R and
43608    # others require no space.  Words are not sufficient . . . .
43609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43610$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43611    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43612    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43613    ac_cxx_werror_flag=yes
43614    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43615/* end confdefs.h.  */
43616
43617int
43618main ()
43619{
43620
43621  ;
43622  return 0;
43623}
43624_ACEOF
43625if ac_fn_cxx_try_link "$LINENO"; then :
43626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43627$as_echo "no" >&6; }
43628       X_LIBS="$X_LIBS -R$x_libraries"
43629else
43630  LIBS="$ac_xsave_LIBS -R $x_libraries"
43631       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43632/* end confdefs.h.  */
43633
43634int
43635main ()
43636{
43637
43638  ;
43639  return 0;
43640}
43641_ACEOF
43642if ac_fn_cxx_try_link "$LINENO"; then :
43643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43644$as_echo "yes" >&6; }
43645	  X_LIBS="$X_LIBS -R $x_libraries"
43646else
43647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43648$as_echo "neither works" >&6; }
43649fi
43650rm -f core conftest.err conftest.$ac_objext \
43651    conftest$ac_exeext conftest.$ac_ext
43652fi
43653rm -f core conftest.err conftest.$ac_objext \
43654    conftest$ac_exeext conftest.$ac_ext
43655    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43656    LIBS=$ac_xsave_LIBS
43657  fi
43658
43659  # Check for system-dependent libraries X programs must link with.
43660  # Do this before checking for the system-independent R6 libraries
43661  # (-lICE), since we may need -lsocket or whatever for X linking.
43662
43663  if test "$ISC" = yes; then
43664    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43665  else
43666    # Martyn Johnson says this is needed for Ultrix, if the X
43667    # libraries were built with DECnet support.  And Karl Berry says
43668    # the Alpha needs dnet_stub (dnet does not exist).
43669    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43670    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43671/* end confdefs.h.  */
43672
43673/* Override any GCC internal prototype to avoid an error.
43674   Use char because int might match the return type of a GCC
43675   builtin and then its argument prototype would still apply.  */
43676#ifdef __cplusplus
43677extern "C"
43678#endif
43679char XOpenDisplay ();
43680int
43681main ()
43682{
43683return XOpenDisplay ();
43684  ;
43685  return 0;
43686}
43687_ACEOF
43688if ac_fn_cxx_try_link "$LINENO"; then :
43689
43690else
43691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43692$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43693if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43694  $as_echo_n "(cached) " >&6
43695else
43696  ac_check_lib_save_LIBS=$LIBS
43697LIBS="-ldnet  $LIBS"
43698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43699/* end confdefs.h.  */
43700
43701/* Override any GCC internal prototype to avoid an error.
43702   Use char because int might match the return type of a GCC
43703   builtin and then its argument prototype would still apply.  */
43704#ifdef __cplusplus
43705extern "C"
43706#endif
43707char dnet_ntoa ();
43708int
43709main ()
43710{
43711return dnet_ntoa ();
43712  ;
43713  return 0;
43714}
43715_ACEOF
43716if ac_fn_cxx_try_link "$LINENO"; then :
43717  ac_cv_lib_dnet_dnet_ntoa=yes
43718else
43719  ac_cv_lib_dnet_dnet_ntoa=no
43720fi
43721rm -f core conftest.err conftest.$ac_objext \
43722    conftest$ac_exeext conftest.$ac_ext
43723LIBS=$ac_check_lib_save_LIBS
43724fi
43725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43726$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43727if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43728  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43729fi
43730
43731    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43733$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43734if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43735  $as_echo_n "(cached) " >&6
43736else
43737  ac_check_lib_save_LIBS=$LIBS
43738LIBS="-ldnet_stub  $LIBS"
43739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43740/* end confdefs.h.  */
43741
43742/* Override any GCC internal prototype to avoid an error.
43743   Use char because int might match the return type of a GCC
43744   builtin and then its argument prototype would still apply.  */
43745#ifdef __cplusplus
43746extern "C"
43747#endif
43748char dnet_ntoa ();
43749int
43750main ()
43751{
43752return dnet_ntoa ();
43753  ;
43754  return 0;
43755}
43756_ACEOF
43757if ac_fn_cxx_try_link "$LINENO"; then :
43758  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43759else
43760  ac_cv_lib_dnet_stub_dnet_ntoa=no
43761fi
43762rm -f core conftest.err conftest.$ac_objext \
43763    conftest$ac_exeext conftest.$ac_ext
43764LIBS=$ac_check_lib_save_LIBS
43765fi
43766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43767$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43768if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43769  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43770fi
43771
43772    fi
43773fi
43774rm -f core conftest.err conftest.$ac_objext \
43775    conftest$ac_exeext conftest.$ac_ext
43776    LIBS="$ac_xsave_LIBS"
43777
43778    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43779    # to get the SysV transport functions.
43780    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43781    # needs -lnsl.
43782    # The nsl library prevents programs from opening the X display
43783    # on Irix 5.2, according to T.E. Dickey.
43784    # The functions gethostbyname, getservbyname, and inet_addr are
43785    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43786    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43787if test "x$ac_cv_func_gethostbyname" = xyes; then :
43788
43789fi
43790
43791    if test $ac_cv_func_gethostbyname = no; then
43792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43793$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43794if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43795  $as_echo_n "(cached) " >&6
43796else
43797  ac_check_lib_save_LIBS=$LIBS
43798LIBS="-lnsl  $LIBS"
43799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43800/* end confdefs.h.  */
43801
43802/* Override any GCC internal prototype to avoid an error.
43803   Use char because int might match the return type of a GCC
43804   builtin and then its argument prototype would still apply.  */
43805#ifdef __cplusplus
43806extern "C"
43807#endif
43808char gethostbyname ();
43809int
43810main ()
43811{
43812return gethostbyname ();
43813  ;
43814  return 0;
43815}
43816_ACEOF
43817if ac_fn_cxx_try_link "$LINENO"; then :
43818  ac_cv_lib_nsl_gethostbyname=yes
43819else
43820  ac_cv_lib_nsl_gethostbyname=no
43821fi
43822rm -f core conftest.err conftest.$ac_objext \
43823    conftest$ac_exeext conftest.$ac_ext
43824LIBS=$ac_check_lib_save_LIBS
43825fi
43826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43827$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43828if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43829  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43830fi
43831
43832      if test $ac_cv_lib_nsl_gethostbyname = no; then
43833	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43834$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43835if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43836  $as_echo_n "(cached) " >&6
43837else
43838  ac_check_lib_save_LIBS=$LIBS
43839LIBS="-lbsd  $LIBS"
43840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43841/* end confdefs.h.  */
43842
43843/* Override any GCC internal prototype to avoid an error.
43844   Use char because int might match the return type of a GCC
43845   builtin and then its argument prototype would still apply.  */
43846#ifdef __cplusplus
43847extern "C"
43848#endif
43849char gethostbyname ();
43850int
43851main ()
43852{
43853return gethostbyname ();
43854  ;
43855  return 0;
43856}
43857_ACEOF
43858if ac_fn_cxx_try_link "$LINENO"; then :
43859  ac_cv_lib_bsd_gethostbyname=yes
43860else
43861  ac_cv_lib_bsd_gethostbyname=no
43862fi
43863rm -f core conftest.err conftest.$ac_objext \
43864    conftest$ac_exeext conftest.$ac_ext
43865LIBS=$ac_check_lib_save_LIBS
43866fi
43867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43868$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43869if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43870  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43871fi
43872
43873      fi
43874    fi
43875
43876    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43877    # socket/setsockopt and other routines are undefined under SCO ODT
43878    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43879    # on later versions), says Simon Leinen: it contains gethostby*
43880    # variants that don't use the name server (or something).  -lsocket
43881    # must be given before -lnsl if both are needed.  We assume that
43882    # if connect needs -lnsl, so does gethostbyname.
43883    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43884if test "x$ac_cv_func_connect" = xyes; then :
43885
43886fi
43887
43888    if test $ac_cv_func_connect = no; then
43889      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43890$as_echo_n "checking for connect in -lsocket... " >&6; }
43891if ${ac_cv_lib_socket_connect+:} false; then :
43892  $as_echo_n "(cached) " >&6
43893else
43894  ac_check_lib_save_LIBS=$LIBS
43895LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43897/* end confdefs.h.  */
43898
43899/* Override any GCC internal prototype to avoid an error.
43900   Use char because int might match the return type of a GCC
43901   builtin and then its argument prototype would still apply.  */
43902#ifdef __cplusplus
43903extern "C"
43904#endif
43905char connect ();
43906int
43907main ()
43908{
43909return connect ();
43910  ;
43911  return 0;
43912}
43913_ACEOF
43914if ac_fn_cxx_try_link "$LINENO"; then :
43915  ac_cv_lib_socket_connect=yes
43916else
43917  ac_cv_lib_socket_connect=no
43918fi
43919rm -f core conftest.err conftest.$ac_objext \
43920    conftest$ac_exeext conftest.$ac_ext
43921LIBS=$ac_check_lib_save_LIBS
43922fi
43923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43924$as_echo "$ac_cv_lib_socket_connect" >&6; }
43925if test "x$ac_cv_lib_socket_connect" = xyes; then :
43926  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43927fi
43928
43929    fi
43930
43931    # Guillermo Gomez says -lposix is necessary on A/UX.
43932    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43933if test "x$ac_cv_func_remove" = xyes; then :
43934
43935fi
43936
43937    if test $ac_cv_func_remove = no; then
43938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43939$as_echo_n "checking for remove in -lposix... " >&6; }
43940if ${ac_cv_lib_posix_remove+:} false; then :
43941  $as_echo_n "(cached) " >&6
43942else
43943  ac_check_lib_save_LIBS=$LIBS
43944LIBS="-lposix  $LIBS"
43945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43946/* end confdefs.h.  */
43947
43948/* Override any GCC internal prototype to avoid an error.
43949   Use char because int might match the return type of a GCC
43950   builtin and then its argument prototype would still apply.  */
43951#ifdef __cplusplus
43952extern "C"
43953#endif
43954char remove ();
43955int
43956main ()
43957{
43958return remove ();
43959  ;
43960  return 0;
43961}
43962_ACEOF
43963if ac_fn_cxx_try_link "$LINENO"; then :
43964  ac_cv_lib_posix_remove=yes
43965else
43966  ac_cv_lib_posix_remove=no
43967fi
43968rm -f core conftest.err conftest.$ac_objext \
43969    conftest$ac_exeext conftest.$ac_ext
43970LIBS=$ac_check_lib_save_LIBS
43971fi
43972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43973$as_echo "$ac_cv_lib_posix_remove" >&6; }
43974if test "x$ac_cv_lib_posix_remove" = xyes; then :
43975  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43976fi
43977
43978    fi
43979
43980    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43981    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43982if test "x$ac_cv_func_shmat" = xyes; then :
43983
43984fi
43985
43986    if test $ac_cv_func_shmat = no; then
43987      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43988$as_echo_n "checking for shmat in -lipc... " >&6; }
43989if ${ac_cv_lib_ipc_shmat+:} false; then :
43990  $as_echo_n "(cached) " >&6
43991else
43992  ac_check_lib_save_LIBS=$LIBS
43993LIBS="-lipc  $LIBS"
43994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43995/* end confdefs.h.  */
43996
43997/* Override any GCC internal prototype to avoid an error.
43998   Use char because int might match the return type of a GCC
43999   builtin and then its argument prototype would still apply.  */
44000#ifdef __cplusplus
44001extern "C"
44002#endif
44003char shmat ();
44004int
44005main ()
44006{
44007return shmat ();
44008  ;
44009  return 0;
44010}
44011_ACEOF
44012if ac_fn_cxx_try_link "$LINENO"; then :
44013  ac_cv_lib_ipc_shmat=yes
44014else
44015  ac_cv_lib_ipc_shmat=no
44016fi
44017rm -f core conftest.err conftest.$ac_objext \
44018    conftest$ac_exeext conftest.$ac_ext
44019LIBS=$ac_check_lib_save_LIBS
44020fi
44021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44022$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44023if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44024  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44025fi
44026
44027    fi
44028  fi
44029
44030  # Check for libraries that X11R6 Xt/Xaw programs need.
44031  ac_save_LDFLAGS=$LDFLAGS
44032  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44033  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44034  # check for ICE first), but we must link in the order -lSM -lICE or
44035  # we get undefined symbols.  So assume we have SM if we have ICE.
44036  # These have to be linked with before -lX11, unlike the other
44037  # libraries we check for below, so use a different variable.
44038  # John Interrante, Karl Berry
44039  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44040$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44041if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44042  $as_echo_n "(cached) " >&6
44043else
44044  ac_check_lib_save_LIBS=$LIBS
44045LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44047/* end confdefs.h.  */
44048
44049/* Override any GCC internal prototype to avoid an error.
44050   Use char because int might match the return type of a GCC
44051   builtin and then its argument prototype would still apply.  */
44052#ifdef __cplusplus
44053extern "C"
44054#endif
44055char IceConnectionNumber ();
44056int
44057main ()
44058{
44059return IceConnectionNumber ();
44060  ;
44061  return 0;
44062}
44063_ACEOF
44064if ac_fn_cxx_try_link "$LINENO"; then :
44065  ac_cv_lib_ICE_IceConnectionNumber=yes
44066else
44067  ac_cv_lib_ICE_IceConnectionNumber=no
44068fi
44069rm -f core conftest.err conftest.$ac_objext \
44070    conftest$ac_exeext conftest.$ac_ext
44071LIBS=$ac_check_lib_save_LIBS
44072fi
44073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44074$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44075if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44076  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44077fi
44078
44079  LDFLAGS=$ac_save_LDFLAGS
44080
44081fi
44082
44083
44084    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44085    # this doesn't make sense so we remove it.
44086    if test "x$COMPILE_TYPE" = xcross; then
44087      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44088    fi
44089
44090    if test "x$no_x" = xyes; then
44091
44092  # Print a helpful message on how to acquire the necessary build dependency.
44093  # x11 is the help tag: freetype, cups, pulse, alsa etc
44094  MISSING_DEPENDENCY=x11
44095
44096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44097    cygwin_help $MISSING_DEPENDENCY
44098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44099    msys_help $MISSING_DEPENDENCY
44100  else
44101    PKGHANDLER_COMMAND=
44102
44103    case $PKGHANDLER in
44104      apt-get)
44105        apt_help     $MISSING_DEPENDENCY ;;
44106      yum)
44107        yum_help     $MISSING_DEPENDENCY ;;
44108      port)
44109        port_help    $MISSING_DEPENDENCY ;;
44110      pkgutil)
44111        pkgutil_help $MISSING_DEPENDENCY ;;
44112      pkgadd)
44113        pkgadd_help  $MISSING_DEPENDENCY ;;
44114    esac
44115
44116    if test "x$PKGHANDLER_COMMAND" != x; then
44117      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44118    fi
44119  fi
44120
44121      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44122    fi
44123
44124    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44125      OPENWIN_HOME="/usr/openwin"
44126      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44127      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44128          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44129          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44130          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44131    fi
44132
44133    ac_ext=c
44134ac_cpp='$CPP $CPPFLAGS'
44135ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44136ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44137ac_compiler_gnu=$ac_cv_c_compiler_gnu
44138
44139    OLD_CFLAGS="$CFLAGS"
44140    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44141
44142    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44143    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44144do :
44145  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44146ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44147          # include <X11/Xlib.h>
44148          # include <X11/Xutil.h>
44149
44150
44151"
44152if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44153  cat >>confdefs.h <<_ACEOF
44154#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44155_ACEOF
44156 X11_HEADERS_OK=yes
44157else
44158  X11_HEADERS_OK=no; break
44159fi
44160
44161done
44162
44163
44164    if test "x$X11_HEADERS_OK" = xno; then
44165
44166  # Print a helpful message on how to acquire the necessary build dependency.
44167  # x11 is the help tag: freetype, cups, pulse, alsa etc
44168  MISSING_DEPENDENCY=x11
44169
44170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44171    cygwin_help $MISSING_DEPENDENCY
44172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44173    msys_help $MISSING_DEPENDENCY
44174  else
44175    PKGHANDLER_COMMAND=
44176
44177    case $PKGHANDLER in
44178      apt-get)
44179        apt_help     $MISSING_DEPENDENCY ;;
44180      yum)
44181        yum_help     $MISSING_DEPENDENCY ;;
44182      port)
44183        port_help    $MISSING_DEPENDENCY ;;
44184      pkgutil)
44185        pkgutil_help $MISSING_DEPENDENCY ;;
44186      pkgadd)
44187        pkgadd_help  $MISSING_DEPENDENCY ;;
44188    esac
44189
44190    if test "x$PKGHANDLER_COMMAND" != x; then
44191      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44192    fi
44193  fi
44194
44195      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44196    fi
44197
44198    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44199    # defined in libawt_xawt.
44200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44201$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44202    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44203/* end confdefs.h.  */
44204#include <X11/extensions/Xrender.h>
44205int
44206main ()
44207{
44208XLinearGradient x;
44209  ;
44210  return 0;
44211}
44212_ACEOF
44213if ac_fn_c_try_compile "$LINENO"; then :
44214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44215$as_echo "yes" >&6; }
44216else
44217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44218$as_echo "no" >&6; }
44219         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44220fi
44221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44222
44223    CFLAGS="$OLD_CFLAGS"
44224    ac_ext=cpp
44225ac_cpp='$CXXCPP $CPPFLAGS'
44226ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44227ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44228ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44229
44230  fi # X11_NOT_NEEDED
44231
44232
44233
44234
44235
44236
44237  ###############################################################################
44238  #
44239  # The common unix printing system cups is used to print from java.
44240  #
44241
44242# Check whether --with-cups was given.
44243if test "${with_cups+set}" = set; then :
44244  withval=$with_cups;
44245fi
44246
44247
44248# Check whether --with-cups-include was given.
44249if test "${with_cups_include+set}" = set; then :
44250  withval=$with_cups_include;
44251fi
44252
44253
44254  if test "x$CUPS_NOT_NEEDED" = xyes; then
44255    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44256      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44257$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44258    fi
44259    CUPS_CFLAGS=
44260  else
44261    CUPS_FOUND=no
44262
44263    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44264      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44265    fi
44266
44267    if test "x${with_cups}" != x; then
44268      CUPS_CFLAGS="-I${with_cups}/include"
44269      CUPS_FOUND=yes
44270    fi
44271    if test "x${with_cups_include}" != x; then
44272      CUPS_CFLAGS="-I${with_cups_include}"
44273      CUPS_FOUND=yes
44274    fi
44275    if test "x$CUPS_FOUND" = xno; then
44276
44277
44278  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44279    # Source the builddeps file again, to make sure it uses the latest variables!
44280    . $builddepsfile
44281    # Look for a target and build machine specific resource!
44282    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44283    if test "x$resource" = x; then
44284      # Ok, lets instead look for a target specific resource
44285      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44286    fi
44287    if test "x$resource" = x; then
44288      # Ok, lets instead look for a build specific resource
44289      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44290    fi
44291    if test "x$resource" = x; then
44292      # Ok, lets instead look for a generic resource
44293      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44294      resource=${builddep_cups}
44295    fi
44296    if test "x$resource" != x; then
44297      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44298$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44299      # If the resource in the builddeps.conf file is an existing directory,
44300      # for example /java/linux/cups
44301      if test -d ${resource}; then
44302        depdir=${resource}
44303      else
44304
44305  # cups is for example mymodule
44306  # $resource is for example libs/general/libmymod_1_2_3.zip
44307  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44308  # $with_builddeps_dir is for example /localhome/builddeps
44309  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44310  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44311  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44312  filename=`basename $resource`
44313  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44314  filebase=${filename%%.*}
44315  extension=${filename#*.}
44316  installdir=$with_builddeps_dir/$filebase
44317  if test ! -f $installdir/$filename.unpacked; then
44318    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44319$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44320    if test ! -d $installdir; then
44321      mkdir -p $installdir
44322    fi
44323    if test ! -d $installdir; then
44324      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44325    fi
44326    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44327    touch $tmpfile
44328    if test ! -f $tmpfile; then
44329      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44330    fi
44331
44332  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44333  # $tmpfile is the local file name for the downloaded file.
44334  VALID_TOOL=no
44335  if test "x$BDEPS_FTP" = xwget; then
44336    VALID_TOOL=yes
44337    wget -O $tmpfile $with_builddeps_server/$resource
44338  fi
44339  if test "x$BDEPS_FTP" = xlftp; then
44340    VALID_TOOL=yes
44341    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44342  fi
44343  if test "x$BDEPS_FTP" = xftp; then
44344    VALID_TOOL=yes
44345    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44346    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44347    FTPUSERPWD=${FTPSERVER%%@*}
44348    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44349      FTPUSER=${userpwd%%:*}
44350      FTPPWD=${userpwd#*@}
44351      FTPSERVER=${FTPSERVER#*@}
44352    else
44353      FTPUSER=ftp
44354      FTPPWD=ftp
44355    fi
44356    # the "pass" command does not work on some
44357    # ftp clients (read ftp.exe) but if it works,
44358    # passive mode is better!
44359    ( \
44360        echo "user $FTPUSER $FTPPWD"        ; \
44361        echo "pass"                         ; \
44362        echo "bin"                          ; \
44363        echo "get $FTPPATH $tmpfile"              ; \
44364    ) | ftp -in $FTPSERVER
44365  fi
44366  if test "x$VALID_TOOL" != xyes; then
44367    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44368  fi
44369
44370    mv $tmpfile $installdir/$filename
44371    if test ! -s $installdir/$filename; then
44372      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44373    fi
44374    case "$extension" in
44375      zip)  echo "Unzipping $installdir/$filename..."
44376        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44377        ;;
44378      tar.gz) echo "Untaring $installdir/$filename..."
44379        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44380        ;;
44381      tgz) echo "Untaring $installdir/$filename..."
44382        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44383        ;;
44384      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44385        ;;
44386    esac
44387  fi
44388  if test -f $installdir/$filename.unpacked; then
44389    depdir=$installdir
44390  fi
44391
44392      fi
44393      # Source the builddeps file again, because in the previous command, the depdir
44394      # was updated to point at the current build dependency install directory.
44395      . $builddepsfile
44396      # Now extract variables from the builddeps.conf files.
44397      theroot=${builddep_cups_ROOT}
44398      thecflags=${builddep_cups_CFLAGS}
44399      thelibs=${builddep_cups_LIBS}
44400      if test "x$depdir" = x; then
44401        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44402      fi
44403      CUPS=$depdir
44404      if test "x$theroot" != x; then
44405        CUPS="$theroot"
44406      fi
44407      if test "x$thecflags" != x; then
44408        CUPS_CFLAGS="$thecflags"
44409      fi
44410      if test "x$thelibs" != x; then
44411        CUPS_LIBS="$thelibs"
44412      fi
44413      CUPS_FOUND=yes
44414
44415    fi
44416
44417  fi
44418
44419    fi
44420    if test "x$CUPS_FOUND" = xno; then
44421      # Are the cups headers installed in the default /usr/include location?
44422      for ac_header in cups/cups.h cups/ppd.h
44423do :
44424  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44425ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44426if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44427  cat >>confdefs.h <<_ACEOF
44428#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44429_ACEOF
44430
44431            CUPS_FOUND=yes
44432            CUPS_CFLAGS=
44433            DEFAULT_CUPS=yes
44434
44435
44436fi
44437
44438done
44439
44440    fi
44441    if test "x$CUPS_FOUND" = xno; then
44442      # Getting nervous now? Lets poke around for standard Solaris third-party
44443      # package installation locations.
44444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44445$as_echo_n "checking for cups headers... " >&6; }
44446      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44447        # An SFW package seems to be installed!
44448        CUPS_FOUND=yes
44449        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44450      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44451        # A CSW package seems to be installed!
44452        CUPS_FOUND=yes
44453        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44454      fi
44455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44456$as_echo "$CUPS_FOUND" >&6; }
44457    fi
44458    if test "x$CUPS_FOUND" = xno; then
44459
44460  # Print a helpful message on how to acquire the necessary build dependency.
44461  # cups is the help tag: freetype, cups, pulse, alsa etc
44462  MISSING_DEPENDENCY=cups
44463
44464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44465    cygwin_help $MISSING_DEPENDENCY
44466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44467    msys_help $MISSING_DEPENDENCY
44468  else
44469    PKGHANDLER_COMMAND=
44470
44471    case $PKGHANDLER in
44472      apt-get)
44473        apt_help     $MISSING_DEPENDENCY ;;
44474      yum)
44475        yum_help     $MISSING_DEPENDENCY ;;
44476      port)
44477        port_help    $MISSING_DEPENDENCY ;;
44478      pkgutil)
44479        pkgutil_help $MISSING_DEPENDENCY ;;
44480      pkgadd)
44481        pkgadd_help  $MISSING_DEPENDENCY ;;
44482    esac
44483
44484    if test "x$PKGHANDLER_COMMAND" != x; then
44485      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44486    fi
44487  fi
44488
44489      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44490    fi
44491  fi
44492
44493
44494
44495
44496
44497
44498  ###############################################################################
44499  #
44500  # The ubiquitous freetype library is used to render fonts.
44501  #
44502
44503# Check whether --with-freetype was given.
44504if test "${with_freetype+set}" = set; then :
44505  withval=$with_freetype;
44506fi
44507
44508
44509# Check whether --with-freetype-include was given.
44510if test "${with_freetype_include+set}" = set; then :
44511  withval=$with_freetype_include;
44512fi
44513
44514
44515# Check whether --with-freetype-lib was given.
44516if test "${with_freetype_lib+set}" = set; then :
44517  withval=$with_freetype_lib;
44518fi
44519
44520
44521# Check whether --with-freetype-src was given.
44522if test "${with_freetype_src+set}" = set; then :
44523  withval=$with_freetype_src;
44524fi
44525
44526  # Check whether --enable-freetype-bundling was given.
44527if test "${enable_freetype_bundling+set}" = set; then :
44528  enableval=$enable_freetype_bundling;
44529fi
44530
44531
44532  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44533  FREETYPE_BASE_NAME=freetype
44534  FREETYPE_CFLAGS=
44535  FREETYPE_LIBS=
44536  FREETYPE_BUNDLE_LIB_PATH=
44537
44538  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44539    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
44540      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44541$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44542    fi
44543    if test "x$enable_freetype_bundling" != x; then
44544      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44545$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44546    fi
44547  else
44548    # freetype is needed to build; go get it!
44549
44550    BUNDLE_FREETYPE="$enable_freetype_bundling"
44551
44552    if  test "x$with_freetype_src" != x; then
44553      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44554        # Try to build freetype if --with-freetype-src was given on Windows
44555
44556  FREETYPE_SRC_PATH="$with_freetype_src"
44557  BUILD_FREETYPE=yes
44558
44559  # Check if the freetype sources are acessible..
44560  if ! test -d $FREETYPE_SRC_PATH; then
44561    { $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
44562$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44563    BUILD_FREETYPE=no
44564  fi
44565  # ..and contain a vc2010 project file
44566  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44567  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44568    { $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
44569$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44570    BUILD_FREETYPE=no
44571  fi
44572  # Now check if configure found a version of 'msbuild.exe'
44573  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44574    { $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
44575$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;}
44576    BUILD_FREETYPE=no
44577  fi
44578
44579  # Ready to go..
44580  if test "x$BUILD_FREETYPE" = xyes; then
44581
44582    # msbuild requires trailing slashes for output directories
44583    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44584    freetype_lib_path_unix="$freetype_lib_path"
44585    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44586
44587  unix_path="$vcxproj_path"
44588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44589    windows_path=`$CYGPATH -m "$unix_path"`
44590    vcxproj_path="$windows_path"
44591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44592    windows_path=`cmd //c echo $unix_path`
44593    vcxproj_path="$windows_path"
44594  fi
44595
44596
44597  unix_path="$freetype_lib_path"
44598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44599    windows_path=`$CYGPATH -m "$unix_path"`
44600    freetype_lib_path="$windows_path"
44601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44602    windows_path=`cmd //c echo $unix_path`
44603    freetype_lib_path="$windows_path"
44604  fi
44605
44606
44607  unix_path="$freetype_obj_path"
44608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44609    windows_path=`$CYGPATH -m "$unix_path"`
44610    freetype_obj_path="$windows_path"
44611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44612    windows_path=`cmd //c echo $unix_path`
44613    freetype_obj_path="$windows_path"
44614  fi
44615
44616    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44617      freetype_platform=x64
44618    else
44619      freetype_platform=win32
44620    fi
44621
44622    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44623    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44624    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44625    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44626    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44627$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44628
44629    # First we try to build the freetype.dll
44630    $ECHO -e "@echo off\n"\
44631	     "$MSBUILD $vcxproj_path "\
44632		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44633		       "/p:Configuration=\"Release Multithreaded\" "\
44634		       "/p:Platform=$freetype_platform "\
44635		       "/p:ConfigurationType=DynamicLibrary "\
44636		       "/p:TargetName=freetype "\
44637		       "/p:OutDir=\"$freetype_lib_path\" "\
44638		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44639    cmd /c freetype.bat
44640
44641    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44642      # If that succeeds we also build freetype.lib
44643      $ECHO -e "@echo off\n"\
44644	       "$MSBUILD $vcxproj_path "\
44645			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44646			 "/p:Configuration=\"Release Multithreaded\" "\
44647			 "/p:Platform=$freetype_platform "\
44648			 "/p:ConfigurationType=StaticLibrary "\
44649			 "/p:TargetName=freetype "\
44650			 "/p:OutDir=\"$freetype_lib_path\" "\
44651			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44652      cmd /c freetype.bat
44653
44654      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44655	# Once we build both, lib and dll, set freetype lib and include path appropriately
44656	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44657	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44658	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44659$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44660      else
44661	BUILD_FREETYPE=no
44662      fi
44663    else
44664      BUILD_FREETYPE=no
44665    fi
44666  fi
44667
44668        if test "x$BUILD_FREETYPE" = xyes; then
44669          # Okay, we built it. Check that it works.
44670
44671  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44672  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44673  METHOD="--with-freetype-src"
44674
44675  # Let's start with an optimistic view of the world :-)
44676  FOUND_FREETYPE=yes
44677
44678  # First look for the canonical freetype main include file ft2build.h.
44679  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44680    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44681    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44682    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44683      # Fail.
44684      FOUND_FREETYPE=no
44685    fi
44686  fi
44687
44688  if test "x$FOUND_FREETYPE" = xyes; then
44689    # Include file found, let's continue the sanity check.
44690    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44691$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44692
44693    # Reset to default value
44694    FREETYPE_BASE_NAME=freetype
44695    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44696    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44697      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44698          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44699        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44700        # for the .6 version explicitly.
44701        FREETYPE_BASE_NAME=freetype.6
44702        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44703        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44704$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44705      else
44706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44707$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44708        FOUND_FREETYPE=no
44709      fi
44710    else
44711      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44712        # On Windows, we will need both .lib and .dll file.
44713        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44714          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44715$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44716          FOUND_FREETYPE=no
44717        fi
44718      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44719          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44720        # Found lib in isa dir, use that instead.
44721        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44722        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44723$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44724      fi
44725    fi
44726  fi
44727
44728  if test "x$FOUND_FREETYPE" = xyes; then
44729
44730  # Only process if variable expands to non-empty
44731
44732  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44734
44735  # Input might be given as Windows format, start by converting to
44736  # unix format.
44737  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44738  new_path=`$CYGPATH -u "$path"`
44739
44740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44743  # "foo.exe" is OK but "foo" is an error.
44744  #
44745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44746  # It is also a way to make sure we got the proper file name for the real test later on.
44747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44748  if test "x$test_shortpath" = x; then
44749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44751    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44752  fi
44753
44754  # Call helper function which possibly converts this using DOS-style short mode.
44755  # If so, the updated path is stored in $new_path.
44756
44757  input_path="$new_path"
44758  # Check if we need to convert this using DOS-style short mode. If the path
44759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44760  # take no chances and rewrite it.
44761  # Note: m4 eats our [], so we need to use [ and ] instead.
44762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44763  if test "x$has_forbidden_chars" != x; then
44764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44768      # Going to short mode and back again did indeed matter. Since short mode is
44769      # case insensitive, let's make it lowercase to improve readability.
44770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44771      # Now convert it back to Unix-style (cygpath)
44772      input_path=`$CYGPATH -u "$shortmode_path"`
44773      new_path="$input_path"
44774    fi
44775  fi
44776
44777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44778  if test "x$test_cygdrive_prefix" = x; then
44779    # As a simple fix, exclude /usr/bin since it's not a real path.
44780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44782      # a path prefixed by /cygdrive for fixpath to work.
44783      new_path="$CYGWIN_ROOT_PATH$input_path"
44784    fi
44785  fi
44786
44787
44788  if test "x$path" != "x$new_path"; then
44789    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44792  fi
44793
44794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44795
44796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44797  has_colon=`$ECHO $path | $GREP ^.:`
44798  new_path="$path"
44799  if test "x$has_colon" = x; then
44800    # Not in mixed or Windows style, start by that.
44801    new_path=`cmd //c echo $path`
44802  fi
44803
44804
44805  input_path="$new_path"
44806  # Check if we need to convert this using DOS-style short mode. If the path
44807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44808  # take no chances and rewrite it.
44809  # Note: m4 eats our [], so we need to use [ and ] instead.
44810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44811  if test "x$has_forbidden_chars" != x; then
44812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44814  fi
44815
44816
44817  windows_path="$new_path"
44818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44819    unix_path=`$CYGPATH -u "$windows_path"`
44820    new_path="$unix_path"
44821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44823    new_path="$unix_path"
44824  fi
44825
44826  if test "x$path" != "x$new_path"; then
44827    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44830  fi
44831
44832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44834
44835    else
44836      # We're on a unix platform. Hooray! :)
44837      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44838      has_space=`$ECHO "$path" | $GREP " "`
44839      if test "x$has_space" != x; then
44840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44843      fi
44844
44845      # Use eval to expand a potential ~
44846      eval path="$path"
44847      if test ! -f "$path" && test ! -d "$path"; then
44848        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44849      fi
44850
44851      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44852    fi
44853  fi
44854
44855
44856  # Only process if variable expands to non-empty
44857
44858  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44860
44861  # Input might be given as Windows format, start by converting to
44862  # unix format.
44863  path="$POTENTIAL_FREETYPE_LIB_PATH"
44864  new_path=`$CYGPATH -u "$path"`
44865
44866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44869  # "foo.exe" is OK but "foo" is an error.
44870  #
44871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44872  # It is also a way to make sure we got the proper file name for the real test later on.
44873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44874  if test "x$test_shortpath" = x; then
44875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44877    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44878  fi
44879
44880  # Call helper function which possibly converts this using DOS-style short mode.
44881  # If so, the updated path is stored in $new_path.
44882
44883  input_path="$new_path"
44884  # Check if we need to convert this using DOS-style short mode. If the path
44885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44886  # take no chances and rewrite it.
44887  # Note: m4 eats our [], so we need to use [ and ] instead.
44888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44889  if test "x$has_forbidden_chars" != x; then
44890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44894      # Going to short mode and back again did indeed matter. Since short mode is
44895      # case insensitive, let's make it lowercase to improve readability.
44896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44897      # Now convert it back to Unix-style (cygpath)
44898      input_path=`$CYGPATH -u "$shortmode_path"`
44899      new_path="$input_path"
44900    fi
44901  fi
44902
44903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44904  if test "x$test_cygdrive_prefix" = x; then
44905    # As a simple fix, exclude /usr/bin since it's not a real path.
44906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44908      # a path prefixed by /cygdrive for fixpath to work.
44909      new_path="$CYGWIN_ROOT_PATH$input_path"
44910    fi
44911  fi
44912
44913
44914  if test "x$path" != "x$new_path"; then
44915    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44918  fi
44919
44920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44921
44922  path="$POTENTIAL_FREETYPE_LIB_PATH"
44923  has_colon=`$ECHO $path | $GREP ^.:`
44924  new_path="$path"
44925  if test "x$has_colon" = x; then
44926    # Not in mixed or Windows style, start by that.
44927    new_path=`cmd //c echo $path`
44928  fi
44929
44930
44931  input_path="$new_path"
44932  # Check if we need to convert this using DOS-style short mode. If the path
44933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44934  # take no chances and rewrite it.
44935  # Note: m4 eats our [], so we need to use [ and ] instead.
44936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44937  if test "x$has_forbidden_chars" != x; then
44938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44940  fi
44941
44942
44943  windows_path="$new_path"
44944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44945    unix_path=`$CYGPATH -u "$windows_path"`
44946    new_path="$unix_path"
44947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44949    new_path="$unix_path"
44950  fi
44951
44952  if test "x$path" != "x$new_path"; then
44953    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44956  fi
44957
44958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44960
44961    else
44962      # We're on a unix platform. Hooray! :)
44963      path="$POTENTIAL_FREETYPE_LIB_PATH"
44964      has_space=`$ECHO "$path" | $GREP " "`
44965      if test "x$has_space" != x; then
44966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44969      fi
44970
44971      # Use eval to expand a potential ~
44972      eval path="$path"
44973      if test ! -f "$path" && test ! -d "$path"; then
44974        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44975      fi
44976
44977      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44978    fi
44979  fi
44980
44981
44982    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44984$as_echo_n "checking for freetype includes... " >&6; }
44985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44986$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44987    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44989$as_echo_n "checking for freetype libraries... " >&6; }
44990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44991$as_echo "$FREETYPE_LIB_PATH" >&6; }
44992  fi
44993
44994          if test "x$FOUND_FREETYPE" != xyes; then
44995            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44996          fi
44997        else
44998          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44999$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45000          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45001        fi
45002      else
45003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45004$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45005      fi
45006    fi
45007
45008    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45009      # User has specified settings
45010
45011      if test "x$BUNDLE_FREETYPE" = x; then
45012        # If not specified, default is to bundle freetype
45013        BUNDLE_FREETYPE=yes
45014      fi
45015
45016      if test "x$with_freetype" != x; then
45017        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45018        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45019      fi
45020
45021      # Allow --with-freetype-lib and --with-freetype-include to override
45022      if test "x$with_freetype_include" != x; then
45023        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45024      fi
45025      if test "x$with_freetype_lib" != x; then
45026        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45027      fi
45028
45029      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45030        # Okay, we got it. Check that it works.
45031
45032  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45033  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45034  METHOD="--with-freetype"
45035
45036  # Let's start with an optimistic view of the world :-)
45037  FOUND_FREETYPE=yes
45038
45039  # First look for the canonical freetype main include file ft2build.h.
45040  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45041    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45042    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45043    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45044      # Fail.
45045      FOUND_FREETYPE=no
45046    fi
45047  fi
45048
45049  if test "x$FOUND_FREETYPE" = xyes; then
45050    # Include file found, let's continue the sanity check.
45051    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45052$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45053
45054    # Reset to default value
45055    FREETYPE_BASE_NAME=freetype
45056    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45057    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45058      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45059          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45060        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45061        # for the .6 version explicitly.
45062        FREETYPE_BASE_NAME=freetype.6
45063        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45064        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45065$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45066      else
45067        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45068$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45069        FOUND_FREETYPE=no
45070      fi
45071    else
45072      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45073        # On Windows, we will need both .lib and .dll file.
45074        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45075          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45076$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45077          FOUND_FREETYPE=no
45078        fi
45079      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45080          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45081        # Found lib in isa dir, use that instead.
45082        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45083        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45084$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45085      fi
45086    fi
45087  fi
45088
45089  if test "x$FOUND_FREETYPE" = xyes; then
45090
45091  # Only process if variable expands to non-empty
45092
45093  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45095
45096  # Input might be given as Windows format, start by converting to
45097  # unix format.
45098  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45099  new_path=`$CYGPATH -u "$path"`
45100
45101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45104  # "foo.exe" is OK but "foo" is an error.
45105  #
45106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45107  # It is also a way to make sure we got the proper file name for the real test later on.
45108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45109  if test "x$test_shortpath" = x; then
45110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45112    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45113  fi
45114
45115  # Call helper function which possibly converts this using DOS-style short mode.
45116  # If so, the updated path is stored in $new_path.
45117
45118  input_path="$new_path"
45119  # Check if we need to convert this using DOS-style short mode. If the path
45120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45121  # take no chances and rewrite it.
45122  # Note: m4 eats our [], so we need to use [ and ] instead.
45123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45124  if test "x$has_forbidden_chars" != x; then
45125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45129      # Going to short mode and back again did indeed matter. Since short mode is
45130      # case insensitive, let's make it lowercase to improve readability.
45131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45132      # Now convert it back to Unix-style (cygpath)
45133      input_path=`$CYGPATH -u "$shortmode_path"`
45134      new_path="$input_path"
45135    fi
45136  fi
45137
45138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45139  if test "x$test_cygdrive_prefix" = x; then
45140    # As a simple fix, exclude /usr/bin since it's not a real path.
45141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45143      # a path prefixed by /cygdrive for fixpath to work.
45144      new_path="$CYGWIN_ROOT_PATH$input_path"
45145    fi
45146  fi
45147
45148
45149  if test "x$path" != "x$new_path"; then
45150    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45152$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45153  fi
45154
45155    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45156
45157  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45158  has_colon=`$ECHO $path | $GREP ^.:`
45159  new_path="$path"
45160  if test "x$has_colon" = x; then
45161    # Not in mixed or Windows style, start by that.
45162    new_path=`cmd //c echo $path`
45163  fi
45164
45165
45166  input_path="$new_path"
45167  # Check if we need to convert this using DOS-style short mode. If the path
45168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45169  # take no chances and rewrite it.
45170  # Note: m4 eats our [], so we need to use [ and ] instead.
45171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45172  if test "x$has_forbidden_chars" != x; then
45173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45175  fi
45176
45177
45178  windows_path="$new_path"
45179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45180    unix_path=`$CYGPATH -u "$windows_path"`
45181    new_path="$unix_path"
45182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45184    new_path="$unix_path"
45185  fi
45186
45187  if test "x$path" != "x$new_path"; then
45188    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45190$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45191  fi
45192
45193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45195
45196    else
45197      # We're on a unix platform. Hooray! :)
45198      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45199      has_space=`$ECHO "$path" | $GREP " "`
45200      if test "x$has_space" != x; then
45201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45202$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45203        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45204      fi
45205
45206      # Use eval to expand a potential ~
45207      eval path="$path"
45208      if test ! -f "$path" && test ! -d "$path"; then
45209        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45210      fi
45211
45212      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45213    fi
45214  fi
45215
45216
45217  # Only process if variable expands to non-empty
45218
45219  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45221
45222  # Input might be given as Windows format, start by converting to
45223  # unix format.
45224  path="$POTENTIAL_FREETYPE_LIB_PATH"
45225  new_path=`$CYGPATH -u "$path"`
45226
45227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45230  # "foo.exe" is OK but "foo" is an error.
45231  #
45232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45233  # It is also a way to make sure we got the proper file name for the real test later on.
45234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45235  if test "x$test_shortpath" = x; then
45236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45237$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45238    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45239  fi
45240
45241  # Call helper function which possibly converts this using DOS-style short mode.
45242  # If so, the updated path is stored in $new_path.
45243
45244  input_path="$new_path"
45245  # Check if we need to convert this using DOS-style short mode. If the path
45246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45247  # take no chances and rewrite it.
45248  # Note: m4 eats our [], so we need to use [ and ] instead.
45249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45250  if test "x$has_forbidden_chars" != x; then
45251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45255      # Going to short mode and back again did indeed matter. Since short mode is
45256      # case insensitive, let's make it lowercase to improve readability.
45257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45258      # Now convert it back to Unix-style (cygpath)
45259      input_path=`$CYGPATH -u "$shortmode_path"`
45260      new_path="$input_path"
45261    fi
45262  fi
45263
45264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45265  if test "x$test_cygdrive_prefix" = x; then
45266    # As a simple fix, exclude /usr/bin since it's not a real path.
45267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45269      # a path prefixed by /cygdrive for fixpath to work.
45270      new_path="$CYGWIN_ROOT_PATH$input_path"
45271    fi
45272  fi
45273
45274
45275  if test "x$path" != "x$new_path"; then
45276    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45279  fi
45280
45281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45282
45283  path="$POTENTIAL_FREETYPE_LIB_PATH"
45284  has_colon=`$ECHO $path | $GREP ^.:`
45285  new_path="$path"
45286  if test "x$has_colon" = x; then
45287    # Not in mixed or Windows style, start by that.
45288    new_path=`cmd //c echo $path`
45289  fi
45290
45291
45292  input_path="$new_path"
45293  # Check if we need to convert this using DOS-style short mode. If the path
45294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45295  # take no chances and rewrite it.
45296  # Note: m4 eats our [], so we need to use [ and ] instead.
45297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45298  if test "x$has_forbidden_chars" != x; then
45299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45301  fi
45302
45303
45304  windows_path="$new_path"
45305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45306    unix_path=`$CYGPATH -u "$windows_path"`
45307    new_path="$unix_path"
45308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45310    new_path="$unix_path"
45311  fi
45312
45313  if test "x$path" != "x$new_path"; then
45314    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45316$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45317  fi
45318
45319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45321
45322    else
45323      # We're on a unix platform. Hooray! :)
45324      path="$POTENTIAL_FREETYPE_LIB_PATH"
45325      has_space=`$ECHO "$path" | $GREP " "`
45326      if test "x$has_space" != x; then
45327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45328$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45329        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45330      fi
45331
45332      # Use eval to expand a potential ~
45333      eval path="$path"
45334      if test ! -f "$path" && test ! -d "$path"; then
45335        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45336      fi
45337
45338      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45339    fi
45340  fi
45341
45342
45343    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45345$as_echo_n "checking for freetype includes... " >&6; }
45346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45347$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45348    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45350$as_echo_n "checking for freetype libraries... " >&6; }
45351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45352$as_echo "$FREETYPE_LIB_PATH" >&6; }
45353  fi
45354
45355        if test "x$FOUND_FREETYPE" != xyes; then
45356          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45357        fi
45358      else
45359        # User specified only one of lib or include. This is an error.
45360        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45361          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45362$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45363          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45364        else
45365          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45366$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45367          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45368        fi
45369      fi
45370    else
45371      # User did not specify settings, but we need freetype. Try to locate it.
45372
45373      if test "x$BUNDLE_FREETYPE" = x; then
45374        # If not specified, default is to bundle freetype only on windows
45375        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45376          BUNDLE_FREETYPE=yes
45377        else
45378          BUNDLE_FREETYPE=no
45379        fi
45380      fi
45381
45382      if test "x$FOUND_FREETYPE" != xyes; then
45383        # Check builddeps
45384
45385
45386  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45387    # Source the builddeps file again, to make sure it uses the latest variables!
45388    . $builddepsfile
45389    # Look for a target and build machine specific resource!
45390    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45391    if test "x$resource" = x; then
45392      # Ok, lets instead look for a target specific resource
45393      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45394    fi
45395    if test "x$resource" = x; then
45396      # Ok, lets instead look for a build specific resource
45397      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45398    fi
45399    if test "x$resource" = x; then
45400      # Ok, lets instead look for a generic resource
45401      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45402      resource=${builddep_freetype2}
45403    fi
45404    if test "x$resource" != x; then
45405      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45406$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45407      # If the resource in the builddeps.conf file is an existing directory,
45408      # for example /java/linux/cups
45409      if test -d ${resource}; then
45410        depdir=${resource}
45411      else
45412
45413  # freetype2 is for example mymodule
45414  # $resource is for example libs/general/libmymod_1_2_3.zip
45415  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45416  # $with_builddeps_dir is for example /localhome/builddeps
45417  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45418  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45419  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45420  filename=`basename $resource`
45421  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45422  filebase=${filename%%.*}
45423  extension=${filename#*.}
45424  installdir=$with_builddeps_dir/$filebase
45425  if test ! -f $installdir/$filename.unpacked; then
45426    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45427$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45428    if test ! -d $installdir; then
45429      mkdir -p $installdir
45430    fi
45431    if test ! -d $installdir; then
45432      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45433    fi
45434    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45435    touch $tmpfile
45436    if test ! -f $tmpfile; then
45437      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45438    fi
45439
45440  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45441  # $tmpfile is the local file name for the downloaded file.
45442  VALID_TOOL=no
45443  if test "x$BDEPS_FTP" = xwget; then
45444    VALID_TOOL=yes
45445    wget -O $tmpfile $with_builddeps_server/$resource
45446  fi
45447  if test "x$BDEPS_FTP" = xlftp; then
45448    VALID_TOOL=yes
45449    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45450  fi
45451  if test "x$BDEPS_FTP" = xftp; then
45452    VALID_TOOL=yes
45453    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45454    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45455    FTPUSERPWD=${FTPSERVER%%@*}
45456    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45457      FTPUSER=${userpwd%%:*}
45458      FTPPWD=${userpwd#*@}
45459      FTPSERVER=${FTPSERVER#*@}
45460    else
45461      FTPUSER=ftp
45462      FTPPWD=ftp
45463    fi
45464    # the "pass" command does not work on some
45465    # ftp clients (read ftp.exe) but if it works,
45466    # passive mode is better!
45467    ( \
45468        echo "user $FTPUSER $FTPPWD"        ; \
45469        echo "pass"                         ; \
45470        echo "bin"                          ; \
45471        echo "get $FTPPATH $tmpfile"              ; \
45472    ) | ftp -in $FTPSERVER
45473  fi
45474  if test "x$VALID_TOOL" != xyes; then
45475    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45476  fi
45477
45478    mv $tmpfile $installdir/$filename
45479    if test ! -s $installdir/$filename; then
45480      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45481    fi
45482    case "$extension" in
45483      zip)  echo "Unzipping $installdir/$filename..."
45484        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45485        ;;
45486      tar.gz) echo "Untaring $installdir/$filename..."
45487        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45488        ;;
45489      tgz) echo "Untaring $installdir/$filename..."
45490        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45491        ;;
45492      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45493        ;;
45494    esac
45495  fi
45496  if test -f $installdir/$filename.unpacked; then
45497    depdir=$installdir
45498  fi
45499
45500      fi
45501      # Source the builddeps file again, because in the previous command, the depdir
45502      # was updated to point at the current build dependency install directory.
45503      . $builddepsfile
45504      # Now extract variables from the builddeps.conf files.
45505      theroot=${builddep_freetype2_ROOT}
45506      thecflags=${builddep_freetype2_CFLAGS}
45507      thelibs=${builddep_freetype2_LIBS}
45508      if test "x$depdir" = x; then
45509        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45510      fi
45511      FREETYPE=$depdir
45512      if test "x$theroot" != x; then
45513        FREETYPE="$theroot"
45514      fi
45515      if test "x$thecflags" != x; then
45516        FREETYPE_CFLAGS="$thecflags"
45517      fi
45518      if test "x$thelibs" != x; then
45519        FREETYPE_LIBS="$thelibs"
45520      fi
45521      FOUND_FREETYPE=yes
45522      else FOUND_FREETYPE=no
45523
45524    fi
45525    else FOUND_FREETYPE=no
45526
45527  fi
45528
45529        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45530        if test "x$FOUND_FREETYPE" = xyes; then
45531          if test "x$BUNDLE_FREETYPE" = xyes; then
45532            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45533$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45534            FOUND_FREETYPE=no
45535          else
45536            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45537$as_echo_n "checking for freetype... " >&6; }
45538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45539$as_echo "yes (using builddeps)" >&6; }
45540          fi
45541        fi
45542      fi
45543
45544      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45545      if test "x$SYSROOT" = x; then
45546        if test "x$FOUND_FREETYPE" != xyes; then
45547          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45548          if test "x$PKG_CONFIG" != x; then
45549
45550pkg_failed=no
45551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45552$as_echo_n "checking for FREETYPE... " >&6; }
45553
45554if test -n "$FREETYPE_CFLAGS"; then
45555    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45556 elif test -n "$PKG_CONFIG"; then
45557    if test -n "$PKG_CONFIG" && \
45558    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45559  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45560  ac_status=$?
45561  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45562  test $ac_status = 0; }; then
45563  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45564else
45565  pkg_failed=yes
45566fi
45567 else
45568    pkg_failed=untried
45569fi
45570if test -n "$FREETYPE_LIBS"; then
45571    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45572 elif test -n "$PKG_CONFIG"; then
45573    if test -n "$PKG_CONFIG" && \
45574    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45575  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45576  ac_status=$?
45577  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45578  test $ac_status = 0; }; then
45579  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45580else
45581  pkg_failed=yes
45582fi
45583 else
45584    pkg_failed=untried
45585fi
45586
45587
45588
45589if test $pkg_failed = yes; then
45590
45591if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45592        _pkg_short_errors_supported=yes
45593else
45594        _pkg_short_errors_supported=no
45595fi
45596        if test $_pkg_short_errors_supported = yes; then
45597	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45598        else
45599	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45600        fi
45601	# Put the nasty error message in config.log where it belongs
45602	echo "$FREETYPE_PKG_ERRORS" >&5
45603
45604	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45605$as_echo "no" >&6; }
45606                FOUND_FREETYPE=no
45607elif test $pkg_failed = untried; then
45608	FOUND_FREETYPE=no
45609else
45610	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45611	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45613$as_echo "yes" >&6; }
45614	FOUND_FREETYPE=yes
45615fi
45616            if test "x$FOUND_FREETYPE" = xyes; then
45617              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45618              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45619              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45620              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45621                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45622              fi
45623              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45624              if test "x$BUNDLE_FREETYPE" = xyes; then
45625                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45626$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45627                FOUND_FREETYPE=no
45628              else
45629                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45630$as_echo_n "checking for freetype... " >&6; }
45631                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45632$as_echo "yes (using pkg-config)" >&6; }
45633              fi
45634            fi
45635          fi
45636        fi
45637      fi
45638
45639      if test "x$FOUND_FREETYPE" != xyes; then
45640        # Check in well-known locations
45641        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45642          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45643
45644  windows_path="$FREETYPE_BASE_DIR"
45645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45646    unix_path=`$CYGPATH -u "$windows_path"`
45647    FREETYPE_BASE_DIR="$unix_path"
45648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45650    FREETYPE_BASE_DIR="$unix_path"
45651  fi
45652
45653
45654  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45655  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45656  METHOD="well-known location"
45657
45658  # Let's start with an optimistic view of the world :-)
45659  FOUND_FREETYPE=yes
45660
45661  # First look for the canonical freetype main include file ft2build.h.
45662  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45663    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45664    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45665    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45666      # Fail.
45667      FOUND_FREETYPE=no
45668    fi
45669  fi
45670
45671  if test "x$FOUND_FREETYPE" = xyes; then
45672    # Include file found, let's continue the sanity check.
45673    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45674$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45675
45676    # Reset to default value
45677    FREETYPE_BASE_NAME=freetype
45678    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45679    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45680      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45681          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45682        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45683        # for the .6 version explicitly.
45684        FREETYPE_BASE_NAME=freetype.6
45685        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45686        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45687$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45688      else
45689        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45690$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45691        FOUND_FREETYPE=no
45692      fi
45693    else
45694      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45695        # On Windows, we will need both .lib and .dll file.
45696        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45697          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45698$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45699          FOUND_FREETYPE=no
45700        fi
45701      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45702          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45703        # Found lib in isa dir, use that instead.
45704        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45705        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45706$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45707      fi
45708    fi
45709  fi
45710
45711  if test "x$FOUND_FREETYPE" = xyes; then
45712
45713  # Only process if variable expands to non-empty
45714
45715  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45717
45718  # Input might be given as Windows format, start by converting to
45719  # unix format.
45720  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45721  new_path=`$CYGPATH -u "$path"`
45722
45723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45726  # "foo.exe" is OK but "foo" is an error.
45727  #
45728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45729  # It is also a way to make sure we got the proper file name for the real test later on.
45730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45731  if test "x$test_shortpath" = x; then
45732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45734    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45735  fi
45736
45737  # Call helper function which possibly converts this using DOS-style short mode.
45738  # If so, the updated path is stored in $new_path.
45739
45740  input_path="$new_path"
45741  # Check if we need to convert this using DOS-style short mode. If the path
45742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45743  # take no chances and rewrite it.
45744  # Note: m4 eats our [], so we need to use [ and ] instead.
45745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45746  if test "x$has_forbidden_chars" != x; then
45747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45751      # Going to short mode and back again did indeed matter. Since short mode is
45752      # case insensitive, let's make it lowercase to improve readability.
45753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45754      # Now convert it back to Unix-style (cygpath)
45755      input_path=`$CYGPATH -u "$shortmode_path"`
45756      new_path="$input_path"
45757    fi
45758  fi
45759
45760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45761  if test "x$test_cygdrive_prefix" = x; then
45762    # As a simple fix, exclude /usr/bin since it's not a real path.
45763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45765      # a path prefixed by /cygdrive for fixpath to work.
45766      new_path="$CYGWIN_ROOT_PATH$input_path"
45767    fi
45768  fi
45769
45770
45771  if test "x$path" != "x$new_path"; then
45772    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45775  fi
45776
45777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45778
45779  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45780  has_colon=`$ECHO $path | $GREP ^.:`
45781  new_path="$path"
45782  if test "x$has_colon" = x; then
45783    # Not in mixed or Windows style, start by that.
45784    new_path=`cmd //c echo $path`
45785  fi
45786
45787
45788  input_path="$new_path"
45789  # Check if we need to convert this using DOS-style short mode. If the path
45790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45791  # take no chances and rewrite it.
45792  # Note: m4 eats our [], so we need to use [ and ] instead.
45793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45794  if test "x$has_forbidden_chars" != x; then
45795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45797  fi
45798
45799
45800  windows_path="$new_path"
45801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45802    unix_path=`$CYGPATH -u "$windows_path"`
45803    new_path="$unix_path"
45804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45806    new_path="$unix_path"
45807  fi
45808
45809  if test "x$path" != "x$new_path"; then
45810    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45813  fi
45814
45815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45817
45818    else
45819      # We're on a unix platform. Hooray! :)
45820      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45821      has_space=`$ECHO "$path" | $GREP " "`
45822      if test "x$has_space" != x; then
45823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45826      fi
45827
45828      # Use eval to expand a potential ~
45829      eval path="$path"
45830      if test ! -f "$path" && test ! -d "$path"; then
45831        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45832      fi
45833
45834      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45835    fi
45836  fi
45837
45838
45839  # Only process if variable expands to non-empty
45840
45841  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45843
45844  # Input might be given as Windows format, start by converting to
45845  # unix format.
45846  path="$POTENTIAL_FREETYPE_LIB_PATH"
45847  new_path=`$CYGPATH -u "$path"`
45848
45849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45852  # "foo.exe" is OK but "foo" is an error.
45853  #
45854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45855  # It is also a way to make sure we got the proper file name for the real test later on.
45856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45857  if test "x$test_shortpath" = x; then
45858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45859$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45860    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45861  fi
45862
45863  # Call helper function which possibly converts this using DOS-style short mode.
45864  # If so, the updated path is stored in $new_path.
45865
45866  input_path="$new_path"
45867  # Check if we need to convert this using DOS-style short mode. If the path
45868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45869  # take no chances and rewrite it.
45870  # Note: m4 eats our [], so we need to use [ and ] instead.
45871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45872  if test "x$has_forbidden_chars" != x; then
45873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45877      # Going to short mode and back again did indeed matter. Since short mode is
45878      # case insensitive, let's make it lowercase to improve readability.
45879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45880      # Now convert it back to Unix-style (cygpath)
45881      input_path=`$CYGPATH -u "$shortmode_path"`
45882      new_path="$input_path"
45883    fi
45884  fi
45885
45886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45887  if test "x$test_cygdrive_prefix" = x; then
45888    # As a simple fix, exclude /usr/bin since it's not a real path.
45889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45891      # a path prefixed by /cygdrive for fixpath to work.
45892      new_path="$CYGWIN_ROOT_PATH$input_path"
45893    fi
45894  fi
45895
45896
45897  if test "x$path" != "x$new_path"; then
45898    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45901  fi
45902
45903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45904
45905  path="$POTENTIAL_FREETYPE_LIB_PATH"
45906  has_colon=`$ECHO $path | $GREP ^.:`
45907  new_path="$path"
45908  if test "x$has_colon" = x; then
45909    # Not in mixed or Windows style, start by that.
45910    new_path=`cmd //c echo $path`
45911  fi
45912
45913
45914  input_path="$new_path"
45915  # Check if we need to convert this using DOS-style short mode. If the path
45916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45917  # take no chances and rewrite it.
45918  # Note: m4 eats our [], so we need to use [ and ] instead.
45919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45920  if test "x$has_forbidden_chars" != x; then
45921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45923  fi
45924
45925
45926  windows_path="$new_path"
45927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45928    unix_path=`$CYGPATH -u "$windows_path"`
45929    new_path="$unix_path"
45930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45932    new_path="$unix_path"
45933  fi
45934
45935  if test "x$path" != "x$new_path"; then
45936    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45938$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45939  fi
45940
45941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45943
45944    else
45945      # We're on a unix platform. Hooray! :)
45946      path="$POTENTIAL_FREETYPE_LIB_PATH"
45947      has_space=`$ECHO "$path" | $GREP " "`
45948      if test "x$has_space" != x; then
45949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45950$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45952      fi
45953
45954      # Use eval to expand a potential ~
45955      eval path="$path"
45956      if test ! -f "$path" && test ! -d "$path"; then
45957        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45958      fi
45959
45960      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45961    fi
45962  fi
45963
45964
45965    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45967$as_echo_n "checking for freetype includes... " >&6; }
45968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45969$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45970    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45972$as_echo_n "checking for freetype libraries... " >&6; }
45973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45974$as_echo "$FREETYPE_LIB_PATH" >&6; }
45975  fi
45976
45977          if test "x$FOUND_FREETYPE" != xyes; then
45978            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45979
45980  windows_path="$FREETYPE_BASE_DIR"
45981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45982    unix_path=`$CYGPATH -u "$windows_path"`
45983    FREETYPE_BASE_DIR="$unix_path"
45984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45986    FREETYPE_BASE_DIR="$unix_path"
45987  fi
45988
45989
45990  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45991  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45992  METHOD="well-known location"
45993
45994  # Let's start with an optimistic view of the world :-)
45995  FOUND_FREETYPE=yes
45996
45997  # First look for the canonical freetype main include file ft2build.h.
45998  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45999    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46000    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46001    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46002      # Fail.
46003      FOUND_FREETYPE=no
46004    fi
46005  fi
46006
46007  if test "x$FOUND_FREETYPE" = xyes; then
46008    # Include file found, let's continue the sanity check.
46009    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46010$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46011
46012    # Reset to default value
46013    FREETYPE_BASE_NAME=freetype
46014    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46015    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46016      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46017          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46018        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46019        # for the .6 version explicitly.
46020        FREETYPE_BASE_NAME=freetype.6
46021        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46022        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46023$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46024      else
46025        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46026$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46027        FOUND_FREETYPE=no
46028      fi
46029    else
46030      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46031        # On Windows, we will need both .lib and .dll file.
46032        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46033          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46034$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46035          FOUND_FREETYPE=no
46036        fi
46037      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46038          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46039        # Found lib in isa dir, use that instead.
46040        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46041        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46042$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46043      fi
46044    fi
46045  fi
46046
46047  if test "x$FOUND_FREETYPE" = xyes; then
46048
46049  # Only process if variable expands to non-empty
46050
46051  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46053
46054  # Input might be given as Windows format, start by converting to
46055  # unix format.
46056  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46057  new_path=`$CYGPATH -u "$path"`
46058
46059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46062  # "foo.exe" is OK but "foo" is an error.
46063  #
46064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46065  # It is also a way to make sure we got the proper file name for the real test later on.
46066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46067  if test "x$test_shortpath" = x; then
46068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46069$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46070    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46071  fi
46072
46073  # Call helper function which possibly converts this using DOS-style short mode.
46074  # If so, the updated path is stored in $new_path.
46075
46076  input_path="$new_path"
46077  # Check if we need to convert this using DOS-style short mode. If the path
46078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46079  # take no chances and rewrite it.
46080  # Note: m4 eats our [], so we need to use [ and ] instead.
46081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46082  if test "x$has_forbidden_chars" != x; then
46083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46087      # Going to short mode and back again did indeed matter. Since short mode is
46088      # case insensitive, let's make it lowercase to improve readability.
46089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46090      # Now convert it back to Unix-style (cygpath)
46091      input_path=`$CYGPATH -u "$shortmode_path"`
46092      new_path="$input_path"
46093    fi
46094  fi
46095
46096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46097  if test "x$test_cygdrive_prefix" = x; then
46098    # As a simple fix, exclude /usr/bin since it's not a real path.
46099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46101      # a path prefixed by /cygdrive for fixpath to work.
46102      new_path="$CYGWIN_ROOT_PATH$input_path"
46103    fi
46104  fi
46105
46106
46107  if test "x$path" != "x$new_path"; then
46108    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46111  fi
46112
46113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46114
46115  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46116  has_colon=`$ECHO $path | $GREP ^.:`
46117  new_path="$path"
46118  if test "x$has_colon" = x; then
46119    # Not in mixed or Windows style, start by that.
46120    new_path=`cmd //c echo $path`
46121  fi
46122
46123
46124  input_path="$new_path"
46125  # Check if we need to convert this using DOS-style short mode. If the path
46126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46127  # take no chances and rewrite it.
46128  # Note: m4 eats our [], so we need to use [ and ] instead.
46129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46130  if test "x$has_forbidden_chars" != x; then
46131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46133  fi
46134
46135
46136  windows_path="$new_path"
46137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46138    unix_path=`$CYGPATH -u "$windows_path"`
46139    new_path="$unix_path"
46140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46142    new_path="$unix_path"
46143  fi
46144
46145  if test "x$path" != "x$new_path"; then
46146    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46148$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46149  fi
46150
46151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46153
46154    else
46155      # We're on a unix platform. Hooray! :)
46156      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46157      has_space=`$ECHO "$path" | $GREP " "`
46158      if test "x$has_space" != x; then
46159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46161        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46162      fi
46163
46164      # Use eval to expand a potential ~
46165      eval path="$path"
46166      if test ! -f "$path" && test ! -d "$path"; then
46167        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46168      fi
46169
46170      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46171    fi
46172  fi
46173
46174
46175  # Only process if variable expands to non-empty
46176
46177  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46179
46180  # Input might be given as Windows format, start by converting to
46181  # unix format.
46182  path="$POTENTIAL_FREETYPE_LIB_PATH"
46183  new_path=`$CYGPATH -u "$path"`
46184
46185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46188  # "foo.exe" is OK but "foo" is an error.
46189  #
46190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46191  # It is also a way to make sure we got the proper file name for the real test later on.
46192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46193  if test "x$test_shortpath" = x; then
46194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46195$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46196    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46197  fi
46198
46199  # Call helper function which possibly converts this using DOS-style short mode.
46200  # If so, the updated path is stored in $new_path.
46201
46202  input_path="$new_path"
46203  # Check if we need to convert this using DOS-style short mode. If the path
46204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46205  # take no chances and rewrite it.
46206  # Note: m4 eats our [], so we need to use [ and ] instead.
46207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46208  if test "x$has_forbidden_chars" != x; then
46209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46213      # Going to short mode and back again did indeed matter. Since short mode is
46214      # case insensitive, let's make it lowercase to improve readability.
46215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46216      # Now convert it back to Unix-style (cygpath)
46217      input_path=`$CYGPATH -u "$shortmode_path"`
46218      new_path="$input_path"
46219    fi
46220  fi
46221
46222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46223  if test "x$test_cygdrive_prefix" = x; then
46224    # As a simple fix, exclude /usr/bin since it's not a real path.
46225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46227      # a path prefixed by /cygdrive for fixpath to work.
46228      new_path="$CYGWIN_ROOT_PATH$input_path"
46229    fi
46230  fi
46231
46232
46233  if test "x$path" != "x$new_path"; then
46234    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46237  fi
46238
46239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46240
46241  path="$POTENTIAL_FREETYPE_LIB_PATH"
46242  has_colon=`$ECHO $path | $GREP ^.:`
46243  new_path="$path"
46244  if test "x$has_colon" = x; then
46245    # Not in mixed or Windows style, start by that.
46246    new_path=`cmd //c echo $path`
46247  fi
46248
46249
46250  input_path="$new_path"
46251  # Check if we need to convert this using DOS-style short mode. If the path
46252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46253  # take no chances and rewrite it.
46254  # Note: m4 eats our [], so we need to use [ and ] instead.
46255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46256  if test "x$has_forbidden_chars" != x; then
46257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46259  fi
46260
46261
46262  windows_path="$new_path"
46263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46264    unix_path=`$CYGPATH -u "$windows_path"`
46265    new_path="$unix_path"
46266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46268    new_path="$unix_path"
46269  fi
46270
46271  if test "x$path" != "x$new_path"; then
46272    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46275  fi
46276
46277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46279
46280    else
46281      # We're on a unix platform. Hooray! :)
46282      path="$POTENTIAL_FREETYPE_LIB_PATH"
46283      has_space=`$ECHO "$path" | $GREP " "`
46284      if test "x$has_space" != x; then
46285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46286$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46288      fi
46289
46290      # Use eval to expand a potential ~
46291      eval path="$path"
46292      if test ! -f "$path" && test ! -d "$path"; then
46293        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46294      fi
46295
46296      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46297    fi
46298  fi
46299
46300
46301    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46303$as_echo_n "checking for freetype includes... " >&6; }
46304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46305$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46306    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46308$as_echo_n "checking for freetype libraries... " >&6; }
46309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46310$as_echo "$FREETYPE_LIB_PATH" >&6; }
46311  fi
46312
46313          fi
46314        else
46315          FREETYPE_BASE_DIR="$SYSROOT/usr"
46316
46317  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46318  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46319  METHOD="well-known location"
46320
46321  # Let's start with an optimistic view of the world :-)
46322  FOUND_FREETYPE=yes
46323
46324  # First look for the canonical freetype main include file ft2build.h.
46325  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46326    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46327    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46328    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46329      # Fail.
46330      FOUND_FREETYPE=no
46331    fi
46332  fi
46333
46334  if test "x$FOUND_FREETYPE" = xyes; then
46335    # Include file found, let's continue the sanity check.
46336    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46337$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46338
46339    # Reset to default value
46340    FREETYPE_BASE_NAME=freetype
46341    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46342    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46343      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46344          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46345        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46346        # for the .6 version explicitly.
46347        FREETYPE_BASE_NAME=freetype.6
46348        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46349        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46350$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46351      else
46352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46353$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46354        FOUND_FREETYPE=no
46355      fi
46356    else
46357      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46358        # On Windows, we will need both .lib and .dll file.
46359        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46360          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46361$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46362          FOUND_FREETYPE=no
46363        fi
46364      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46365          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46366        # Found lib in isa dir, use that instead.
46367        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46368        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46369$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46370      fi
46371    fi
46372  fi
46373
46374  if test "x$FOUND_FREETYPE" = xyes; then
46375
46376  # Only process if variable expands to non-empty
46377
46378  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46380
46381  # Input might be given as Windows format, start by converting to
46382  # unix format.
46383  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46384  new_path=`$CYGPATH -u "$path"`
46385
46386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46389  # "foo.exe" is OK but "foo" is an error.
46390  #
46391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46392  # It is also a way to make sure we got the proper file name for the real test later on.
46393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46394  if test "x$test_shortpath" = x; then
46395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46397    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46398  fi
46399
46400  # Call helper function which possibly converts this using DOS-style short mode.
46401  # If so, the updated path is stored in $new_path.
46402
46403  input_path="$new_path"
46404  # Check if we need to convert this using DOS-style short mode. If the path
46405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46406  # take no chances and rewrite it.
46407  # Note: m4 eats our [], so we need to use [ and ] instead.
46408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46409  if test "x$has_forbidden_chars" != x; then
46410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46414      # Going to short mode and back again did indeed matter. Since short mode is
46415      # case insensitive, let's make it lowercase to improve readability.
46416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46417      # Now convert it back to Unix-style (cygpath)
46418      input_path=`$CYGPATH -u "$shortmode_path"`
46419      new_path="$input_path"
46420    fi
46421  fi
46422
46423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46424  if test "x$test_cygdrive_prefix" = x; then
46425    # As a simple fix, exclude /usr/bin since it's not a real path.
46426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46428      # a path prefixed by /cygdrive for fixpath to work.
46429      new_path="$CYGWIN_ROOT_PATH$input_path"
46430    fi
46431  fi
46432
46433
46434  if test "x$path" != "x$new_path"; then
46435    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46437$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46438  fi
46439
46440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46441
46442  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46443  has_colon=`$ECHO $path | $GREP ^.:`
46444  new_path="$path"
46445  if test "x$has_colon" = x; then
46446    # Not in mixed or Windows style, start by that.
46447    new_path=`cmd //c echo $path`
46448  fi
46449
46450
46451  input_path="$new_path"
46452  # Check if we need to convert this using DOS-style short mode. If the path
46453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46454  # take no chances and rewrite it.
46455  # Note: m4 eats our [], so we need to use [ and ] instead.
46456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46457  if test "x$has_forbidden_chars" != x; then
46458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46460  fi
46461
46462
46463  windows_path="$new_path"
46464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46465    unix_path=`$CYGPATH -u "$windows_path"`
46466    new_path="$unix_path"
46467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46469    new_path="$unix_path"
46470  fi
46471
46472  if test "x$path" != "x$new_path"; then
46473    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46476  fi
46477
46478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46480
46481    else
46482      # We're on a unix platform. Hooray! :)
46483      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46484      has_space=`$ECHO "$path" | $GREP " "`
46485      if test "x$has_space" != x; then
46486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46487$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46489      fi
46490
46491      # Use eval to expand a potential ~
46492      eval path="$path"
46493      if test ! -f "$path" && test ! -d "$path"; then
46494        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46495      fi
46496
46497      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46498    fi
46499  fi
46500
46501
46502  # Only process if variable expands to non-empty
46503
46504  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46506
46507  # Input might be given as Windows format, start by converting to
46508  # unix format.
46509  path="$POTENTIAL_FREETYPE_LIB_PATH"
46510  new_path=`$CYGPATH -u "$path"`
46511
46512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46515  # "foo.exe" is OK but "foo" is an error.
46516  #
46517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46518  # It is also a way to make sure we got the proper file name for the real test later on.
46519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46520  if test "x$test_shortpath" = x; then
46521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46523    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46524  fi
46525
46526  # Call helper function which possibly converts this using DOS-style short mode.
46527  # If so, the updated path is stored in $new_path.
46528
46529  input_path="$new_path"
46530  # Check if we need to convert this using DOS-style short mode. If the path
46531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46532  # take no chances and rewrite it.
46533  # Note: m4 eats our [], so we need to use [ and ] instead.
46534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46535  if test "x$has_forbidden_chars" != x; then
46536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46540      # Going to short mode and back again did indeed matter. Since short mode is
46541      # case insensitive, let's make it lowercase to improve readability.
46542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46543      # Now convert it back to Unix-style (cygpath)
46544      input_path=`$CYGPATH -u "$shortmode_path"`
46545      new_path="$input_path"
46546    fi
46547  fi
46548
46549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46550  if test "x$test_cygdrive_prefix" = x; then
46551    # As a simple fix, exclude /usr/bin since it's not a real path.
46552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46554      # a path prefixed by /cygdrive for fixpath to work.
46555      new_path="$CYGWIN_ROOT_PATH$input_path"
46556    fi
46557  fi
46558
46559
46560  if test "x$path" != "x$new_path"; then
46561    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46563$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46564  fi
46565
46566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46567
46568  path="$POTENTIAL_FREETYPE_LIB_PATH"
46569  has_colon=`$ECHO $path | $GREP ^.:`
46570  new_path="$path"
46571  if test "x$has_colon" = x; then
46572    # Not in mixed or Windows style, start by that.
46573    new_path=`cmd //c echo $path`
46574  fi
46575
46576
46577  input_path="$new_path"
46578  # Check if we need to convert this using DOS-style short mode. If the path
46579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46580  # take no chances and rewrite it.
46581  # Note: m4 eats our [], so we need to use [ and ] instead.
46582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46583  if test "x$has_forbidden_chars" != x; then
46584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46586  fi
46587
46588
46589  windows_path="$new_path"
46590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46591    unix_path=`$CYGPATH -u "$windows_path"`
46592    new_path="$unix_path"
46593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46595    new_path="$unix_path"
46596  fi
46597
46598  if test "x$path" != "x$new_path"; then
46599    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46601$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46602  fi
46603
46604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46606
46607    else
46608      # We're on a unix platform. Hooray! :)
46609      path="$POTENTIAL_FREETYPE_LIB_PATH"
46610      has_space=`$ECHO "$path" | $GREP " "`
46611      if test "x$has_space" != x; then
46612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46615      fi
46616
46617      # Use eval to expand a potential ~
46618      eval path="$path"
46619      if test ! -f "$path" && test ! -d "$path"; then
46620        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46621      fi
46622
46623      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46624    fi
46625  fi
46626
46627
46628    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46630$as_echo_n "checking for freetype includes... " >&6; }
46631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46632$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46633    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46635$as_echo_n "checking for freetype libraries... " >&6; }
46636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46637$as_echo "$FREETYPE_LIB_PATH" >&6; }
46638  fi
46639
46640
46641          if test "x$FOUND_FREETYPE" != xyes; then
46642            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46643
46644  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46645  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46646  METHOD="well-known location"
46647
46648  # Let's start with an optimistic view of the world :-)
46649  FOUND_FREETYPE=yes
46650
46651  # First look for the canonical freetype main include file ft2build.h.
46652  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46653    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46654    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46655    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46656      # Fail.
46657      FOUND_FREETYPE=no
46658    fi
46659  fi
46660
46661  if test "x$FOUND_FREETYPE" = xyes; then
46662    # Include file found, let's continue the sanity check.
46663    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46664$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46665
46666    # Reset to default value
46667    FREETYPE_BASE_NAME=freetype
46668    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46669    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46670      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46671          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46672        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46673        # for the .6 version explicitly.
46674        FREETYPE_BASE_NAME=freetype.6
46675        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46676        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46677$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46678      else
46679        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46680$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46681        FOUND_FREETYPE=no
46682      fi
46683    else
46684      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46685        # On Windows, we will need both .lib and .dll file.
46686        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46687          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46688$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46689          FOUND_FREETYPE=no
46690        fi
46691      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46692          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46693        # Found lib in isa dir, use that instead.
46694        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46695        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46696$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46697      fi
46698    fi
46699  fi
46700
46701  if test "x$FOUND_FREETYPE" = xyes; then
46702
46703  # Only process if variable expands to non-empty
46704
46705  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46707
46708  # Input might be given as Windows format, start by converting to
46709  # unix format.
46710  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46711  new_path=`$CYGPATH -u "$path"`
46712
46713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46716  # "foo.exe" is OK but "foo" is an error.
46717  #
46718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46719  # It is also a way to make sure we got the proper file name for the real test later on.
46720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46721  if test "x$test_shortpath" = x; then
46722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46723$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46724    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46725  fi
46726
46727  # Call helper function which possibly converts this using DOS-style short mode.
46728  # If so, the updated path is stored in $new_path.
46729
46730  input_path="$new_path"
46731  # Check if we need to convert this using DOS-style short mode. If the path
46732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46733  # take no chances and rewrite it.
46734  # Note: m4 eats our [], so we need to use [ and ] instead.
46735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46736  if test "x$has_forbidden_chars" != x; then
46737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46741      # Going to short mode and back again did indeed matter. Since short mode is
46742      # case insensitive, let's make it lowercase to improve readability.
46743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46744      # Now convert it back to Unix-style (cygpath)
46745      input_path=`$CYGPATH -u "$shortmode_path"`
46746      new_path="$input_path"
46747    fi
46748  fi
46749
46750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46751  if test "x$test_cygdrive_prefix" = x; then
46752    # As a simple fix, exclude /usr/bin since it's not a real path.
46753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46755      # a path prefixed by /cygdrive for fixpath to work.
46756      new_path="$CYGWIN_ROOT_PATH$input_path"
46757    fi
46758  fi
46759
46760
46761  if test "x$path" != "x$new_path"; then
46762    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46764$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46765  fi
46766
46767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46768
46769  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46770  has_colon=`$ECHO $path | $GREP ^.:`
46771  new_path="$path"
46772  if test "x$has_colon" = x; then
46773    # Not in mixed or Windows style, start by that.
46774    new_path=`cmd //c echo $path`
46775  fi
46776
46777
46778  input_path="$new_path"
46779  # Check if we need to convert this using DOS-style short mode. If the path
46780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46781  # take no chances and rewrite it.
46782  # Note: m4 eats our [], so we need to use [ and ] instead.
46783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46784  if test "x$has_forbidden_chars" != x; then
46785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46787  fi
46788
46789
46790  windows_path="$new_path"
46791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46792    unix_path=`$CYGPATH -u "$windows_path"`
46793    new_path="$unix_path"
46794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46796    new_path="$unix_path"
46797  fi
46798
46799  if test "x$path" != "x$new_path"; then
46800    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46802$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46803  fi
46804
46805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46807
46808    else
46809      # We're on a unix platform. Hooray! :)
46810      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46811      has_space=`$ECHO "$path" | $GREP " "`
46812      if test "x$has_space" != x; then
46813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46814$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46816      fi
46817
46818      # Use eval to expand a potential ~
46819      eval path="$path"
46820      if test ! -f "$path" && test ! -d "$path"; then
46821        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46822      fi
46823
46824      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46825    fi
46826  fi
46827
46828
46829  # Only process if variable expands to non-empty
46830
46831  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46833
46834  # Input might be given as Windows format, start by converting to
46835  # unix format.
46836  path="$POTENTIAL_FREETYPE_LIB_PATH"
46837  new_path=`$CYGPATH -u "$path"`
46838
46839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46842  # "foo.exe" is OK but "foo" is an error.
46843  #
46844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46845  # It is also a way to make sure we got the proper file name for the real test later on.
46846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46847  if test "x$test_shortpath" = x; then
46848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46850    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46851  fi
46852
46853  # Call helper function which possibly converts this using DOS-style short mode.
46854  # If so, the updated path is stored in $new_path.
46855
46856  input_path="$new_path"
46857  # Check if we need to convert this using DOS-style short mode. If the path
46858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46859  # take no chances and rewrite it.
46860  # Note: m4 eats our [], so we need to use [ and ] instead.
46861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46862  if test "x$has_forbidden_chars" != x; then
46863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46867      # Going to short mode and back again did indeed matter. Since short mode is
46868      # case insensitive, let's make it lowercase to improve readability.
46869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46870      # Now convert it back to Unix-style (cygpath)
46871      input_path=`$CYGPATH -u "$shortmode_path"`
46872      new_path="$input_path"
46873    fi
46874  fi
46875
46876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46877  if test "x$test_cygdrive_prefix" = x; then
46878    # As a simple fix, exclude /usr/bin since it's not a real path.
46879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46881      # a path prefixed by /cygdrive for fixpath to work.
46882      new_path="$CYGWIN_ROOT_PATH$input_path"
46883    fi
46884  fi
46885
46886
46887  if test "x$path" != "x$new_path"; then
46888    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46891  fi
46892
46893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46894
46895  path="$POTENTIAL_FREETYPE_LIB_PATH"
46896  has_colon=`$ECHO $path | $GREP ^.:`
46897  new_path="$path"
46898  if test "x$has_colon" = x; then
46899    # Not in mixed or Windows style, start by that.
46900    new_path=`cmd //c echo $path`
46901  fi
46902
46903
46904  input_path="$new_path"
46905  # Check if we need to convert this using DOS-style short mode. If the path
46906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46907  # take no chances and rewrite it.
46908  # Note: m4 eats our [], so we need to use [ and ] instead.
46909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46910  if test "x$has_forbidden_chars" != x; then
46911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46913  fi
46914
46915
46916  windows_path="$new_path"
46917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46918    unix_path=`$CYGPATH -u "$windows_path"`
46919    new_path="$unix_path"
46920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46922    new_path="$unix_path"
46923  fi
46924
46925  if test "x$path" != "x$new_path"; then
46926    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46928$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46929  fi
46930
46931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46933
46934    else
46935      # We're on a unix platform. Hooray! :)
46936      path="$POTENTIAL_FREETYPE_LIB_PATH"
46937      has_space=`$ECHO "$path" | $GREP " "`
46938      if test "x$has_space" != x; then
46939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46942      fi
46943
46944      # Use eval to expand a potential ~
46945      eval path="$path"
46946      if test ! -f "$path" && test ! -d "$path"; then
46947        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46948      fi
46949
46950      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46951    fi
46952  fi
46953
46954
46955    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46957$as_echo_n "checking for freetype includes... " >&6; }
46958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46959$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46960    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46962$as_echo_n "checking for freetype libraries... " >&6; }
46963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46964$as_echo "$FREETYPE_LIB_PATH" >&6; }
46965  fi
46966
46967          fi
46968
46969          if test "x$FOUND_FREETYPE" != xyes; then
46970            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46971
46972  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46973  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46974  METHOD="well-known location"
46975
46976  # Let's start with an optimistic view of the world :-)
46977  FOUND_FREETYPE=yes
46978
46979  # First look for the canonical freetype main include file ft2build.h.
46980  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46981    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46982    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46983    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46984      # Fail.
46985      FOUND_FREETYPE=no
46986    fi
46987  fi
46988
46989  if test "x$FOUND_FREETYPE" = xyes; then
46990    # Include file found, let's continue the sanity check.
46991    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46992$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46993
46994    # Reset to default value
46995    FREETYPE_BASE_NAME=freetype
46996    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46997    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46998      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46999          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47000        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47001        # for the .6 version explicitly.
47002        FREETYPE_BASE_NAME=freetype.6
47003        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47004        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47005$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47006      else
47007        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47008$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47009        FOUND_FREETYPE=no
47010      fi
47011    else
47012      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47013        # On Windows, we will need both .lib and .dll file.
47014        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47015          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47016$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47017          FOUND_FREETYPE=no
47018        fi
47019      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47020          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47021        # Found lib in isa dir, use that instead.
47022        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47023        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47024$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47025      fi
47026    fi
47027  fi
47028
47029  if test "x$FOUND_FREETYPE" = xyes; then
47030
47031  # Only process if variable expands to non-empty
47032
47033  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47035
47036  # Input might be given as Windows format, start by converting to
47037  # unix format.
47038  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47039  new_path=`$CYGPATH -u "$path"`
47040
47041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47044  # "foo.exe" is OK but "foo" is an error.
47045  #
47046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47047  # It is also a way to make sure we got the proper file name for the real test later on.
47048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47049  if test "x$test_shortpath" = x; then
47050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47052    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47053  fi
47054
47055  # Call helper function which possibly converts this using DOS-style short mode.
47056  # If so, the updated path is stored in $new_path.
47057
47058  input_path="$new_path"
47059  # Check if we need to convert this using DOS-style short mode. If the path
47060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47061  # take no chances and rewrite it.
47062  # Note: m4 eats our [], so we need to use [ and ] instead.
47063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47064  if test "x$has_forbidden_chars" != x; then
47065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47069      # Going to short mode and back again did indeed matter. Since short mode is
47070      # case insensitive, let's make it lowercase to improve readability.
47071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47072      # Now convert it back to Unix-style (cygpath)
47073      input_path=`$CYGPATH -u "$shortmode_path"`
47074      new_path="$input_path"
47075    fi
47076  fi
47077
47078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47079  if test "x$test_cygdrive_prefix" = x; then
47080    # As a simple fix, exclude /usr/bin since it's not a real path.
47081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47083      # a path prefixed by /cygdrive for fixpath to work.
47084      new_path="$CYGWIN_ROOT_PATH$input_path"
47085    fi
47086  fi
47087
47088
47089  if test "x$path" != "x$new_path"; then
47090    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47093  fi
47094
47095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47096
47097  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47098  has_colon=`$ECHO $path | $GREP ^.:`
47099  new_path="$path"
47100  if test "x$has_colon" = x; then
47101    # Not in mixed or Windows style, start by that.
47102    new_path=`cmd //c echo $path`
47103  fi
47104
47105
47106  input_path="$new_path"
47107  # Check if we need to convert this using DOS-style short mode. If the path
47108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47109  # take no chances and rewrite it.
47110  # Note: m4 eats our [], so we need to use [ and ] instead.
47111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47112  if test "x$has_forbidden_chars" != x; then
47113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47115  fi
47116
47117
47118  windows_path="$new_path"
47119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47120    unix_path=`$CYGPATH -u "$windows_path"`
47121    new_path="$unix_path"
47122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47124    new_path="$unix_path"
47125  fi
47126
47127  if test "x$path" != "x$new_path"; then
47128    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47130$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47131  fi
47132
47133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47135
47136    else
47137      # We're on a unix platform. Hooray! :)
47138      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47139      has_space=`$ECHO "$path" | $GREP " "`
47140      if test "x$has_space" != x; then
47141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47142$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47144      fi
47145
47146      # Use eval to expand a potential ~
47147      eval path="$path"
47148      if test ! -f "$path" && test ! -d "$path"; then
47149        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47150      fi
47151
47152      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47153    fi
47154  fi
47155
47156
47157  # Only process if variable expands to non-empty
47158
47159  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47161
47162  # Input might be given as Windows format, start by converting to
47163  # unix format.
47164  path="$POTENTIAL_FREETYPE_LIB_PATH"
47165  new_path=`$CYGPATH -u "$path"`
47166
47167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47170  # "foo.exe" is OK but "foo" is an error.
47171  #
47172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47173  # It is also a way to make sure we got the proper file name for the real test later on.
47174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47175  if test "x$test_shortpath" = x; then
47176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47178    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47179  fi
47180
47181  # Call helper function which possibly converts this using DOS-style short mode.
47182  # If so, the updated path is stored in $new_path.
47183
47184  input_path="$new_path"
47185  # Check if we need to convert this using DOS-style short mode. If the path
47186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47187  # take no chances and rewrite it.
47188  # Note: m4 eats our [], so we need to use [ and ] instead.
47189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47190  if test "x$has_forbidden_chars" != x; then
47191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47195      # Going to short mode and back again did indeed matter. Since short mode is
47196      # case insensitive, let's make it lowercase to improve readability.
47197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47198      # Now convert it back to Unix-style (cygpath)
47199      input_path=`$CYGPATH -u "$shortmode_path"`
47200      new_path="$input_path"
47201    fi
47202  fi
47203
47204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47205  if test "x$test_cygdrive_prefix" = x; then
47206    # As a simple fix, exclude /usr/bin since it's not a real path.
47207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47209      # a path prefixed by /cygdrive for fixpath to work.
47210      new_path="$CYGWIN_ROOT_PATH$input_path"
47211    fi
47212  fi
47213
47214
47215  if test "x$path" != "x$new_path"; then
47216    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47219  fi
47220
47221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47222
47223  path="$POTENTIAL_FREETYPE_LIB_PATH"
47224  has_colon=`$ECHO $path | $GREP ^.:`
47225  new_path="$path"
47226  if test "x$has_colon" = x; then
47227    # Not in mixed or Windows style, start by that.
47228    new_path=`cmd //c echo $path`
47229  fi
47230
47231
47232  input_path="$new_path"
47233  # Check if we need to convert this using DOS-style short mode. If the path
47234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47235  # take no chances and rewrite it.
47236  # Note: m4 eats our [], so we need to use [ and ] instead.
47237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47238  if test "x$has_forbidden_chars" != x; then
47239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47241  fi
47242
47243
47244  windows_path="$new_path"
47245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47246    unix_path=`$CYGPATH -u "$windows_path"`
47247    new_path="$unix_path"
47248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47250    new_path="$unix_path"
47251  fi
47252
47253  if test "x$path" != "x$new_path"; then
47254    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47257  fi
47258
47259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47261
47262    else
47263      # We're on a unix platform. Hooray! :)
47264      path="$POTENTIAL_FREETYPE_LIB_PATH"
47265      has_space=`$ECHO "$path" | $GREP " "`
47266      if test "x$has_space" != x; then
47267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47268$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47269        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47270      fi
47271
47272      # Use eval to expand a potential ~
47273      eval path="$path"
47274      if test ! -f "$path" && test ! -d "$path"; then
47275        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47276      fi
47277
47278      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47279    fi
47280  fi
47281
47282
47283    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47285$as_echo_n "checking for freetype includes... " >&6; }
47286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47287$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47288    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47290$as_echo_n "checking for freetype libraries... " >&6; }
47291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47292$as_echo "$FREETYPE_LIB_PATH" >&6; }
47293  fi
47294
47295          fi
47296
47297          if test "x$FOUND_FREETYPE" != xyes; then
47298            FREETYPE_BASE_DIR="$SYSROOT/usr"
47299            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47300
47301  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47302  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47303  METHOD="well-known location"
47304
47305  # Let's start with an optimistic view of the world :-)
47306  FOUND_FREETYPE=yes
47307
47308  # First look for the canonical freetype main include file ft2build.h.
47309  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47310    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47311    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47312    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47313      # Fail.
47314      FOUND_FREETYPE=no
47315    fi
47316  fi
47317
47318  if test "x$FOUND_FREETYPE" = xyes; then
47319    # Include file found, let's continue the sanity check.
47320    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47321$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47322
47323    # Reset to default value
47324    FREETYPE_BASE_NAME=freetype
47325    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47326    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47327      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47328          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47329        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47330        # for the .6 version explicitly.
47331        FREETYPE_BASE_NAME=freetype.6
47332        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47333        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47334$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47335      else
47336        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47337$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47338        FOUND_FREETYPE=no
47339      fi
47340    else
47341      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47342        # On Windows, we will need both .lib and .dll file.
47343        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47344          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47345$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47346          FOUND_FREETYPE=no
47347        fi
47348      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47349          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47350        # Found lib in isa dir, use that instead.
47351        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47352        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47353$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47354      fi
47355    fi
47356  fi
47357
47358  if test "x$FOUND_FREETYPE" = xyes; then
47359
47360  # Only process if variable expands to non-empty
47361
47362  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47364
47365  # Input might be given as Windows format, start by converting to
47366  # unix format.
47367  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47368  new_path=`$CYGPATH -u "$path"`
47369
47370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47373  # "foo.exe" is OK but "foo" is an error.
47374  #
47375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47376  # It is also a way to make sure we got the proper file name for the real test later on.
47377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47378  if test "x$test_shortpath" = x; then
47379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47380$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47381    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47382  fi
47383
47384  # Call helper function which possibly converts this using DOS-style short mode.
47385  # If so, the updated path is stored in $new_path.
47386
47387  input_path="$new_path"
47388  # Check if we need to convert this using DOS-style short mode. If the path
47389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47390  # take no chances and rewrite it.
47391  # Note: m4 eats our [], so we need to use [ and ] instead.
47392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47393  if test "x$has_forbidden_chars" != x; then
47394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47398      # Going to short mode and back again did indeed matter. Since short mode is
47399      # case insensitive, let's make it lowercase to improve readability.
47400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47401      # Now convert it back to Unix-style (cygpath)
47402      input_path=`$CYGPATH -u "$shortmode_path"`
47403      new_path="$input_path"
47404    fi
47405  fi
47406
47407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47408  if test "x$test_cygdrive_prefix" = x; then
47409    # As a simple fix, exclude /usr/bin since it's not a real path.
47410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47412      # a path prefixed by /cygdrive for fixpath to work.
47413      new_path="$CYGWIN_ROOT_PATH$input_path"
47414    fi
47415  fi
47416
47417
47418  if test "x$path" != "x$new_path"; then
47419    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47421$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47422  fi
47423
47424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47425
47426  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47427  has_colon=`$ECHO $path | $GREP ^.:`
47428  new_path="$path"
47429  if test "x$has_colon" = x; then
47430    # Not in mixed or Windows style, start by that.
47431    new_path=`cmd //c echo $path`
47432  fi
47433
47434
47435  input_path="$new_path"
47436  # Check if we need to convert this using DOS-style short mode. If the path
47437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47438  # take no chances and rewrite it.
47439  # Note: m4 eats our [], so we need to use [ and ] instead.
47440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47441  if test "x$has_forbidden_chars" != x; then
47442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47444  fi
47445
47446
47447  windows_path="$new_path"
47448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47449    unix_path=`$CYGPATH -u "$windows_path"`
47450    new_path="$unix_path"
47451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47453    new_path="$unix_path"
47454  fi
47455
47456  if test "x$path" != "x$new_path"; then
47457    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47459$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47460  fi
47461
47462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47464
47465    else
47466      # We're on a unix platform. Hooray! :)
47467      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47468      has_space=`$ECHO "$path" | $GREP " "`
47469      if test "x$has_space" != x; then
47470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47471$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47473      fi
47474
47475      # Use eval to expand a potential ~
47476      eval path="$path"
47477      if test ! -f "$path" && test ! -d "$path"; then
47478        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47479      fi
47480
47481      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47482    fi
47483  fi
47484
47485
47486  # Only process if variable expands to non-empty
47487
47488  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47490
47491  # Input might be given as Windows format, start by converting to
47492  # unix format.
47493  path="$POTENTIAL_FREETYPE_LIB_PATH"
47494  new_path=`$CYGPATH -u "$path"`
47495
47496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47499  # "foo.exe" is OK but "foo" is an error.
47500  #
47501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47502  # It is also a way to make sure we got the proper file name for the real test later on.
47503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47504  if test "x$test_shortpath" = x; then
47505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47508  fi
47509
47510  # Call helper function which possibly converts this using DOS-style short mode.
47511  # If so, the updated path is stored in $new_path.
47512
47513  input_path="$new_path"
47514  # Check if we need to convert this using DOS-style short mode. If the path
47515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47516  # take no chances and rewrite it.
47517  # Note: m4 eats our [], so we need to use [ and ] instead.
47518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47519  if test "x$has_forbidden_chars" != x; then
47520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47524      # Going to short mode and back again did indeed matter. Since short mode is
47525      # case insensitive, let's make it lowercase to improve readability.
47526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47527      # Now convert it back to Unix-style (cygpath)
47528      input_path=`$CYGPATH -u "$shortmode_path"`
47529      new_path="$input_path"
47530    fi
47531  fi
47532
47533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47534  if test "x$test_cygdrive_prefix" = x; then
47535    # As a simple fix, exclude /usr/bin since it's not a real path.
47536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47538      # a path prefixed by /cygdrive for fixpath to work.
47539      new_path="$CYGWIN_ROOT_PATH$input_path"
47540    fi
47541  fi
47542
47543
47544  if test "x$path" != "x$new_path"; then
47545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47548  fi
47549
47550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47551
47552  path="$POTENTIAL_FREETYPE_LIB_PATH"
47553  has_colon=`$ECHO $path | $GREP ^.:`
47554  new_path="$path"
47555  if test "x$has_colon" = x; then
47556    # Not in mixed or Windows style, start by that.
47557    new_path=`cmd //c echo $path`
47558  fi
47559
47560
47561  input_path="$new_path"
47562  # Check if we need to convert this using DOS-style short mode. If the path
47563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47564  # take no chances and rewrite it.
47565  # Note: m4 eats our [], so we need to use [ and ] instead.
47566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47567  if test "x$has_forbidden_chars" != x; then
47568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47570  fi
47571
47572
47573  windows_path="$new_path"
47574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47575    unix_path=`$CYGPATH -u "$windows_path"`
47576    new_path="$unix_path"
47577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47579    new_path="$unix_path"
47580  fi
47581
47582  if test "x$path" != "x$new_path"; then
47583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47586  fi
47587
47588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47590
47591    else
47592      # We're on a unix platform. Hooray! :)
47593      path="$POTENTIAL_FREETYPE_LIB_PATH"
47594      has_space=`$ECHO "$path" | $GREP " "`
47595      if test "x$has_space" != x; then
47596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47599      fi
47600
47601      # Use eval to expand a potential ~
47602      eval path="$path"
47603      if test ! -f "$path" && test ! -d "$path"; then
47604        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47605      fi
47606
47607      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47608    fi
47609  fi
47610
47611
47612    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47614$as_echo_n "checking for freetype includes... " >&6; }
47615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47616$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47617    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47619$as_echo_n "checking for freetype libraries... " >&6; }
47620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47621$as_echo "$FREETYPE_LIB_PATH" >&6; }
47622  fi
47623
47624            else
47625
47626  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47627  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47628  METHOD="well-known location"
47629
47630  # Let's start with an optimistic view of the world :-)
47631  FOUND_FREETYPE=yes
47632
47633  # First look for the canonical freetype main include file ft2build.h.
47634  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47635    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47636    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47637    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47638      # Fail.
47639      FOUND_FREETYPE=no
47640    fi
47641  fi
47642
47643  if test "x$FOUND_FREETYPE" = xyes; then
47644    # Include file found, let's continue the sanity check.
47645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47646$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47647
47648    # Reset to default value
47649    FREETYPE_BASE_NAME=freetype
47650    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47651    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47652      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47653          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47654        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47655        # for the .6 version explicitly.
47656        FREETYPE_BASE_NAME=freetype.6
47657        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47658        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47659$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47660      else
47661        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47662$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47663        FOUND_FREETYPE=no
47664      fi
47665    else
47666      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47667        # On Windows, we will need both .lib and .dll file.
47668        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47669          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47670$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47671          FOUND_FREETYPE=no
47672        fi
47673      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47674          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47675        # Found lib in isa dir, use that instead.
47676        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47677        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47678$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47679      fi
47680    fi
47681  fi
47682
47683  if test "x$FOUND_FREETYPE" = xyes; then
47684
47685  # Only process if variable expands to non-empty
47686
47687  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47689
47690  # Input might be given as Windows format, start by converting to
47691  # unix format.
47692  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47693  new_path=`$CYGPATH -u "$path"`
47694
47695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47698  # "foo.exe" is OK but "foo" is an error.
47699  #
47700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47701  # It is also a way to make sure we got the proper file name for the real test later on.
47702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47703  if test "x$test_shortpath" = x; then
47704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47705$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47706    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47707  fi
47708
47709  # Call helper function which possibly converts this using DOS-style short mode.
47710  # If so, the updated path is stored in $new_path.
47711
47712  input_path="$new_path"
47713  # Check if we need to convert this using DOS-style short mode. If the path
47714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47715  # take no chances and rewrite it.
47716  # Note: m4 eats our [], so we need to use [ and ] instead.
47717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47718  if test "x$has_forbidden_chars" != x; then
47719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47723      # Going to short mode and back again did indeed matter. Since short mode is
47724      # case insensitive, let's make it lowercase to improve readability.
47725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47726      # Now convert it back to Unix-style (cygpath)
47727      input_path=`$CYGPATH -u "$shortmode_path"`
47728      new_path="$input_path"
47729    fi
47730  fi
47731
47732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47733  if test "x$test_cygdrive_prefix" = x; then
47734    # As a simple fix, exclude /usr/bin since it's not a real path.
47735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47737      # a path prefixed by /cygdrive for fixpath to work.
47738      new_path="$CYGWIN_ROOT_PATH$input_path"
47739    fi
47740  fi
47741
47742
47743  if test "x$path" != "x$new_path"; then
47744    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47746$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47747  fi
47748
47749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47750
47751  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47752  has_colon=`$ECHO $path | $GREP ^.:`
47753  new_path="$path"
47754  if test "x$has_colon" = x; then
47755    # Not in mixed or Windows style, start by that.
47756    new_path=`cmd //c echo $path`
47757  fi
47758
47759
47760  input_path="$new_path"
47761  # Check if we need to convert this using DOS-style short mode. If the path
47762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47763  # take no chances and rewrite it.
47764  # Note: m4 eats our [], so we need to use [ and ] instead.
47765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47766  if test "x$has_forbidden_chars" != x; then
47767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47769  fi
47770
47771
47772  windows_path="$new_path"
47773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47774    unix_path=`$CYGPATH -u "$windows_path"`
47775    new_path="$unix_path"
47776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47778    new_path="$unix_path"
47779  fi
47780
47781  if test "x$path" != "x$new_path"; then
47782    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47785  fi
47786
47787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47789
47790    else
47791      # We're on a unix platform. Hooray! :)
47792      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47793      has_space=`$ECHO "$path" | $GREP " "`
47794      if test "x$has_space" != x; then
47795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47798      fi
47799
47800      # Use eval to expand a potential ~
47801      eval path="$path"
47802      if test ! -f "$path" && test ! -d "$path"; then
47803        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47804      fi
47805
47806      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47807    fi
47808  fi
47809
47810
47811  # Only process if variable expands to non-empty
47812
47813  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47815
47816  # Input might be given as Windows format, start by converting to
47817  # unix format.
47818  path="$POTENTIAL_FREETYPE_LIB_PATH"
47819  new_path=`$CYGPATH -u "$path"`
47820
47821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47824  # "foo.exe" is OK but "foo" is an error.
47825  #
47826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47827  # It is also a way to make sure we got the proper file name for the real test later on.
47828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47829  if test "x$test_shortpath" = x; then
47830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47832    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47833  fi
47834
47835  # Call helper function which possibly converts this using DOS-style short mode.
47836  # If so, the updated path is stored in $new_path.
47837
47838  input_path="$new_path"
47839  # Check if we need to convert this using DOS-style short mode. If the path
47840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47841  # take no chances and rewrite it.
47842  # Note: m4 eats our [], so we need to use [ and ] instead.
47843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47844  if test "x$has_forbidden_chars" != x; then
47845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47849      # Going to short mode and back again did indeed matter. Since short mode is
47850      # case insensitive, let's make it lowercase to improve readability.
47851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47852      # Now convert it back to Unix-style (cygpath)
47853      input_path=`$CYGPATH -u "$shortmode_path"`
47854      new_path="$input_path"
47855    fi
47856  fi
47857
47858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47859  if test "x$test_cygdrive_prefix" = x; then
47860    # As a simple fix, exclude /usr/bin since it's not a real path.
47861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47863      # a path prefixed by /cygdrive for fixpath to work.
47864      new_path="$CYGWIN_ROOT_PATH$input_path"
47865    fi
47866  fi
47867
47868
47869  if test "x$path" != "x$new_path"; then
47870    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47873  fi
47874
47875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47876
47877  path="$POTENTIAL_FREETYPE_LIB_PATH"
47878  has_colon=`$ECHO $path | $GREP ^.:`
47879  new_path="$path"
47880  if test "x$has_colon" = x; then
47881    # Not in mixed or Windows style, start by that.
47882    new_path=`cmd //c echo $path`
47883  fi
47884
47885
47886  input_path="$new_path"
47887  # Check if we need to convert this using DOS-style short mode. If the path
47888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47889  # take no chances and rewrite it.
47890  # Note: m4 eats our [], so we need to use [ and ] instead.
47891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47892  if test "x$has_forbidden_chars" != x; then
47893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47895  fi
47896
47897
47898  windows_path="$new_path"
47899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47900    unix_path=`$CYGPATH -u "$windows_path"`
47901    new_path="$unix_path"
47902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47904    new_path="$unix_path"
47905  fi
47906
47907  if test "x$path" != "x$new_path"; then
47908    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47911  fi
47912
47913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47915
47916    else
47917      # We're on a unix platform. Hooray! :)
47918      path="$POTENTIAL_FREETYPE_LIB_PATH"
47919      has_space=`$ECHO "$path" | $GREP " "`
47920      if test "x$has_space" != x; then
47921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47924      fi
47925
47926      # Use eval to expand a potential ~
47927      eval path="$path"
47928      if test ! -f "$path" && test ! -d "$path"; then
47929        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47930      fi
47931
47932      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47933    fi
47934  fi
47935
47936
47937    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47939$as_echo_n "checking for freetype includes... " >&6; }
47940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47941$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47942    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47944$as_echo_n "checking for freetype libraries... " >&6; }
47945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47946$as_echo "$FREETYPE_LIB_PATH" >&6; }
47947  fi
47948
47949              if test "x$FOUND_FREETYPE" != xyes; then
47950
47951  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47952  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47953  METHOD="well-known location"
47954
47955  # Let's start with an optimistic view of the world :-)
47956  FOUND_FREETYPE=yes
47957
47958  # First look for the canonical freetype main include file ft2build.h.
47959  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47960    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47961    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47962    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47963      # Fail.
47964      FOUND_FREETYPE=no
47965    fi
47966  fi
47967
47968  if test "x$FOUND_FREETYPE" = xyes; then
47969    # Include file found, let's continue the sanity check.
47970    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47971$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47972
47973    # Reset to default value
47974    FREETYPE_BASE_NAME=freetype
47975    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47976    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47977      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47978          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47979        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47980        # for the .6 version explicitly.
47981        FREETYPE_BASE_NAME=freetype.6
47982        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47983        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47984$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47985      else
47986        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47987$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47988        FOUND_FREETYPE=no
47989      fi
47990    else
47991      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47992        # On Windows, we will need both .lib and .dll file.
47993        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47994          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47995$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47996          FOUND_FREETYPE=no
47997        fi
47998      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47999          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48000        # Found lib in isa dir, use that instead.
48001        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48002        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48003$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48004      fi
48005    fi
48006  fi
48007
48008  if test "x$FOUND_FREETYPE" = xyes; then
48009
48010  # Only process if variable expands to non-empty
48011
48012  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48014
48015  # Input might be given as Windows format, start by converting to
48016  # unix format.
48017  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48018  new_path=`$CYGPATH -u "$path"`
48019
48020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48023  # "foo.exe" is OK but "foo" is an error.
48024  #
48025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48026  # It is also a way to make sure we got the proper file name for the real test later on.
48027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48028  if test "x$test_shortpath" = x; then
48029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48031    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48032  fi
48033
48034  # Call helper function which possibly converts this using DOS-style short mode.
48035  # If so, the updated path is stored in $new_path.
48036
48037  input_path="$new_path"
48038  # Check if we need to convert this using DOS-style short mode. If the path
48039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48040  # take no chances and rewrite it.
48041  # Note: m4 eats our [], so we need to use [ and ] instead.
48042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48043  if test "x$has_forbidden_chars" != x; then
48044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48048      # Going to short mode and back again did indeed matter. Since short mode is
48049      # case insensitive, let's make it lowercase to improve readability.
48050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48051      # Now convert it back to Unix-style (cygpath)
48052      input_path=`$CYGPATH -u "$shortmode_path"`
48053      new_path="$input_path"
48054    fi
48055  fi
48056
48057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48058  if test "x$test_cygdrive_prefix" = x; then
48059    # As a simple fix, exclude /usr/bin since it's not a real path.
48060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48062      # a path prefixed by /cygdrive for fixpath to work.
48063      new_path="$CYGWIN_ROOT_PATH$input_path"
48064    fi
48065  fi
48066
48067
48068  if test "x$path" != "x$new_path"; then
48069    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48071$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48072  fi
48073
48074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48075
48076  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48077  has_colon=`$ECHO $path | $GREP ^.:`
48078  new_path="$path"
48079  if test "x$has_colon" = x; then
48080    # Not in mixed or Windows style, start by that.
48081    new_path=`cmd //c echo $path`
48082  fi
48083
48084
48085  input_path="$new_path"
48086  # Check if we need to convert this using DOS-style short mode. If the path
48087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48088  # take no chances and rewrite it.
48089  # Note: m4 eats our [], so we need to use [ and ] instead.
48090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48091  if test "x$has_forbidden_chars" != x; then
48092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48094  fi
48095
48096
48097  windows_path="$new_path"
48098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48099    unix_path=`$CYGPATH -u "$windows_path"`
48100    new_path="$unix_path"
48101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48103    new_path="$unix_path"
48104  fi
48105
48106  if test "x$path" != "x$new_path"; then
48107    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48110  fi
48111
48112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48114
48115    else
48116      # We're on a unix platform. Hooray! :)
48117      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48118      has_space=`$ECHO "$path" | $GREP " "`
48119      if test "x$has_space" != x; then
48120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48121$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48123      fi
48124
48125      # Use eval to expand a potential ~
48126      eval path="$path"
48127      if test ! -f "$path" && test ! -d "$path"; then
48128        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48129      fi
48130
48131      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48132    fi
48133  fi
48134
48135
48136  # Only process if variable expands to non-empty
48137
48138  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48140
48141  # Input might be given as Windows format, start by converting to
48142  # unix format.
48143  path="$POTENTIAL_FREETYPE_LIB_PATH"
48144  new_path=`$CYGPATH -u "$path"`
48145
48146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48149  # "foo.exe" is OK but "foo" is an error.
48150  #
48151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48152  # It is also a way to make sure we got the proper file name for the real test later on.
48153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48154  if test "x$test_shortpath" = x; then
48155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48156$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48157    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48158  fi
48159
48160  # Call helper function which possibly converts this using DOS-style short mode.
48161  # If so, the updated path is stored in $new_path.
48162
48163  input_path="$new_path"
48164  # Check if we need to convert this using DOS-style short mode. If the path
48165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48166  # take no chances and rewrite it.
48167  # Note: m4 eats our [], so we need to use [ and ] instead.
48168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48169  if test "x$has_forbidden_chars" != x; then
48170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48174      # Going to short mode and back again did indeed matter. Since short mode is
48175      # case insensitive, let's make it lowercase to improve readability.
48176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48177      # Now convert it back to Unix-style (cygpath)
48178      input_path=`$CYGPATH -u "$shortmode_path"`
48179      new_path="$input_path"
48180    fi
48181  fi
48182
48183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48184  if test "x$test_cygdrive_prefix" = x; then
48185    # As a simple fix, exclude /usr/bin since it's not a real path.
48186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48188      # a path prefixed by /cygdrive for fixpath to work.
48189      new_path="$CYGWIN_ROOT_PATH$input_path"
48190    fi
48191  fi
48192
48193
48194  if test "x$path" != "x$new_path"; then
48195    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48197$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48198  fi
48199
48200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48201
48202  path="$POTENTIAL_FREETYPE_LIB_PATH"
48203  has_colon=`$ECHO $path | $GREP ^.:`
48204  new_path="$path"
48205  if test "x$has_colon" = x; then
48206    # Not in mixed or Windows style, start by that.
48207    new_path=`cmd //c echo $path`
48208  fi
48209
48210
48211  input_path="$new_path"
48212  # Check if we need to convert this using DOS-style short mode. If the path
48213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48214  # take no chances and rewrite it.
48215  # Note: m4 eats our [], so we need to use [ and ] instead.
48216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48217  if test "x$has_forbidden_chars" != x; then
48218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48220  fi
48221
48222
48223  windows_path="$new_path"
48224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48225    unix_path=`$CYGPATH -u "$windows_path"`
48226    new_path="$unix_path"
48227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48229    new_path="$unix_path"
48230  fi
48231
48232  if test "x$path" != "x$new_path"; then
48233    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48236  fi
48237
48238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48240
48241    else
48242      # We're on a unix platform. Hooray! :)
48243      path="$POTENTIAL_FREETYPE_LIB_PATH"
48244      has_space=`$ECHO "$path" | $GREP " "`
48245      if test "x$has_space" != x; then
48246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48247$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48248        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48249      fi
48250
48251      # Use eval to expand a potential ~
48252      eval path="$path"
48253      if test ! -f "$path" && test ! -d "$path"; then
48254        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48255      fi
48256
48257      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48258    fi
48259  fi
48260
48261
48262    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48264$as_echo_n "checking for freetype includes... " >&6; }
48265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48266$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48267    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48269$as_echo_n "checking for freetype libraries... " >&6; }
48270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48271$as_echo "$FREETYPE_LIB_PATH" >&6; }
48272  fi
48273
48274              fi
48275            fi
48276          fi
48277        fi
48278      fi # end check in well-known locations
48279
48280      if test "x$FOUND_FREETYPE" != xyes; then
48281
48282  # Print a helpful message on how to acquire the necessary build dependency.
48283  # freetype is the help tag: freetype, cups, pulse, alsa etc
48284  MISSING_DEPENDENCY=freetype
48285
48286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48287    cygwin_help $MISSING_DEPENDENCY
48288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48289    msys_help $MISSING_DEPENDENCY
48290  else
48291    PKGHANDLER_COMMAND=
48292
48293    case $PKGHANDLER in
48294      apt-get)
48295        apt_help     $MISSING_DEPENDENCY ;;
48296      yum)
48297        yum_help     $MISSING_DEPENDENCY ;;
48298      port)
48299        port_help    $MISSING_DEPENDENCY ;;
48300      pkgutil)
48301        pkgutil_help $MISSING_DEPENDENCY ;;
48302      pkgadd)
48303        pkgadd_help  $MISSING_DEPENDENCY ;;
48304    esac
48305
48306    if test "x$PKGHANDLER_COMMAND" != x; then
48307      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48308    fi
48309  fi
48310
48311        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48312      fi
48313    fi # end user specified settings
48314
48315    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48316    if test "x$FREETYPE_CFLAGS" = x; then
48317
48318  # Only process if variable expands to non-empty
48319
48320  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48322
48323  # Input might be given as Windows format, start by converting to
48324  # unix format.
48325  path="$FREETYPE_INCLUDE_PATH"
48326  new_path=`$CYGPATH -u "$path"`
48327
48328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48331  # "foo.exe" is OK but "foo" is an error.
48332  #
48333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48334  # It is also a way to make sure we got the proper file name for the real test later on.
48335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48336  if test "x$test_shortpath" = x; then
48337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48338$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48339    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48340  fi
48341
48342  # Call helper function which possibly converts this using DOS-style short mode.
48343  # If so, the updated path is stored in $new_path.
48344
48345  input_path="$new_path"
48346  # Check if we need to convert this using DOS-style short mode. If the path
48347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48348  # take no chances and rewrite it.
48349  # Note: m4 eats our [], so we need to use [ and ] instead.
48350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48351  if test "x$has_forbidden_chars" != x; then
48352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48356      # Going to short mode and back again did indeed matter. Since short mode is
48357      # case insensitive, let's make it lowercase to improve readability.
48358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48359      # Now convert it back to Unix-style (cygpath)
48360      input_path=`$CYGPATH -u "$shortmode_path"`
48361      new_path="$input_path"
48362    fi
48363  fi
48364
48365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48366  if test "x$test_cygdrive_prefix" = x; then
48367    # As a simple fix, exclude /usr/bin since it's not a real path.
48368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48370      # a path prefixed by /cygdrive for fixpath to work.
48371      new_path="$CYGWIN_ROOT_PATH$input_path"
48372    fi
48373  fi
48374
48375
48376  if test "x$path" != "x$new_path"; then
48377    FREETYPE_INCLUDE_PATH="$new_path"
48378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48379$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48380  fi
48381
48382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48383
48384  path="$FREETYPE_INCLUDE_PATH"
48385  has_colon=`$ECHO $path | $GREP ^.:`
48386  new_path="$path"
48387  if test "x$has_colon" = x; then
48388    # Not in mixed or Windows style, start by that.
48389    new_path=`cmd //c echo $path`
48390  fi
48391
48392
48393  input_path="$new_path"
48394  # Check if we need to convert this using DOS-style short mode. If the path
48395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48396  # take no chances and rewrite it.
48397  # Note: m4 eats our [], so we need to use [ and ] instead.
48398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48399  if test "x$has_forbidden_chars" != x; then
48400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48402  fi
48403
48404
48405  windows_path="$new_path"
48406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48407    unix_path=`$CYGPATH -u "$windows_path"`
48408    new_path="$unix_path"
48409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48411    new_path="$unix_path"
48412  fi
48413
48414  if test "x$path" != "x$new_path"; then
48415    FREETYPE_INCLUDE_PATH="$new_path"
48416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48417$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48418  fi
48419
48420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48422
48423    else
48424      # We're on a unix platform. Hooray! :)
48425      path="$FREETYPE_INCLUDE_PATH"
48426      has_space=`$ECHO "$path" | $GREP " "`
48427      if test "x$has_space" != x; then
48428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48429$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48431      fi
48432
48433      # Use eval to expand a potential ~
48434      eval path="$path"
48435      if test ! -f "$path" && test ! -d "$path"; then
48436        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48437      fi
48438
48439      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48440    fi
48441  fi
48442
48443      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48444        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48445      else
48446        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48447      fi
48448    fi
48449
48450    if test "x$FREETYPE_LIBS" = x; then
48451
48452  # Only process if variable expands to non-empty
48453
48454  if test "x$FREETYPE_LIB_PATH" != x; then
48455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48456
48457  # Input might be given as Windows format, start by converting to
48458  # unix format.
48459  path="$FREETYPE_LIB_PATH"
48460  new_path=`$CYGPATH -u "$path"`
48461
48462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48465  # "foo.exe" is OK but "foo" is an error.
48466  #
48467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48468  # It is also a way to make sure we got the proper file name for the real test later on.
48469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48470  if test "x$test_shortpath" = x; then
48471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48472$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48473    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48474  fi
48475
48476  # Call helper function which possibly converts this using DOS-style short mode.
48477  # If so, the updated path is stored in $new_path.
48478
48479  input_path="$new_path"
48480  # Check if we need to convert this using DOS-style short mode. If the path
48481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48482  # take no chances and rewrite it.
48483  # Note: m4 eats our [], so we need to use [ and ] instead.
48484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48485  if test "x$has_forbidden_chars" != x; then
48486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48490      # Going to short mode and back again did indeed matter. Since short mode is
48491      # case insensitive, let's make it lowercase to improve readability.
48492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48493      # Now convert it back to Unix-style (cygpath)
48494      input_path=`$CYGPATH -u "$shortmode_path"`
48495      new_path="$input_path"
48496    fi
48497  fi
48498
48499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48500  if test "x$test_cygdrive_prefix" = x; then
48501    # As a simple fix, exclude /usr/bin since it's not a real path.
48502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48504      # a path prefixed by /cygdrive for fixpath to work.
48505      new_path="$CYGWIN_ROOT_PATH$input_path"
48506    fi
48507  fi
48508
48509
48510  if test "x$path" != "x$new_path"; then
48511    FREETYPE_LIB_PATH="$new_path"
48512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48513$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48514  fi
48515
48516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48517
48518  path="$FREETYPE_LIB_PATH"
48519  has_colon=`$ECHO $path | $GREP ^.:`
48520  new_path="$path"
48521  if test "x$has_colon" = x; then
48522    # Not in mixed or Windows style, start by that.
48523    new_path=`cmd //c echo $path`
48524  fi
48525
48526
48527  input_path="$new_path"
48528  # Check if we need to convert this using DOS-style short mode. If the path
48529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48530  # take no chances and rewrite it.
48531  # Note: m4 eats our [], so we need to use [ and ] instead.
48532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48533  if test "x$has_forbidden_chars" != x; then
48534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48536  fi
48537
48538
48539  windows_path="$new_path"
48540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48541    unix_path=`$CYGPATH -u "$windows_path"`
48542    new_path="$unix_path"
48543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48545    new_path="$unix_path"
48546  fi
48547
48548  if test "x$path" != "x$new_path"; then
48549    FREETYPE_LIB_PATH="$new_path"
48550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48551$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48552  fi
48553
48554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48556
48557    else
48558      # We're on a unix platform. Hooray! :)
48559      path="$FREETYPE_LIB_PATH"
48560      has_space=`$ECHO "$path" | $GREP " "`
48561      if test "x$has_space" != x; then
48562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48563$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48565      fi
48566
48567      # Use eval to expand a potential ~
48568      eval path="$path"
48569      if test ! -f "$path" && test ! -d "$path"; then
48570        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48571      fi
48572
48573      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48574    fi
48575  fi
48576
48577      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48578        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48579      else
48580        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48581      fi
48582    fi
48583
48584    # Try to compile it
48585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48586$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48587    ac_ext=cpp
48588ac_cpp='$CXXCPP $CPPFLAGS'
48589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48592
48593    PREV_CXXCFLAGS="$CXXFLAGS"
48594    PREV_LIBS="$LIBS"
48595    PREV_CXX="$CXX"
48596    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48597    LIBS="$LIBS $FREETYPE_LIBS"
48598    CXX="$FIXPATH $CXX"
48599    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48600/* end confdefs.h.  */
48601
48602          #include<ft2build.h>
48603          #include FT_FREETYPE_H
48604          int main () {
48605            FT_Init_FreeType(NULL);
48606            return 0;
48607          }
48608
48609_ACEOF
48610if ac_fn_cxx_try_link "$LINENO"; then :
48611
48612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48613$as_echo "yes" >&6; }
48614
48615else
48616
48617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48618$as_echo "no" >&6; }
48619          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48620$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48621          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48622$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48623
48624
48625  # Print a helpful message on how to acquire the necessary build dependency.
48626  # freetype is the help tag: freetype, cups, pulse, alsa etc
48627  MISSING_DEPENDENCY=freetype
48628
48629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48630    cygwin_help $MISSING_DEPENDENCY
48631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48632    msys_help $MISSING_DEPENDENCY
48633  else
48634    PKGHANDLER_COMMAND=
48635
48636    case $PKGHANDLER in
48637      apt-get)
48638        apt_help     $MISSING_DEPENDENCY ;;
48639      yum)
48640        yum_help     $MISSING_DEPENDENCY ;;
48641      port)
48642        port_help    $MISSING_DEPENDENCY ;;
48643      pkgutil)
48644        pkgutil_help $MISSING_DEPENDENCY ;;
48645      pkgadd)
48646        pkgadd_help  $MISSING_DEPENDENCY ;;
48647    esac
48648
48649    if test "x$PKGHANDLER_COMMAND" != x; then
48650      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48651    fi
48652  fi
48653
48654
48655          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48656
48657
48658fi
48659rm -f core conftest.err conftest.$ac_objext \
48660    conftest$ac_exeext conftest.$ac_ext
48661    CXXCFLAGS="$PREV_CXXFLAGS"
48662    LIBS="$PREV_LIBS"
48663    CXX="$PREV_CXX"
48664    ac_ext=cpp
48665ac_cpp='$CXXCPP $CPPFLAGS'
48666ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48667ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48668ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48669
48670
48671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48672$as_echo_n "checking if we should bundle freetype... " >&6; }
48673    if test "x$BUNDLE_FREETYPE" = xyes; then
48674      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48675    fi
48676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48677$as_echo "$BUNDLE_FREETYPE" >&6; }
48678
48679  fi # end freetype needed
48680
48681
48682
48683
48684
48685
48686
48687  ###############################################################################
48688  #
48689  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48690  #
48691
48692# Check whether --with-alsa was given.
48693if test "${with_alsa+set}" = set; then :
48694  withval=$with_alsa;
48695fi
48696
48697
48698# Check whether --with-alsa-include was given.
48699if test "${with_alsa_include+set}" = set; then :
48700  withval=$with_alsa_include;
48701fi
48702
48703
48704# Check whether --with-alsa-lib was given.
48705if test "${with_alsa_lib+set}" = set; then :
48706  withval=$with_alsa_lib;
48707fi
48708
48709
48710  if test "x$ALSA_NOT_NEEDED" = xyes; then
48711    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48712      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48713$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48714    fi
48715    ALSA_CFLAGS=
48716    ALSA_LIBS=
48717  else
48718    ALSA_FOUND=no
48719
48720    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48721      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48722    fi
48723
48724    if test "x${with_alsa}" != x; then
48725      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48726      ALSA_CFLAGS="-I${with_alsa}/include"
48727      ALSA_FOUND=yes
48728    fi
48729    if test "x${with_alsa_include}" != x; then
48730      ALSA_CFLAGS="-I${with_alsa_include}"
48731      ALSA_FOUND=yes
48732    fi
48733    if test "x${with_alsa_lib}" != x; then
48734      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48735      ALSA_FOUND=yes
48736    fi
48737    if test "x$ALSA_FOUND" = xno; then
48738
48739
48740  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48741    # Source the builddeps file again, to make sure it uses the latest variables!
48742    . $builddepsfile
48743    # Look for a target and build machine specific resource!
48744    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48745    if test "x$resource" = x; then
48746      # Ok, lets instead look for a target specific resource
48747      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48748    fi
48749    if test "x$resource" = x; then
48750      # Ok, lets instead look for a build specific resource
48751      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48752    fi
48753    if test "x$resource" = x; then
48754      # Ok, lets instead look for a generic resource
48755      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48756      resource=${builddep_alsa}
48757    fi
48758    if test "x$resource" != x; then
48759      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48760$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48761      # If the resource in the builddeps.conf file is an existing directory,
48762      # for example /java/linux/cups
48763      if test -d ${resource}; then
48764        depdir=${resource}
48765      else
48766
48767  # alsa is for example mymodule
48768  # $resource is for example libs/general/libmymod_1_2_3.zip
48769  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48770  # $with_builddeps_dir is for example /localhome/builddeps
48771  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48772  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48773  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48774  filename=`basename $resource`
48775  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48776  filebase=${filename%%.*}
48777  extension=${filename#*.}
48778  installdir=$with_builddeps_dir/$filebase
48779  if test ! -f $installdir/$filename.unpacked; then
48780    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48781$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48782    if test ! -d $installdir; then
48783      mkdir -p $installdir
48784    fi
48785    if test ! -d $installdir; then
48786      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48787    fi
48788    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48789    touch $tmpfile
48790    if test ! -f $tmpfile; then
48791      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48792    fi
48793
48794  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48795  # $tmpfile is the local file name for the downloaded file.
48796  VALID_TOOL=no
48797  if test "x$BDEPS_FTP" = xwget; then
48798    VALID_TOOL=yes
48799    wget -O $tmpfile $with_builddeps_server/$resource
48800  fi
48801  if test "x$BDEPS_FTP" = xlftp; then
48802    VALID_TOOL=yes
48803    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48804  fi
48805  if test "x$BDEPS_FTP" = xftp; then
48806    VALID_TOOL=yes
48807    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48808    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48809    FTPUSERPWD=${FTPSERVER%%@*}
48810    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48811      FTPUSER=${userpwd%%:*}
48812      FTPPWD=${userpwd#*@}
48813      FTPSERVER=${FTPSERVER#*@}
48814    else
48815      FTPUSER=ftp
48816      FTPPWD=ftp
48817    fi
48818    # the "pass" command does not work on some
48819    # ftp clients (read ftp.exe) but if it works,
48820    # passive mode is better!
48821    ( \
48822        echo "user $FTPUSER $FTPPWD"        ; \
48823        echo "pass"                         ; \
48824        echo "bin"                          ; \
48825        echo "get $FTPPATH $tmpfile"              ; \
48826    ) | ftp -in $FTPSERVER
48827  fi
48828  if test "x$VALID_TOOL" != xyes; then
48829    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48830  fi
48831
48832    mv $tmpfile $installdir/$filename
48833    if test ! -s $installdir/$filename; then
48834      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48835    fi
48836    case "$extension" in
48837      zip)  echo "Unzipping $installdir/$filename..."
48838        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48839        ;;
48840      tar.gz) echo "Untaring $installdir/$filename..."
48841        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48842        ;;
48843      tgz) echo "Untaring $installdir/$filename..."
48844        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48845        ;;
48846      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48847        ;;
48848    esac
48849  fi
48850  if test -f $installdir/$filename.unpacked; then
48851    depdir=$installdir
48852  fi
48853
48854      fi
48855      # Source the builddeps file again, because in the previous command, the depdir
48856      # was updated to point at the current build dependency install directory.
48857      . $builddepsfile
48858      # Now extract variables from the builddeps.conf files.
48859      theroot=${builddep_alsa_ROOT}
48860      thecflags=${builddep_alsa_CFLAGS}
48861      thelibs=${builddep_alsa_LIBS}
48862      if test "x$depdir" = x; then
48863        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48864      fi
48865      ALSA=$depdir
48866      if test "x$theroot" != x; then
48867        ALSA="$theroot"
48868      fi
48869      if test "x$thecflags" != x; then
48870        ALSA_CFLAGS="$thecflags"
48871      fi
48872      if test "x$thelibs" != x; then
48873        ALSA_LIBS="$thelibs"
48874      fi
48875      ALSA_FOUND=yes
48876      else ALSA_FOUND=no
48877
48878    fi
48879    else ALSA_FOUND=no
48880
48881  fi
48882
48883    fi
48884    # Do not try pkg-config if we have a sysroot set.
48885    if test "x$SYSROOT" = x; then
48886      if test "x$ALSA_FOUND" = xno; then
48887
48888pkg_failed=no
48889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48890$as_echo_n "checking for ALSA... " >&6; }
48891
48892if test -n "$ALSA_CFLAGS"; then
48893    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48894 elif test -n "$PKG_CONFIG"; then
48895    if test -n "$PKG_CONFIG" && \
48896    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48897  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48898  ac_status=$?
48899  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48900  test $ac_status = 0; }; then
48901  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48902else
48903  pkg_failed=yes
48904fi
48905 else
48906    pkg_failed=untried
48907fi
48908if test -n "$ALSA_LIBS"; then
48909    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48910 elif test -n "$PKG_CONFIG"; then
48911    if test -n "$PKG_CONFIG" && \
48912    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48913  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48914  ac_status=$?
48915  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48916  test $ac_status = 0; }; then
48917  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48918else
48919  pkg_failed=yes
48920fi
48921 else
48922    pkg_failed=untried
48923fi
48924
48925
48926
48927if test $pkg_failed = yes; then
48928
48929if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48930        _pkg_short_errors_supported=yes
48931else
48932        _pkg_short_errors_supported=no
48933fi
48934        if test $_pkg_short_errors_supported = yes; then
48935	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48936        else
48937	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48938        fi
48939	# Put the nasty error message in config.log where it belongs
48940	echo "$ALSA_PKG_ERRORS" >&5
48941
48942	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48943$as_echo "no" >&6; }
48944                ALSA_FOUND=no
48945elif test $pkg_failed = untried; then
48946	ALSA_FOUND=no
48947else
48948	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48949	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48951$as_echo "yes" >&6; }
48952	ALSA_FOUND=yes
48953fi
48954      fi
48955    fi
48956    if test "x$ALSA_FOUND" = xno; then
48957      for ac_header in alsa/asoundlib.h
48958do :
48959  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48960if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48961  cat >>confdefs.h <<_ACEOF
48962#define HAVE_ALSA_ASOUNDLIB_H 1
48963_ACEOF
48964
48965            ALSA_FOUND=yes
48966            ALSA_CFLAGS=-Iignoreme
48967            ALSA_LIBS=-lasound
48968            DEFAULT_ALSA=yes
48969
48970else
48971  ALSA_FOUND=no
48972fi
48973
48974done
48975
48976    fi
48977    if test "x$ALSA_FOUND" = xno; then
48978
48979  # Print a helpful message on how to acquire the necessary build dependency.
48980  # alsa is the help tag: freetype, cups, pulse, alsa etc
48981  MISSING_DEPENDENCY=alsa
48982
48983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48984    cygwin_help $MISSING_DEPENDENCY
48985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48986    msys_help $MISSING_DEPENDENCY
48987  else
48988    PKGHANDLER_COMMAND=
48989
48990    case $PKGHANDLER in
48991      apt-get)
48992        apt_help     $MISSING_DEPENDENCY ;;
48993      yum)
48994        yum_help     $MISSING_DEPENDENCY ;;
48995      port)
48996        port_help    $MISSING_DEPENDENCY ;;
48997      pkgutil)
48998        pkgutil_help $MISSING_DEPENDENCY ;;
48999      pkgadd)
49000        pkgadd_help  $MISSING_DEPENDENCY ;;
49001    esac
49002
49003    if test "x$PKGHANDLER_COMMAND" != x; then
49004      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49005    fi
49006  fi
49007
49008      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49009    fi
49010  fi
49011
49012
49013
49014
49015
49016
49017  ###############################################################################
49018  #
49019  # Check for the jpeg library
49020  #
49021
49022
49023# Check whether --with-libjpeg was given.
49024if test "${with_libjpeg+set}" = set; then :
49025  withval=$with_libjpeg;
49026fi
49027
49028
49029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49030$as_echo_n "checking for which libjpeg to use... " >&6; }
49031
49032  # default is bundled
49033  DEFAULT_LIBJPEG=bundled
49034
49035  #
49036  # if user didn't specify, use DEFAULT_LIBJPEG
49037  #
49038  if test "x${with_libjpeg}" = "x"; then
49039    with_libjpeg=${DEFAULT_LIBJPEG}
49040  fi
49041
49042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49043$as_echo "${with_libjpeg}" >&6; }
49044
49045  if test "x${with_libjpeg}" = "xbundled"; then
49046    USE_EXTERNAL_LIBJPEG=false
49047  elif test "x${with_libjpeg}" = "xsystem"; then
49048    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49049if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49050
49051else
49052   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49053fi
49054
49055
49056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49057$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49058if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49059  $as_echo_n "(cached) " >&6
49060else
49061  ac_check_lib_save_LIBS=$LIBS
49062LIBS="-ljpeg  $LIBS"
49063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49064/* end confdefs.h.  */
49065
49066/* Override any GCC internal prototype to avoid an error.
49067   Use char because int might match the return type of a GCC
49068   builtin and then its argument prototype would still apply.  */
49069#ifdef __cplusplus
49070extern "C"
49071#endif
49072char jpeg_CreateDecompress ();
49073int
49074main ()
49075{
49076return jpeg_CreateDecompress ();
49077  ;
49078  return 0;
49079}
49080_ACEOF
49081if ac_fn_cxx_try_link "$LINENO"; then :
49082  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49083else
49084  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49085fi
49086rm -f core conftest.err conftest.$ac_objext \
49087    conftest$ac_exeext conftest.$ac_ext
49088LIBS=$ac_check_lib_save_LIBS
49089fi
49090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49091$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49092if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49093  cat >>confdefs.h <<_ACEOF
49094#define HAVE_LIBJPEG 1
49095_ACEOF
49096
49097  LIBS="-ljpeg $LIBS"
49098
49099else
49100   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49101fi
49102
49103
49104    USE_EXTERNAL_LIBJPEG=true
49105  else
49106    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49107  fi
49108
49109
49110
49111  ###############################################################################
49112  #
49113  # Check for the gif library
49114  #
49115
49116
49117# Check whether --with-giflib was given.
49118if test "${with_giflib+set}" = set; then :
49119  withval=$with_giflib;
49120fi
49121
49122
49123
49124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49125$as_echo_n "checking for which giflib to use... " >&6; }
49126
49127  # default is bundled
49128  DEFAULT_GIFLIB=bundled
49129
49130  #
49131  # if user didn't specify, use DEFAULT_GIFLIB
49132  #
49133  if test "x${with_giflib}" = "x"; then
49134    with_giflib=${DEFAULT_GIFLIB}
49135  fi
49136
49137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49138$as_echo "${with_giflib}" >&6; }
49139
49140  if test "x${with_giflib}" = "xbundled"; then
49141    USE_EXTERNAL_LIBGIF=false
49142  elif test "x${with_giflib}" = "xsystem"; then
49143    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49144if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49145
49146else
49147   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49148fi
49149
49150
49151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49152$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49153if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49154  $as_echo_n "(cached) " >&6
49155else
49156  ac_check_lib_save_LIBS=$LIBS
49157LIBS="-lgif  $LIBS"
49158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49159/* end confdefs.h.  */
49160
49161/* Override any GCC internal prototype to avoid an error.
49162   Use char because int might match the return type of a GCC
49163   builtin and then its argument prototype would still apply.  */
49164#ifdef __cplusplus
49165extern "C"
49166#endif
49167char DGifGetCode ();
49168int
49169main ()
49170{
49171return DGifGetCode ();
49172  ;
49173  return 0;
49174}
49175_ACEOF
49176if ac_fn_cxx_try_link "$LINENO"; then :
49177  ac_cv_lib_gif_DGifGetCode=yes
49178else
49179  ac_cv_lib_gif_DGifGetCode=no
49180fi
49181rm -f core conftest.err conftest.$ac_objext \
49182    conftest$ac_exeext conftest.$ac_ext
49183LIBS=$ac_check_lib_save_LIBS
49184fi
49185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49186$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49187if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49188  cat >>confdefs.h <<_ACEOF
49189#define HAVE_LIBGIF 1
49190_ACEOF
49191
49192  LIBS="-lgif $LIBS"
49193
49194else
49195   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49196fi
49197
49198
49199    USE_EXTERNAL_LIBGIF=true
49200  else
49201    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49202  fi
49203
49204
49205  ###############################################################################
49206  #
49207  # Check for the lcms2 library
49208  #
49209
49210
49211# Check whether --with-lcms was given.
49212if test "${with_lcms+set}" = set; then :
49213  withval=$with_lcms;
49214fi
49215
49216
49217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49218$as_echo_n "checking for which lcms to use... " >&6; }
49219
49220  DEFAULT_LCMS=bundled
49221
49222  #
49223  # If user didn't specify, use DEFAULT_LCMS
49224  #
49225  if test "x${with_lcms}" = "x"; then
49226      with_lcms=${DEFAULT_LCMS}
49227  fi
49228
49229  if test "x${with_lcms}" = "xbundled"; then
49230    USE_EXTERNAL_LCMS=false
49231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49232$as_echo "bundled" >&6; }
49233  elif test "x${with_lcms}" = "xsystem"; then
49234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49235$as_echo "system" >&6; }
49236
49237pkg_failed=no
49238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49239$as_echo_n "checking for LCMS... " >&6; }
49240
49241if test -n "$LCMS_CFLAGS"; then
49242    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49243 elif test -n "$PKG_CONFIG"; then
49244    if test -n "$PKG_CONFIG" && \
49245    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49246  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49247  ac_status=$?
49248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49249  test $ac_status = 0; }; then
49250  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49251else
49252  pkg_failed=yes
49253fi
49254 else
49255    pkg_failed=untried
49256fi
49257if test -n "$LCMS_LIBS"; then
49258    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49259 elif test -n "$PKG_CONFIG"; then
49260    if test -n "$PKG_CONFIG" && \
49261    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49262  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49263  ac_status=$?
49264  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49265  test $ac_status = 0; }; then
49266  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49267else
49268  pkg_failed=yes
49269fi
49270 else
49271    pkg_failed=untried
49272fi
49273
49274
49275
49276if test $pkg_failed = yes; then
49277
49278if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49279        _pkg_short_errors_supported=yes
49280else
49281        _pkg_short_errors_supported=no
49282fi
49283        if test $_pkg_short_errors_supported = yes; then
49284	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49285        else
49286	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49287        fi
49288	# Put the nasty error message in config.log where it belongs
49289	echo "$LCMS_PKG_ERRORS" >&5
49290
49291	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49292$as_echo "no" >&6; }
49293                LCMS_FOUND=no
49294elif test $pkg_failed = untried; then
49295	LCMS_FOUND=no
49296else
49297	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49298	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49300$as_echo "yes" >&6; }
49301	LCMS_FOUND=yes
49302fi
49303    if test "x${LCMS_FOUND}" = "xyes"; then
49304      USE_EXTERNAL_LCMS=true
49305    else
49306      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49307    fi
49308  else
49309    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49310  fi
49311
49312
49313
49314  ###############################################################################
49315  #
49316  # Check for the png library
49317  #
49318
49319
49320# Check whether --with-libpng was given.
49321if test "${with_libpng+set}" = set; then :
49322  withval=$with_libpng;
49323fi
49324
49325
49326
49327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49328$as_echo_n "checking for which libpng to use... " >&6; }
49329
49330  # default is bundled
49331  DEFAULT_LIBPNG=bundled
49332
49333  #
49334  # if user didn't specify, use DEFAULT_LIBPNG
49335  #
49336  if test "x${with_libpng}" = "x"; then
49337      with_libpng=${DEFAULT_LIBPNG}
49338  fi
49339
49340  if test "x${with_libpng}" = "xbundled"; then
49341      USE_EXTERNAL_LIBPNG=false
49342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49343$as_echo "bundled" >&6; }
49344  elif test "x${with_libpng}" = "xsystem"; then
49345
49346pkg_failed=no
49347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49348$as_echo_n "checking for PNG... " >&6; }
49349
49350if test -n "$PNG_CFLAGS"; then
49351    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49352 elif test -n "$PKG_CONFIG"; then
49353    if test -n "$PKG_CONFIG" && \
49354    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49355  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49356  ac_status=$?
49357  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49358  test $ac_status = 0; }; then
49359  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49360else
49361  pkg_failed=yes
49362fi
49363 else
49364    pkg_failed=untried
49365fi
49366if test -n "$PNG_LIBS"; then
49367    pkg_cv_PNG_LIBS="$PNG_LIBS"
49368 elif test -n "$PKG_CONFIG"; then
49369    if test -n "$PKG_CONFIG" && \
49370    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49371  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49372  ac_status=$?
49373  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49374  test $ac_status = 0; }; then
49375  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49376else
49377  pkg_failed=yes
49378fi
49379 else
49380    pkg_failed=untried
49381fi
49382
49383
49384
49385if test $pkg_failed = yes; then
49386
49387if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49388        _pkg_short_errors_supported=yes
49389else
49390        _pkg_short_errors_supported=no
49391fi
49392        if test $_pkg_short_errors_supported = yes; then
49393	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49394        else
49395	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49396        fi
49397	# Put the nasty error message in config.log where it belongs
49398	echo "$PNG_PKG_ERRORS" >&5
49399
49400	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49401$as_echo "no" >&6; }
49402                 LIBPNG_FOUND=no
49403elif test $pkg_failed = untried; then
49404	 LIBPNG_FOUND=no
49405else
49406	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49407	PNG_LIBS=$pkg_cv_PNG_LIBS
49408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49409$as_echo "yes" >&6; }
49410	 LIBPNG_FOUND=yes
49411fi
49412      if test "x${LIBPNG_FOUND}" = "xyes"; then
49413          USE_EXTERNAL_LIBPNG=true
49414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49415$as_echo "system" >&6; }
49416      else
49417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49418$as_echo "system not found" >&6; }
49419          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49420      fi
49421  else
49422      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49423  fi
49424
49425
49426  ###############################################################################
49427  #
49428  # Check for the zlib library
49429  #
49430
49431
49432# Check whether --with-zlib was given.
49433if test "${with_zlib+set}" = set; then :
49434  withval=$with_zlib;
49435fi
49436
49437
49438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49439$as_echo_n "checking for compress in -lz... " >&6; }
49440if ${ac_cv_lib_z_compress+:} false; then :
49441  $as_echo_n "(cached) " >&6
49442else
49443  ac_check_lib_save_LIBS=$LIBS
49444LIBS="-lz  $LIBS"
49445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49446/* end confdefs.h.  */
49447
49448/* Override any GCC internal prototype to avoid an error.
49449   Use char because int might match the return type of a GCC
49450   builtin and then its argument prototype would still apply.  */
49451#ifdef __cplusplus
49452extern "C"
49453#endif
49454char compress ();
49455int
49456main ()
49457{
49458return compress ();
49459  ;
49460  return 0;
49461}
49462_ACEOF
49463if ac_fn_cxx_try_link "$LINENO"; then :
49464  ac_cv_lib_z_compress=yes
49465else
49466  ac_cv_lib_z_compress=no
49467fi
49468rm -f core conftest.err conftest.$ac_objext \
49469    conftest$ac_exeext conftest.$ac_ext
49470LIBS=$ac_check_lib_save_LIBS
49471fi
49472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49473$as_echo "$ac_cv_lib_z_compress" >&6; }
49474if test "x$ac_cv_lib_z_compress" = xyes; then :
49475   ZLIB_FOUND=yes
49476else
49477   ZLIB_FOUND=no
49478fi
49479
49480
49481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49482$as_echo_n "checking for which zlib to use... " >&6; }
49483
49484  DEFAULT_ZLIB=bundled
49485  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49486    #
49487    # On macosx default is system...on others default is
49488    #
49489    DEFAULT_ZLIB=system
49490  fi
49491
49492  if test "x${ZLIB_FOUND}" != "xyes"; then
49493    #
49494    # If we don't find any system...set default to bundled
49495    #
49496    DEFAULT_ZLIB=bundled
49497  fi
49498
49499  #
49500  # If user didn't specify, use DEFAULT_ZLIB
49501  #
49502  if test "x${with_zlib}" = "x"; then
49503    with_zlib=${DEFAULT_ZLIB}
49504  fi
49505
49506  if test "x${with_zlib}" = "xbundled"; then
49507    USE_EXTERNAL_LIBZ=false
49508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49509$as_echo "bundled" >&6; }
49510  elif test "x${with_zlib}" = "xsystem"; then
49511    if test "x${ZLIB_FOUND}" = "xyes"; then
49512      USE_EXTERNAL_LIBZ=true
49513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49514$as_echo "system" >&6; }
49515    else
49516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49517$as_echo "system not found" >&6; }
49518      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49519    fi
49520  else
49521    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49522  fi
49523
49524
49525
49526  ###############################################################################
49527  LIBZIP_CAN_USE_MMAP=true
49528
49529
49530
49531  ###############################################################################
49532  #
49533  # Check if altzone exists in time.h
49534  #
49535
49536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49537/* end confdefs.h.  */
49538#include <time.h>
49539int
49540main ()
49541{
49542return (int)altzone;
49543  ;
49544  return 0;
49545}
49546_ACEOF
49547if ac_fn_cxx_try_link "$LINENO"; then :
49548  has_altzone=yes
49549else
49550  has_altzone=no
49551fi
49552rm -f core conftest.err conftest.$ac_objext \
49553    conftest$ac_exeext conftest.$ac_ext
49554  if test "x$has_altzone" = xyes; then
49555
49556$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49557
49558  fi
49559
49560  ###############################################################################
49561  #
49562  # Check the maths library
49563  #
49564
49565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49566$as_echo_n "checking for cos in -lm... " >&6; }
49567if ${ac_cv_lib_m_cos+:} false; then :
49568  $as_echo_n "(cached) " >&6
49569else
49570  ac_check_lib_save_LIBS=$LIBS
49571LIBS="-lm  $LIBS"
49572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49573/* end confdefs.h.  */
49574
49575/* Override any GCC internal prototype to avoid an error.
49576   Use char because int might match the return type of a GCC
49577   builtin and then its argument prototype would still apply.  */
49578#ifdef __cplusplus
49579extern "C"
49580#endif
49581char cos ();
49582int
49583main ()
49584{
49585return cos ();
49586  ;
49587  return 0;
49588}
49589_ACEOF
49590if ac_fn_cxx_try_link "$LINENO"; then :
49591  ac_cv_lib_m_cos=yes
49592else
49593  ac_cv_lib_m_cos=no
49594fi
49595rm -f core conftest.err conftest.$ac_objext \
49596    conftest$ac_exeext conftest.$ac_ext
49597LIBS=$ac_check_lib_save_LIBS
49598fi
49599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49600$as_echo "$ac_cv_lib_m_cos" >&6; }
49601if test "x$ac_cv_lib_m_cos" = xyes; then :
49602  cat >>confdefs.h <<_ACEOF
49603#define HAVE_LIBM 1
49604_ACEOF
49605
49606  LIBS="-lm $LIBS"
49607
49608else
49609
49610        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49611$as_echo "$as_me: Maths library was not found" >&6;}
49612
49613
49614fi
49615
49616
49617
49618  ###############################################################################
49619  #
49620  # Check for libdl.so
49621
49622  save_LIBS="$LIBS"
49623  LIBS=""
49624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49625$as_echo_n "checking for dlopen in -ldl... " >&6; }
49626if ${ac_cv_lib_dl_dlopen+:} false; then :
49627  $as_echo_n "(cached) " >&6
49628else
49629  ac_check_lib_save_LIBS=$LIBS
49630LIBS="-ldl  $LIBS"
49631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49632/* end confdefs.h.  */
49633
49634/* Override any GCC internal prototype to avoid an error.
49635   Use char because int might match the return type of a GCC
49636   builtin and then its argument prototype would still apply.  */
49637#ifdef __cplusplus
49638extern "C"
49639#endif
49640char dlopen ();
49641int
49642main ()
49643{
49644return dlopen ();
49645  ;
49646  return 0;
49647}
49648_ACEOF
49649if ac_fn_cxx_try_link "$LINENO"; then :
49650  ac_cv_lib_dl_dlopen=yes
49651else
49652  ac_cv_lib_dl_dlopen=no
49653fi
49654rm -f core conftest.err conftest.$ac_objext \
49655    conftest$ac_exeext conftest.$ac_ext
49656LIBS=$ac_check_lib_save_LIBS
49657fi
49658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49659$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49660if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49661  cat >>confdefs.h <<_ACEOF
49662#define HAVE_LIBDL 1
49663_ACEOF
49664
49665  LIBS="-ldl $LIBS"
49666
49667fi
49668
49669  LIBDL="$LIBS"
49670
49671  LIBS="$save_LIBS"
49672
49673
49674  ###############################################################################
49675  #
49676  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49677  # dynamic build is configured on command line.
49678  #
49679
49680# Check whether --with-stdc++lib was given.
49681if test "${with_stdc__lib+set}" = set; then :
49682  withval=$with_stdc__lib;
49683        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49684                && test "x$with_stdc__lib" != xdefault; then
49685          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49686        fi
49687
49688else
49689  with_stdc__lib=default
49690
49691fi
49692
49693
49694  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49695    # Test if -lstdc++ works.
49696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49697$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49698    ac_ext=cpp
49699ac_cpp='$CXXCPP $CPPFLAGS'
49700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49703
49704    OLD_CXXFLAGS="$CXXFLAGS"
49705    CXXFLAGS="$CXXFLAGS -lstdc++"
49706    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49707/* end confdefs.h.  */
49708
49709int
49710main ()
49711{
49712return 0;
49713  ;
49714  return 0;
49715}
49716_ACEOF
49717if ac_fn_cxx_try_link "$LINENO"; then :
49718  has_dynamic_libstdcxx=yes
49719else
49720  has_dynamic_libstdcxx=no
49721fi
49722rm -f core conftest.err conftest.$ac_objext \
49723    conftest$ac_exeext conftest.$ac_ext
49724    CXXFLAGS="$OLD_CXXFLAGS"
49725    ac_ext=cpp
49726ac_cpp='$CXXCPP $CPPFLAGS'
49727ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49728ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49729ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49730
49731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49732$as_echo "$has_dynamic_libstdcxx" >&6; }
49733
49734    # Test if stdc++ can be linked statically.
49735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49736$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49737    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49738    ac_ext=cpp
49739ac_cpp='$CXXCPP $CPPFLAGS'
49740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49743
49744    OLD_LIBS="$LIBS"
49745    OLD_CXX="$CXX"
49746    LIBS="$STATIC_STDCXX_FLAGS"
49747    CXX="$CC"
49748    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49749/* end confdefs.h.  */
49750
49751int
49752main ()
49753{
49754return 0;
49755  ;
49756  return 0;
49757}
49758_ACEOF
49759if ac_fn_cxx_try_link "$LINENO"; then :
49760  has_static_libstdcxx=yes
49761else
49762  has_static_libstdcxx=no
49763fi
49764rm -f core conftest.err conftest.$ac_objext \
49765    conftest$ac_exeext conftest.$ac_ext
49766    LIBS="$OLD_LIBS"
49767    CXX="$OLD_CXX"
49768    ac_ext=cpp
49769ac_cpp='$CXXCPP $CPPFLAGS'
49770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49773
49774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49775$as_echo "$has_static_libstdcxx" >&6; }
49776
49777    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49778      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49779    fi
49780
49781    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49782      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49783    fi
49784
49785    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49786      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49787    fi
49788
49789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49790$as_echo_n "checking how to link with libstdc++... " >&6; }
49791    # If dynamic was requested, it's available since it would fail above otherwise.
49792    # If dynamic wasn't requested, go with static unless it isn't available.
49793    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49794      LIBCXX="$LIBCXX -lstdc++"
49795      LDCXX="$CXX"
49796      STATIC_CXX_SETTING="STATIC_CXX=false"
49797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49798$as_echo "dynamic" >&6; }
49799    else
49800      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49801      LDCXX="$CC"
49802      STATIC_CXX_SETTING="STATIC_CXX=true"
49803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49804$as_echo "static" >&6; }
49805    fi
49806  fi
49807
49808
49809  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49810    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49811
49812pkg_failed=no
49813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49814$as_echo_n "checking for LIBFFI... " >&6; }
49815
49816if test -n "$LIBFFI_CFLAGS"; then
49817    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49818 elif test -n "$PKG_CONFIG"; then
49819    if test -n "$PKG_CONFIG" && \
49820    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49821  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49822  ac_status=$?
49823  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49824  test $ac_status = 0; }; then
49825  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49826else
49827  pkg_failed=yes
49828fi
49829 else
49830    pkg_failed=untried
49831fi
49832if test -n "$LIBFFI_LIBS"; then
49833    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49834 elif test -n "$PKG_CONFIG"; then
49835    if test -n "$PKG_CONFIG" && \
49836    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49837  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49838  ac_status=$?
49839  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49840  test $ac_status = 0; }; then
49841  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49842else
49843  pkg_failed=yes
49844fi
49845 else
49846    pkg_failed=untried
49847fi
49848
49849
49850
49851if test $pkg_failed = yes; then
49852
49853if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49854        _pkg_short_errors_supported=yes
49855else
49856        _pkg_short_errors_supported=no
49857fi
49858        if test $_pkg_short_errors_supported = yes; then
49859	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49860        else
49861	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49862        fi
49863	# Put the nasty error message in config.log where it belongs
49864	echo "$LIBFFI_PKG_ERRORS" >&5
49865
49866	as_fn_error $? "Package requirements (libffi) were not met:
49867
49868$LIBFFI_PKG_ERRORS
49869
49870Consider adjusting the PKG_CONFIG_PATH environment variable if you
49871installed software in a non-standard prefix.
49872
49873Alternatively, you may set the environment variables LIBFFI_CFLAGS
49874and LIBFFI_LIBS to avoid the need to call pkg-config.
49875See the pkg-config man page for more details.
49876" "$LINENO" 5
49877elif test $pkg_failed = untried; then
49878	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49880as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49881is in your PATH or set the PKG_CONFIG environment variable to the full
49882path to pkg-config.
49883
49884Alternatively, you may set the environment variables LIBFFI_CFLAGS
49885and LIBFFI_LIBS to avoid the need to call pkg-config.
49886See the pkg-config man page for more details.
49887
49888To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49889See \`config.log' for more details" "$LINENO" 5; }
49890else
49891	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49892	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49894$as_echo "yes" >&6; }
49895	:
49896fi
49897
49898  fi
49899
49900  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49901    # Extract the first word of "llvm-config", so it can be a program name with args.
49902set dummy llvm-config; ac_word=$2
49903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49904$as_echo_n "checking for $ac_word... " >&6; }
49905if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49906  $as_echo_n "(cached) " >&6
49907else
49908  if test -n "$LLVM_CONFIG"; then
49909  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49910else
49911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49912for as_dir in $PATH
49913do
49914  IFS=$as_save_IFS
49915  test -z "$as_dir" && as_dir=.
49916    for ac_exec_ext in '' $ac_executable_extensions; do
49917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49918    ac_cv_prog_LLVM_CONFIG="llvm-config"
49919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49920    break 2
49921  fi
49922done
49923  done
49924IFS=$as_save_IFS
49925
49926fi
49927fi
49928LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49929if test -n "$LLVM_CONFIG"; then
49930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49931$as_echo "$LLVM_CONFIG" >&6; }
49932else
49933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49934$as_echo "no" >&6; }
49935fi
49936
49937
49938
49939    if test "x$LLVM_CONFIG" != xllvm-config; then
49940      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49941    fi
49942
49943    llvm_components="jit mcjit engine nativecodegen native"
49944    unset LLVM_CFLAGS
49945    for flag in $("$LLVM_CONFIG" --cxxflags); do
49946      if echo "${flag}" | grep -q '^-[ID]'; then
49947        if test "${flag}" != "-D_DEBUG" ; then
49948          if test "${LLVM_CFLAGS}" != "" ; then
49949            LLVM_CFLAGS="${LLVM_CFLAGS} "
49950          fi
49951          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49952        fi
49953      fi
49954    done
49955    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49956    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49957
49958    unset LLVM_LDFLAGS
49959    for flag in $("${LLVM_CONFIG}" --ldflags); do
49960      if echo "${flag}" | grep -q '^-L'; then
49961        if test "${LLVM_LDFLAGS}" != ""; then
49962          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49963        fi
49964        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49965      fi
49966    done
49967
49968    unset LLVM_LIBS
49969    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49970      if echo "${flag}" | grep -q '^-l'; then
49971        if test "${LLVM_LIBS}" != ""; then
49972          LLVM_LIBS="${LLVM_LIBS} "
49973        fi
49974        LLVM_LIBS="${LLVM_LIBS}${flag}"
49975      fi
49976    done
49977
49978
49979
49980
49981  fi
49982
49983  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49984  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49985    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49986  fi
49987
49988  # TODO better (platform agnostic) test
49989  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49990    LIBCXX="-lstdc++"
49991  fi
49992
49993
49994
49995
49996  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49997
49998
49999# Check whether --with-msvcr-dll was given.
50000if test "${with_msvcr_dll+set}" = set; then :
50001  withval=$with_msvcr_dll;
50002fi
50003
50004
50005  if test "x$with_msvcr_dll" != x; then
50006    # If given explicitely by user, do not probe. If not present, fail directly.
50007
50008  DLL_NAME="$MSVCR_NAME"
50009  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50010  METHOD="--with-msvcr-dll"
50011  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50012    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50013$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50014
50015    # Need to check if the found msvcr is correct architecture
50016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50017$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50018    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50020      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50021      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50022      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50023        CORRECT_MSVCR_ARCH="PE32 executable"
50024      else
50025        CORRECT_MSVCR_ARCH="PE32+ executable"
50026      fi
50027    else
50028      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50029        CORRECT_MSVCR_ARCH=386
50030      else
50031        CORRECT_MSVCR_ARCH=x86-64
50032      fi
50033    fi
50034    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50036$as_echo "ok" >&6; }
50037      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50038
50039  # Only process if variable expands to non-empty
50040
50041  if test "x$MSVC_DLL" != x; then
50042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50043
50044  # Input might be given as Windows format, start by converting to
50045  # unix format.
50046  path="$MSVC_DLL"
50047  new_path=`$CYGPATH -u "$path"`
50048
50049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50052  # "foo.exe" is OK but "foo" is an error.
50053  #
50054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50055  # It is also a way to make sure we got the proper file name for the real test later on.
50056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50057  if test "x$test_shortpath" = x; then
50058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50059$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50060    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50061  fi
50062
50063  # Call helper function which possibly converts this using DOS-style short mode.
50064  # If so, the updated path is stored in $new_path.
50065
50066  input_path="$new_path"
50067  # Check if we need to convert this using DOS-style short mode. If the path
50068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50069  # take no chances and rewrite it.
50070  # Note: m4 eats our [], so we need to use [ and ] instead.
50071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50072  if test "x$has_forbidden_chars" != x; then
50073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50077      # Going to short mode and back again did indeed matter. Since short mode is
50078      # case insensitive, let's make it lowercase to improve readability.
50079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50080      # Now convert it back to Unix-style (cygpath)
50081      input_path=`$CYGPATH -u "$shortmode_path"`
50082      new_path="$input_path"
50083    fi
50084  fi
50085
50086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50087  if test "x$test_cygdrive_prefix" = x; then
50088    # As a simple fix, exclude /usr/bin since it's not a real path.
50089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50091      # a path prefixed by /cygdrive for fixpath to work.
50092      new_path="$CYGWIN_ROOT_PATH$input_path"
50093    fi
50094  fi
50095
50096
50097  if test "x$path" != "x$new_path"; then
50098    MSVC_DLL="$new_path"
50099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50100$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50101  fi
50102
50103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50104
50105  path="$MSVC_DLL"
50106  has_colon=`$ECHO $path | $GREP ^.:`
50107  new_path="$path"
50108  if test "x$has_colon" = x; then
50109    # Not in mixed or Windows style, start by that.
50110    new_path=`cmd //c echo $path`
50111  fi
50112
50113
50114  input_path="$new_path"
50115  # Check if we need to convert this using DOS-style short mode. If the path
50116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50117  # take no chances and rewrite it.
50118  # Note: m4 eats our [], so we need to use [ and ] instead.
50119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50120  if test "x$has_forbidden_chars" != x; then
50121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50123  fi
50124
50125
50126  windows_path="$new_path"
50127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50128    unix_path=`$CYGPATH -u "$windows_path"`
50129    new_path="$unix_path"
50130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50132    new_path="$unix_path"
50133  fi
50134
50135  if test "x$path" != "x$new_path"; then
50136    MSVC_DLL="$new_path"
50137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50138$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50139  fi
50140
50141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50143
50144    else
50145      # We're on a unix platform. Hooray! :)
50146      path="$MSVC_DLL"
50147      has_space=`$ECHO "$path" | $GREP " "`
50148      if test "x$has_space" != x; then
50149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50150$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50152      fi
50153
50154      # Use eval to expand a potential ~
50155      eval path="$path"
50156      if test ! -f "$path" && test ! -d "$path"; then
50157        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50158      fi
50159
50160      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50161    fi
50162  fi
50163
50164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50165$as_echo_n "checking for $DLL_NAME... " >&6; }
50166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50167$as_echo "$MSVC_DLL" >&6; }
50168    else
50169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50170$as_echo "incorrect, ignoring" >&6; }
50171      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50172$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50173    fi
50174  fi
50175
50176    if test "x$MSVC_DLL" = x; then
50177      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50178    fi
50179    MSVCR_DLL="$MSVC_DLL"
50180  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50181
50182  DLL_NAME="$MSVCR_NAME"
50183  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50184  METHOD="devkit"
50185  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50186    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50187$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50188
50189    # Need to check if the found msvcr is correct architecture
50190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50191$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50192    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50194      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50195      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50196      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50197        CORRECT_MSVCR_ARCH="PE32 executable"
50198      else
50199        CORRECT_MSVCR_ARCH="PE32+ executable"
50200      fi
50201    else
50202      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50203        CORRECT_MSVCR_ARCH=386
50204      else
50205        CORRECT_MSVCR_ARCH=x86-64
50206      fi
50207    fi
50208    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50210$as_echo "ok" >&6; }
50211      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50212
50213  # Only process if variable expands to non-empty
50214
50215  if test "x$MSVC_DLL" != x; then
50216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50217
50218  # Input might be given as Windows format, start by converting to
50219  # unix format.
50220  path="$MSVC_DLL"
50221  new_path=`$CYGPATH -u "$path"`
50222
50223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50226  # "foo.exe" is OK but "foo" is an error.
50227  #
50228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50229  # It is also a way to make sure we got the proper file name for the real test later on.
50230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50231  if test "x$test_shortpath" = x; then
50232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50233$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50234    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50235  fi
50236
50237  # Call helper function which possibly converts this using DOS-style short mode.
50238  # If so, the updated path is stored in $new_path.
50239
50240  input_path="$new_path"
50241  # Check if we need to convert this using DOS-style short mode. If the path
50242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50243  # take no chances and rewrite it.
50244  # Note: m4 eats our [], so we need to use [ and ] instead.
50245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50246  if test "x$has_forbidden_chars" != x; then
50247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50251      # Going to short mode and back again did indeed matter. Since short mode is
50252      # case insensitive, let's make it lowercase to improve readability.
50253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50254      # Now convert it back to Unix-style (cygpath)
50255      input_path=`$CYGPATH -u "$shortmode_path"`
50256      new_path="$input_path"
50257    fi
50258  fi
50259
50260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50261  if test "x$test_cygdrive_prefix" = x; then
50262    # As a simple fix, exclude /usr/bin since it's not a real path.
50263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50265      # a path prefixed by /cygdrive for fixpath to work.
50266      new_path="$CYGWIN_ROOT_PATH$input_path"
50267    fi
50268  fi
50269
50270
50271  if test "x$path" != "x$new_path"; then
50272    MSVC_DLL="$new_path"
50273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50274$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50275  fi
50276
50277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50278
50279  path="$MSVC_DLL"
50280  has_colon=`$ECHO $path | $GREP ^.:`
50281  new_path="$path"
50282  if test "x$has_colon" = x; then
50283    # Not in mixed or Windows style, start by that.
50284    new_path=`cmd //c echo $path`
50285  fi
50286
50287
50288  input_path="$new_path"
50289  # Check if we need to convert this using DOS-style short mode. If the path
50290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50291  # take no chances and rewrite it.
50292  # Note: m4 eats our [], so we need to use [ and ] instead.
50293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50294  if test "x$has_forbidden_chars" != x; then
50295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50297  fi
50298
50299
50300  windows_path="$new_path"
50301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50302    unix_path=`$CYGPATH -u "$windows_path"`
50303    new_path="$unix_path"
50304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50306    new_path="$unix_path"
50307  fi
50308
50309  if test "x$path" != "x$new_path"; then
50310    MSVC_DLL="$new_path"
50311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50312$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50313  fi
50314
50315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50317
50318    else
50319      # We're on a unix platform. Hooray! :)
50320      path="$MSVC_DLL"
50321      has_space=`$ECHO "$path" | $GREP " "`
50322      if test "x$has_space" != x; then
50323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50324$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50326      fi
50327
50328      # Use eval to expand a potential ~
50329      eval path="$path"
50330      if test ! -f "$path" && test ! -d "$path"; then
50331        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50332      fi
50333
50334      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50335    fi
50336  fi
50337
50338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50339$as_echo_n "checking for $DLL_NAME... " >&6; }
50340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50341$as_echo "$MSVC_DLL" >&6; }
50342    else
50343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50344$as_echo "incorrect, ignoring" >&6; }
50345      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50346$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50347    fi
50348  fi
50349
50350    if test "x$MSVC_DLL" = x; then
50351      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50352    fi
50353    MSVCR_DLL="$MSVC_DLL"
50354  else
50355
50356  DLL_NAME="${MSVCR_NAME}"
50357  MSVC_DLL=
50358
50359  if test "x$MSVC_DLL" = x; then
50360    # Probe: Using well-known location from Visual Studio 10.0
50361    if test "x$VCINSTALLDIR" != x; then
50362      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50363
50364  windows_path="$CYGWIN_VC_INSTALL_DIR"
50365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50366    unix_path=`$CYGPATH -u "$windows_path"`
50367    CYGWIN_VC_INSTALL_DIR="$unix_path"
50368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50370    CYGWIN_VC_INSTALL_DIR="$unix_path"
50371  fi
50372
50373      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50374        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50375      else
50376        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50377      fi
50378      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50379
50380  DLL_NAME="$DLL_NAME"
50381  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50382  METHOD="well-known location in VCINSTALLDIR"
50383  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50384    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50385$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50386
50387    # Need to check if the found msvcr is correct architecture
50388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50389$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50390    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50392      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50393      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50394      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50395        CORRECT_MSVCR_ARCH="PE32 executable"
50396      else
50397        CORRECT_MSVCR_ARCH="PE32+ executable"
50398      fi
50399    else
50400      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50401        CORRECT_MSVCR_ARCH=386
50402      else
50403        CORRECT_MSVCR_ARCH=x86-64
50404      fi
50405    fi
50406    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50408$as_echo "ok" >&6; }
50409      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50410
50411  # Only process if variable expands to non-empty
50412
50413  if test "x$MSVC_DLL" != x; then
50414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50415
50416  # Input might be given as Windows format, start by converting to
50417  # unix format.
50418  path="$MSVC_DLL"
50419  new_path=`$CYGPATH -u "$path"`
50420
50421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50424  # "foo.exe" is OK but "foo" is an error.
50425  #
50426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50427  # It is also a way to make sure we got the proper file name for the real test later on.
50428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50429  if test "x$test_shortpath" = x; then
50430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50431$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50432    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50433  fi
50434
50435  # Call helper function which possibly converts this using DOS-style short mode.
50436  # If so, the updated path is stored in $new_path.
50437
50438  input_path="$new_path"
50439  # Check if we need to convert this using DOS-style short mode. If the path
50440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50441  # take no chances and rewrite it.
50442  # Note: m4 eats our [], so we need to use [ and ] instead.
50443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50444  if test "x$has_forbidden_chars" != x; then
50445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50449      # Going to short mode and back again did indeed matter. Since short mode is
50450      # case insensitive, let's make it lowercase to improve readability.
50451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50452      # Now convert it back to Unix-style (cygpath)
50453      input_path=`$CYGPATH -u "$shortmode_path"`
50454      new_path="$input_path"
50455    fi
50456  fi
50457
50458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50459  if test "x$test_cygdrive_prefix" = x; then
50460    # As a simple fix, exclude /usr/bin since it's not a real path.
50461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50463      # a path prefixed by /cygdrive for fixpath to work.
50464      new_path="$CYGWIN_ROOT_PATH$input_path"
50465    fi
50466  fi
50467
50468
50469  if test "x$path" != "x$new_path"; then
50470    MSVC_DLL="$new_path"
50471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50472$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50473  fi
50474
50475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50476
50477  path="$MSVC_DLL"
50478  has_colon=`$ECHO $path | $GREP ^.:`
50479  new_path="$path"
50480  if test "x$has_colon" = x; then
50481    # Not in mixed or Windows style, start by that.
50482    new_path=`cmd //c echo $path`
50483  fi
50484
50485
50486  input_path="$new_path"
50487  # Check if we need to convert this using DOS-style short mode. If the path
50488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50489  # take no chances and rewrite it.
50490  # Note: m4 eats our [], so we need to use [ and ] instead.
50491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50492  if test "x$has_forbidden_chars" != x; then
50493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50495  fi
50496
50497
50498  windows_path="$new_path"
50499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50500    unix_path=`$CYGPATH -u "$windows_path"`
50501    new_path="$unix_path"
50502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50504    new_path="$unix_path"
50505  fi
50506
50507  if test "x$path" != "x$new_path"; then
50508    MSVC_DLL="$new_path"
50509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50510$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50511  fi
50512
50513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50515
50516    else
50517      # We're on a unix platform. Hooray! :)
50518      path="$MSVC_DLL"
50519      has_space=`$ECHO "$path" | $GREP " "`
50520      if test "x$has_space" != x; then
50521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50522$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50524      fi
50525
50526      # Use eval to expand a potential ~
50527      eval path="$path"
50528      if test ! -f "$path" && test ! -d "$path"; then
50529        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50530      fi
50531
50532      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50533    fi
50534  fi
50535
50536      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50537$as_echo_n "checking for $DLL_NAME... " >&6; }
50538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50539$as_echo "$MSVC_DLL" >&6; }
50540    else
50541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50542$as_echo "incorrect, ignoring" >&6; }
50543      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50544$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50545    fi
50546  fi
50547
50548    fi
50549  fi
50550
50551  if test "x$MSVC_DLL" = x; then
50552    # Probe: Check in the Boot JDK directory.
50553    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50554
50555  DLL_NAME="$DLL_NAME"
50556  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50557  METHOD="well-known location in Boot JDK"
50558  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50559    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50560$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50561
50562    # Need to check if the found msvcr is correct architecture
50563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50564$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50565    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50567      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50568      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50569      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50570        CORRECT_MSVCR_ARCH="PE32 executable"
50571      else
50572        CORRECT_MSVCR_ARCH="PE32+ executable"
50573      fi
50574    else
50575      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50576        CORRECT_MSVCR_ARCH=386
50577      else
50578        CORRECT_MSVCR_ARCH=x86-64
50579      fi
50580    fi
50581    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50583$as_echo "ok" >&6; }
50584      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50585
50586  # Only process if variable expands to non-empty
50587
50588  if test "x$MSVC_DLL" != x; then
50589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50590
50591  # Input might be given as Windows format, start by converting to
50592  # unix format.
50593  path="$MSVC_DLL"
50594  new_path=`$CYGPATH -u "$path"`
50595
50596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50599  # "foo.exe" is OK but "foo" is an error.
50600  #
50601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50602  # It is also a way to make sure we got the proper file name for the real test later on.
50603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50604  if test "x$test_shortpath" = x; then
50605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50606$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50607    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50608  fi
50609
50610  # Call helper function which possibly converts this using DOS-style short mode.
50611  # If so, the updated path is stored in $new_path.
50612
50613  input_path="$new_path"
50614  # Check if we need to convert this using DOS-style short mode. If the path
50615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50616  # take no chances and rewrite it.
50617  # Note: m4 eats our [], so we need to use [ and ] instead.
50618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50619  if test "x$has_forbidden_chars" != x; then
50620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50624      # Going to short mode and back again did indeed matter. Since short mode is
50625      # case insensitive, let's make it lowercase to improve readability.
50626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50627      # Now convert it back to Unix-style (cygpath)
50628      input_path=`$CYGPATH -u "$shortmode_path"`
50629      new_path="$input_path"
50630    fi
50631  fi
50632
50633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50634  if test "x$test_cygdrive_prefix" = x; then
50635    # As a simple fix, exclude /usr/bin since it's not a real path.
50636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50638      # a path prefixed by /cygdrive for fixpath to work.
50639      new_path="$CYGWIN_ROOT_PATH$input_path"
50640    fi
50641  fi
50642
50643
50644  if test "x$path" != "x$new_path"; then
50645    MSVC_DLL="$new_path"
50646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50647$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50648  fi
50649
50650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50651
50652  path="$MSVC_DLL"
50653  has_colon=`$ECHO $path | $GREP ^.:`
50654  new_path="$path"
50655  if test "x$has_colon" = x; then
50656    # Not in mixed or Windows style, start by that.
50657    new_path=`cmd //c echo $path`
50658  fi
50659
50660
50661  input_path="$new_path"
50662  # Check if we need to convert this using DOS-style short mode. If the path
50663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50664  # take no chances and rewrite it.
50665  # Note: m4 eats our [], so we need to use [ and ] instead.
50666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50667  if test "x$has_forbidden_chars" != x; then
50668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50670  fi
50671
50672
50673  windows_path="$new_path"
50674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50675    unix_path=`$CYGPATH -u "$windows_path"`
50676    new_path="$unix_path"
50677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50679    new_path="$unix_path"
50680  fi
50681
50682  if test "x$path" != "x$new_path"; then
50683    MSVC_DLL="$new_path"
50684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50685$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50686  fi
50687
50688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50690
50691    else
50692      # We're on a unix platform. Hooray! :)
50693      path="$MSVC_DLL"
50694      has_space=`$ECHO "$path" | $GREP " "`
50695      if test "x$has_space" != x; then
50696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50697$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50699      fi
50700
50701      # Use eval to expand a potential ~
50702      eval path="$path"
50703      if test ! -f "$path" && test ! -d "$path"; then
50704        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50705      fi
50706
50707      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50708    fi
50709  fi
50710
50711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50712$as_echo_n "checking for $DLL_NAME... " >&6; }
50713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50714$as_echo "$MSVC_DLL" >&6; }
50715    else
50716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50717$as_echo "incorrect, ignoring" >&6; }
50718      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50719$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50720    fi
50721  fi
50722
50723  fi
50724
50725  if test "x$MSVC_DLL" = x; then
50726    # Probe: Look in the Windows system32 directory
50727    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50728
50729  windows_path="$CYGWIN_SYSTEMROOT"
50730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50731    unix_path=`$CYGPATH -u "$windows_path"`
50732    CYGWIN_SYSTEMROOT="$unix_path"
50733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50735    CYGWIN_SYSTEMROOT="$unix_path"
50736  fi
50737
50738    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50739
50740  DLL_NAME="$DLL_NAME"
50741  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50742  METHOD="well-known location in SYSTEMROOT"
50743  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50744    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50745$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50746
50747    # Need to check if the found msvcr is correct architecture
50748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50749$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50750    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50752      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50753      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50754      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50755        CORRECT_MSVCR_ARCH="PE32 executable"
50756      else
50757        CORRECT_MSVCR_ARCH="PE32+ executable"
50758      fi
50759    else
50760      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50761        CORRECT_MSVCR_ARCH=386
50762      else
50763        CORRECT_MSVCR_ARCH=x86-64
50764      fi
50765    fi
50766    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50768$as_echo "ok" >&6; }
50769      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50770
50771  # Only process if variable expands to non-empty
50772
50773  if test "x$MSVC_DLL" != x; then
50774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50775
50776  # Input might be given as Windows format, start by converting to
50777  # unix format.
50778  path="$MSVC_DLL"
50779  new_path=`$CYGPATH -u "$path"`
50780
50781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50784  # "foo.exe" is OK but "foo" is an error.
50785  #
50786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50787  # It is also a way to make sure we got the proper file name for the real test later on.
50788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50789  if test "x$test_shortpath" = x; then
50790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50791$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50792    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50793  fi
50794
50795  # Call helper function which possibly converts this using DOS-style short mode.
50796  # If so, the updated path is stored in $new_path.
50797
50798  input_path="$new_path"
50799  # Check if we need to convert this using DOS-style short mode. If the path
50800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50801  # take no chances and rewrite it.
50802  # Note: m4 eats our [], so we need to use [ and ] instead.
50803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50804  if test "x$has_forbidden_chars" != x; then
50805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50809      # Going to short mode and back again did indeed matter. Since short mode is
50810      # case insensitive, let's make it lowercase to improve readability.
50811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50812      # Now convert it back to Unix-style (cygpath)
50813      input_path=`$CYGPATH -u "$shortmode_path"`
50814      new_path="$input_path"
50815    fi
50816  fi
50817
50818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50819  if test "x$test_cygdrive_prefix" = x; then
50820    # As a simple fix, exclude /usr/bin since it's not a real path.
50821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50823      # a path prefixed by /cygdrive for fixpath to work.
50824      new_path="$CYGWIN_ROOT_PATH$input_path"
50825    fi
50826  fi
50827
50828
50829  if test "x$path" != "x$new_path"; then
50830    MSVC_DLL="$new_path"
50831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50832$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50833  fi
50834
50835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50836
50837  path="$MSVC_DLL"
50838  has_colon=`$ECHO $path | $GREP ^.:`
50839  new_path="$path"
50840  if test "x$has_colon" = x; then
50841    # Not in mixed or Windows style, start by that.
50842    new_path=`cmd //c echo $path`
50843  fi
50844
50845
50846  input_path="$new_path"
50847  # Check if we need to convert this using DOS-style short mode. If the path
50848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50849  # take no chances and rewrite it.
50850  # Note: m4 eats our [], so we need to use [ and ] instead.
50851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50852  if test "x$has_forbidden_chars" != x; then
50853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50855  fi
50856
50857
50858  windows_path="$new_path"
50859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50860    unix_path=`$CYGPATH -u "$windows_path"`
50861    new_path="$unix_path"
50862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50864    new_path="$unix_path"
50865  fi
50866
50867  if test "x$path" != "x$new_path"; then
50868    MSVC_DLL="$new_path"
50869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50870$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50871  fi
50872
50873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50875
50876    else
50877      # We're on a unix platform. Hooray! :)
50878      path="$MSVC_DLL"
50879      has_space=`$ECHO "$path" | $GREP " "`
50880      if test "x$has_space" != x; then
50881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50882$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50884      fi
50885
50886      # Use eval to expand a potential ~
50887      eval path="$path"
50888      if test ! -f "$path" && test ! -d "$path"; then
50889        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50890      fi
50891
50892      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50893    fi
50894  fi
50895
50896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50897$as_echo_n "checking for $DLL_NAME... " >&6; }
50898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50899$as_echo "$MSVC_DLL" >&6; }
50900    else
50901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50902$as_echo "incorrect, ignoring" >&6; }
50903      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50904$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50905    fi
50906  fi
50907
50908  fi
50909
50910  if test "x$MSVC_DLL" = x; then
50911    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50912    if test "x$VS100COMNTOOLS" != x; then
50913      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50914
50915  windows_path="$CYGWIN_VS_TOOLS_DIR"
50916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50917    unix_path=`$CYGPATH -u "$windows_path"`
50918    CYGWIN_VS_TOOLS_DIR="$unix_path"
50919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50921    CYGWIN_VS_TOOLS_DIR="$unix_path"
50922  fi
50923
50924      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50925        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50926	    | $GREP -i /x64/ | $HEAD --lines 1`
50927      else
50928        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50929	    | $GREP -i /x86/ | $HEAD --lines 1`
50930      fi
50931
50932  DLL_NAME="$DLL_NAME"
50933  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50934  METHOD="search of VS100COMNTOOLS"
50935  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50936    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50937$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50938
50939    # Need to check if the found msvcr is correct architecture
50940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50941$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50942    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50944      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50945      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50946      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50947        CORRECT_MSVCR_ARCH="PE32 executable"
50948      else
50949        CORRECT_MSVCR_ARCH="PE32+ executable"
50950      fi
50951    else
50952      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50953        CORRECT_MSVCR_ARCH=386
50954      else
50955        CORRECT_MSVCR_ARCH=x86-64
50956      fi
50957    fi
50958    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50960$as_echo "ok" >&6; }
50961      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50962
50963  # Only process if variable expands to non-empty
50964
50965  if test "x$MSVC_DLL" != x; then
50966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50967
50968  # Input might be given as Windows format, start by converting to
50969  # unix format.
50970  path="$MSVC_DLL"
50971  new_path=`$CYGPATH -u "$path"`
50972
50973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50976  # "foo.exe" is OK but "foo" is an error.
50977  #
50978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50979  # It is also a way to make sure we got the proper file name for the real test later on.
50980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50981  if test "x$test_shortpath" = x; then
50982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50983$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50984    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50985  fi
50986
50987  # Call helper function which possibly converts this using DOS-style short mode.
50988  # If so, the updated path is stored in $new_path.
50989
50990  input_path="$new_path"
50991  # Check if we need to convert this using DOS-style short mode. If the path
50992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50993  # take no chances and rewrite it.
50994  # Note: m4 eats our [], so we need to use [ and ] instead.
50995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50996  if test "x$has_forbidden_chars" != x; then
50997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51001      # Going to short mode and back again did indeed matter. Since short mode is
51002      # case insensitive, let's make it lowercase to improve readability.
51003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51004      # Now convert it back to Unix-style (cygpath)
51005      input_path=`$CYGPATH -u "$shortmode_path"`
51006      new_path="$input_path"
51007    fi
51008  fi
51009
51010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51011  if test "x$test_cygdrive_prefix" = x; then
51012    # As a simple fix, exclude /usr/bin since it's not a real path.
51013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51015      # a path prefixed by /cygdrive for fixpath to work.
51016      new_path="$CYGWIN_ROOT_PATH$input_path"
51017    fi
51018  fi
51019
51020
51021  if test "x$path" != "x$new_path"; then
51022    MSVC_DLL="$new_path"
51023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51024$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51025  fi
51026
51027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51028
51029  path="$MSVC_DLL"
51030  has_colon=`$ECHO $path | $GREP ^.:`
51031  new_path="$path"
51032  if test "x$has_colon" = x; then
51033    # Not in mixed or Windows style, start by that.
51034    new_path=`cmd //c echo $path`
51035  fi
51036
51037
51038  input_path="$new_path"
51039  # Check if we need to convert this using DOS-style short mode. If the path
51040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51041  # take no chances and rewrite it.
51042  # Note: m4 eats our [], so we need to use [ and ] instead.
51043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51044  if test "x$has_forbidden_chars" != x; then
51045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51047  fi
51048
51049
51050  windows_path="$new_path"
51051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51052    unix_path=`$CYGPATH -u "$windows_path"`
51053    new_path="$unix_path"
51054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51056    new_path="$unix_path"
51057  fi
51058
51059  if test "x$path" != "x$new_path"; then
51060    MSVC_DLL="$new_path"
51061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51062$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51063  fi
51064
51065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51067
51068    else
51069      # We're on a unix platform. Hooray! :)
51070      path="$MSVC_DLL"
51071      has_space=`$ECHO "$path" | $GREP " "`
51072      if test "x$has_space" != x; then
51073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51074$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51075        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51076      fi
51077
51078      # Use eval to expand a potential ~
51079      eval path="$path"
51080      if test ! -f "$path" && test ! -d "$path"; then
51081        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51082      fi
51083
51084      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51085    fi
51086  fi
51087
51088      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51089$as_echo_n "checking for $DLL_NAME... " >&6; }
51090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51091$as_echo "$MSVC_DLL" >&6; }
51092    else
51093      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51094$as_echo "incorrect, ignoring" >&6; }
51095      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51096$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51097    fi
51098  fi
51099
51100    fi
51101  fi
51102
51103  if test "x$MSVC_DLL" = x; then
51104    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51105    # (This was the original behaviour; kept since it might turn something up)
51106    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51107      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51108        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51109	    | $GREP x64 | $HEAD --lines 1`
51110      else
51111        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51112	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51113        if test "x$POSSIBLE_MSVC_DLL" = x; then
51114          # We're grasping at straws now...
51115          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51116	      | $HEAD --lines 1`
51117        fi
51118      fi
51119
51120
51121  DLL_NAME="$DLL_NAME"
51122  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51123  METHOD="search of VCINSTALLDIR"
51124  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51125    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51126$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51127
51128    # Need to check if the found msvcr is correct architecture
51129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51130$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51131    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51133      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51134      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51135      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51136        CORRECT_MSVCR_ARCH="PE32 executable"
51137      else
51138        CORRECT_MSVCR_ARCH="PE32+ executable"
51139      fi
51140    else
51141      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51142        CORRECT_MSVCR_ARCH=386
51143      else
51144        CORRECT_MSVCR_ARCH=x86-64
51145      fi
51146    fi
51147    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51149$as_echo "ok" >&6; }
51150      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51151
51152  # Only process if variable expands to non-empty
51153
51154  if test "x$MSVC_DLL" != x; then
51155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51156
51157  # Input might be given as Windows format, start by converting to
51158  # unix format.
51159  path="$MSVC_DLL"
51160  new_path=`$CYGPATH -u "$path"`
51161
51162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51165  # "foo.exe" is OK but "foo" is an error.
51166  #
51167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51168  # It is also a way to make sure we got the proper file name for the real test later on.
51169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51170  if test "x$test_shortpath" = x; then
51171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51172$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51173    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51174  fi
51175
51176  # Call helper function which possibly converts this using DOS-style short mode.
51177  # If so, the updated path is stored in $new_path.
51178
51179  input_path="$new_path"
51180  # Check if we need to convert this using DOS-style short mode. If the path
51181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51182  # take no chances and rewrite it.
51183  # Note: m4 eats our [], so we need to use [ and ] instead.
51184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51185  if test "x$has_forbidden_chars" != x; then
51186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51190      # Going to short mode and back again did indeed matter. Since short mode is
51191      # case insensitive, let's make it lowercase to improve readability.
51192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51193      # Now convert it back to Unix-style (cygpath)
51194      input_path=`$CYGPATH -u "$shortmode_path"`
51195      new_path="$input_path"
51196    fi
51197  fi
51198
51199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51200  if test "x$test_cygdrive_prefix" = x; then
51201    # As a simple fix, exclude /usr/bin since it's not a real path.
51202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51204      # a path prefixed by /cygdrive for fixpath to work.
51205      new_path="$CYGWIN_ROOT_PATH$input_path"
51206    fi
51207  fi
51208
51209
51210  if test "x$path" != "x$new_path"; then
51211    MSVC_DLL="$new_path"
51212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51213$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51214  fi
51215
51216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51217
51218  path="$MSVC_DLL"
51219  has_colon=`$ECHO $path | $GREP ^.:`
51220  new_path="$path"
51221  if test "x$has_colon" = x; then
51222    # Not in mixed or Windows style, start by that.
51223    new_path=`cmd //c echo $path`
51224  fi
51225
51226
51227  input_path="$new_path"
51228  # Check if we need to convert this using DOS-style short mode. If the path
51229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51230  # take no chances and rewrite it.
51231  # Note: m4 eats our [], so we need to use [ and ] instead.
51232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51233  if test "x$has_forbidden_chars" != x; then
51234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51236  fi
51237
51238
51239  windows_path="$new_path"
51240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51241    unix_path=`$CYGPATH -u "$windows_path"`
51242    new_path="$unix_path"
51243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51245    new_path="$unix_path"
51246  fi
51247
51248  if test "x$path" != "x$new_path"; then
51249    MSVC_DLL="$new_path"
51250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51251$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51252  fi
51253
51254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51256
51257    else
51258      # We're on a unix platform. Hooray! :)
51259      path="$MSVC_DLL"
51260      has_space=`$ECHO "$path" | $GREP " "`
51261      if test "x$has_space" != x; then
51262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51263$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51265      fi
51266
51267      # Use eval to expand a potential ~
51268      eval path="$path"
51269      if test ! -f "$path" && test ! -d "$path"; then
51270        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51271      fi
51272
51273      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51274    fi
51275  fi
51276
51277      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51278$as_echo_n "checking for $DLL_NAME... " >&6; }
51279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51280$as_echo "$MSVC_DLL" >&6; }
51281    else
51282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51283$as_echo "incorrect, ignoring" >&6; }
51284      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51285$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51286    fi
51287  fi
51288
51289    fi
51290  fi
51291
51292  if test "x$MSVC_DLL" = x; then
51293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51294$as_echo_n "checking for $DLL_NAME... " >&6; }
51295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51296$as_echo "no" >&6; }
51297    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51298  fi
51299
51300    MSVCR_DLL="$MSVC_DLL"
51301  fi
51302
51303
51304
51305# Check whether --with-msvcp-dll was given.
51306if test "${with_msvcp_dll+set}" = set; then :
51307  withval=$with_msvcp_dll;
51308fi
51309
51310
51311  if test "x$MSVCP_NAME" != "x"; then
51312    if test "x$with_msvcp_dll" != x; then
51313      # If given explicitely by user, do not probe. If not present, fail directly.
51314
51315  DLL_NAME="$MSVCP_NAME"
51316  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51317  METHOD="--with-msvcp-dll"
51318  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51319    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51320$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51321
51322    # Need to check if the found msvcr is correct architecture
51323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51324$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51325    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51327      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51328      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51329      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51330        CORRECT_MSVCR_ARCH="PE32 executable"
51331      else
51332        CORRECT_MSVCR_ARCH="PE32+ executable"
51333      fi
51334    else
51335      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51336        CORRECT_MSVCR_ARCH=386
51337      else
51338        CORRECT_MSVCR_ARCH=x86-64
51339      fi
51340    fi
51341    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51343$as_echo "ok" >&6; }
51344      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51345
51346  # Only process if variable expands to non-empty
51347
51348  if test "x$MSVC_DLL" != x; then
51349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51350
51351  # Input might be given as Windows format, start by converting to
51352  # unix format.
51353  path="$MSVC_DLL"
51354  new_path=`$CYGPATH -u "$path"`
51355
51356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51359  # "foo.exe" is OK but "foo" is an error.
51360  #
51361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51362  # It is also a way to make sure we got the proper file name for the real test later on.
51363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51364  if test "x$test_shortpath" = x; then
51365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51366$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51367    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51368  fi
51369
51370  # Call helper function which possibly converts this using DOS-style short mode.
51371  # If so, the updated path is stored in $new_path.
51372
51373  input_path="$new_path"
51374  # Check if we need to convert this using DOS-style short mode. If the path
51375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51376  # take no chances and rewrite it.
51377  # Note: m4 eats our [], so we need to use [ and ] instead.
51378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51379  if test "x$has_forbidden_chars" != x; then
51380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51384      # Going to short mode and back again did indeed matter. Since short mode is
51385      # case insensitive, let's make it lowercase to improve readability.
51386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51387      # Now convert it back to Unix-style (cygpath)
51388      input_path=`$CYGPATH -u "$shortmode_path"`
51389      new_path="$input_path"
51390    fi
51391  fi
51392
51393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51394  if test "x$test_cygdrive_prefix" = x; then
51395    # As a simple fix, exclude /usr/bin since it's not a real path.
51396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51398      # a path prefixed by /cygdrive for fixpath to work.
51399      new_path="$CYGWIN_ROOT_PATH$input_path"
51400    fi
51401  fi
51402
51403
51404  if test "x$path" != "x$new_path"; then
51405    MSVC_DLL="$new_path"
51406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51407$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51408  fi
51409
51410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51411
51412  path="$MSVC_DLL"
51413  has_colon=`$ECHO $path | $GREP ^.:`
51414  new_path="$path"
51415  if test "x$has_colon" = x; then
51416    # Not in mixed or Windows style, start by that.
51417    new_path=`cmd //c echo $path`
51418  fi
51419
51420
51421  input_path="$new_path"
51422  # Check if we need to convert this using DOS-style short mode. If the path
51423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51424  # take no chances and rewrite it.
51425  # Note: m4 eats our [], so we need to use [ and ] instead.
51426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51427  if test "x$has_forbidden_chars" != x; then
51428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51430  fi
51431
51432
51433  windows_path="$new_path"
51434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51435    unix_path=`$CYGPATH -u "$windows_path"`
51436    new_path="$unix_path"
51437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51439    new_path="$unix_path"
51440  fi
51441
51442  if test "x$path" != "x$new_path"; then
51443    MSVC_DLL="$new_path"
51444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51445$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51446  fi
51447
51448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51450
51451    else
51452      # We're on a unix platform. Hooray! :)
51453      path="$MSVC_DLL"
51454      has_space=`$ECHO "$path" | $GREP " "`
51455      if test "x$has_space" != x; then
51456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51457$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51459      fi
51460
51461      # Use eval to expand a potential ~
51462      eval path="$path"
51463      if test ! -f "$path" && test ! -d "$path"; then
51464        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51465      fi
51466
51467      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51468    fi
51469  fi
51470
51471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51472$as_echo_n "checking for $DLL_NAME... " >&6; }
51473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51474$as_echo "$MSVC_DLL" >&6; }
51475    else
51476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51477$as_echo "incorrect, ignoring" >&6; }
51478      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51479$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51480    fi
51481  fi
51482
51483      if test "x$MSVC_DLL" = x; then
51484        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51485      fi
51486      MSVCP_DLL="$MSVC_DLL"
51487    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51488
51489  DLL_NAME="$MSVCP_NAME"
51490  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51491  METHOD="devkit"
51492  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51493    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51494$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51495
51496    # Need to check if the found msvcr is correct architecture
51497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51498$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51499    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51501      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51502      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51503      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51504        CORRECT_MSVCR_ARCH="PE32 executable"
51505      else
51506        CORRECT_MSVCR_ARCH="PE32+ executable"
51507      fi
51508    else
51509      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51510        CORRECT_MSVCR_ARCH=386
51511      else
51512        CORRECT_MSVCR_ARCH=x86-64
51513      fi
51514    fi
51515    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51517$as_echo "ok" >&6; }
51518      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51519
51520  # Only process if variable expands to non-empty
51521
51522  if test "x$MSVC_DLL" != x; then
51523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51524
51525  # Input might be given as Windows format, start by converting to
51526  # unix format.
51527  path="$MSVC_DLL"
51528  new_path=`$CYGPATH -u "$path"`
51529
51530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51533  # "foo.exe" is OK but "foo" is an error.
51534  #
51535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51536  # It is also a way to make sure we got the proper file name for the real test later on.
51537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51538  if test "x$test_shortpath" = x; then
51539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51540$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51541    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51542  fi
51543
51544  # Call helper function which possibly converts this using DOS-style short mode.
51545  # If so, the updated path is stored in $new_path.
51546
51547  input_path="$new_path"
51548  # Check if we need to convert this using DOS-style short mode. If the path
51549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51550  # take no chances and rewrite it.
51551  # Note: m4 eats our [], so we need to use [ and ] instead.
51552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51553  if test "x$has_forbidden_chars" != x; then
51554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51558      # Going to short mode and back again did indeed matter. Since short mode is
51559      # case insensitive, let's make it lowercase to improve readability.
51560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51561      # Now convert it back to Unix-style (cygpath)
51562      input_path=`$CYGPATH -u "$shortmode_path"`
51563      new_path="$input_path"
51564    fi
51565  fi
51566
51567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51568  if test "x$test_cygdrive_prefix" = x; then
51569    # As a simple fix, exclude /usr/bin since it's not a real path.
51570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51572      # a path prefixed by /cygdrive for fixpath to work.
51573      new_path="$CYGWIN_ROOT_PATH$input_path"
51574    fi
51575  fi
51576
51577
51578  if test "x$path" != "x$new_path"; then
51579    MSVC_DLL="$new_path"
51580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51581$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51582  fi
51583
51584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51585
51586  path="$MSVC_DLL"
51587  has_colon=`$ECHO $path | $GREP ^.:`
51588  new_path="$path"
51589  if test "x$has_colon" = x; then
51590    # Not in mixed or Windows style, start by that.
51591    new_path=`cmd //c echo $path`
51592  fi
51593
51594
51595  input_path="$new_path"
51596  # Check if we need to convert this using DOS-style short mode. If the path
51597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51598  # take no chances and rewrite it.
51599  # Note: m4 eats our [], so we need to use [ and ] instead.
51600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51601  if test "x$has_forbidden_chars" != x; then
51602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51604  fi
51605
51606
51607  windows_path="$new_path"
51608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51609    unix_path=`$CYGPATH -u "$windows_path"`
51610    new_path="$unix_path"
51611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51613    new_path="$unix_path"
51614  fi
51615
51616  if test "x$path" != "x$new_path"; then
51617    MSVC_DLL="$new_path"
51618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51619$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51620  fi
51621
51622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51624
51625    else
51626      # We're on a unix platform. Hooray! :)
51627      path="$MSVC_DLL"
51628      has_space=`$ECHO "$path" | $GREP " "`
51629      if test "x$has_space" != x; then
51630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51631$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51632        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51633      fi
51634
51635      # Use eval to expand a potential ~
51636      eval path="$path"
51637      if test ! -f "$path" && test ! -d "$path"; then
51638        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51639      fi
51640
51641      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51642    fi
51643  fi
51644
51645      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51646$as_echo_n "checking for $DLL_NAME... " >&6; }
51647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51648$as_echo "$MSVC_DLL" >&6; }
51649    else
51650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51651$as_echo "incorrect, ignoring" >&6; }
51652      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51653$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51654    fi
51655  fi
51656
51657      if test "x$MSVC_DLL" = x; then
51658        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51659      fi
51660      MSVCP_DLL="$MSVC_DLL"
51661    else
51662
51663  DLL_NAME="${MSVCP_NAME}"
51664  MSVC_DLL=
51665
51666  if test "x$MSVC_DLL" = x; then
51667    # Probe: Using well-known location from Visual Studio 10.0
51668    if test "x$VCINSTALLDIR" != x; then
51669      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51670
51671  windows_path="$CYGWIN_VC_INSTALL_DIR"
51672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51673    unix_path=`$CYGPATH -u "$windows_path"`
51674    CYGWIN_VC_INSTALL_DIR="$unix_path"
51675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51677    CYGWIN_VC_INSTALL_DIR="$unix_path"
51678  fi
51679
51680      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51681        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51682      else
51683        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51684      fi
51685      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51686
51687  DLL_NAME="$DLL_NAME"
51688  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51689  METHOD="well-known location in VCINSTALLDIR"
51690  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51691    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51692$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51693
51694    # Need to check if the found msvcr is correct architecture
51695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51696$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51697    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51699      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51700      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51701      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51702        CORRECT_MSVCR_ARCH="PE32 executable"
51703      else
51704        CORRECT_MSVCR_ARCH="PE32+ executable"
51705      fi
51706    else
51707      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51708        CORRECT_MSVCR_ARCH=386
51709      else
51710        CORRECT_MSVCR_ARCH=x86-64
51711      fi
51712    fi
51713    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51715$as_echo "ok" >&6; }
51716      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51717
51718  # Only process if variable expands to non-empty
51719
51720  if test "x$MSVC_DLL" != x; then
51721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51722
51723  # Input might be given as Windows format, start by converting to
51724  # unix format.
51725  path="$MSVC_DLL"
51726  new_path=`$CYGPATH -u "$path"`
51727
51728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51731  # "foo.exe" is OK but "foo" is an error.
51732  #
51733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51734  # It is also a way to make sure we got the proper file name for the real test later on.
51735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51736  if test "x$test_shortpath" = x; then
51737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51738$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51739    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51740  fi
51741
51742  # Call helper function which possibly converts this using DOS-style short mode.
51743  # If so, the updated path is stored in $new_path.
51744
51745  input_path="$new_path"
51746  # Check if we need to convert this using DOS-style short mode. If the path
51747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51748  # take no chances and rewrite it.
51749  # Note: m4 eats our [], so we need to use [ and ] instead.
51750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51751  if test "x$has_forbidden_chars" != x; then
51752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51756      # Going to short mode and back again did indeed matter. Since short mode is
51757      # case insensitive, let's make it lowercase to improve readability.
51758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51759      # Now convert it back to Unix-style (cygpath)
51760      input_path=`$CYGPATH -u "$shortmode_path"`
51761      new_path="$input_path"
51762    fi
51763  fi
51764
51765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51766  if test "x$test_cygdrive_prefix" = x; then
51767    # As a simple fix, exclude /usr/bin since it's not a real path.
51768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51770      # a path prefixed by /cygdrive for fixpath to work.
51771      new_path="$CYGWIN_ROOT_PATH$input_path"
51772    fi
51773  fi
51774
51775
51776  if test "x$path" != "x$new_path"; then
51777    MSVC_DLL="$new_path"
51778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51779$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51780  fi
51781
51782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51783
51784  path="$MSVC_DLL"
51785  has_colon=`$ECHO $path | $GREP ^.:`
51786  new_path="$path"
51787  if test "x$has_colon" = x; then
51788    # Not in mixed or Windows style, start by that.
51789    new_path=`cmd //c echo $path`
51790  fi
51791
51792
51793  input_path="$new_path"
51794  # Check if we need to convert this using DOS-style short mode. If the path
51795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51796  # take no chances and rewrite it.
51797  # Note: m4 eats our [], so we need to use [ and ] instead.
51798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51799  if test "x$has_forbidden_chars" != x; then
51800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51802  fi
51803
51804
51805  windows_path="$new_path"
51806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51807    unix_path=`$CYGPATH -u "$windows_path"`
51808    new_path="$unix_path"
51809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51811    new_path="$unix_path"
51812  fi
51813
51814  if test "x$path" != "x$new_path"; then
51815    MSVC_DLL="$new_path"
51816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51817$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51818  fi
51819
51820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51822
51823    else
51824      # We're on a unix platform. Hooray! :)
51825      path="$MSVC_DLL"
51826      has_space=`$ECHO "$path" | $GREP " "`
51827      if test "x$has_space" != x; then
51828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51829$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51831      fi
51832
51833      # Use eval to expand a potential ~
51834      eval path="$path"
51835      if test ! -f "$path" && test ! -d "$path"; then
51836        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51837      fi
51838
51839      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51840    fi
51841  fi
51842
51843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51844$as_echo_n "checking for $DLL_NAME... " >&6; }
51845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51846$as_echo "$MSVC_DLL" >&6; }
51847    else
51848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51849$as_echo "incorrect, ignoring" >&6; }
51850      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51851$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51852    fi
51853  fi
51854
51855    fi
51856  fi
51857
51858  if test "x$MSVC_DLL" = x; then
51859    # Probe: Check in the Boot JDK directory.
51860    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51861
51862  DLL_NAME="$DLL_NAME"
51863  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51864  METHOD="well-known location in Boot JDK"
51865  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51866    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51867$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51868
51869    # Need to check if the found msvcr is correct architecture
51870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51871$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51872    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51874      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51875      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51876      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51877        CORRECT_MSVCR_ARCH="PE32 executable"
51878      else
51879        CORRECT_MSVCR_ARCH="PE32+ executable"
51880      fi
51881    else
51882      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51883        CORRECT_MSVCR_ARCH=386
51884      else
51885        CORRECT_MSVCR_ARCH=x86-64
51886      fi
51887    fi
51888    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51890$as_echo "ok" >&6; }
51891      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51892
51893  # Only process if variable expands to non-empty
51894
51895  if test "x$MSVC_DLL" != x; then
51896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51897
51898  # Input might be given as Windows format, start by converting to
51899  # unix format.
51900  path="$MSVC_DLL"
51901  new_path=`$CYGPATH -u "$path"`
51902
51903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51906  # "foo.exe" is OK but "foo" is an error.
51907  #
51908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51909  # It is also a way to make sure we got the proper file name for the real test later on.
51910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51911  if test "x$test_shortpath" = x; then
51912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51913$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51914    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51915  fi
51916
51917  # Call helper function which possibly converts this using DOS-style short mode.
51918  # If so, the updated path is stored in $new_path.
51919
51920  input_path="$new_path"
51921  # Check if we need to convert this using DOS-style short mode. If the path
51922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51923  # take no chances and rewrite it.
51924  # Note: m4 eats our [], so we need to use [ and ] instead.
51925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51926  if test "x$has_forbidden_chars" != x; then
51927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51931      # Going to short mode and back again did indeed matter. Since short mode is
51932      # case insensitive, let's make it lowercase to improve readability.
51933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51934      # Now convert it back to Unix-style (cygpath)
51935      input_path=`$CYGPATH -u "$shortmode_path"`
51936      new_path="$input_path"
51937    fi
51938  fi
51939
51940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51941  if test "x$test_cygdrive_prefix" = x; then
51942    # As a simple fix, exclude /usr/bin since it's not a real path.
51943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51945      # a path prefixed by /cygdrive for fixpath to work.
51946      new_path="$CYGWIN_ROOT_PATH$input_path"
51947    fi
51948  fi
51949
51950
51951  if test "x$path" != "x$new_path"; then
51952    MSVC_DLL="$new_path"
51953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51954$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51955  fi
51956
51957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51958
51959  path="$MSVC_DLL"
51960  has_colon=`$ECHO $path | $GREP ^.:`
51961  new_path="$path"
51962  if test "x$has_colon" = x; then
51963    # Not in mixed or Windows style, start by that.
51964    new_path=`cmd //c echo $path`
51965  fi
51966
51967
51968  input_path="$new_path"
51969  # Check if we need to convert this using DOS-style short mode. If the path
51970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51971  # take no chances and rewrite it.
51972  # Note: m4 eats our [], so we need to use [ and ] instead.
51973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51974  if test "x$has_forbidden_chars" != x; then
51975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51977  fi
51978
51979
51980  windows_path="$new_path"
51981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51982    unix_path=`$CYGPATH -u "$windows_path"`
51983    new_path="$unix_path"
51984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51986    new_path="$unix_path"
51987  fi
51988
51989  if test "x$path" != "x$new_path"; then
51990    MSVC_DLL="$new_path"
51991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51992$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51993  fi
51994
51995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51997
51998    else
51999      # We're on a unix platform. Hooray! :)
52000      path="$MSVC_DLL"
52001      has_space=`$ECHO "$path" | $GREP " "`
52002      if test "x$has_space" != x; then
52003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52004$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52006      fi
52007
52008      # Use eval to expand a potential ~
52009      eval path="$path"
52010      if test ! -f "$path" && test ! -d "$path"; then
52011        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52012      fi
52013
52014      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52015    fi
52016  fi
52017
52018      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52019$as_echo_n "checking for $DLL_NAME... " >&6; }
52020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52021$as_echo "$MSVC_DLL" >&6; }
52022    else
52023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52024$as_echo "incorrect, ignoring" >&6; }
52025      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52026$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52027    fi
52028  fi
52029
52030  fi
52031
52032  if test "x$MSVC_DLL" = x; then
52033    # Probe: Look in the Windows system32 directory
52034    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
52035
52036  windows_path="$CYGWIN_SYSTEMROOT"
52037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52038    unix_path=`$CYGPATH -u "$windows_path"`
52039    CYGWIN_SYSTEMROOT="$unix_path"
52040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52042    CYGWIN_SYSTEMROOT="$unix_path"
52043  fi
52044
52045    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
52046
52047  DLL_NAME="$DLL_NAME"
52048  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52049  METHOD="well-known location in SYSTEMROOT"
52050  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52051    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52052$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52053
52054    # Need to check if the found msvcr is correct architecture
52055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52056$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52057    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52059      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52060      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52061      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52062        CORRECT_MSVCR_ARCH="PE32 executable"
52063      else
52064        CORRECT_MSVCR_ARCH="PE32+ executable"
52065      fi
52066    else
52067      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52068        CORRECT_MSVCR_ARCH=386
52069      else
52070        CORRECT_MSVCR_ARCH=x86-64
52071      fi
52072    fi
52073    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52075$as_echo "ok" >&6; }
52076      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52077
52078  # Only process if variable expands to non-empty
52079
52080  if test "x$MSVC_DLL" != x; then
52081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52082
52083  # Input might be given as Windows format, start by converting to
52084  # unix format.
52085  path="$MSVC_DLL"
52086  new_path=`$CYGPATH -u "$path"`
52087
52088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52091  # "foo.exe" is OK but "foo" is an error.
52092  #
52093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52094  # It is also a way to make sure we got the proper file name for the real test later on.
52095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52096  if test "x$test_shortpath" = x; then
52097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52098$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52099    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52100  fi
52101
52102  # Call helper function which possibly converts this using DOS-style short mode.
52103  # If so, the updated path is stored in $new_path.
52104
52105  input_path="$new_path"
52106  # Check if we need to convert this using DOS-style short mode. If the path
52107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52108  # take no chances and rewrite it.
52109  # Note: m4 eats our [], so we need to use [ and ] instead.
52110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52111  if test "x$has_forbidden_chars" != x; then
52112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52116      # Going to short mode and back again did indeed matter. Since short mode is
52117      # case insensitive, let's make it lowercase to improve readability.
52118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52119      # Now convert it back to Unix-style (cygpath)
52120      input_path=`$CYGPATH -u "$shortmode_path"`
52121      new_path="$input_path"
52122    fi
52123  fi
52124
52125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52126  if test "x$test_cygdrive_prefix" = x; then
52127    # As a simple fix, exclude /usr/bin since it's not a real path.
52128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52130      # a path prefixed by /cygdrive for fixpath to work.
52131      new_path="$CYGWIN_ROOT_PATH$input_path"
52132    fi
52133  fi
52134
52135
52136  if test "x$path" != "x$new_path"; then
52137    MSVC_DLL="$new_path"
52138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52139$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52140  fi
52141
52142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52143
52144  path="$MSVC_DLL"
52145  has_colon=`$ECHO $path | $GREP ^.:`
52146  new_path="$path"
52147  if test "x$has_colon" = x; then
52148    # Not in mixed or Windows style, start by that.
52149    new_path=`cmd //c echo $path`
52150  fi
52151
52152
52153  input_path="$new_path"
52154  # Check if we need to convert this using DOS-style short mode. If the path
52155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52156  # take no chances and rewrite it.
52157  # Note: m4 eats our [], so we need to use [ and ] instead.
52158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52159  if test "x$has_forbidden_chars" != x; then
52160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52162  fi
52163
52164
52165  windows_path="$new_path"
52166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52167    unix_path=`$CYGPATH -u "$windows_path"`
52168    new_path="$unix_path"
52169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52171    new_path="$unix_path"
52172  fi
52173
52174  if test "x$path" != "x$new_path"; then
52175    MSVC_DLL="$new_path"
52176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52177$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52178  fi
52179
52180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52182
52183    else
52184      # We're on a unix platform. Hooray! :)
52185      path="$MSVC_DLL"
52186      has_space=`$ECHO "$path" | $GREP " "`
52187      if test "x$has_space" != x; then
52188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52189$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52190        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52191      fi
52192
52193      # Use eval to expand a potential ~
52194      eval path="$path"
52195      if test ! -f "$path" && test ! -d "$path"; then
52196        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52197      fi
52198
52199      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52200    fi
52201  fi
52202
52203      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52204$as_echo_n "checking for $DLL_NAME... " >&6; }
52205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52206$as_echo "$MSVC_DLL" >&6; }
52207    else
52208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52209$as_echo "incorrect, ignoring" >&6; }
52210      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52211$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52212    fi
52213  fi
52214
52215  fi
52216
52217  if test "x$MSVC_DLL" = x; then
52218    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52219    if test "x$VS100COMNTOOLS" != x; then
52220      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52221
52222  windows_path="$CYGWIN_VS_TOOLS_DIR"
52223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52224    unix_path=`$CYGPATH -u "$windows_path"`
52225    CYGWIN_VS_TOOLS_DIR="$unix_path"
52226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52228    CYGWIN_VS_TOOLS_DIR="$unix_path"
52229  fi
52230
52231      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52232        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52233	    | $GREP -i /x64/ | $HEAD --lines 1`
52234      else
52235        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52236	    | $GREP -i /x86/ | $HEAD --lines 1`
52237      fi
52238
52239  DLL_NAME="$DLL_NAME"
52240  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52241  METHOD="search of VS100COMNTOOLS"
52242  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52243    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52244$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52245
52246    # Need to check if the found msvcr is correct architecture
52247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52248$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52249    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52251      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52252      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52253      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52254        CORRECT_MSVCR_ARCH="PE32 executable"
52255      else
52256        CORRECT_MSVCR_ARCH="PE32+ executable"
52257      fi
52258    else
52259      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52260        CORRECT_MSVCR_ARCH=386
52261      else
52262        CORRECT_MSVCR_ARCH=x86-64
52263      fi
52264    fi
52265    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52267$as_echo "ok" >&6; }
52268      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52269
52270  # Only process if variable expands to non-empty
52271
52272  if test "x$MSVC_DLL" != x; then
52273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52274
52275  # Input might be given as Windows format, start by converting to
52276  # unix format.
52277  path="$MSVC_DLL"
52278  new_path=`$CYGPATH -u "$path"`
52279
52280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52283  # "foo.exe" is OK but "foo" is an error.
52284  #
52285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52286  # It is also a way to make sure we got the proper file name for the real test later on.
52287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52288  if test "x$test_shortpath" = x; then
52289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52290$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52291    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52292  fi
52293
52294  # Call helper function which possibly converts this using DOS-style short mode.
52295  # If so, the updated path is stored in $new_path.
52296
52297  input_path="$new_path"
52298  # Check if we need to convert this using DOS-style short mode. If the path
52299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52300  # take no chances and rewrite it.
52301  # Note: m4 eats our [], so we need to use [ and ] instead.
52302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52303  if test "x$has_forbidden_chars" != x; then
52304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52308      # Going to short mode and back again did indeed matter. Since short mode is
52309      # case insensitive, let's make it lowercase to improve readability.
52310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52311      # Now convert it back to Unix-style (cygpath)
52312      input_path=`$CYGPATH -u "$shortmode_path"`
52313      new_path="$input_path"
52314    fi
52315  fi
52316
52317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52318  if test "x$test_cygdrive_prefix" = x; then
52319    # As a simple fix, exclude /usr/bin since it's not a real path.
52320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52322      # a path prefixed by /cygdrive for fixpath to work.
52323      new_path="$CYGWIN_ROOT_PATH$input_path"
52324    fi
52325  fi
52326
52327
52328  if test "x$path" != "x$new_path"; then
52329    MSVC_DLL="$new_path"
52330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52331$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52332  fi
52333
52334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52335
52336  path="$MSVC_DLL"
52337  has_colon=`$ECHO $path | $GREP ^.:`
52338  new_path="$path"
52339  if test "x$has_colon" = x; then
52340    # Not in mixed or Windows style, start by that.
52341    new_path=`cmd //c echo $path`
52342  fi
52343
52344
52345  input_path="$new_path"
52346  # Check if we need to convert this using DOS-style short mode. If the path
52347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52348  # take no chances and rewrite it.
52349  # Note: m4 eats our [], so we need to use [ and ] instead.
52350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52351  if test "x$has_forbidden_chars" != x; then
52352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52354  fi
52355
52356
52357  windows_path="$new_path"
52358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52359    unix_path=`$CYGPATH -u "$windows_path"`
52360    new_path="$unix_path"
52361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52363    new_path="$unix_path"
52364  fi
52365
52366  if test "x$path" != "x$new_path"; then
52367    MSVC_DLL="$new_path"
52368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52369$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52370  fi
52371
52372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52374
52375    else
52376      # We're on a unix platform. Hooray! :)
52377      path="$MSVC_DLL"
52378      has_space=`$ECHO "$path" | $GREP " "`
52379      if test "x$has_space" != x; then
52380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52381$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52383      fi
52384
52385      # Use eval to expand a potential ~
52386      eval path="$path"
52387      if test ! -f "$path" && test ! -d "$path"; then
52388        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52389      fi
52390
52391      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52392    fi
52393  fi
52394
52395      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52396$as_echo_n "checking for $DLL_NAME... " >&6; }
52397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52398$as_echo "$MSVC_DLL" >&6; }
52399    else
52400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52401$as_echo "incorrect, ignoring" >&6; }
52402      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52403$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52404    fi
52405  fi
52406
52407    fi
52408  fi
52409
52410  if test "x$MSVC_DLL" = x; then
52411    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52412    # (This was the original behaviour; kept since it might turn something up)
52413    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52414      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52415        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52416	    | $GREP x64 | $HEAD --lines 1`
52417      else
52418        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52419	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52420        if test "x$POSSIBLE_MSVC_DLL" = x; then
52421          # We're grasping at straws now...
52422          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52423	      | $HEAD --lines 1`
52424        fi
52425      fi
52426
52427
52428  DLL_NAME="$DLL_NAME"
52429  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52430  METHOD="search of VCINSTALLDIR"
52431  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52432    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52433$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52434
52435    # Need to check if the found msvcr is correct architecture
52436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52437$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52438    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52440      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52441      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52442      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52443        CORRECT_MSVCR_ARCH="PE32 executable"
52444      else
52445        CORRECT_MSVCR_ARCH="PE32+ executable"
52446      fi
52447    else
52448      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52449        CORRECT_MSVCR_ARCH=386
52450      else
52451        CORRECT_MSVCR_ARCH=x86-64
52452      fi
52453    fi
52454    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52456$as_echo "ok" >&6; }
52457      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52458
52459  # Only process if variable expands to non-empty
52460
52461  if test "x$MSVC_DLL" != x; then
52462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52463
52464  # Input might be given as Windows format, start by converting to
52465  # unix format.
52466  path="$MSVC_DLL"
52467  new_path=`$CYGPATH -u "$path"`
52468
52469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52472  # "foo.exe" is OK but "foo" is an error.
52473  #
52474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52475  # It is also a way to make sure we got the proper file name for the real test later on.
52476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52477  if test "x$test_shortpath" = x; then
52478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52479$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52480    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52481  fi
52482
52483  # Call helper function which possibly converts this using DOS-style short mode.
52484  # If so, the updated path is stored in $new_path.
52485
52486  input_path="$new_path"
52487  # Check if we need to convert this using DOS-style short mode. If the path
52488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52489  # take no chances and rewrite it.
52490  # Note: m4 eats our [], so we need to use [ and ] instead.
52491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52492  if test "x$has_forbidden_chars" != x; then
52493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52497      # Going to short mode and back again did indeed matter. Since short mode is
52498      # case insensitive, let's make it lowercase to improve readability.
52499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52500      # Now convert it back to Unix-style (cygpath)
52501      input_path=`$CYGPATH -u "$shortmode_path"`
52502      new_path="$input_path"
52503    fi
52504  fi
52505
52506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52507  if test "x$test_cygdrive_prefix" = x; then
52508    # As a simple fix, exclude /usr/bin since it's not a real path.
52509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52511      # a path prefixed by /cygdrive for fixpath to work.
52512      new_path="$CYGWIN_ROOT_PATH$input_path"
52513    fi
52514  fi
52515
52516
52517  if test "x$path" != "x$new_path"; then
52518    MSVC_DLL="$new_path"
52519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52520$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52521  fi
52522
52523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52524
52525  path="$MSVC_DLL"
52526  has_colon=`$ECHO $path | $GREP ^.:`
52527  new_path="$path"
52528  if test "x$has_colon" = x; then
52529    # Not in mixed or Windows style, start by that.
52530    new_path=`cmd //c echo $path`
52531  fi
52532
52533
52534  input_path="$new_path"
52535  # Check if we need to convert this using DOS-style short mode. If the path
52536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52537  # take no chances and rewrite it.
52538  # Note: m4 eats our [], so we need to use [ and ] instead.
52539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52540  if test "x$has_forbidden_chars" != x; then
52541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52543  fi
52544
52545
52546  windows_path="$new_path"
52547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52548    unix_path=`$CYGPATH -u "$windows_path"`
52549    new_path="$unix_path"
52550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52552    new_path="$unix_path"
52553  fi
52554
52555  if test "x$path" != "x$new_path"; then
52556    MSVC_DLL="$new_path"
52557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52558$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52559  fi
52560
52561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52563
52564    else
52565      # We're on a unix platform. Hooray! :)
52566      path="$MSVC_DLL"
52567      has_space=`$ECHO "$path" | $GREP " "`
52568      if test "x$has_space" != x; then
52569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52570$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52571        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52572      fi
52573
52574      # Use eval to expand a potential ~
52575      eval path="$path"
52576      if test ! -f "$path" && test ! -d "$path"; then
52577        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52578      fi
52579
52580      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52581    fi
52582  fi
52583
52584      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52585$as_echo_n "checking for $DLL_NAME... " >&6; }
52586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52587$as_echo "$MSVC_DLL" >&6; }
52588    else
52589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52590$as_echo "incorrect, ignoring" >&6; }
52591      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52592$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52593    fi
52594  fi
52595
52596    fi
52597  fi
52598
52599  if test "x$MSVC_DLL" = x; then
52600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52601$as_echo_n "checking for $DLL_NAME... " >&6; }
52602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52603$as_echo "no" >&6; }
52604    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52605  fi
52606
52607      MSVCP_DLL="$MSVC_DLL"
52608    fi
52609
52610  fi
52611
52612
52613
52614# Check whether --with-dxsdk was given.
52615if test "${with_dxsdk+set}" = set; then :
52616  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52617$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52618fi
52619
52620
52621
52622
52623# Check whether --with-dxsdk-lib was given.
52624if test "${with_dxsdk_lib+set}" = set; then :
52625  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52626$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52627fi
52628
52629
52630
52631
52632# Check whether --with-dxsdk-include was given.
52633if test "${with_dxsdk_include+set}" = set; then :
52634  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52635$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52636fi
52637
52638
52639  fi
52640
52641
52642###############################################################################
52643#
52644# We need to do some final tweaking, when everything else is done.
52645#
52646###############################################################################
52647
52648
52649  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52650
52651
52652  # The name of the Service Agent jar.
52653  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52654  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52655    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52656  fi
52657
52658
52659
52660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52661$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52662
52663  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52664    ENABLE_INTREE_EC=yes
52665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52666$as_echo "yes" >&6; }
52667  else
52668    ENABLE_INTREE_EC=no
52669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52670$as_echo "no" >&6; }
52671  fi
52672
52673
52674
52675
52676###############################################################################
52677#
52678# Configure parts of the build that only affect the build performance,
52679# not the result.
52680#
52681###############################################################################
52682
52683
52684  # How many cores do we have on this build system?
52685
52686# Check whether --with-num-cores was given.
52687if test "${with_num_cores+set}" = set; then :
52688  withval=$with_num_cores;
52689fi
52690
52691  if test "x$with_num_cores" = x; then
52692    # The number of cores were not specified, try to probe them.
52693
52694  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52695$as_echo_n "checking for number of cores... " >&6; }
52696  NUM_CORES=1
52697  FOUND_CORES=no
52698
52699  if test -f /proc/cpuinfo; then
52700    # Looks like a Linux (or cygwin) system
52701    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52702    FOUND_CORES=yes
52703  elif test -x /usr/sbin/psrinfo; then
52704    # Looks like a Solaris system
52705    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52706    FOUND_CORES=yes
52707  elif test -x /usr/sbin/system_profiler; then
52708    # Looks like a MacOSX system
52709    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52710    FOUND_CORES=yes
52711  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52712    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52713    FOUND_CORES=yes
52714  elif test -n "$NUMBER_OF_PROCESSORS"; then
52715    # On windows, look in the env
52716    NUM_CORES=$NUMBER_OF_PROCESSORS
52717    FOUND_CORES=yes
52718  fi
52719
52720  if test "x$FOUND_CORES" = xyes; then
52721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52722$as_echo "$NUM_CORES" >&6; }
52723  else
52724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52725$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52726    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52727$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52728  fi
52729
52730  else
52731    NUM_CORES=$with_num_cores
52732  fi
52733
52734
52735
52736  # How much memory do we have on this build system?
52737
52738# Check whether --with-memory-size was given.
52739if test "${with_memory_size+set}" = set; then :
52740  withval=$with_memory_size;
52741fi
52742
52743  if test "x$with_memory_size" = x; then
52744    # The memory size was not specified, try to probe it.
52745
52746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52747$as_echo_n "checking for memory size... " >&6; }
52748  # Default to 1024 MB
52749  MEMORY_SIZE=1024
52750  FOUND_MEM=no
52751
52752  if test -f /proc/meminfo; then
52753    # Looks like a Linux (or cygwin) system
52754    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52755    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52756    FOUND_MEM=yes
52757  elif test -x /usr/sbin/prtconf; then
52758    # Looks like a Solaris or AIX system
52759    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52760    FOUND_MEM=yes
52761  elif test -x /usr/sbin/system_profiler; then
52762    # Looks like a MacOSX system
52763    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52764    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52765    FOUND_MEM=yes
52766  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52767    # Windows, but without cygwin
52768    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52769    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52770    FOUND_MEM=yes
52771  fi
52772
52773  if test "x$FOUND_MEM" = xyes; then
52774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52775$as_echo "$MEMORY_SIZE MB" >&6; }
52776  else
52777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52778$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52779    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52780$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52781  fi
52782
52783  else
52784    MEMORY_SIZE=$with_memory_size
52785  fi
52786
52787
52788
52789  # Provide a decent default number of parallel jobs for make depending on
52790  # number of cores, amount of memory and machine architecture.
52791
52792# Check whether --with-jobs was given.
52793if test "${with_jobs+set}" = set; then :
52794  withval=$with_jobs;
52795fi
52796
52797  if test "x$with_jobs" = x; then
52798    # Number of jobs was not specified, calculate.
52799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52800$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52801    # Approximate memory in GB.
52802    memory_gb=`expr $MEMORY_SIZE / 1024`
52803    # Pick the lowest of memory in gb and number of cores.
52804    if test "$memory_gb" -lt "$NUM_CORES"; then
52805      JOBS="$memory_gb"
52806    else
52807      JOBS="$NUM_CORES"
52808      # On bigger machines, leave some room for other processes to run
52809      if test "$JOBS" -gt "4"; then
52810        JOBS=`expr $JOBS '*' 90 / 100`
52811      fi
52812    fi
52813    # Cap number of jobs to 16
52814    if test "$JOBS" -gt "16"; then
52815      JOBS=16
52816    fi
52817    if test "$JOBS" -eq "0"; then
52818      JOBS=1
52819    fi
52820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52821$as_echo "$JOBS" >&6; }
52822  else
52823    JOBS=$with_jobs
52824  fi
52825
52826
52827
52828# Setup arguments for the boot jdk (after cores and memory have been setup)
52829
52830  ##############################################################################
52831  #
52832  # Specify jvm options for anything that is run with the Boot JDK.
52833  # Not all JVM:s accept the same arguments on the command line.
52834  #
52835
52836# Check whether --with-boot-jdk-jvmargs was given.
52837if test "${with_boot_jdk_jvmargs+set}" = set; then :
52838  withval=$with_boot_jdk_jvmargs;
52839fi
52840
52841
52842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52843$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52844
52845  # Disable special log output when a debug build is used as Boot JDK...
52846
52847  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52848  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52849  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52850  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52851  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52852  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52853    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52854    JVM_ARG_OK=true
52855  else
52856    $ECHO "Arg failed:" >&5
52857    $ECHO "$OUTPUT" >&5
52858    JVM_ARG_OK=false
52859  fi
52860
52861
52862  # Apply user provided options.
52863
52864  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52865  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52866  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52867  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52868  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52869  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52870    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52871    JVM_ARG_OK=true
52872  else
52873    $ECHO "Arg failed:" >&5
52874    $ECHO "$OUTPUT" >&5
52875    JVM_ARG_OK=false
52876  fi
52877
52878
52879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52880$as_echo "$boot_jdk_jvmargs" >&6; }
52881
52882  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52883  JAVA_FLAGS=$boot_jdk_jvmargs
52884
52885
52886
52887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52888$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52889
52890  # Starting amount of heap memory.
52891
52892  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52893  $ECHO "Command: $JAVA -Xms64M -version" >&5
52894  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52895  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52896  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52897  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52898    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52899    JVM_ARG_OK=true
52900  else
52901    $ECHO "Arg failed:" >&5
52902    $ECHO "$OUTPUT" >&5
52903    JVM_ARG_OK=false
52904  fi
52905
52906
52907  # Maximum amount of heap memory.
52908  # Maximum stack size.
52909  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52910  if test "x$BUILD_NUM_BITS" = x32; then
52911    if test "$JVM_MAX_HEAP" -gt "1100"; then
52912      JVM_MAX_HEAP=1100
52913    elif test "$JVM_MAX_HEAP" -lt "512"; then
52914      JVM_MAX_HEAP=512
52915    fi
52916    STACK_SIZE=768
52917  else
52918    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52919    # pointers are used. Apparently, we need to increase the heap and stack
52920    # space for the jvm. More specifically, when running javac to build huge
52921    # jdk batch
52922    if test "$JVM_MAX_HEAP" -gt "1600"; then
52923      JVM_MAX_HEAP=1600
52924    elif test "$JVM_MAX_HEAP" -lt "512"; then
52925      JVM_MAX_HEAP=512
52926    fi
52927    STACK_SIZE=1536
52928  fi
52929
52930  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52931  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52932  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52933  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52934  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52935  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52936    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52937    JVM_ARG_OK=true
52938  else
52939    $ECHO "Arg failed:" >&5
52940    $ECHO "$OUTPUT" >&5
52941    JVM_ARG_OK=false
52942  fi
52943
52944
52945  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52946  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52947  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52948  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52949  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52950  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52951    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52952    JVM_ARG_OK=true
52953  else
52954    $ECHO "Arg failed:" >&5
52955    $ECHO "$OUTPUT" >&5
52956    JVM_ARG_OK=false
52957  fi
52958
52959
52960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52961$as_echo "$boot_jdk_jvmargs_big" >&6; }
52962
52963  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52964
52965
52966
52967  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52968$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52969
52970  # Use serial gc for small short lived tools if possible
52971
52972  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52973  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52974  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52975  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52976  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52977  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52978    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52979    JVM_ARG_OK=true
52980  else
52981    $ECHO "Arg failed:" >&5
52982    $ECHO "$OUTPUT" >&5
52983    JVM_ARG_OK=false
52984  fi
52985
52986
52987  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52988  $ECHO "Command: $JAVA -Xms32M -version" >&5
52989  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52990  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52991  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52992  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52993    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52994    JVM_ARG_OK=true
52995  else
52996    $ECHO "Arg failed:" >&5
52997    $ECHO "$OUTPUT" >&5
52998    JVM_ARG_OK=false
52999  fi
53000
53001
53002  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53003  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53004  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53005  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53006  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53007  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53008    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53009    JVM_ARG_OK=true
53010  else
53011    $ECHO "Arg failed:" >&5
53012    $ECHO "$OUTPUT" >&5
53013    JVM_ARG_OK=false
53014  fi
53015
53016
53017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53018$as_echo "$boot_jdk_jvmargs_small" >&6; }
53019
53020  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53021
53022
53023  JAVA_TOOL_FLAGS_SMALL=""
53024  for f in $JAVA_FLAGS_SMALL; do
53025    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53026  done
53027
53028
53029
53030# Setup smart javac (after cores and memory have been setup)
53031
53032
53033# Check whether --with-sjavac-server-java was given.
53034if test "${with_sjavac_server_java+set}" = set; then :
53035  withval=$with_sjavac_server_java;
53036fi
53037
53038
53039  if test "x$with_sjavac_server_java" != x; then
53040    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53041    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53042    if test "x$FOUND_VERSION" = x; then
53043      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53044    fi
53045  else
53046    SJAVAC_SERVER_JAVA="$JAVA"
53047  fi
53048
53049
53050  if test "$MEMORY_SIZE" -gt "3000"; then
53051
53052  $ECHO "Check if jvm arg is ok: -d64" >&5
53053  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53054  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53055  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53056  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53057  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53058    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53059    JVM_ARG_OK=true
53060  else
53061    $ECHO "Arg failed:" >&5
53062    $ECHO "$OUTPUT" >&5
53063    JVM_ARG_OK=false
53064  fi
53065
53066    if test "$JVM_ARG_OK" = true; then
53067      JVM_64BIT=true
53068      JVM_ARG_OK=false
53069    fi
53070  fi
53071
53072  MX_VALUE=`expr $MEMORY_SIZE / 2`
53073  if test "$JVM_64BIT" = true; then
53074    # Set ms lower than mx since more than one instance of the server might
53075    # get launched at the same time before they figure out which instance won.
53076    MS_VALUE=512
53077    if test "$MX_VALUE" -gt "2048"; then
53078      MX_VALUE=2048
53079    fi
53080  else
53081    MS_VALUE=256
53082    if test "$MX_VALUE" -gt "1500"; then
53083      MX_VALUE=1500
53084    fi
53085  fi
53086  if test "$MX_VALUE" -lt "512"; then
53087    MX_VALUE=512
53088  fi
53089
53090  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53091  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53092  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53093  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53094  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53095  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53096    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53097    JVM_ARG_OK=true
53098  else
53099    $ECHO "Arg failed:" >&5
53100    $ECHO "$OUTPUT" >&5
53101    JVM_ARG_OK=false
53102  fi
53103
53104
53105
53106  # Check whether --enable-sjavac was given.
53107if test "${enable_sjavac+set}" = set; then :
53108  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53109else
53110  ENABLE_SJAVAC='no'
53111fi
53112
53113  if test "x$JVM_ARG_OK" = "xfalse"; then
53114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53115$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53116    ENABLE_SJAVAC=no;
53117  fi
53118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53119$as_echo_n "checking whether to use sjavac... " >&6; }
53120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53121$as_echo "$ENABLE_SJAVAC" >&6; }
53122
53123
53124
53125# Can the C/C++ compiler use precompiled headers?
53126
53127
53128  ###############################################################################
53129  #
53130  # Can the C/C++ compiler use precompiled headers?
53131  #
53132  # Check whether --enable-precompiled-headers was given.
53133if test "${enable_precompiled_headers+set}" = set; then :
53134  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53135else
53136  ENABLE_PRECOMPH=yes
53137fi
53138
53139
53140  USE_PRECOMPILED_HEADER=1
53141  if test "x$ENABLE_PRECOMPH" = xno; then
53142    USE_PRECOMPILED_HEADER=0
53143  fi
53144
53145  if test "x$ENABLE_PRECOMPH" = xyes; then
53146    # Check that the compiler actually supports precomp headers.
53147    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53149$as_echo_n "checking that precompiled headers work... " >&6; }
53150      echo "int alfa();" > conftest.h
53151      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53152      if test ! -f conftest.hpp.gch; then
53153        USE_PRECOMPILED_HEADER=0
53154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53155$as_echo "no" >&6; }
53156      else
53157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53158$as_echo "yes" >&6; }
53159      fi
53160      rm -f conftest.h conftest.hpp.gch
53161    fi
53162  fi
53163
53164
53165
53166
53167# Setup use of ccache, if available
53168
53169  # Check whether --enable-ccache was given.
53170if test "${enable_ccache+set}" = set; then :
53171  enableval=$enable_ccache;
53172fi
53173
53174
53175  CCACHE=
53176  CCACHE_STATUS=
53177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53178$as_echo_n "checking is ccache enabled... " >&6; }
53179  if test "x$enable_ccache" = xyes; then
53180    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53182$as_echo "yes" >&6; }
53183      OLD_PATH="$PATH"
53184      if test "x$TOOLCHAIN_PATH" != x; then
53185        PATH=$TOOLCHAIN_PATH:$PATH
53186      fi
53187
53188
53189
53190  # Publish this variable in the help.
53191
53192
53193  if test "x$CCACHE" = x; then
53194    # The variable is not set by user, try to locate tool using the code snippet
53195    for ac_prog in ccache
53196do
53197  # Extract the first word of "$ac_prog", so it can be a program name with args.
53198set dummy $ac_prog; ac_word=$2
53199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53200$as_echo_n "checking for $ac_word... " >&6; }
53201if ${ac_cv_path_CCACHE+:} false; then :
53202  $as_echo_n "(cached) " >&6
53203else
53204  case $CCACHE in
53205  [\\/]* | ?:[\\/]*)
53206  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53207  ;;
53208  *)
53209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53210for as_dir in $PATH
53211do
53212  IFS=$as_save_IFS
53213  test -z "$as_dir" && as_dir=.
53214    for ac_exec_ext in '' $ac_executable_extensions; do
53215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53216    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53218    break 2
53219  fi
53220done
53221  done
53222IFS=$as_save_IFS
53223
53224  ;;
53225esac
53226fi
53227CCACHE=$ac_cv_path_CCACHE
53228if test -n "$CCACHE"; then
53229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53230$as_echo "$CCACHE" >&6; }
53231else
53232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53233$as_echo "no" >&6; }
53234fi
53235
53236
53237  test -n "$CCACHE" && break
53238done
53239
53240  else
53241    # The variable is set, but is it from the command line or the environment?
53242
53243    # Try to remove the string !CCACHE! from our list.
53244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53246      # If it failed, the variable was not from the command line. Ignore it,
53247      # but warn the user (except for BASH, which is always set by the calling BASH).
53248      if test "xCCACHE" != xBASH; then
53249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53250$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53251      fi
53252      # Try to locate tool using the code snippet
53253      for ac_prog in ccache
53254do
53255  # Extract the first word of "$ac_prog", so it can be a program name with args.
53256set dummy $ac_prog; ac_word=$2
53257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53258$as_echo_n "checking for $ac_word... " >&6; }
53259if ${ac_cv_path_CCACHE+:} false; then :
53260  $as_echo_n "(cached) " >&6
53261else
53262  case $CCACHE in
53263  [\\/]* | ?:[\\/]*)
53264  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53265  ;;
53266  *)
53267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53268for as_dir in $PATH
53269do
53270  IFS=$as_save_IFS
53271  test -z "$as_dir" && as_dir=.
53272    for ac_exec_ext in '' $ac_executable_extensions; do
53273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53274    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53276    break 2
53277  fi
53278done
53279  done
53280IFS=$as_save_IFS
53281
53282  ;;
53283esac
53284fi
53285CCACHE=$ac_cv_path_CCACHE
53286if test -n "$CCACHE"; then
53287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53288$as_echo "$CCACHE" >&6; }
53289else
53290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53291$as_echo "no" >&6; }
53292fi
53293
53294
53295  test -n "$CCACHE" && break
53296done
53297
53298    else
53299      # If it succeeded, then it was overridden by the user. We will use it
53300      # for the tool.
53301
53302      # First remove it from the list of overridden variables, so we can test
53303      # for unknown variables in the end.
53304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53305
53306      # Check if the provided tool contains a complete path.
53307      tool_specified="$CCACHE"
53308      tool_basename="${tool_specified##*/}"
53309      if test "x$tool_basename" = "x$tool_specified"; then
53310        # A command without a complete path is provided, search $PATH.
53311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53312$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53313        # Extract the first word of "$tool_basename", so it can be a program name with args.
53314set dummy $tool_basename; ac_word=$2
53315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53316$as_echo_n "checking for $ac_word... " >&6; }
53317if ${ac_cv_path_CCACHE+:} false; then :
53318  $as_echo_n "(cached) " >&6
53319else
53320  case $CCACHE in
53321  [\\/]* | ?:[\\/]*)
53322  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53323  ;;
53324  *)
53325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53326for as_dir in $PATH
53327do
53328  IFS=$as_save_IFS
53329  test -z "$as_dir" && as_dir=.
53330    for ac_exec_ext in '' $ac_executable_extensions; do
53331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53332    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53334    break 2
53335  fi
53336done
53337  done
53338IFS=$as_save_IFS
53339
53340  ;;
53341esac
53342fi
53343CCACHE=$ac_cv_path_CCACHE
53344if test -n "$CCACHE"; then
53345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53346$as_echo "$CCACHE" >&6; }
53347else
53348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53349$as_echo "no" >&6; }
53350fi
53351
53352
53353        if test "x$CCACHE" = x; then
53354          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53355        fi
53356      else
53357        # Otherwise we believe it is a complete path. Use it as it is.
53358        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53359$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53361$as_echo_n "checking for CCACHE... " >&6; }
53362        if test ! -x "$tool_specified"; then
53363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53364$as_echo "not found" >&6; }
53365          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53366        fi
53367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53368$as_echo "$tool_specified" >&6; }
53369      fi
53370    fi
53371  fi
53372
53373
53374
53375  if test "x$CCACHE" = x; then
53376    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53377  fi
53378
53379
53380      PATH="$OLD_PATH"
53381      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53382      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53383    else
53384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53385$as_echo "no" >&6; }
53386      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53387$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53388    fi
53389  elif test "x$enable_ccache" = xno; then
53390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53391$as_echo "no, explicitly disabled" >&6; }
53392    CCACHE_STATUS="Disabled"
53393  elif test "x$enable_ccache" = x; then
53394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53395$as_echo "no" >&6; }
53396  else
53397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53398$as_echo "unknown" >&6; }
53399    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53400  fi
53401
53402
53403
53404# Check whether --with-ccache-dir was given.
53405if test "${with_ccache_dir+set}" = set; then :
53406  withval=$with_ccache_dir;
53407fi
53408
53409
53410  if test "x$with_ccache_dir" != x; then
53411    # When using a non home ccache directory, assume the use is to share ccache files
53412    # with other users. Thus change the umask.
53413    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53414    if test "x$CCACHE" = x; then
53415      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53416$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53417    fi
53418  fi
53419
53420  if test "x$CCACHE" != x; then
53421
53422  if test "x$CCACHE" != x; then
53423    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53424      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53425          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53426      if test "x$HAS_BAD_CCACHE" != "x"; then
53427        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53428      fi
53429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53430$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53431      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53432      PUSHED_FLAGS="$CXXFLAGS"
53433      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53434      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53435/* end confdefs.h.  */
53436
53437int
53438main ()
53439{
53440
53441  ;
53442  return 0;
53443}
53444_ACEOF
53445if ac_fn_cxx_try_compile "$LINENO"; then :
53446  CC_KNOWS_CCACHE_TRICK=yes
53447else
53448  CC_KNOWS_CCACHE_TRICK=no
53449fi
53450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53451      CXXFLAGS="$PUSHED_FLAGS"
53452      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53454$as_echo "yes" >&6; }
53455        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53456
53457        CCACHE_SLOPPINESS=pch_defines,time_macros
53458      else
53459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53460$as_echo "no" >&6; }
53461        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53462      fi
53463    fi
53464
53465    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53466        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53467
53468    if test "x$SET_CCACHE_DIR" != x; then
53469      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53470      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53471    fi
53472  fi
53473
53474  fi
53475
53476
53477###############################################################################
53478#
53479# And now the finish...
53480#
53481###############################################################################
53482
53483# Check for some common pitfalls
53484
53485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53486    file_to_test="$SRC_ROOT/LICENSE"
53487    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53488      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
53489    fi
53490  fi
53491
53492
53493  # Did user specify any unknown variables?
53494
53495  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53496    # Replace the separating ! with spaces before presenting for end user.
53497    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53499$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53500  fi
53501
53502
53503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53504$as_echo_n "checking if build directory is on local disk... " >&6; }
53505
53506  # df -l lists only local disks; if the given directory is not found then
53507  # a non-zero exit code is given
53508  if test "x$DF" = x; then
53509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53510      # msys does not have df; use Windows "net use" instead.
53511      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53512      if test "x$IS_NETWORK_DISK" = x; then
53513        OUTPUT_DIR_IS_LOCAL="yes"
53514      else
53515        OUTPUT_DIR_IS_LOCAL="no"
53516      fi
53517    else
53518      # No df here, say it's local
53519      OUTPUT_DIR_IS_LOCAL="yes"
53520    fi
53521  else
53522    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53523      OUTPUT_DIR_IS_LOCAL="yes"
53524    else
53525      OUTPUT_DIR_IS_LOCAL="no"
53526    fi
53527  fi
53528
53529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53530$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53531
53532
53533
53534  # Check if the user has any old-style ALT_ variables set.
53535  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53536
53537  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53538  # Since we can't properly handle the dependencies for this, warn the user about the situation
53539  if test -e $OUTPUT_ROOT/spec.gmk; then
53540    IS_RECONFIGURE=yes
53541  else
53542    IS_RECONFIGURE=no
53543  fi
53544
53545
53546# At the end, call the custom hook. (Dummy macro if no custom sources available)
53547
53548
53549# We're messing a bit with internal autoconf variables to put the config.status
53550# in the output directory instead of the current directory.
53551CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53552
53553# Create the actual output files. Now the main work of configure is done.
53554cat >confcache <<\_ACEOF
53555# This file is a shell script that caches the results of configure
53556# tests run on this system so they can be shared between configure
53557# scripts and configure runs, see configure's option --config-cache.
53558# It is not useful on other systems.  If it contains results you don't
53559# want to keep, you may remove or edit it.
53560#
53561# config.status only pays attention to the cache file if you give it
53562# the --recheck option to rerun configure.
53563#
53564# `ac_cv_env_foo' variables (set or unset) will be overridden when
53565# loading this file, other *unset* `ac_cv_foo' will be assigned the
53566# following values.
53567
53568_ACEOF
53569
53570# The following way of writing the cache mishandles newlines in values,
53571# but we know of no workaround that is simple, portable, and efficient.
53572# So, we kill variables containing newlines.
53573# Ultrix sh set writes to stderr and can't be redirected directly,
53574# and sets the high bit in the cache file unless we assign to the vars.
53575(
53576  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53577    eval ac_val=\$$ac_var
53578    case $ac_val in #(
53579    *${as_nl}*)
53580      case $ac_var in #(
53581      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53582$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53583      esac
53584      case $ac_var in #(
53585      _ | IFS | as_nl) ;; #(
53586      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53587      *) { eval $ac_var=; unset $ac_var;} ;;
53588      esac ;;
53589    esac
53590  done
53591
53592  (set) 2>&1 |
53593    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53594    *${as_nl}ac_space=\ *)
53595      # `set' does not quote correctly, so add quotes: double-quote
53596      # substitution turns \\\\ into \\, and sed turns \\ into \.
53597      sed -n \
53598	"s/'/'\\\\''/g;
53599	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53600      ;; #(
53601    *)
53602      # `set' quotes correctly as required by POSIX, so do not add quotes.
53603      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53604      ;;
53605    esac |
53606    sort
53607) |
53608  sed '
53609     /^ac_cv_env_/b end
53610     t clear
53611     :clear
53612     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53613     t end
53614     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53615     :end' >>confcache
53616if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53617  if test -w "$cache_file"; then
53618    if test "x$cache_file" != "x/dev/null"; then
53619      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53620$as_echo "$as_me: updating cache $cache_file" >&6;}
53621      if test ! -f "$cache_file" || test -h "$cache_file"; then
53622	cat confcache >"$cache_file"
53623      else
53624        case $cache_file in #(
53625        */* | ?:*)
53626	  mv -f confcache "$cache_file"$$ &&
53627	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53628        *)
53629	  mv -f confcache "$cache_file" ;;
53630	esac
53631      fi
53632    fi
53633  else
53634    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53635$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53636  fi
53637fi
53638rm -f confcache
53639
53640test "x$prefix" = xNONE && prefix=$ac_default_prefix
53641# Let make expand exec_prefix.
53642test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53643
53644# Transform confdefs.h into DEFS.
53645# Protect against shell expansion while executing Makefile rules.
53646# Protect against Makefile macro expansion.
53647#
53648# If the first sed substitution is executed (which looks for macros that
53649# take arguments), then branch to the quote section.  Otherwise,
53650# look for a macro that doesn't take arguments.
53651ac_script='
53652:mline
53653/\\$/{
53654 N
53655 s,\\\n,,
53656 b mline
53657}
53658t clear
53659:clear
53660s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53661t quote
53662s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53663t quote
53664b any
53665:quote
53666s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53667s/\[/\\&/g
53668s/\]/\\&/g
53669s/\$/$$/g
53670H
53671:any
53672${
53673	g
53674	s/^\n//
53675	s/\n/ /g
53676	p
53677}
53678'
53679DEFS=`sed -n "$ac_script" confdefs.h`
53680
53681
53682ac_libobjs=
53683ac_ltlibobjs=
53684U=
53685for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53686  # 1. Remove the extension, and $U if already installed.
53687  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53688  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53689  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53690  #    will be set to the directory where LIBOBJS objects are built.
53691  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53692  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53693done
53694LIBOBJS=$ac_libobjs
53695
53696LTLIBOBJS=$ac_ltlibobjs
53697
53698
53699
53700: "${CONFIG_STATUS=./config.status}"
53701ac_write_fail=0
53702ac_clean_files_save=$ac_clean_files
53703ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53704{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53705$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53706as_write_fail=0
53707cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53708#! $SHELL
53709# Generated by $as_me.
53710# Run this file to recreate the current configuration.
53711# Compiler output produced by configure, useful for debugging
53712# configure, is in config.log if it exists.
53713
53714debug=false
53715ac_cs_recheck=false
53716ac_cs_silent=false
53717
53718SHELL=\${CONFIG_SHELL-$SHELL}
53719export SHELL
53720_ASEOF
53721cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53722## -------------------- ##
53723## M4sh Initialization. ##
53724## -------------------- ##
53725
53726# Be more Bourne compatible
53727DUALCASE=1; export DUALCASE # for MKS sh
53728if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53729  emulate sh
53730  NULLCMD=:
53731  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53732  # is contrary to our usage.  Disable this feature.
53733  alias -g '${1+"$@"}'='"$@"'
53734  setopt NO_GLOB_SUBST
53735else
53736  case `(set -o) 2>/dev/null` in #(
53737  *posix*) :
53738    set -o posix ;; #(
53739  *) :
53740     ;;
53741esac
53742fi
53743
53744
53745as_nl='
53746'
53747export as_nl
53748# Printing a long string crashes Solaris 7 /usr/bin/printf.
53749as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53750as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53751as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53752# Prefer a ksh shell builtin over an external printf program on Solaris,
53753# but without wasting forks for bash or zsh.
53754if test -z "$BASH_VERSION$ZSH_VERSION" \
53755    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53756  as_echo='print -r --'
53757  as_echo_n='print -rn --'
53758elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53759  as_echo='printf %s\n'
53760  as_echo_n='printf %s'
53761else
53762  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53763    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53764    as_echo_n='/usr/ucb/echo -n'
53765  else
53766    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53767    as_echo_n_body='eval
53768      arg=$1;
53769      case $arg in #(
53770      *"$as_nl"*)
53771	expr "X$arg" : "X\\(.*\\)$as_nl";
53772	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53773      esac;
53774      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53775    '
53776    export as_echo_n_body
53777    as_echo_n='sh -c $as_echo_n_body as_echo'
53778  fi
53779  export as_echo_body
53780  as_echo='sh -c $as_echo_body as_echo'
53781fi
53782
53783# The user is always right.
53784if test "${PATH_SEPARATOR+set}" != set; then
53785  PATH_SEPARATOR=:
53786  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53787    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53788      PATH_SEPARATOR=';'
53789  }
53790fi
53791
53792
53793# IFS
53794# We need space, tab and new line, in precisely that order.  Quoting is
53795# there to prevent editors from complaining about space-tab.
53796# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53797# splitting by setting IFS to empty value.)
53798IFS=" ""	$as_nl"
53799
53800# Find who we are.  Look in the path if we contain no directory separator.
53801as_myself=
53802case $0 in #((
53803  *[\\/]* ) as_myself=$0 ;;
53804  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53805for as_dir in $PATH
53806do
53807  IFS=$as_save_IFS
53808  test -z "$as_dir" && as_dir=.
53809    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53810  done
53811IFS=$as_save_IFS
53812
53813     ;;
53814esac
53815# We did not find ourselves, most probably we were run as `sh COMMAND'
53816# in which case we are not to be found in the path.
53817if test "x$as_myself" = x; then
53818  as_myself=$0
53819fi
53820if test ! -f "$as_myself"; then
53821  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53822  exit 1
53823fi
53824
53825# Unset variables that we do not need and which cause bugs (e.g. in
53826# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53827# suppresses any "Segmentation fault" message there.  '((' could
53828# trigger a bug in pdksh 5.2.14.
53829for as_var in BASH_ENV ENV MAIL MAILPATH
53830do eval test x\${$as_var+set} = xset \
53831  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53832done
53833PS1='$ '
53834PS2='> '
53835PS4='+ '
53836
53837# NLS nuisances.
53838LC_ALL=C
53839export LC_ALL
53840LANGUAGE=C
53841export LANGUAGE
53842
53843# CDPATH.
53844(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53845
53846
53847# as_fn_error STATUS ERROR [LINENO LOG_FD]
53848# ----------------------------------------
53849# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53850# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53851# script with STATUS, using 1 if that was 0.
53852as_fn_error ()
53853{
53854  as_status=$1; test $as_status -eq 0 && as_status=1
53855  if test "$4"; then
53856    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53857    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53858  fi
53859  $as_echo "$as_me: error: $2" >&2
53860  as_fn_exit $as_status
53861} # as_fn_error
53862
53863
53864# as_fn_set_status STATUS
53865# -----------------------
53866# Set $? to STATUS, without forking.
53867as_fn_set_status ()
53868{
53869  return $1
53870} # as_fn_set_status
53871
53872# as_fn_exit STATUS
53873# -----------------
53874# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53875as_fn_exit ()
53876{
53877  set +e
53878  as_fn_set_status $1
53879  exit $1
53880} # as_fn_exit
53881
53882# as_fn_unset VAR
53883# ---------------
53884# Portably unset VAR.
53885as_fn_unset ()
53886{
53887  { eval $1=; unset $1;}
53888}
53889as_unset=as_fn_unset
53890# as_fn_append VAR VALUE
53891# ----------------------
53892# Append the text in VALUE to the end of the definition contained in VAR. Take
53893# advantage of any shell optimizations that allow amortized linear growth over
53894# repeated appends, instead of the typical quadratic growth present in naive
53895# implementations.
53896if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53897  eval 'as_fn_append ()
53898  {
53899    eval $1+=\$2
53900  }'
53901else
53902  as_fn_append ()
53903  {
53904    eval $1=\$$1\$2
53905  }
53906fi # as_fn_append
53907
53908# as_fn_arith ARG...
53909# ------------------
53910# Perform arithmetic evaluation on the ARGs, and store the result in the
53911# global $as_val. Take advantage of shells that can avoid forks. The arguments
53912# must be portable across $(()) and expr.
53913if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53914  eval 'as_fn_arith ()
53915  {
53916    as_val=$(( $* ))
53917  }'
53918else
53919  as_fn_arith ()
53920  {
53921    as_val=`expr "$@" || test $? -eq 1`
53922  }
53923fi # as_fn_arith
53924
53925
53926if expr a : '\(a\)' >/dev/null 2>&1 &&
53927   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53928  as_expr=expr
53929else
53930  as_expr=false
53931fi
53932
53933if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53934  as_basename=basename
53935else
53936  as_basename=false
53937fi
53938
53939if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53940  as_dirname=dirname
53941else
53942  as_dirname=false
53943fi
53944
53945as_me=`$as_basename -- "$0" ||
53946$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53947	 X"$0" : 'X\(//\)$' \| \
53948	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53949$as_echo X/"$0" |
53950    sed '/^.*\/\([^/][^/]*\)\/*$/{
53951	    s//\1/
53952	    q
53953	  }
53954	  /^X\/\(\/\/\)$/{
53955	    s//\1/
53956	    q
53957	  }
53958	  /^X\/\(\/\).*/{
53959	    s//\1/
53960	    q
53961	  }
53962	  s/.*/./; q'`
53963
53964# Avoid depending upon Character Ranges.
53965as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53966as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53967as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53968as_cr_digits='0123456789'
53969as_cr_alnum=$as_cr_Letters$as_cr_digits
53970
53971ECHO_C= ECHO_N= ECHO_T=
53972case `echo -n x` in #(((((
53973-n*)
53974  case `echo 'xy\c'` in
53975  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53976  xy)  ECHO_C='\c';;
53977  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53978       ECHO_T='	';;
53979  esac;;
53980*)
53981  ECHO_N='-n';;
53982esac
53983
53984rm -f conf$$ conf$$.exe conf$$.file
53985if test -d conf$$.dir; then
53986  rm -f conf$$.dir/conf$$.file
53987else
53988  rm -f conf$$.dir
53989  mkdir conf$$.dir 2>/dev/null
53990fi
53991if (echo >conf$$.file) 2>/dev/null; then
53992  if ln -s conf$$.file conf$$ 2>/dev/null; then
53993    as_ln_s='ln -s'
53994    # ... but there are two gotchas:
53995    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53996    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53997    # In both cases, we have to default to `cp -pR'.
53998    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53999      as_ln_s='cp -pR'
54000  elif ln conf$$.file conf$$ 2>/dev/null; then
54001    as_ln_s=ln
54002  else
54003    as_ln_s='cp -pR'
54004  fi
54005else
54006  as_ln_s='cp -pR'
54007fi
54008rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54009rmdir conf$$.dir 2>/dev/null
54010
54011
54012# as_fn_mkdir_p
54013# -------------
54014# Create "$as_dir" as a directory, including parents if necessary.
54015as_fn_mkdir_p ()
54016{
54017
54018  case $as_dir in #(
54019  -*) as_dir=./$as_dir;;
54020  esac
54021  test -d "$as_dir" || eval $as_mkdir_p || {
54022    as_dirs=
54023    while :; do
54024      case $as_dir in #(
54025      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54026      *) as_qdir=$as_dir;;
54027      esac
54028      as_dirs="'$as_qdir' $as_dirs"
54029      as_dir=`$as_dirname -- "$as_dir" ||
54030$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54031	 X"$as_dir" : 'X\(//\)[^/]' \| \
54032	 X"$as_dir" : 'X\(//\)$' \| \
54033	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54034$as_echo X"$as_dir" |
54035    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54036	    s//\1/
54037	    q
54038	  }
54039	  /^X\(\/\/\)[^/].*/{
54040	    s//\1/
54041	    q
54042	  }
54043	  /^X\(\/\/\)$/{
54044	    s//\1/
54045	    q
54046	  }
54047	  /^X\(\/\).*/{
54048	    s//\1/
54049	    q
54050	  }
54051	  s/.*/./; q'`
54052      test -d "$as_dir" && break
54053    done
54054    test -z "$as_dirs" || eval "mkdir $as_dirs"
54055  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54056
54057
54058} # as_fn_mkdir_p
54059if mkdir -p . 2>/dev/null; then
54060  as_mkdir_p='mkdir -p "$as_dir"'
54061else
54062  test -d ./-p && rmdir ./-p
54063  as_mkdir_p=false
54064fi
54065
54066
54067# as_fn_executable_p FILE
54068# -----------------------
54069# Test if FILE is an executable regular file.
54070as_fn_executable_p ()
54071{
54072  test -f "$1" && test -x "$1"
54073} # as_fn_executable_p
54074as_test_x='test -x'
54075as_executable_p=as_fn_executable_p
54076
54077# Sed expression to map a string onto a valid CPP name.
54078as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54079
54080# Sed expression to map a string onto a valid variable name.
54081as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54082
54083
54084exec 6>&1
54085## ----------------------------------- ##
54086## Main body of $CONFIG_STATUS script. ##
54087## ----------------------------------- ##
54088_ASEOF
54089test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54090
54091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54092# Save the log message, to keep $0 and so on meaningful, and to
54093# report actual input values of CONFIG_FILES etc. instead of their
54094# values after options handling.
54095ac_log="
54096This file was extended by OpenJDK $as_me jdk9, which was
54097generated by GNU Autoconf 2.69.  Invocation command line was
54098
54099  CONFIG_FILES    = $CONFIG_FILES
54100  CONFIG_HEADERS  = $CONFIG_HEADERS
54101  CONFIG_LINKS    = $CONFIG_LINKS
54102  CONFIG_COMMANDS = $CONFIG_COMMANDS
54103  $ $0 $@
54104
54105on `(hostname || uname -n) 2>/dev/null | sed 1q`
54106"
54107
54108_ACEOF
54109
54110case $ac_config_files in *"
54111"*) set x $ac_config_files; shift; ac_config_files=$*;;
54112esac
54113
54114
54115
54116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54117# Files that config.status was made for.
54118config_files="$ac_config_files"
54119
54120_ACEOF
54121
54122cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54123ac_cs_usage="\
54124\`$as_me' instantiates files and other configuration actions
54125from templates according to the current configuration.  Unless the files
54126and actions are specified as TAGs, all are instantiated by default.
54127
54128Usage: $0 [OPTION]... [TAG]...
54129
54130  -h, --help       print this help, then exit
54131  -V, --version    print version number and configuration settings, then exit
54132      --config     print configuration, then exit
54133  -q, --quiet, --silent
54134                   do not print progress messages
54135  -d, --debug      don't remove temporary files
54136      --recheck    update $as_me by reconfiguring in the same conditions
54137      --file=FILE[:TEMPLATE]
54138                   instantiate the configuration file FILE
54139
54140Configuration files:
54141$config_files
54142
54143Report bugs to <build-dev@openjdk.java.net>.
54144OpenJDK home page: <http://openjdk.java.net>."
54145
54146_ACEOF
54147cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54148ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54149ac_cs_version="\\
54150OpenJDK config.status jdk9
54151configured by $0, generated by GNU Autoconf 2.69,
54152  with options \\"\$ac_cs_config\\"
54153
54154Copyright (C) 2012 Free Software Foundation, Inc.
54155This config.status script is free software; the Free Software Foundation
54156gives unlimited permission to copy, distribute and modify it."
54157
54158ac_pwd='$ac_pwd'
54159srcdir='$srcdir'
54160AWK='$AWK'
54161test -n "\$AWK" || AWK=awk
54162_ACEOF
54163
54164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54165# The default lists apply if the user does not specify any file.
54166ac_need_defaults=:
54167while test $# != 0
54168do
54169  case $1 in
54170  --*=?*)
54171    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54172    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54173    ac_shift=:
54174    ;;
54175  --*=)
54176    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54177    ac_optarg=
54178    ac_shift=:
54179    ;;
54180  *)
54181    ac_option=$1
54182    ac_optarg=$2
54183    ac_shift=shift
54184    ;;
54185  esac
54186
54187  case $ac_option in
54188  # Handling of the options.
54189  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54190    ac_cs_recheck=: ;;
54191  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54192    $as_echo "$ac_cs_version"; exit ;;
54193  --config | --confi | --conf | --con | --co | --c )
54194    $as_echo "$ac_cs_config"; exit ;;
54195  --debug | --debu | --deb | --de | --d | -d )
54196    debug=: ;;
54197  --file | --fil | --fi | --f )
54198    $ac_shift
54199    case $ac_optarg in
54200    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54201    '') as_fn_error $? "missing file argument" ;;
54202    esac
54203    as_fn_append CONFIG_FILES " '$ac_optarg'"
54204    ac_need_defaults=false;;
54205  --he | --h |  --help | --hel | -h )
54206    $as_echo "$ac_cs_usage"; exit ;;
54207  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54208  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54209    ac_cs_silent=: ;;
54210
54211  # This is an error.
54212  -*) as_fn_error $? "unrecognized option: \`$1'
54213Try \`$0 --help' for more information." ;;
54214
54215  *) as_fn_append ac_config_targets " $1"
54216     ac_need_defaults=false ;;
54217
54218  esac
54219  shift
54220done
54221
54222ac_configure_extra_args=
54223
54224if $ac_cs_silent; then
54225  exec 6>/dev/null
54226  ac_configure_extra_args="$ac_configure_extra_args --silent"
54227fi
54228
54229_ACEOF
54230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54231if \$ac_cs_recheck; then
54232  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54233  shift
54234  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54235  CONFIG_SHELL='$SHELL'
54236  export CONFIG_SHELL
54237  exec "\$@"
54238fi
54239
54240_ACEOF
54241cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54242exec 5>>config.log
54243{
54244  echo
54245  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54246## Running $as_me. ##
54247_ASBOX
54248  $as_echo "$ac_log"
54249} >&5
54250
54251_ACEOF
54252cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54253_ACEOF
54254
54255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54256
54257# Handling of arguments.
54258for ac_config_target in $ac_config_targets
54259do
54260  case $ac_config_target in
54261    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54262    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54263    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54264    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54265    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54266
54267  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54268  esac
54269done
54270
54271
54272# If the user did not use the arguments to specify the items to instantiate,
54273# then the envvar interface is used.  Set only those that are not.
54274# We use the long form for the default assignment because of an extremely
54275# bizarre bug on SunOS 4.1.3.
54276if $ac_need_defaults; then
54277  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54278fi
54279
54280# Have a temporary directory for convenience.  Make it in the build tree
54281# simply because there is no reason against having it here, and in addition,
54282# creating and moving files from /tmp can sometimes cause problems.
54283# Hook for its removal unless debugging.
54284# Note that there is a small window in which the directory will not be cleaned:
54285# after its creation but before its name has been assigned to `$tmp'.
54286$debug ||
54287{
54288  tmp= ac_tmp=
54289  trap 'exit_status=$?
54290  : "${ac_tmp:=$tmp}"
54291  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54292' 0
54293  trap 'as_fn_exit 1' 1 2 13 15
54294}
54295# Create a (secure) tmp directory for tmp files.
54296
54297{
54298  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54299  test -d "$tmp"
54300}  ||
54301{
54302  tmp=./conf$$-$RANDOM
54303  (umask 077 && mkdir "$tmp")
54304} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54305ac_tmp=$tmp
54306
54307# Set up the scripts for CONFIG_FILES section.
54308# No need to generate them if there are no CONFIG_FILES.
54309# This happens for instance with `./config.status config.h'.
54310if test -n "$CONFIG_FILES"; then
54311
54312
54313ac_cr=`echo X | tr X '\015'`
54314# On cygwin, bash can eat \r inside `` if the user requested igncr.
54315# But we know of no other shell where ac_cr would be empty at this
54316# point, so we can use a bashism as a fallback.
54317if test "x$ac_cr" = x; then
54318  eval ac_cr=\$\'\\r\'
54319fi
54320ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54321if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54322  ac_cs_awk_cr='\\r'
54323else
54324  ac_cs_awk_cr=$ac_cr
54325fi
54326
54327echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54328_ACEOF
54329
54330
54331{
54332  echo "cat >conf$$subs.awk <<_ACEOF" &&
54333  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54334  echo "_ACEOF"
54335} >conf$$subs.sh ||
54336  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54337ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54338ac_delim='%!_!# '
54339for ac_last_try in false false false false false :; do
54340  . ./conf$$subs.sh ||
54341    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54342
54343  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54344  if test $ac_delim_n = $ac_delim_num; then
54345    break
54346  elif $ac_last_try; then
54347    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54348  else
54349    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54350  fi
54351done
54352rm -f conf$$subs.sh
54353
54354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54355cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54356_ACEOF
54357sed -n '
54358h
54359s/^/S["/; s/!.*/"]=/
54360p
54361g
54362s/^[^!]*!//
54363:repl
54364t repl
54365s/'"$ac_delim"'$//
54366t delim
54367:nl
54368h
54369s/\(.\{148\}\)..*/\1/
54370t more1
54371s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54372p
54373n
54374b repl
54375:more1
54376s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54377p
54378g
54379s/.\{148\}//
54380t nl
54381:delim
54382h
54383s/\(.\{148\}\)..*/\1/
54384t more2
54385s/["\\]/\\&/g; s/^/"/; s/$/"/
54386p
54387b
54388:more2
54389s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54390p
54391g
54392s/.\{148\}//
54393t delim
54394' <conf$$subs.awk | sed '
54395/^[^""]/{
54396  N
54397  s/\n//
54398}
54399' >>$CONFIG_STATUS || ac_write_fail=1
54400rm -f conf$$subs.awk
54401cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54402_ACAWK
54403cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54404  for (key in S) S_is_set[key] = 1
54405  FS = ""
54406
54407}
54408{
54409  line = $ 0
54410  nfields = split(line, field, "@")
54411  substed = 0
54412  len = length(field[1])
54413  for (i = 2; i < nfields; i++) {
54414    key = field[i]
54415    keylen = length(key)
54416    if (S_is_set[key]) {
54417      value = S[key]
54418      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54419      len += length(value) + length(field[++i])
54420      substed = 1
54421    } else
54422      len += 1 + keylen
54423  }
54424
54425  print line
54426}
54427
54428_ACAWK
54429_ACEOF
54430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54431if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54432  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54433else
54434  cat
54435fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54436  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54437_ACEOF
54438
54439# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54440# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54441# trailing colons and then remove the whole line if VPATH becomes empty
54442# (actually we leave an empty line to preserve line numbers).
54443if test "x$srcdir" = x.; then
54444  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54445h
54446s///
54447s/^/:/
54448s/[	 ]*$/:/
54449s/:\$(srcdir):/:/g
54450s/:\${srcdir}:/:/g
54451s/:@srcdir@:/:/g
54452s/^:*//
54453s/:*$//
54454x
54455s/\(=[	 ]*\).*/\1/
54456G
54457s/\n//
54458s/^[^=]*=[	 ]*$//
54459}'
54460fi
54461
54462cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54463fi # test -n "$CONFIG_FILES"
54464
54465
54466eval set X "  :F $CONFIG_FILES      "
54467shift
54468for ac_tag
54469do
54470  case $ac_tag in
54471  :[FHLC]) ac_mode=$ac_tag; continue;;
54472  esac
54473  case $ac_mode$ac_tag in
54474  :[FHL]*:*);;
54475  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54476  :[FH]-) ac_tag=-:-;;
54477  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54478  esac
54479  ac_save_IFS=$IFS
54480  IFS=:
54481  set x $ac_tag
54482  IFS=$ac_save_IFS
54483  shift
54484  ac_file=$1
54485  shift
54486
54487  case $ac_mode in
54488  :L) ac_source=$1;;
54489  :[FH])
54490    ac_file_inputs=
54491    for ac_f
54492    do
54493      case $ac_f in
54494      -) ac_f="$ac_tmp/stdin";;
54495      *) # Look for the file first in the build tree, then in the source tree
54496	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54497	 # because $ac_f cannot contain `:'.
54498	 test -f "$ac_f" ||
54499	   case $ac_f in
54500	   [\\/$]*) false;;
54501	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54502	   esac ||
54503	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54504      esac
54505      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54506      as_fn_append ac_file_inputs " '$ac_f'"
54507    done
54508
54509    # Let's still pretend it is `configure' which instantiates (i.e., don't
54510    # use $as_me), people would be surprised to read:
54511    #    /* config.h.  Generated by config.status.  */
54512    configure_input='Generated from '`
54513	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54514	`' by configure.'
54515    if test x"$ac_file" != x-; then
54516      configure_input="$ac_file.  $configure_input"
54517      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54518$as_echo "$as_me: creating $ac_file" >&6;}
54519    fi
54520    # Neutralize special characters interpreted by sed in replacement strings.
54521    case $configure_input in #(
54522    *\&* | *\|* | *\\* )
54523       ac_sed_conf_input=`$as_echo "$configure_input" |
54524       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54525    *) ac_sed_conf_input=$configure_input;;
54526    esac
54527
54528    case $ac_tag in
54529    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54530      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54531    esac
54532    ;;
54533  esac
54534
54535  ac_dir=`$as_dirname -- "$ac_file" ||
54536$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54537	 X"$ac_file" : 'X\(//\)[^/]' \| \
54538	 X"$ac_file" : 'X\(//\)$' \| \
54539	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54540$as_echo X"$ac_file" |
54541    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54542	    s//\1/
54543	    q
54544	  }
54545	  /^X\(\/\/\)[^/].*/{
54546	    s//\1/
54547	    q
54548	  }
54549	  /^X\(\/\/\)$/{
54550	    s//\1/
54551	    q
54552	  }
54553	  /^X\(\/\).*/{
54554	    s//\1/
54555	    q
54556	  }
54557	  s/.*/./; q'`
54558  as_dir="$ac_dir"; as_fn_mkdir_p
54559  ac_builddir=.
54560
54561case "$ac_dir" in
54562.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54563*)
54564  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54565  # A ".." for each directory in $ac_dir_suffix.
54566  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54567  case $ac_top_builddir_sub in
54568  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54569  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54570  esac ;;
54571esac
54572ac_abs_top_builddir=$ac_pwd
54573ac_abs_builddir=$ac_pwd$ac_dir_suffix
54574# for backward compatibility:
54575ac_top_builddir=$ac_top_build_prefix
54576
54577case $srcdir in
54578  .)  # We are building in place.
54579    ac_srcdir=.
54580    ac_top_srcdir=$ac_top_builddir_sub
54581    ac_abs_top_srcdir=$ac_pwd ;;
54582  [\\/]* | ?:[\\/]* )  # Absolute name.
54583    ac_srcdir=$srcdir$ac_dir_suffix;
54584    ac_top_srcdir=$srcdir
54585    ac_abs_top_srcdir=$srcdir ;;
54586  *) # Relative name.
54587    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54588    ac_top_srcdir=$ac_top_build_prefix$srcdir
54589    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54590esac
54591ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54592
54593
54594  case $ac_mode in
54595  :F)
54596  #
54597  # CONFIG_FILE
54598  #
54599
54600_ACEOF
54601
54602cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54603# If the template does not know about datarootdir, expand it.
54604# FIXME: This hack should be removed a few years after 2.60.
54605ac_datarootdir_hack=; ac_datarootdir_seen=
54606ac_sed_dataroot='
54607/datarootdir/ {
54608  p
54609  q
54610}
54611/@datadir@/p
54612/@docdir@/p
54613/@infodir@/p
54614/@localedir@/p
54615/@mandir@/p'
54616case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54617*datarootdir*) ac_datarootdir_seen=yes;;
54618*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54619  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54620$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54621_ACEOF
54622cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54623  ac_datarootdir_hack='
54624  s&@datadir@&$datadir&g
54625  s&@docdir@&$docdir&g
54626  s&@infodir@&$infodir&g
54627  s&@localedir@&$localedir&g
54628  s&@mandir@&$mandir&g
54629  s&\\\${datarootdir}&$datarootdir&g' ;;
54630esac
54631_ACEOF
54632
54633# Neutralize VPATH when `$srcdir' = `.'.
54634# Shell code in configure.ac might set extrasub.
54635# FIXME: do we really want to maintain this feature?
54636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54637ac_sed_extra="$ac_vpsub
54638$extrasub
54639_ACEOF
54640cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54641:t
54642/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54643s|@configure_input@|$ac_sed_conf_input|;t t
54644s&@top_builddir@&$ac_top_builddir_sub&;t t
54645s&@top_build_prefix@&$ac_top_build_prefix&;t t
54646s&@srcdir@&$ac_srcdir&;t t
54647s&@abs_srcdir@&$ac_abs_srcdir&;t t
54648s&@top_srcdir@&$ac_top_srcdir&;t t
54649s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54650s&@builddir@&$ac_builddir&;t t
54651s&@abs_builddir@&$ac_abs_builddir&;t t
54652s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54653$ac_datarootdir_hack
54654"
54655eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54656  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54657
54658test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54659  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54660  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54661      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54662  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54663which seems to be undefined.  Please make sure it is defined" >&5
54664$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54665which seems to be undefined.  Please make sure it is defined" >&2;}
54666
54667  rm -f "$ac_tmp/stdin"
54668  case $ac_file in
54669  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54670  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54671  esac \
54672  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54673 ;;
54674
54675
54676
54677  esac
54678
54679done # for ac_tag
54680
54681
54682as_fn_exit 0
54683_ACEOF
54684ac_clean_files=$ac_clean_files_save
54685
54686test $ac_write_fail = 0 ||
54687  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54688
54689
54690# configure is writing to config.log, and then calls config.status.
54691# config.status does its own redirection, appending to config.log.
54692# Unfortunately, on DOS this fails, as config.log is still kept open
54693# by configure, so config.status won't be able to write to it; its
54694# output is simply discarded.  So we exec the FD to /dev/null,
54695# effectively closing config.log, so it can be properly (re)opened and
54696# appended to by config.status.  When coming back to configure, we
54697# need to make the FD available again.
54698if test "$no_create" != yes; then
54699  ac_cs_success=:
54700  ac_config_status_args=
54701  test "$silent" = yes &&
54702    ac_config_status_args="$ac_config_status_args --quiet"
54703  exec 5>/dev/null
54704  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54705  exec 5>>config.log
54706  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54707  # would make configure fail if this is the last instruction.
54708  $ac_cs_success || as_fn_exit 1
54709fi
54710if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54711  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54712$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54713fi
54714
54715
54716# After AC_OUTPUT, we need to do final work
54717
54718
54719  # Try to move config.log (generated by autoconf) to the configure-support directory.
54720  if test -e ./config.log; then
54721    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54722  fi
54723
54724  # Rotate our log file (configure.log)
54725  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54726    $RM -f "$OUTPUT_ROOT/configure.log.old"
54727  fi
54728  if test -e "$OUTPUT_ROOT/configure.log"; then
54729    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54730  fi
54731
54732  # Move configure.log from current directory to the build output root
54733  if test -e ./configure.log; then
54734    echo found it
54735    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54736  fi
54737
54738  # Make the compare script executable
54739  $CHMOD +x $OUTPUT_ROOT/compare.sh
54740
54741
54742# Finally output some useful information to the user
54743
54744  # Finally output some useful information to the user
54745
54746  printf "\n"
54747  printf "====================================================\n"
54748  if test "x$no_create" != "xyes"; then
54749    if test "x$IS_RECONFIGURE" != "xyes"; then
54750      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54751    else
54752      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54753    fi
54754  else
54755    if test "x$IS_RECONFIGURE" != "xyes"; then
54756      printf "A configuration has been successfully checked but not created\n"
54757    else
54758      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54759    fi
54760  fi
54761  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54762    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54763  else
54764    printf "using default settings.\n"
54765  fi
54766
54767  printf "\n"
54768  printf "Configuration summary:\n"
54769  printf "* Debug level:    $DEBUG_LEVEL\n"
54770  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54771  printf "* JDK variant:    $JDK_VARIANT\n"
54772  printf "* JVM variants:   $with_jvm_variants\n"
54773  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54774  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
54775
54776  printf "\n"
54777  printf "Tools summary:\n"
54778  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54779    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54780  fi
54781  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54782  if test "x$TOOLCHAIN_VERSION" != "x"; then
54783    print_version=" $TOOLCHAIN_VERSION"
54784  fi
54785  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54786  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54787  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54788
54789  printf "\n"
54790  printf "Build performance summary:\n"
54791  printf "* Cores to use:   $JOBS\n"
54792  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54793  if test "x$CCACHE_STATUS" != "x"; then
54794    printf "* ccache status:  $CCACHE_STATUS\n"
54795  fi
54796  printf "\n"
54797
54798  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54799    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54800    printf "will result in longer build times.\n"
54801    printf "\n"
54802  fi
54803
54804  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54805    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54806    printf "These are not respected, and will be ignored. It is recommended\n"
54807    printf "that you clean your environment. The following variables are set:\n"
54808    printf "$FOUND_ALT_VARIABLES\n"
54809    printf "\n"
54810  fi
54811
54812  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54813    printf "WARNING: Your build output directory is not on a local disk.\n"
54814    printf "This will severely degrade build performance!\n"
54815    printf "It is recommended that you create an output directory on a local disk,\n"
54816    printf "and run the configure script again from that directory.\n"
54817    printf "\n"
54818  fi
54819
54820  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54821    printf "WARNING: The result of this configuration has overridden an older\n"
54822    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54823    printf "proper build. Failure to do so might result in strange build problems.\n"
54824    printf "\n"
54825  fi
54826
54827  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54828    printf "WARNING: The result of this configuration was not saved.\n"
54829    printf "You should run without '--no-create | -n' to create the configuration.\n"
54830    printf "\n"
54831  fi
54832
54833
54834
54835  # Locate config.log.
54836  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54837    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54838  elif test -e "./config.log"; then
54839    CONFIG_LOG_PATH="."
54840  fi
54841
54842  if test -e "$CONFIG_LOG_PATH/config.log"; then
54843    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54844    if test $? -eq 0; then
54845      printf "The following warnings were produced. Repeated here for convenience:\n"
54846      # We must quote sed expression (using []) to stop m4 from eating the [].
54847      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54848      printf "\n"
54849    fi
54850  fi
54851
54852