generated-configure.sh revision 1757:5064fbd94e61
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_base
1073with_version_pre_debuglevel
1074with_version_opt
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-base Set the base part of the version 'PRE' field
1933                          (pre-release identifier) ['internal']
1934  --with-version-pre-debuglevel
1935                          Set the debug level part of the version 'PRE' field
1936                          (pre-release identifier) [current debug level]
1937  --with-version-opt      Set version 'OPT' field (build metadata)
1938                          [<timestamp>.<user>.<dirname>]
1939  --with-version-build    Set version 'BUILD' field (build number) [not
1940                          specified]
1941  --with-version-major    Set version 'MAJOR' field (first number) [current
1942                          source value]
1943  --with-version-minor    Set version 'MINOR' field (second number) [current
1944                          source value]
1945  --with-version-security Set version 'SECURITY' field (third number) [current
1946                          source value]
1947  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1948                          specified]
1949  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1950  --with-add-source-root  for each and every source directory, look in this
1951                          additional source root for the same directory; if it
1952                          exists and have files in it, include it in the build
1953  --with-override-source-root
1954                          for each and every source directory, look in this
1955                          override source root for the same directory; if it
1956                          exists, use that directory instead and ignore the
1957                          directory in the original source root
1958  --with-adds-and-overrides
1959                          use the subdirs 'adds' and 'overrides' in the
1960                          specified directory as add-source-root and
1961                          override-source-root
1962  --with-override-langtools
1963                          use this langtools dir for the build
1964  --with-override-corba   use this corba dir for the build
1965  --with-override-jaxp    use this jaxp dir for the build
1966  --with-override-jaxws   use this jaxws dir for the build
1967  --with-override-hotspot use this hotspot dir for the build
1968  --with-override-nashorn use this nashorn dir for the build
1969  --with-override-jdk     use this jdk dir for the build
1970  --with-import-hotspot   import hotspot binaries from this jdk image or
1971                          hotspot build dist dir instead of building from
1972                          source
1973  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1974                          to show possible values [platform dependent]
1975  --with-toolchain-version
1976                          the version of the toolchain to look for, use
1977                          '--help' to show possible values [platform
1978                          dependent]
1979  --with-jtreg            Regression Test Harness [probed]
1980  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1981  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1982  --with-extra-ldflags    extra flags to be used when linking jdk
1983  --with-x                use the X Window System
1984  --with-cups             specify prefix directory for the cups package
1985                          (expecting the headers under PATH/include)
1986  --with-cups-include     specify directory for the cups include files
1987  --with-freetype         specify prefix directory for the freetype package
1988                          (expecting the libraries under PATH/lib and the
1989                          headers under PATH/include)
1990  --with-freetype-include specify directory for the freetype include files
1991  --with-freetype-lib     specify directory for the freetype library
1992  --with-freetype-src     specify directory with freetype sources to
1993                          automatically build the library (experimental,
1994                          Windows-only)
1995  --with-alsa             specify prefix directory for the alsa package
1996                          (expecting the libraries under PATH/lib and the
1997                          headers under PATH/include)
1998  --with-alsa-include     specify directory for the alsa include files
1999  --with-alsa-lib         specify directory for the alsa library
2000  --with-libjpeg          use libjpeg from build system or OpenJDK source
2001                          (system, bundled) [bundled]
2002  --with-giflib           use giflib from build system or OpenJDK source
2003                          (system, bundled) [bundled]
2004  --with-lcms             use lcms2 from build system or OpenJDK source
2005                          (system, bundled) [bundled]
2006  --with-libpng           use libpng from build system or OpenJDK source
2007                          (system, bundled) [bundled]
2008  --with-zlib             use zlib from build system or OpenJDK source
2009                          (system, bundled) [bundled]
2010  --with-stdc++lib=<static>,<dynamic>,<default>
2011                          force linking of the C++ runtime on Linux to either
2012                          static or dynamic, default is static with dynamic as
2013                          fallback
2014  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2015                          (Windows only) [probed]
2016  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2017                          (Windows only) [probed]
2018  --with-dxsdk            Deprecated. Option is kept for backwards
2019                          compatibility and is ignored
2020  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2021                          compatibility and is ignored
2022  --with-dxsdk-include    Deprecated. Option is kept for backwards
2023                          compatibility and is ignored
2024  --with-num-cores        number of cores in the build system, e.g.
2025                          --with-num-cores=8 [probed]
2026  --with-memory-size      memory (in MB) available in the build system, e.g.
2027                          --with-memory-size=1024 [probed]
2028  --with-jobs             number of parallel jobs to let make run [calculated
2029                          based on cores and memory]
2030  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2031                          invocations of boot JDK, overriding the default
2032                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2033                          -enableassertions"
2034  --with-sjavac-server-java
2035                          use this java binary for running the sjavac
2036                          background server [Boot JDK java]
2037  --with-ccache-dir       where to store ccache files [~/.ccache]
2038
2039Some influential environment variables:
2040  BASENAME    Override default value for BASENAME
2041  BASH        Override default value for BASH
2042  CAT         Override default value for CAT
2043  CHMOD       Override default value for CHMOD
2044  CMP         Override default value for CMP
2045  COMM        Override default value for COMM
2046  CP          Override default value for CP
2047  CUT         Override default value for CUT
2048  DATE        Override default value for DATE
2049  DIFF        Override default value for DIFF
2050  DIRNAME     Override default value for DIRNAME
2051  ECHO        Override default value for ECHO
2052  EXPR        Override default value for EXPR
2053  FILE        Override default value for FILE
2054  FIND        Override default value for FIND
2055  HEAD        Override default value for HEAD
2056  LN          Override default value for LN
2057  LS          Override default value for LS
2058  MKDIR       Override default value for MKDIR
2059  MKTEMP      Override default value for MKTEMP
2060  MV          Override default value for MV
2061  NAWK        Override default value for NAWK
2062  PRINTF      Override default value for PRINTF
2063  RM          Override default value for RM
2064  SH          Override default value for SH
2065  SORT        Override default value for SORT
2066  TAIL        Override default value for TAIL
2067  TAR         Override default value for TAR
2068  TEE         Override default value for TEE
2069  TOUCH       Override default value for TOUCH
2070  TR          Override default value for TR
2071  UNAME       Override default value for UNAME
2072  UNIQ        Override default value for UNIQ
2073  WC          Override default value for WC
2074  WHICH       Override default value for WHICH
2075  XARGS       Override default value for XARGS
2076  AWK         Override default value for AWK
2077  GREP        Override default value for GREP
2078  EGREP       Override default value for EGREP
2079  FGREP       Override default value for FGREP
2080  SED         Override default value for SED
2081  CYGPATH     Override default value for CYGPATH
2082  READLINK    Override default value for READLINK
2083  DF          Override default value for DF
2084  SETFILE     Override default value for SETFILE
2085  CPIO        Override default value for CPIO
2086  UNZIP       Override default value for UNZIP
2087  ZIP         Override default value for ZIP
2088  LDD         Override default value for LDD
2089  OTOOL       Override default value for OTOOL
2090  READELF     Override default value for READELF
2091  HG          Override default value for HG
2092  STAT        Override default value for STAT
2093  TIME        Override default value for TIME
2094  DSYMUTIL    Override default value for DSYMUTIL
2095  XATTR       Override default value for XATTR
2096  CODESIGN    Override default value for CODESIGN
2097  PKG_CONFIG  path to pkg-config utility
2098  JAVA        Override default value for JAVA
2099  JAVAC       Override default value for JAVAC
2100  JAVAH       Override default value for JAVAH
2101  JAR         Override default value for JAR
2102  JARSIGNER   Override default value for JARSIGNER
2103  CC          C compiler command
2104  CFLAGS      C compiler flags
2105  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2106              nonstandard directory <lib dir>
2107  LIBS        libraries to pass to the linker, e.g. -l<library>
2108  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2109              you have headers in a nonstandard directory <include dir>
2110  CXX         C++ compiler command
2111  CXXFLAGS    C++ compiler flags
2112  CPP         C preprocessor
2113  CXXCPP      C++ preprocessor
2114  AS          Override default value for AS
2115  AR          Override default value for AR
2116  LIPO        Override default value for LIPO
2117  STRIP       Override default value for STRIP
2118  NM          Override default value for NM
2119  GNM         Override default value for GNM
2120  OBJCOPY     Override default value for OBJCOPY
2121  OBJDUMP     Override default value for OBJDUMP
2122  BUILD_CC    Override default value for BUILD_CC
2123  BUILD_CXX   Override default value for BUILD_CXX
2124  BUILD_LD    Override default value for BUILD_LD
2125  JTREGEXE    Override default value for JTREGEXE
2126  XMKMF       Path to xmkmf, Makefile generator for X Window System
2127  FREETYPE_CFLAGS
2128              C compiler flags for FREETYPE, overriding pkg-config
2129  FREETYPE_LIBS
2130              linker flags for FREETYPE, overriding pkg-config
2131  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2132  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2133  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2134  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2135  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2136  PNG_LIBS    linker flags for PNG, overriding pkg-config
2137  LIBFFI_CFLAGS
2138              C compiler flags for LIBFFI, overriding pkg-config
2139  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2140  CCACHE      Override default value for CCACHE
2141
2142Use these variables to override the choices made by `configure' or to help
2143it to find libraries and programs with nonstandard names/locations.
2144
2145Report bugs to <build-dev@openjdk.java.net>.
2146OpenJDK home page: <http://openjdk.java.net>.
2147_ACEOF
2148ac_status=$?
2149fi
2150
2151if test "$ac_init_help" = "recursive"; then
2152  # If there are subdirs, report their specific --help.
2153  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2154    test -d "$ac_dir" ||
2155      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2156      continue
2157    ac_builddir=.
2158
2159case "$ac_dir" in
2160.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2161*)
2162  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2163  # A ".." for each directory in $ac_dir_suffix.
2164  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2165  case $ac_top_builddir_sub in
2166  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2167  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2168  esac ;;
2169esac
2170ac_abs_top_builddir=$ac_pwd
2171ac_abs_builddir=$ac_pwd$ac_dir_suffix
2172# for backward compatibility:
2173ac_top_builddir=$ac_top_build_prefix
2174
2175case $srcdir in
2176  .)  # We are building in place.
2177    ac_srcdir=.
2178    ac_top_srcdir=$ac_top_builddir_sub
2179    ac_abs_top_srcdir=$ac_pwd ;;
2180  [\\/]* | ?:[\\/]* )  # Absolute name.
2181    ac_srcdir=$srcdir$ac_dir_suffix;
2182    ac_top_srcdir=$srcdir
2183    ac_abs_top_srcdir=$srcdir ;;
2184  *) # Relative name.
2185    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2186    ac_top_srcdir=$ac_top_build_prefix$srcdir
2187    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2188esac
2189ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2190
2191    cd "$ac_dir" || { ac_status=$?; continue; }
2192    # Check for guested configure.
2193    if test -f "$ac_srcdir/configure.gnu"; then
2194      echo &&
2195      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2196    elif test -f "$ac_srcdir/configure"; then
2197      echo &&
2198      $SHELL "$ac_srcdir/configure" --help=recursive
2199    else
2200      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2201    fi || ac_status=$?
2202    cd "$ac_pwd" || { ac_status=$?; break; }
2203  done
2204fi
2205
2206test -n "$ac_init_help" && exit $ac_status
2207if $ac_init_version; then
2208  cat <<\_ACEOF
2209OpenJDK configure jdk9
2210generated by GNU Autoconf 2.69
2211
2212Copyright (C) 2012 Free Software Foundation, Inc.
2213This configure script is free software; the Free Software Foundation
2214gives unlimited permission to copy, distribute and modify it.
2215_ACEOF
2216  exit
2217fi
2218
2219## ------------------------ ##
2220## Autoconf initialization. ##
2221## ------------------------ ##
2222
2223# ac_fn_c_try_compile LINENO
2224# --------------------------
2225# Try to compile conftest.$ac_ext, and return whether this succeeded.
2226ac_fn_c_try_compile ()
2227{
2228  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2229  rm -f conftest.$ac_objext
2230  if { { ac_try="$ac_compile"
2231case "(($ac_try" in
2232  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2233  *) ac_try_echo=$ac_try;;
2234esac
2235eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2236$as_echo "$ac_try_echo"; } >&5
2237  (eval "$ac_compile") 2>conftest.err
2238  ac_status=$?
2239  if test -s conftest.err; then
2240    grep -v '^ *+' conftest.err >conftest.er1
2241    cat conftest.er1 >&5
2242    mv -f conftest.er1 conftest.err
2243  fi
2244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2245  test $ac_status = 0; } && {
2246	 test -z "$ac_c_werror_flag" ||
2247	 test ! -s conftest.err
2248       } && test -s conftest.$ac_objext; then :
2249  ac_retval=0
2250else
2251  $as_echo "$as_me: failed program was:" >&5
2252sed 's/^/| /' conftest.$ac_ext >&5
2253
2254	ac_retval=1
2255fi
2256  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257  as_fn_set_status $ac_retval
2258
2259} # ac_fn_c_try_compile
2260
2261# ac_fn_cxx_try_compile LINENO
2262# ----------------------------
2263# Try to compile conftest.$ac_ext, and return whether this succeeded.
2264ac_fn_cxx_try_compile ()
2265{
2266  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2267  rm -f conftest.$ac_objext
2268  if { { ac_try="$ac_compile"
2269case "(($ac_try" in
2270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2271  *) ac_try_echo=$ac_try;;
2272esac
2273eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2274$as_echo "$ac_try_echo"; } >&5
2275  (eval "$ac_compile") 2>conftest.err
2276  ac_status=$?
2277  if test -s conftest.err; then
2278    grep -v '^ *+' conftest.err >conftest.er1
2279    cat conftest.er1 >&5
2280    mv -f conftest.er1 conftest.err
2281  fi
2282  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2283  test $ac_status = 0; } && {
2284	 test -z "$ac_cxx_werror_flag" ||
2285	 test ! -s conftest.err
2286       } && test -s conftest.$ac_objext; then :
2287  ac_retval=0
2288else
2289  $as_echo "$as_me: failed program was:" >&5
2290sed 's/^/| /' conftest.$ac_ext >&5
2291
2292	ac_retval=1
2293fi
2294  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2295  as_fn_set_status $ac_retval
2296
2297} # ac_fn_cxx_try_compile
2298
2299# ac_fn_c_try_cpp LINENO
2300# ----------------------
2301# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2302ac_fn_c_try_cpp ()
2303{
2304  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305  if { { ac_try="$ac_cpp conftest.$ac_ext"
2306case "(($ac_try" in
2307  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2308  *) ac_try_echo=$ac_try;;
2309esac
2310eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2311$as_echo "$ac_try_echo"; } >&5
2312  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2313  ac_status=$?
2314  if test -s conftest.err; then
2315    grep -v '^ *+' conftest.err >conftest.er1
2316    cat conftest.er1 >&5
2317    mv -f conftest.er1 conftest.err
2318  fi
2319  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2320  test $ac_status = 0; } > conftest.i && {
2321	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2322	 test ! -s conftest.err
2323       }; then :
2324  ac_retval=0
2325else
2326  $as_echo "$as_me: failed program was:" >&5
2327sed 's/^/| /' conftest.$ac_ext >&5
2328
2329    ac_retval=1
2330fi
2331  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2332  as_fn_set_status $ac_retval
2333
2334} # ac_fn_c_try_cpp
2335
2336# ac_fn_cxx_try_cpp LINENO
2337# ------------------------
2338# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2339ac_fn_cxx_try_cpp ()
2340{
2341  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342  if { { ac_try="$ac_cpp conftest.$ac_ext"
2343case "(($ac_try" in
2344  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2345  *) ac_try_echo=$ac_try;;
2346esac
2347eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2348$as_echo "$ac_try_echo"; } >&5
2349  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2350  ac_status=$?
2351  if test -s conftest.err; then
2352    grep -v '^ *+' conftest.err >conftest.er1
2353    cat conftest.er1 >&5
2354    mv -f conftest.er1 conftest.err
2355  fi
2356  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2357  test $ac_status = 0; } > conftest.i && {
2358	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2359	 test ! -s conftest.err
2360       }; then :
2361  ac_retval=0
2362else
2363  $as_echo "$as_me: failed program was:" >&5
2364sed 's/^/| /' conftest.$ac_ext >&5
2365
2366    ac_retval=1
2367fi
2368  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369  as_fn_set_status $ac_retval
2370
2371} # ac_fn_cxx_try_cpp
2372
2373# ac_fn_c_try_link LINENO
2374# -----------------------
2375# Try to link conftest.$ac_ext, and return whether this succeeded.
2376ac_fn_c_try_link ()
2377{
2378  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2379  rm -f conftest.$ac_objext conftest$ac_exeext
2380  if { { ac_try="$ac_link"
2381case "(($ac_try" in
2382  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2383  *) ac_try_echo=$ac_try;;
2384esac
2385eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2386$as_echo "$ac_try_echo"; } >&5
2387  (eval "$ac_link") 2>conftest.err
2388  ac_status=$?
2389  if test -s conftest.err; then
2390    grep -v '^ *+' conftest.err >conftest.er1
2391    cat conftest.er1 >&5
2392    mv -f conftest.er1 conftest.err
2393  fi
2394  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2395  test $ac_status = 0; } && {
2396	 test -z "$ac_c_werror_flag" ||
2397	 test ! -s conftest.err
2398       } && test -s conftest$ac_exeext && {
2399	 test "$cross_compiling" = yes ||
2400	 test -x conftest$ac_exeext
2401       }; then :
2402  ac_retval=0
2403else
2404  $as_echo "$as_me: failed program was:" >&5
2405sed 's/^/| /' conftest.$ac_ext >&5
2406
2407	ac_retval=1
2408fi
2409  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2410  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2411  # interfere with the next link command; also delete a directory that is
2412  # left behind by Apple's compiler.  We do this before executing the actions.
2413  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2414  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415  as_fn_set_status $ac_retval
2416
2417} # ac_fn_c_try_link
2418
2419# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2420# ---------------------------------------------------------
2421# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2422# the include files in INCLUDES and setting the cache variable VAR
2423# accordingly.
2424ac_fn_cxx_check_header_mongrel ()
2425{
2426  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2427  if eval \${$3+:} false; then :
2428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2429$as_echo_n "checking for $2... " >&6; }
2430if eval \${$3+:} false; then :
2431  $as_echo_n "(cached) " >&6
2432fi
2433eval ac_res=\$$3
2434	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2435$as_echo "$ac_res" >&6; }
2436else
2437  # Is the header compilable?
2438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2439$as_echo_n "checking $2 usability... " >&6; }
2440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441/* end confdefs.h.  */
2442$4
2443#include <$2>
2444_ACEOF
2445if ac_fn_cxx_try_compile "$LINENO"; then :
2446  ac_header_compiler=yes
2447else
2448  ac_header_compiler=no
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2452$as_echo "$ac_header_compiler" >&6; }
2453
2454# Is the header present?
2455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2456$as_echo_n "checking $2 presence... " >&6; }
2457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2458/* end confdefs.h.  */
2459#include <$2>
2460_ACEOF
2461if ac_fn_cxx_try_cpp "$LINENO"; then :
2462  ac_header_preproc=yes
2463else
2464  ac_header_preproc=no
2465fi
2466rm -f conftest.err conftest.i conftest.$ac_ext
2467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2468$as_echo "$ac_header_preproc" >&6; }
2469
2470# So?  What about this header?
2471case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2472  yes:no: )
2473    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2474$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2476$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2477    ;;
2478  no:yes:* )
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2480$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2482$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2484$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2485    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2486$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2488$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2489( $as_echo "## ----------------------------------------- ##
2490## Report this to build-dev@openjdk.java.net ##
2491## ----------------------------------------- ##"
2492     ) | sed "s/^/$as_me: WARNING:     /" >&2
2493    ;;
2494esac
2495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2496$as_echo_n "checking for $2... " >&6; }
2497if eval \${$3+:} false; then :
2498  $as_echo_n "(cached) " >&6
2499else
2500  eval "$3=\$ac_header_compiler"
2501fi
2502eval ac_res=\$$3
2503	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2504$as_echo "$ac_res" >&6; }
2505fi
2506  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2507
2508} # ac_fn_cxx_check_header_mongrel
2509
2510# ac_fn_cxx_try_run LINENO
2511# ------------------------
2512# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2513# that executables *can* be run.
2514ac_fn_cxx_try_run ()
2515{
2516  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2517  if { { ac_try="$ac_link"
2518case "(($ac_try" in
2519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2520  *) ac_try_echo=$ac_try;;
2521esac
2522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2523$as_echo "$ac_try_echo"; } >&5
2524  (eval "$ac_link") 2>&5
2525  ac_status=$?
2526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2527  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2528  { { case "(($ac_try" in
2529  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2530  *) ac_try_echo=$ac_try;;
2531esac
2532eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2533$as_echo "$ac_try_echo"; } >&5
2534  (eval "$ac_try") 2>&5
2535  ac_status=$?
2536  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2537  test $ac_status = 0; }; }; then :
2538  ac_retval=0
2539else
2540  $as_echo "$as_me: program exited with status $ac_status" >&5
2541       $as_echo "$as_me: failed program was:" >&5
2542sed 's/^/| /' conftest.$ac_ext >&5
2543
2544       ac_retval=$ac_status
2545fi
2546  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2547  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548  as_fn_set_status $ac_retval
2549
2550} # ac_fn_cxx_try_run
2551
2552# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2553# ---------------------------------------------------------
2554# Tests whether HEADER exists and can be compiled using the include files in
2555# INCLUDES, setting the cache variable VAR accordingly.
2556ac_fn_cxx_check_header_compile ()
2557{
2558  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2560$as_echo_n "checking for $2... " >&6; }
2561if eval \${$3+:} false; then :
2562  $as_echo_n "(cached) " >&6
2563else
2564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2565/* end confdefs.h.  */
2566$4
2567#include <$2>
2568_ACEOF
2569if ac_fn_cxx_try_compile "$LINENO"; then :
2570  eval "$3=yes"
2571else
2572  eval "$3=no"
2573fi
2574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2575fi
2576eval ac_res=\$$3
2577	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2578$as_echo "$ac_res" >&6; }
2579  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2580
2581} # ac_fn_cxx_check_header_compile
2582
2583# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2584# ----------------------------------------------
2585# Tries to find the compile-time value of EXPR in a program that includes
2586# INCLUDES, setting VAR accordingly. Returns whether the value could be
2587# computed
2588ac_fn_cxx_compute_int ()
2589{
2590  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591  if test "$cross_compiling" = yes; then
2592    # Depending upon the size, compute the lo and hi bounds.
2593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2594/* end confdefs.h.  */
2595$4
2596int
2597main ()
2598{
2599static int test_array [1 - 2 * !(($2) >= 0)];
2600test_array [0] = 0;
2601return test_array [0];
2602
2603  ;
2604  return 0;
2605}
2606_ACEOF
2607if ac_fn_cxx_try_compile "$LINENO"; then :
2608  ac_lo=0 ac_mid=0
2609  while :; do
2610    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613int
2614main ()
2615{
2616static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2617test_array [0] = 0;
2618return test_array [0];
2619
2620  ;
2621  return 0;
2622}
2623_ACEOF
2624if ac_fn_cxx_try_compile "$LINENO"; then :
2625  ac_hi=$ac_mid; break
2626else
2627  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2628			if test $ac_lo -le $ac_mid; then
2629			  ac_lo= ac_hi=
2630			  break
2631			fi
2632			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2633fi
2634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2635  done
2636else
2637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638/* end confdefs.h.  */
2639$4
2640int
2641main ()
2642{
2643static int test_array [1 - 2 * !(($2) < 0)];
2644test_array [0] = 0;
2645return test_array [0];
2646
2647  ;
2648  return 0;
2649}
2650_ACEOF
2651if ac_fn_cxx_try_compile "$LINENO"; then :
2652  ac_hi=-1 ac_mid=-1
2653  while :; do
2654    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2655/* end confdefs.h.  */
2656$4
2657int
2658main ()
2659{
2660static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2661test_array [0] = 0;
2662return test_array [0];
2663
2664  ;
2665  return 0;
2666}
2667_ACEOF
2668if ac_fn_cxx_try_compile "$LINENO"; then :
2669  ac_lo=$ac_mid; break
2670else
2671  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2672			if test $ac_mid -le $ac_hi; then
2673			  ac_lo= ac_hi=
2674			  break
2675			fi
2676			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2677fi
2678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679  done
2680else
2681  ac_lo= ac_hi=
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684fi
2685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686# Binary search between lo and hi bounds.
2687while test "x$ac_lo" != "x$ac_hi"; do
2688  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2690/* end confdefs.h.  */
2691$4
2692int
2693main ()
2694{
2695static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2696test_array [0] = 0;
2697return test_array [0];
2698
2699  ;
2700  return 0;
2701}
2702_ACEOF
2703if ac_fn_cxx_try_compile "$LINENO"; then :
2704  ac_hi=$ac_mid
2705else
2706  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2707fi
2708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2709done
2710case $ac_lo in #((
2711?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2712'') ac_retval=1 ;;
2713esac
2714  else
2715    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2716/* end confdefs.h.  */
2717$4
2718static long int longval () { return $2; }
2719static unsigned long int ulongval () { return $2; }
2720#include <stdio.h>
2721#include <stdlib.h>
2722int
2723main ()
2724{
2725
2726  FILE *f = fopen ("conftest.val", "w");
2727  if (! f)
2728    return 1;
2729  if (($2) < 0)
2730    {
2731      long int i = longval ();
2732      if (i != ($2))
2733	return 1;
2734      fprintf (f, "%ld", i);
2735    }
2736  else
2737    {
2738      unsigned long int i = ulongval ();
2739      if (i != ($2))
2740	return 1;
2741      fprintf (f, "%lu", i);
2742    }
2743  /* Do not output a trailing newline, as this causes \r\n confusion
2744     on some platforms.  */
2745  return ferror (f) || fclose (f) != 0;
2746
2747  ;
2748  return 0;
2749}
2750_ACEOF
2751if ac_fn_cxx_try_run "$LINENO"; then :
2752  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2753else
2754  ac_retval=1
2755fi
2756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2757  conftest.$ac_objext conftest.beam conftest.$ac_ext
2758rm -f conftest.val
2759
2760  fi
2761  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2762  as_fn_set_status $ac_retval
2763
2764} # ac_fn_cxx_compute_int
2765
2766# ac_fn_cxx_try_link LINENO
2767# -------------------------
2768# Try to link conftest.$ac_ext, and return whether this succeeded.
2769ac_fn_cxx_try_link ()
2770{
2771  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2772  rm -f conftest.$ac_objext conftest$ac_exeext
2773  if { { ac_try="$ac_link"
2774case "(($ac_try" in
2775  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2776  *) ac_try_echo=$ac_try;;
2777esac
2778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2779$as_echo "$ac_try_echo"; } >&5
2780  (eval "$ac_link") 2>conftest.err
2781  ac_status=$?
2782  if test -s conftest.err; then
2783    grep -v '^ *+' conftest.err >conftest.er1
2784    cat conftest.er1 >&5
2785    mv -f conftest.er1 conftest.err
2786  fi
2787  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2788  test $ac_status = 0; } && {
2789	 test -z "$ac_cxx_werror_flag" ||
2790	 test ! -s conftest.err
2791       } && test -s conftest$ac_exeext && {
2792	 test "$cross_compiling" = yes ||
2793	 test -x conftest$ac_exeext
2794       }; then :
2795  ac_retval=0
2796else
2797  $as_echo "$as_me: failed program was:" >&5
2798sed 's/^/| /' conftest.$ac_ext >&5
2799
2800	ac_retval=1
2801fi
2802  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2803  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2804  # interfere with the next link command; also delete a directory that is
2805  # left behind by Apple's compiler.  We do this before executing the actions.
2806  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2807  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2808  as_fn_set_status $ac_retval
2809
2810} # ac_fn_cxx_try_link
2811
2812# ac_fn_cxx_check_func LINENO FUNC VAR
2813# ------------------------------------
2814# Tests whether FUNC exists, setting the cache variable VAR accordingly
2815ac_fn_cxx_check_func ()
2816{
2817  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2819$as_echo_n "checking for $2... " >&6; }
2820if eval \${$3+:} false; then :
2821  $as_echo_n "(cached) " >&6
2822else
2823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h.  */
2825/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2826   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2827#define $2 innocuous_$2
2828
2829/* System header to define __stub macros and hopefully few prototypes,
2830    which can conflict with char $2 (); below.
2831    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2832    <limits.h> exists even on freestanding compilers.  */
2833
2834#ifdef __STDC__
2835# include <limits.h>
2836#else
2837# include <assert.h>
2838#endif
2839
2840#undef $2
2841
2842/* Override any GCC internal prototype to avoid an error.
2843   Use char because int might match the return type of a GCC
2844   builtin and then its argument prototype would still apply.  */
2845#ifdef __cplusplus
2846extern "C"
2847#endif
2848char $2 ();
2849/* The GNU C library defines this for functions which it implements
2850    to always fail with ENOSYS.  Some functions are actually named
2851    something starting with __ and the normal name is an alias.  */
2852#if defined __stub_$2 || defined __stub___$2
2853choke me
2854#endif
2855
2856int
2857main ()
2858{
2859return $2 ();
2860  ;
2861  return 0;
2862}
2863_ACEOF
2864if ac_fn_cxx_try_link "$LINENO"; then :
2865  eval "$3=yes"
2866else
2867  eval "$3=no"
2868fi
2869rm -f core conftest.err conftest.$ac_objext \
2870    conftest$ac_exeext conftest.$ac_ext
2871fi
2872eval ac_res=\$$3
2873	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2874$as_echo "$ac_res" >&6; }
2875  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2876
2877} # ac_fn_cxx_check_func
2878
2879# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2880# -------------------------------------------------------
2881# Tests whether HEADER exists and can be compiled using the include files in
2882# INCLUDES, setting the cache variable VAR accordingly.
2883ac_fn_c_check_header_compile ()
2884{
2885  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2887$as_echo_n "checking for $2... " >&6; }
2888if eval \${$3+:} false; then :
2889  $as_echo_n "(cached) " >&6
2890else
2891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892/* end confdefs.h.  */
2893$4
2894#include <$2>
2895_ACEOF
2896if ac_fn_c_try_compile "$LINENO"; then :
2897  eval "$3=yes"
2898else
2899  eval "$3=no"
2900fi
2901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2902fi
2903eval ac_res=\$$3
2904	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2905$as_echo "$ac_res" >&6; }
2906  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2907
2908} # ac_fn_c_check_header_compile
2909cat >config.log <<_ACEOF
2910This file contains any messages produced by compilers while
2911running configure, to aid debugging if configure makes a mistake.
2912
2913It was created by OpenJDK $as_me jdk9, which was
2914generated by GNU Autoconf 2.69.  Invocation command line was
2915
2916  $ $0 $@
2917
2918_ACEOF
2919exec 5>>config.log
2920{
2921cat <<_ASUNAME
2922## --------- ##
2923## Platform. ##
2924## --------- ##
2925
2926hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2927uname -m = `(uname -m) 2>/dev/null || echo unknown`
2928uname -r = `(uname -r) 2>/dev/null || echo unknown`
2929uname -s = `(uname -s) 2>/dev/null || echo unknown`
2930uname -v = `(uname -v) 2>/dev/null || echo unknown`
2931
2932/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2933/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2934
2935/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2936/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2937/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2938/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2939/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2940/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2941/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2942
2943_ASUNAME
2944
2945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2946for as_dir in $PATH
2947do
2948  IFS=$as_save_IFS
2949  test -z "$as_dir" && as_dir=.
2950    $as_echo "PATH: $as_dir"
2951  done
2952IFS=$as_save_IFS
2953
2954} >&5
2955
2956cat >&5 <<_ACEOF
2957
2958
2959## ----------- ##
2960## Core tests. ##
2961## ----------- ##
2962
2963_ACEOF
2964
2965
2966# Keep a trace of the command line.
2967# Strip out --no-create and --no-recursion so they do not pile up.
2968# Strip out --silent because we don't want to record it for future runs.
2969# Also quote any args containing shell meta-characters.
2970# Make two passes to allow for proper duplicate-argument suppression.
2971ac_configure_args=
2972ac_configure_args0=
2973ac_configure_args1=
2974ac_must_keep_next=false
2975for ac_pass in 1 2
2976do
2977  for ac_arg
2978  do
2979    case $ac_arg in
2980    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2981    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2982    | -silent | --silent | --silen | --sile | --sil)
2983      continue ;;
2984    *\'*)
2985      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2986    esac
2987    case $ac_pass in
2988    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2989    2)
2990      as_fn_append ac_configure_args1 " '$ac_arg'"
2991      if test $ac_must_keep_next = true; then
2992	ac_must_keep_next=false # Got value, back to normal.
2993      else
2994	case $ac_arg in
2995	  *=* | --config-cache | -C | -disable-* | --disable-* \
2996	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2997	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2998	  | -with-* | --with-* | -without-* | --without-* | --x)
2999	    case "$ac_configure_args0 " in
3000	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3001	    esac
3002	    ;;
3003	  -* ) ac_must_keep_next=true ;;
3004	esac
3005      fi
3006      as_fn_append ac_configure_args " '$ac_arg'"
3007      ;;
3008    esac
3009  done
3010done
3011{ ac_configure_args0=; unset ac_configure_args0;}
3012{ ac_configure_args1=; unset ac_configure_args1;}
3013
3014# When interrupted or exit'd, cleanup temporary files, and complete
3015# config.log.  We remove comments because anyway the quotes in there
3016# would cause problems or look ugly.
3017# WARNING: Use '\'' to represent an apostrophe within the trap.
3018# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3019trap 'exit_status=$?
3020  # Save into config.log some information that might help in debugging.
3021  {
3022    echo
3023
3024    $as_echo "## ---------------- ##
3025## Cache variables. ##
3026## ---------------- ##"
3027    echo
3028    # The following way of writing the cache mishandles newlines in values,
3029(
3030  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3031    eval ac_val=\$$ac_var
3032    case $ac_val in #(
3033    *${as_nl}*)
3034      case $ac_var in #(
3035      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3036$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3037      esac
3038      case $ac_var in #(
3039      _ | IFS | as_nl) ;; #(
3040      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3041      *) { eval $ac_var=; unset $ac_var;} ;;
3042      esac ;;
3043    esac
3044  done
3045  (set) 2>&1 |
3046    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3047    *${as_nl}ac_space=\ *)
3048      sed -n \
3049	"s/'\''/'\''\\\\'\'''\''/g;
3050	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3051      ;; #(
3052    *)
3053      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3054      ;;
3055    esac |
3056    sort
3057)
3058    echo
3059
3060    $as_echo "## ----------------- ##
3061## Output variables. ##
3062## ----------------- ##"
3063    echo
3064    for ac_var in $ac_subst_vars
3065    do
3066      eval ac_val=\$$ac_var
3067      case $ac_val in
3068      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3069      esac
3070      $as_echo "$ac_var='\''$ac_val'\''"
3071    done | sort
3072    echo
3073
3074    if test -n "$ac_subst_files"; then
3075      $as_echo "## ------------------- ##
3076## File substitutions. ##
3077## ------------------- ##"
3078      echo
3079      for ac_var in $ac_subst_files
3080      do
3081	eval ac_val=\$$ac_var
3082	case $ac_val in
3083	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3084	esac
3085	$as_echo "$ac_var='\''$ac_val'\''"
3086      done | sort
3087      echo
3088    fi
3089
3090    if test -s confdefs.h; then
3091      $as_echo "## ----------- ##
3092## confdefs.h. ##
3093## ----------- ##"
3094      echo
3095      cat confdefs.h
3096      echo
3097    fi
3098    test "$ac_signal" != 0 &&
3099      $as_echo "$as_me: caught signal $ac_signal"
3100    $as_echo "$as_me: exit $exit_status"
3101  } >&5
3102  rm -f core *.core core.conftest.* &&
3103    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3104    exit $exit_status
3105' 0
3106for ac_signal in 1 2 13 15; do
3107  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3108done
3109ac_signal=0
3110
3111# confdefs.h avoids OS command line length limits that DEFS can exceed.
3112rm -f -r conftest* confdefs.h
3113
3114$as_echo "/* confdefs.h */" > confdefs.h
3115
3116# Predefined preprocessor variables.
3117
3118cat >>confdefs.h <<_ACEOF
3119#define PACKAGE_NAME "$PACKAGE_NAME"
3120_ACEOF
3121
3122cat >>confdefs.h <<_ACEOF
3123#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3124_ACEOF
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_VERSION "$PACKAGE_VERSION"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_STRING "$PACKAGE_STRING"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3136_ACEOF
3137
3138cat >>confdefs.h <<_ACEOF
3139#define PACKAGE_URL "$PACKAGE_URL"
3140_ACEOF
3141
3142
3143# Let the site file select an alternate cache file if it wants to.
3144# Prefer an explicitly selected file to automatically selected ones.
3145ac_site_file1=NONE
3146ac_site_file2=NONE
3147if test -n "$CONFIG_SITE"; then
3148  # We do not want a PATH search for config.site.
3149  case $CONFIG_SITE in #((
3150    -*)  ac_site_file1=./$CONFIG_SITE;;
3151    */*) ac_site_file1=$CONFIG_SITE;;
3152    *)   ac_site_file1=./$CONFIG_SITE;;
3153  esac
3154elif test "x$prefix" != xNONE; then
3155  ac_site_file1=$prefix/share/config.site
3156  ac_site_file2=$prefix/etc/config.site
3157else
3158  ac_site_file1=$ac_default_prefix/share/config.site
3159  ac_site_file2=$ac_default_prefix/etc/config.site
3160fi
3161for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3162do
3163  test "x$ac_site_file" = xNONE && continue
3164  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3165    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3166$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3167    sed 's/^/| /' "$ac_site_file" >&5
3168    . "$ac_site_file" \
3169      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3171as_fn_error $? "failed to load site script $ac_site_file
3172See \`config.log' for more details" "$LINENO" 5; }
3173  fi
3174done
3175
3176if test -r "$cache_file"; then
3177  # Some versions of bash will fail to source /dev/null (special files
3178  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3179  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3180    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3181$as_echo "$as_me: loading cache $cache_file" >&6;}
3182    case $cache_file in
3183      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3184      *)                      . "./$cache_file";;
3185    esac
3186  fi
3187else
3188  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3189$as_echo "$as_me: creating cache $cache_file" >&6;}
3190  >$cache_file
3191fi
3192
3193# Check that the precious variables saved in the cache have kept the same
3194# value.
3195ac_cache_corrupted=false
3196for ac_var in $ac_precious_vars; do
3197  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3198  eval ac_new_set=\$ac_env_${ac_var}_set
3199  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3200  eval ac_new_val=\$ac_env_${ac_var}_value
3201  case $ac_old_set,$ac_new_set in
3202    set,)
3203      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3204$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3205      ac_cache_corrupted=: ;;
3206    ,set)
3207      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3208$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3209      ac_cache_corrupted=: ;;
3210    ,);;
3211    *)
3212      if test "x$ac_old_val" != "x$ac_new_val"; then
3213	# differences in whitespace do not lead to failure.
3214	ac_old_val_w=`echo x $ac_old_val`
3215	ac_new_val_w=`echo x $ac_new_val`
3216	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3217	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3218$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3219	  ac_cache_corrupted=:
3220	else
3221	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3222$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3223	  eval $ac_var=\$ac_old_val
3224	fi
3225	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3226$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3227	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3228$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3229      fi;;
3230  esac
3231  # Pass precious variables to config.status.
3232  if test "$ac_new_set" = set; then
3233    case $ac_new_val in
3234    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3235    *) ac_arg=$ac_var=$ac_new_val ;;
3236    esac
3237    case " $ac_configure_args " in
3238      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3239      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3240    esac
3241  fi
3242done
3243if $ac_cache_corrupted; then
3244  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3246  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3247$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3248  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3249fi
3250## -------------------- ##
3251## Main body of script. ##
3252## -------------------- ##
3253
3254ac_ext=c
3255ac_cpp='$CPP $CPPFLAGS'
3256ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3257ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3258ac_compiler_gnu=$ac_cv_c_compiler_gnu
3259
3260
3261
3262ac_aux_dir=
3263for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3264  if test -f "$ac_dir/install-sh"; then
3265    ac_aux_dir=$ac_dir
3266    ac_install_sh="$ac_aux_dir/install-sh -c"
3267    break
3268  elif test -f "$ac_dir/install.sh"; then
3269    ac_aux_dir=$ac_dir
3270    ac_install_sh="$ac_aux_dir/install.sh -c"
3271    break
3272  elif test -f "$ac_dir/shtool"; then
3273    ac_aux_dir=$ac_dir
3274    ac_install_sh="$ac_aux_dir/shtool install -c"
3275    break
3276  fi
3277done
3278if test -z "$ac_aux_dir"; then
3279  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
3280fi
3281
3282# These three variables are undocumented and unsupported,
3283# and are intended to be withdrawn in a future Autoconf release.
3284# They can cause serious problems if a builder's source tree is in a directory
3285# whose full name contains unusual characters.
3286ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3287ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3288ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3289
3290
3291# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3292
3293#
3294# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3295# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3296#
3297# This code is free software; you can redistribute it and/or modify it
3298# under the terms of the GNU General Public License version 2 only, as
3299# published by the Free Software Foundation.  Oracle designates this
3300# particular file as subject to the "Classpath" exception as provided
3301# by Oracle in the LICENSE file that accompanied this code.
3302#
3303# This code is distributed in the hope that it will be useful, but WITHOUT
3304# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3305# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3306# version 2 for more details (a copy is included in the LICENSE file that
3307# accompanied this code).
3308#
3309# You should have received a copy of the GNU General Public License version
3310# 2 along with this work; if not, write to the Free Software Foundation,
3311# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3312#
3313# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3314# or visit www.oracle.com if you need additional information or have any
3315# questions.
3316#
3317
3318#
3319# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3320#
3321# This program is free software; you can redistribute it and/or modify
3322# it under the terms of the GNU General Public License as published by
3323# the Free Software Foundation; either version 2 of the License, or
3324# (at your option) any later version.
3325#
3326# This program is distributed in the hope that it will be useful, but
3327# WITHOUT ANY WARRANTY; without even the implied warranty of
3328# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3329# General Public License for more details.
3330#
3331# You should have received a copy of the GNU General Public License
3332# along with this program; if not, write to the Free Software
3333# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3334#
3335# As a special exception to the GNU General Public License, if you
3336# distribute this file as part of a program that contains a
3337# configuration script generated by Autoconf, you may include it under
3338# the same distribution terms that you use for the rest of that program.
3339
3340# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3341# ----------------------------------
3342# PKG_PROG_PKG_CONFIG
3343
3344# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3345#
3346# Check to see whether a particular set of modules exists.  Similar
3347# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3348#
3349#
3350# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3351# this or PKG_CHECK_MODULES is called, or make sure to call
3352# PKG_CHECK_EXISTS manually
3353# --------------------------------------------------------------
3354
3355
3356
3357# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3358# ---------------------------------------------
3359# _PKG_CONFIG
3360
3361# _PKG_SHORT_ERRORS_SUPPORTED
3362# -----------------------------
3363# _PKG_SHORT_ERRORS_SUPPORTED
3364
3365
3366# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3367# [ACTION-IF-NOT-FOUND])
3368#
3369#
3370# Note that if there is a possibility the first call to
3371# PKG_CHECK_MODULES might not happen, you should be sure to include an
3372# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3373#
3374#
3375# --------------------------------------------------------------
3376# PKG_CHECK_MODULES
3377
3378
3379# Include these first...
3380#
3381# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3382# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3383#
3384# This code is free software; you can redistribute it and/or modify it
3385# under the terms of the GNU General Public License version 2 only, as
3386# published by the Free Software Foundation.  Oracle designates this
3387# particular file as subject to the "Classpath" exception as provided
3388# by Oracle in the LICENSE file that accompanied this code.
3389#
3390# This code is distributed in the hope that it will be useful, but WITHOUT
3391# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3392# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3393# version 2 for more details (a copy is included in the LICENSE file that
3394# accompanied this code).
3395#
3396# You should have received a copy of the GNU General Public License version
3397# 2 along with this work; if not, write to the Free Software Foundation,
3398# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3399#
3400# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3401# or visit www.oracle.com if you need additional information or have any
3402# questions.
3403#
3404
3405# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3406# If so, then append $1 to $2 \
3407# Also set JVM_ARG_OK to true/false depending on outcome.
3408
3409
3410# Appends a string to a path variable, only adding the : when needed.
3411
3412
3413# Prepends a string to a path variable, only adding the : when needed.
3414
3415
3416# This will make sure the given variable points to a full and proper
3417# path. This means:
3418# 1) There will be no spaces in the path. On unix platforms,
3419#    spaces in the path will result in an error. On Windows,
3420#    the path will be rewritten using short-style to be space-free.
3421# 2) The path will be absolute, and it will be in unix-style (on
3422#     cygwin).
3423# $1: The name of the variable to fix
3424
3425
3426# This will make sure the given variable points to a executable
3427# with a full and proper path. This means:
3428# 1) There will be no spaces in the path. On unix platforms,
3429#    spaces in the path will result in an error. On Windows,
3430#    the path will be rewritten using short-style to be space-free.
3431# 2) The path will be absolute, and it will be in unix-style (on
3432#     cygwin).
3433# Any arguments given to the executable is preserved.
3434# If the input variable does not have a directory specification, then
3435# it need to be in the PATH.
3436# $1: The name of the variable to fix
3437
3438
3439
3440
3441# Register a --with argument but mark it as deprecated
3442# $1: The name of the with argument to deprecate, not including --with-
3443
3444
3445# Register a --enable argument but mark it as deprecated
3446# $1: The name of the with argument to deprecate, not including --enable-
3447# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3448
3449
3450
3451
3452# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3453# $1: variable to check
3454
3455
3456# Check that there are no unprocessed overridden variables left.
3457# If so, they are an incorrect argument and we will exit with an error.
3458
3459
3460# Setup a tool for the given variable. If correctly specified by the user,
3461# use that value, otherwise search for the tool using the supplied code snippet.
3462# $1: variable to set
3463# $2: code snippet to call to look for the tool
3464
3465
3466# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3467# $1: variable to set
3468# $2: executable name (or list of names) to look for
3469
3470
3471# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3472# $1: variable to set
3473# $2: executable name (or list of names) to look for
3474
3475
3476# Like BASIC_PATH_PROGS but fails if no tool was found.
3477# $1: variable to set
3478# $2: executable name (or list of names) to look for
3479
3480
3481# Like BASIC_SETUP_TOOL but fails if no tool was found.
3482# $1: variable to set
3483# $2: autoconf macro to call to look for the special tool
3484
3485
3486# Setup the most fundamental tools that relies on not much else to set up,
3487# but is used by much of the early bootstrap code.
3488
3489
3490# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3491
3492
3493# Evaluates platform specific overrides for devkit variables.
3494# $1: Name of variable
3495
3496
3497
3498
3499
3500
3501#%%% Simple tools %%%
3502
3503# Check if we have found a usable version of make
3504# $1: the path to a potential make binary (or empty)
3505# $2: the description on how we found this
3506
3507
3508
3509
3510# Goes looking for a usable version of GNU make.
3511
3512
3513
3514
3515
3516
3517# Check if build directory is on local disk. If not possible to determine,
3518# we prefer to claim it's local.
3519# Argument 1: directory to test
3520# Argument 2: what to do if it is on local disk
3521# Argument 3: what to do otherwise (remote disk or failure)
3522
3523
3524# Check that source files have basic read permissions set. This might
3525# not be the case in cygwin in certain conditions.
3526
3527
3528
3529
3530# Check for support for specific options in bash
3531
3532
3533# Code to run after AC_OUTPUT
3534
3535
3536#
3537# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3538# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3539#
3540# This code is free software; you can redistribute it and/or modify it
3541# under the terms of the GNU General Public License version 2 only, as
3542# published by the Free Software Foundation.  Oracle designates this
3543# particular file as subject to the "Classpath" exception as provided
3544# by Oracle in the LICENSE file that accompanied this code.
3545#
3546# This code is distributed in the hope that it will be useful, but WITHOUT
3547# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3548# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3549# version 2 for more details (a copy is included in the LICENSE file that
3550# accompanied this code).
3551#
3552# You should have received a copy of the GNU General Public License version
3553# 2 along with this work; if not, write to the Free Software Foundation,
3554# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3555#
3556# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3557# or visit www.oracle.com if you need additional information or have any
3558# questions.
3559#
3560
3561
3562
3563
3564
3565# Helper function which possibly converts a path using DOS-style short mode.
3566# If so, the updated path is stored in $new_path.
3567# $1: The path to check
3568
3569
3570# Helper function which possibly converts a path using DOS-style short mode.
3571# If so, the updated path is stored in $new_path.
3572# $1: The path to check
3573
3574
3575# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3576# and could probably be heavily simplified. However, all changes in this
3577# area tend to need lot of testing in different scenarios, and in lack of
3578# proper unit testing, cleaning this up has not been deemed worth the effort
3579# at the moment.
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3590
3591
3592
3593
3594#
3595# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3596# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3597#
3598# This code is free software; you can redistribute it and/or modify it
3599# under the terms of the GNU General Public License version 2 only, as
3600# published by the Free Software Foundation.  Oracle designates this
3601# particular file as subject to the "Classpath" exception as provided
3602# by Oracle in the LICENSE file that accompanied this code.
3603#
3604# This code is distributed in the hope that it will be useful, but WITHOUT
3605# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3606# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3607# version 2 for more details (a copy is included in the LICENSE file that
3608# accompanied this code).
3609#
3610# You should have received a copy of the GNU General Public License version
3611# 2 along with this work; if not, write to the Free Software Foundation,
3612# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3613#
3614# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3615# or visit www.oracle.com if you need additional information or have any
3616# questions.
3617#
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629# ... then the rest
3630#
3631# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3632# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3633#
3634# This code is free software; you can redistribute it and/or modify it
3635# under the terms of the GNU General Public License version 2 only, as
3636# published by the Free Software Foundation.  Oracle designates this
3637# particular file as subject to the "Classpath" exception as provided
3638# by Oracle in the LICENSE file that accompanied this code.
3639#
3640# This code is distributed in the hope that it will be useful, but WITHOUT
3641# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3642# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3643# version 2 for more details (a copy is included in the LICENSE file that
3644# accompanied this code).
3645#
3646# You should have received a copy of the GNU General Public License version
3647# 2 along with this work; if not, write to the Free Software Foundation,
3648# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3649#
3650# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3651# or visit www.oracle.com if you need additional information or have any
3652# questions.
3653#
3654
3655########################################################################
3656# This file handles detection of the Boot JDK. The Boot JDK detection
3657# process has been developed as a response to solve a complex real-world
3658# problem. Initially, it was simple, but it has grown as platform after
3659# platform, idiosyncracy after idiosyncracy has been supported.
3660#
3661# The basic idea is this:
3662# 1) You need an acceptable *) JDK to use as a Boot JDK
3663# 2) There are several ways to locate a JDK, that are mostly platform
3664#    dependent **)
3665# 3) You can have multiple JDKs installed
3666# 4) If possible, configure should try to dig out an acceptable JDK
3667#    automatically, without having to resort to command-line options
3668#
3669# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3670#     javac) and not a JRE, etc.
3671#
3672# **) On Windows we typically use a well-known path.
3673#     On MacOSX we typically use the tool java_home.
3674#     On Linux we typically find javac in the $PATH, and then follow a
3675#     chain of symlinks that often ends up in a real JDK.
3676#
3677# This leads to the code where we check in different ways to locate a
3678# JDK, and if one is found, check if it is acceptable. If not, we print
3679# our reasons for rejecting it (useful when debugging non-working
3680# configure situations) and continue checking the next one.
3681########################################################################
3682
3683# Execute the check given as argument, and verify the result
3684# If the Boot JDK was previously found, do nothing
3685# $1 A command line (typically autoconf macro) to execute
3686
3687
3688# Test: Is bootjdk explicitely set by command line arguments?
3689
3690
3691# Test: Is bootjdk available from builddeps?
3692
3693
3694# Test: Is $JAVA_HOME set?
3695
3696
3697# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3698
3699
3700# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3701# $1: Argument to the java_home binary (optional)
3702
3703
3704# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3705
3706
3707# Look for a jdk in the given path. If there are multiple, try to select the newest.
3708# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3709# $1 = Path to directory containing jdk installations.
3710# $2 = String to append to the found JDK directory to get the proper JDK home
3711
3712
3713# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3714# environmental variable as base for where to look.
3715# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3716
3717
3718# Test: Is there a JDK installed in default, well-known locations?
3719
3720
3721# Check that a command-line tool in the Boot JDK is correct
3722# $1 = name of variable to assign
3723# $2 = name of binary
3724
3725
3726###############################################################################
3727#
3728# We need a Boot JDK to bootstrap the build.
3729#
3730
3731
3732
3733
3734
3735#
3736# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738#
3739# This code is free software; you can redistribute it and/or modify it
3740# under the terms of the GNU General Public License version 2 only, as
3741# published by the Free Software Foundation.  Oracle designates this
3742# particular file as subject to the "Classpath" exception as provided
3743# by Oracle in the LICENSE file that accompanied this code.
3744#
3745# This code is distributed in the hope that it will be useful, but WITHOUT
3746# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748# version 2 for more details (a copy is included in the LICENSE file that
3749# accompanied this code).
3750#
3751# You should have received a copy of the GNU General Public License version
3752# 2 along with this work; if not, write to the Free Software Foundation,
3753# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754#
3755# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756# or visit www.oracle.com if you need additional information or have any
3757# questions.
3758#
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779#
3780# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3781# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3782#
3783# This code is free software; you can redistribute it and/or modify it
3784# under the terms of the GNU General Public License version 2 only, as
3785# published by the Free Software Foundation.  Oracle designates this
3786# particular file as subject to the "Classpath" exception as provided
3787# by Oracle in the LICENSE file that accompanied this code.
3788#
3789# This code is distributed in the hope that it will be useful, but WITHOUT
3790# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3791# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3792# version 2 for more details (a copy is included in the LICENSE file that
3793# accompanied this code).
3794#
3795# You should have received a copy of the GNU General Public License version
3796# 2 along with this work; if not, write to the Free Software Foundation,
3797# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3798#
3799# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3800# or visit www.oracle.com if you need additional information or have any
3801# questions.
3802#
3803
3804
3805
3806
3807
3808# Documentation on common flags used for solstudio in HIGHEST.
3809#
3810# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3811#          done with care, there are some assumptions below that need to
3812#          be understood about the use of pointers, and IEEE behavior.
3813#
3814# -fns: Use non-standard floating point mode (not IEEE 754)
3815# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3816# -fsingle: Use single precision floating point with 'float'
3817# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3818#   (Source with excessing pointer casting and data access with mixed
3819#    pointer types are not recommended)
3820# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3821#   (If you expect perfect errno behavior, do not use this)
3822# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3823# -xrestrict: Pointer parameters to functions do not overlap
3824#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3825#    If you pass in multiple pointers to the same data, do not use this)
3826# -xlibmil: Inline some library routines
3827#   (If you expect perfect errno behavior, do not use this)
3828# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3829#   (If you expect perfect errno behavior, do not use this)
3830#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3831
3832    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3833    # Bug?
3834    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3835    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3836    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3837    #fi
3838
3839
3840
3841
3842
3843# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3844#                                   [RUN-IF-FALSE])
3845# ------------------------------------------------------------
3846# Check that the c and c++ compilers support an argument
3847
3848
3849# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3850#                                    [RUN-IF-FALSE])
3851# ------------------------------------------------------------
3852# Check that the linker support an argument
3853
3854
3855
3856
3857#
3858# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3859# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3860#
3861# This code is free software; you can redistribute it and/or modify it
3862# under the terms of the GNU General Public License version 2 only, as
3863# published by the Free Software Foundation.  Oracle designates this
3864# particular file as subject to the "Classpath" exception as provided
3865# by Oracle in the LICENSE file that accompanied this code.
3866#
3867# This code is distributed in the hope that it will be useful, but WITHOUT
3868# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3869# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3870# version 2 for more details (a copy is included in the LICENSE file that
3871# accompanied this code).
3872#
3873# You should have received a copy of the GNU General Public License version
3874# 2 along with this work; if not, write to the Free Software Foundation,
3875# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3876#
3877# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3878# or visit www.oracle.com if you need additional information or have any
3879# questions.
3880#
3881
3882
3883
3884
3885
3886cygwin_help() {
3887  case $1 in
3888    unzip)
3889      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3890      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3891      ;;
3892    zip)
3893      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3894      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3895      ;;
3896    make)
3897      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3898      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3899      ;;
3900    freetype)
3901      HELP_MSG="
3902The freetype library can now be build during the configure process.
3903Download the freetype sources and unpack them into an arbitrary directory:
3904
3905wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3906tar -xzf freetype-2.5.3.tar.gz
3907
3908Then run configure with '--with-freetype-src=<freetype_src>'. This will
3909automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3910builds or into '<freetype_src>/lib32' for 32-bit builds.
3911Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3912and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3913      ;;
3914  esac
3915}
3916
3917msys_help() {
3918  PKGHANDLER_COMMAND=""
3919}
3920
3921apt_help() {
3922  case $1 in
3923    devkit)
3924      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3925    openjdk)
3926      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3927    alsa)
3928      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3929    cups)
3930      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3931    freetype)
3932      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3933    pulse)
3934      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3935    x11)
3936      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3937    ccache)
3938      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3939  esac
3940}
3941
3942yum_help() {
3943  case $1 in
3944    devkit)
3945      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3946    openjdk)
3947      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3948    alsa)
3949      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3950    cups)
3951      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3952    freetype)
3953      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3954    pulse)
3955      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3956    x11)
3957      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3958    ccache)
3959      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3960  esac
3961}
3962
3963port_help() {
3964  PKGHANDLER_COMMAND=""
3965}
3966
3967pkgutil_help() {
3968  PKGHANDLER_COMMAND=""
3969}
3970
3971pkgadd_help() {
3972  PKGHANDLER_COMMAND=""
3973}
3974
3975# This function will check if we're called from the "configure" wrapper while
3976# printing --help. If so, we will print out additional information that can
3977# only be extracted within the autoconf script, and then exit. This must be
3978# called at the very beginning in configure.ac.
3979
3980
3981
3982
3983
3984
3985#
3986# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3987# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3988#
3989# This code is free software; you can redistribute it and/or modify it
3990# under the terms of the GNU General Public License version 2 only, as
3991# published by the Free Software Foundation.  Oracle designates this
3992# particular file as subject to the "Classpath" exception as provided
3993# by Oracle in the LICENSE file that accompanied this code.
3994#
3995# This code is distributed in the hope that it will be useful, but WITHOUT
3996# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3997# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3998# version 2 for more details (a copy is included in the LICENSE file that
3999# accompanied this code).
4000#
4001# You should have received a copy of the GNU General Public License version
4002# 2 along with this work; if not, write to the Free Software Foundation,
4003# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4004#
4005# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4006# or visit www.oracle.com if you need additional information or have any
4007# questions.
4008#
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019###############################################################################
4020#
4021# Should we build only OpenJDK even if closed sources are present?
4022#
4023
4024
4025
4026
4027
4028
4029###############################################################################
4030#
4031# Enable or disable the elliptic curve crypto implementation
4032#
4033
4034
4035
4036
4037
4038################################################################################
4039#
4040# Gcov coverage data for hotspot
4041#
4042
4043
4044#
4045# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4046# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4047#
4048# This code is free software; you can redistribute it and/or modify it
4049# under the terms of the GNU General Public License version 2 only, as
4050# published by the Free Software Foundation.  Oracle designates this
4051# particular file as subject to the "Classpath" exception as provided
4052# by Oracle in the LICENSE file that accompanied this code.
4053#
4054# This code is distributed in the hope that it will be useful, but WITHOUT
4055# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4056# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4057# version 2 for more details (a copy is included in the LICENSE file that
4058# accompanied this code).
4059#
4060# You should have received a copy of the GNU General Public License version
4061# 2 along with this work; if not, write to the Free Software Foundation,
4062# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4063#
4064# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4065# or visit www.oracle.com if you need additional information or have any
4066# questions.
4067#
4068
4069###############################################################################
4070#
4071# Setup version numbers
4072#
4073
4074# Verify that a given string represents a valid version number, and assign it
4075# to a variable.
4076
4077# Argument 1: the variable to assign to
4078# Argument 2: the value given by the user
4079
4080
4081
4082
4083#
4084# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4085# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4086#
4087# This code is free software; you can redistribute it and/or modify it
4088# under the terms of the GNU General Public License version 2 only, as
4089# published by the Free Software Foundation.  Oracle designates this
4090# particular file as subject to the "Classpath" exception as provided
4091# by Oracle in the LICENSE file that accompanied this code.
4092#
4093# This code is distributed in the hope that it will be useful, but WITHOUT
4094# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4095# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4096# version 2 for more details (a copy is included in the LICENSE file that
4097# accompanied this code).
4098#
4099# You should have received a copy of the GNU General Public License version
4100# 2 along with this work; if not, write to the Free Software Foundation,
4101# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4102#
4103# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4104# or visit www.oracle.com if you need additional information or have any
4105# questions.
4106#
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128#
4129# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4130# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4131#
4132# This code is free software; you can redistribute it and/or modify it
4133# under the terms of the GNU General Public License version 2 only, as
4134# published by the Free Software Foundation.  Oracle designates this
4135# particular file as subject to the "Classpath" exception as provided
4136# by Oracle in the LICENSE file that accompanied this code.
4137#
4138# This code is distributed in the hope that it will be useful, but WITHOUT
4139# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4140# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4141# version 2 for more details (a copy is included in the LICENSE file that
4142# accompanied this code).
4143#
4144# You should have received a copy of the GNU General Public License version
4145# 2 along with this work; if not, write to the Free Software Foundation,
4146# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4147#
4148# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4149# or visit www.oracle.com if you need additional information or have any
4150# questions.
4151#
4152
4153# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4154# Converts autoconf style CPU name to OpenJDK style, into
4155# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4156
4157
4158# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4159# Converts autoconf style OS name to OpenJDK style, into
4160# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4161
4162
4163# Expects $host_os $host_cpu $build_os and $build_cpu
4164# and $with_target_bits to have been setup!
4165#
4166# Translate the standard triplet(quadruplet) definition
4167# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4168# OPENJDK_BUILD_OS, etc.
4169
4170
4171# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4172# accordingly. Must be done after setting up build and target system, but before
4173# doing anything else with these values.
4174
4175
4176# Setup the legacy variables, for controlling the old makefiles.
4177#
4178
4179
4180
4181
4182#%%% Build and target systems %%%
4183
4184
4185
4186
4187# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4188# Add -mX to various FLAGS variables.
4189
4190
4191
4192
4193
4194
4195#
4196# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4197# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4198#
4199# This code is free software; you can redistribute it and/or modify it
4200# under the terms of the GNU General Public License version 2 only, as
4201# published by the Free Software Foundation.  Oracle designates this
4202# particular file as subject to the "Classpath" exception as provided
4203# by Oracle in the LICENSE file that accompanied this code.
4204#
4205# This code is distributed in the hope that it will be useful, but WITHOUT
4206# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4207# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4208# version 2 for more details (a copy is included in the LICENSE file that
4209# accompanied this code).
4210#
4211# You should have received a copy of the GNU General Public License version
4212# 2 along with this work; if not, write to the Free Software Foundation,
4213# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4214#
4215# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4216# or visit www.oracle.com if you need additional information or have any
4217# questions.
4218#
4219
4220
4221
4222
4223
4224
4225
4226
4227#
4228# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4229# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4230#
4231# This code is free software; you can redistribute it and/or modify it
4232# under the terms of the GNU General Public License version 2 only, as
4233# published by the Free Software Foundation.  Oracle designates this
4234# particular file as subject to the "Classpath" exception as provided
4235# by Oracle in the LICENSE file that accompanied this code.
4236#
4237# This code is distributed in the hope that it will be useful, but WITHOUT
4238# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4239# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4240# version 2 for more details (a copy is included in the LICENSE file that
4241# accompanied this code).
4242#
4243# You should have received a copy of the GNU General Public License version
4244# 2 along with this work; if not, write to the Free Software Foundation,
4245# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4246#
4247# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4248# or visit www.oracle.com if you need additional information or have any
4249# questions.
4250#
4251
4252########################################################################
4253# This file is responsible for detecting, verifying and setting up the
4254# toolchain, i.e. the compiler, linker and related utilities. It will setup
4255# proper paths to the binaries, but it will not setup any flags.
4256#
4257# The binaries used is determined by the toolchain type, which is the family of
4258# compilers and related tools that are used.
4259########################################################################
4260
4261
4262# All valid toolchains, regardless of platform (used by help.m4)
4263VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4264
4265# These toolchains are valid on different platforms
4266VALID_TOOLCHAINS_linux="gcc clang"
4267VALID_TOOLCHAINS_solaris="solstudio"
4268VALID_TOOLCHAINS_macosx="gcc clang"
4269VALID_TOOLCHAINS_aix="xlc"
4270VALID_TOOLCHAINS_windows="microsoft"
4271
4272# Toolchain descriptions
4273TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4274TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4275TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4276TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4277TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4278
4279# Setup a number of variables describing how native output files are
4280# named on this platform/toolchain.
4281
4282
4283# Determine which toolchain type to use, and make sure it is valid for this
4284# platform. Setup various information about the selected toolchain.
4285
4286
4287# Before we start detecting the toolchain executables, we might need some
4288# special setup, e.g. additional paths etc.
4289
4290
4291# Restore path, etc
4292
4293
4294# Check if a compiler is of the toolchain type we expect, and save the version
4295# information from it. If the compiler does not match the expected type,
4296# this function will abort using AC_MSG_ERROR. If it matches, the version will
4297# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4298# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4299#
4300# $1 = compiler to test (CC or CXX)
4301# $2 = human readable name of compiler (C or C++)
4302
4303
4304# Try to locate the given C or C++ compiler in the path, or otherwise.
4305#
4306# $1 = compiler to test (CC or CXX)
4307# $2 = human readable name of compiler (C or C++)
4308# $3 = list of compiler names to search for
4309
4310
4311# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4312# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4313# archiver (AR). Verify that the compilers are correct according to the
4314# toolchain type.
4315
4316
4317# Setup additional tools that is considered a part of the toolchain, but not the
4318# core part. Many of these are highly platform-specific and do not exist,
4319# and/or are not needed on all platforms.
4320
4321
4322# Setup the build tools (i.e, the compiler and linker used to build programs
4323# that should be run on the build platform, not the target platform, as a build
4324# helper). Since the non-cross-compile case uses the normal, target compilers
4325# for this, we can only do this after these have been setup.
4326
4327
4328# Setup legacy variables that are still needed as alternative ways to refer to
4329# parts of the toolchain.
4330
4331
4332# Do some additional checks on the detected tools.
4333
4334
4335# Setup the JTReg Regression Test Harness.
4336
4337
4338#
4339# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4340# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4341#
4342# This code is free software; you can redistribute it and/or modify it
4343# under the terms of the GNU General Public License version 2 only, as
4344# published by the Free Software Foundation.  Oracle designates this
4345# particular file as subject to the "Classpath" exception as provided
4346# by Oracle in the LICENSE file that accompanied this code.
4347#
4348# This code is distributed in the hope that it will be useful, but WITHOUT
4349# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4350# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4351# version 2 for more details (a copy is included in the LICENSE file that
4352# accompanied this code).
4353#
4354# You should have received a copy of the GNU General Public License version
4355# 2 along with this work; if not, write to the Free Software Foundation,
4356# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4357#
4358# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4359# or visit www.oracle.com if you need additional information or have any
4360# questions.
4361#
4362
4363################################################################################
4364# The order of these defines the priority by which we try to find them.
4365VALID_VS_VERSIONS="2013 2012 2010"
4366
4367VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4368VS_VERSION_INTERNAL_2010=100
4369VS_MSVCR_2010=msvcr100.dll
4370# We don't use msvcp on Visual Studio 2010
4371#VS_MSVCP_2010=msvcp100.dll
4372VS_ENVVAR_2010="VS100COMNTOOLS"
4373VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4374VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4375VS_VS_PLATFORM_NAME_2010="v100"
4376VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4377
4378VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4379VS_VERSION_INTERNAL_2012=110
4380VS_MSVCR_2012=msvcr110.dll
4381VS_MSVCP_2012=msvcp110.dll
4382VS_ENVVAR_2012="VS110COMNTOOLS"
4383VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4384VS_SDK_INSTALLDIR_2012=
4385VS_VS_PLATFORM_NAME_2012="v110"
4386VS_SDK_PLATFORM_NAME_2012=
4387
4388VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4389VS_VERSION_INTERNAL_2013=120
4390VS_MSVCR_2013=msvcr120.dll
4391VS_MSVCP_2013=msvcp120.dll
4392VS_ENVVAR_2013="VS120COMNTOOLS"
4393VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4394VS_SDK_INSTALLDIR_2013=
4395VS_VS_PLATFORM_NAME_2013="v120"
4396VS_SDK_PLATFORM_NAME_2013=
4397
4398################################################################################
4399
4400
4401
4402################################################################################
4403
4404
4405
4406################################################################################
4407# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4408# build environment and assigns it to VS_ENV_CMD
4409
4410
4411################################################################################
4412
4413
4414
4415################################################################################
4416# Check if the VS env variables were setup prior to running configure.
4417# If not, then find vcvarsall.bat and run it automatically, and integrate
4418# the set env variables into the spec file.
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433# This line needs to be here, verbatim, after all includes and the dummy hook
4434# definitions. It is replaced with custom functionality when building
4435# custom sources.
4436#CUSTOM_AUTOCONF_INCLUDE
4437
4438# Do not change or remove the following line, it is needed for consistency checks:
4439DATE_WHEN_GENERATED=1433975399
4440
4441###############################################################################
4442#
4443# Initialization / Boot-strapping
4444#
4445# The bootstrapping process needs to solve the "chicken or the egg" problem,
4446# thus it jumps back and forth, each time gaining something needed later on.
4447#
4448###############################################################################
4449
4450# If we are requested to print additional help, do that and then exit.
4451# This must be the very first call.
4452
4453  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4454    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4455    $PRINTF "Which are valid to use depends on the build platform.\n"
4456    for toolchain in $VALID_TOOLCHAINS_all; do
4457      # Use indirect variable referencing
4458      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4459      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4460      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4461    done
4462
4463    # And now exit directly
4464    exit 0
4465  fi
4466
4467
4468# Basic initialization that must happen first of all in the normal process.
4469
4470  # Save the original command line. This is passed to us by the wrapper configure script.
4471
4472  # Save the path variable before it gets changed
4473  ORIGINAL_PATH="$PATH"
4474
4475  DATE_WHEN_CONFIGURED=`LANG=C date`
4476
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4478$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4480$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4481
4482
4483  # Start with tools that do not need have cross compilation support
4484  # and can be expected to be found in the default PATH. These tools are
4485  # used by configure. Nor are these tools expected to be found in the
4486  # devkit from the builddeps server either, since they are
4487  # needed to download the devkit.
4488
4489  # First are all the simple required tools.
4490
4491
4492
4493  # Publish this variable in the help.
4494
4495
4496  if test "x$BASENAME" = x; then
4497    # The variable is not set by user, try to locate tool using the code snippet
4498    for ac_prog in basename
4499do
4500  # Extract the first word of "$ac_prog", so it can be a program name with args.
4501set dummy $ac_prog; ac_word=$2
4502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4503$as_echo_n "checking for $ac_word... " >&6; }
4504if ${ac_cv_path_BASENAME+:} false; then :
4505  $as_echo_n "(cached) " >&6
4506else
4507  case $BASENAME in
4508  [\\/]* | ?:[\\/]*)
4509  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4510  ;;
4511  *)
4512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4513for as_dir in $PATH
4514do
4515  IFS=$as_save_IFS
4516  test -z "$as_dir" && as_dir=.
4517    for ac_exec_ext in '' $ac_executable_extensions; do
4518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4519    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4521    break 2
4522  fi
4523done
4524  done
4525IFS=$as_save_IFS
4526
4527  ;;
4528esac
4529fi
4530BASENAME=$ac_cv_path_BASENAME
4531if test -n "$BASENAME"; then
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4533$as_echo "$BASENAME" >&6; }
4534else
4535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4536$as_echo "no" >&6; }
4537fi
4538
4539
4540  test -n "$BASENAME" && break
4541done
4542
4543  else
4544    # The variable is set, but is it from the command line or the environment?
4545
4546    # Try to remove the string !BASENAME! from our list.
4547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4549      # If it failed, the variable was not from the command line. Ignore it,
4550      # but warn the user (except for BASH, which is always set by the calling BASH).
4551      if test "xBASENAME" != xBASH; then
4552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4553$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4554      fi
4555      # Try to locate tool using the code snippet
4556      for ac_prog in basename
4557do
4558  # Extract the first word of "$ac_prog", so it can be a program name with args.
4559set dummy $ac_prog; ac_word=$2
4560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4561$as_echo_n "checking for $ac_word... " >&6; }
4562if ${ac_cv_path_BASENAME+:} false; then :
4563  $as_echo_n "(cached) " >&6
4564else
4565  case $BASENAME in
4566  [\\/]* | ?:[\\/]*)
4567  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4568  ;;
4569  *)
4570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4571for as_dir in $PATH
4572do
4573  IFS=$as_save_IFS
4574  test -z "$as_dir" && as_dir=.
4575    for ac_exec_ext in '' $ac_executable_extensions; do
4576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4577    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4579    break 2
4580  fi
4581done
4582  done
4583IFS=$as_save_IFS
4584
4585  ;;
4586esac
4587fi
4588BASENAME=$ac_cv_path_BASENAME
4589if test -n "$BASENAME"; then
4590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4591$as_echo "$BASENAME" >&6; }
4592else
4593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4594$as_echo "no" >&6; }
4595fi
4596
4597
4598  test -n "$BASENAME" && break
4599done
4600
4601    else
4602      # If it succeeded, then it was overridden by the user. We will use it
4603      # for the tool.
4604
4605      # First remove it from the list of overridden variables, so we can test
4606      # for unknown variables in the end.
4607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4608
4609      # Check if the provided tool contains a complete path.
4610      tool_specified="$BASENAME"
4611      tool_basename="${tool_specified##*/}"
4612      if test "x$tool_basename" = "x$tool_specified"; then
4613        # A command without a complete path is provided, search $PATH.
4614        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4615$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4616        # Extract the first word of "$tool_basename", so it can be a program name with args.
4617set dummy $tool_basename; ac_word=$2
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619$as_echo_n "checking for $ac_word... " >&6; }
4620if ${ac_cv_path_BASENAME+:} false; then :
4621  $as_echo_n "(cached) " >&6
4622else
4623  case $BASENAME in
4624  [\\/]* | ?:[\\/]*)
4625  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4626  ;;
4627  *)
4628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in $PATH
4630do
4631  IFS=$as_save_IFS
4632  test -z "$as_dir" && as_dir=.
4633    for ac_exec_ext in '' $ac_executable_extensions; do
4634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4635    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637    break 2
4638  fi
4639done
4640  done
4641IFS=$as_save_IFS
4642
4643  ;;
4644esac
4645fi
4646BASENAME=$ac_cv_path_BASENAME
4647if test -n "$BASENAME"; then
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4649$as_echo "$BASENAME" >&6; }
4650else
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654
4655
4656        if test "x$BASENAME" = x; then
4657          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4658        fi
4659      else
4660        # Otherwise we believe it is a complete path. Use it as it is.
4661        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4662$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4664$as_echo_n "checking for BASENAME... " >&6; }
4665        if test ! -x "$tool_specified"; then
4666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4667$as_echo "not found" >&6; }
4668          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4669        fi
4670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4671$as_echo "$tool_specified" >&6; }
4672      fi
4673    fi
4674  fi
4675
4676
4677
4678  if test "x$BASENAME" = x; then
4679    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4680  fi
4681
4682
4683
4684
4685
4686  # Publish this variable in the help.
4687
4688
4689  if test "x$BASH" = x; then
4690    # The variable is not set by user, try to locate tool using the code snippet
4691    for ac_prog in bash
4692do
4693  # Extract the first word of "$ac_prog", so it can be a program name with args.
4694set dummy $ac_prog; ac_word=$2
4695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4696$as_echo_n "checking for $ac_word... " >&6; }
4697if ${ac_cv_path_BASH+:} false; then :
4698  $as_echo_n "(cached) " >&6
4699else
4700  case $BASH in
4701  [\\/]* | ?:[\\/]*)
4702  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4703  ;;
4704  *)
4705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4706for as_dir in $PATH
4707do
4708  IFS=$as_save_IFS
4709  test -z "$as_dir" && as_dir=.
4710    for ac_exec_ext in '' $ac_executable_extensions; do
4711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4712    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4714    break 2
4715  fi
4716done
4717  done
4718IFS=$as_save_IFS
4719
4720  ;;
4721esac
4722fi
4723BASH=$ac_cv_path_BASH
4724if test -n "$BASH"; then
4725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4726$as_echo "$BASH" >&6; }
4727else
4728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4729$as_echo "no" >&6; }
4730fi
4731
4732
4733  test -n "$BASH" && break
4734done
4735
4736  else
4737    # The variable is set, but is it from the command line or the environment?
4738
4739    # Try to remove the string !BASH! from our list.
4740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4742      # If it failed, the variable was not from the command line. Ignore it,
4743      # but warn the user (except for BASH, which is always set by the calling BASH).
4744      if test "xBASH" != xBASH; then
4745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4746$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4747      fi
4748      # Try to locate tool using the code snippet
4749      for ac_prog in bash
4750do
4751  # Extract the first word of "$ac_prog", so it can be a program name with args.
4752set dummy $ac_prog; ac_word=$2
4753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4754$as_echo_n "checking for $ac_word... " >&6; }
4755if ${ac_cv_path_BASH+:} false; then :
4756  $as_echo_n "(cached) " >&6
4757else
4758  case $BASH in
4759  [\\/]* | ?:[\\/]*)
4760  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4761  ;;
4762  *)
4763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4764for as_dir in $PATH
4765do
4766  IFS=$as_save_IFS
4767  test -z "$as_dir" && as_dir=.
4768    for ac_exec_ext in '' $ac_executable_extensions; do
4769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4770    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4772    break 2
4773  fi
4774done
4775  done
4776IFS=$as_save_IFS
4777
4778  ;;
4779esac
4780fi
4781BASH=$ac_cv_path_BASH
4782if test -n "$BASH"; then
4783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4784$as_echo "$BASH" >&6; }
4785else
4786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4787$as_echo "no" >&6; }
4788fi
4789
4790
4791  test -n "$BASH" && break
4792done
4793
4794    else
4795      # If it succeeded, then it was overridden by the user. We will use it
4796      # for the tool.
4797
4798      # First remove it from the list of overridden variables, so we can test
4799      # for unknown variables in the end.
4800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4801
4802      # Check if the provided tool contains a complete path.
4803      tool_specified="$BASH"
4804      tool_basename="${tool_specified##*/}"
4805      if test "x$tool_basename" = "x$tool_specified"; then
4806        # A command without a complete path is provided, search $PATH.
4807        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4808$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4809        # Extract the first word of "$tool_basename", so it can be a program name with args.
4810set dummy $tool_basename; ac_word=$2
4811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4812$as_echo_n "checking for $ac_word... " >&6; }
4813if ${ac_cv_path_BASH+:} false; then :
4814  $as_echo_n "(cached) " >&6
4815else
4816  case $BASH in
4817  [\\/]* | ?:[\\/]*)
4818  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4819  ;;
4820  *)
4821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822for as_dir in $PATH
4823do
4824  IFS=$as_save_IFS
4825  test -z "$as_dir" && as_dir=.
4826    for ac_exec_ext in '' $ac_executable_extensions; do
4827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4828    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4830    break 2
4831  fi
4832done
4833  done
4834IFS=$as_save_IFS
4835
4836  ;;
4837esac
4838fi
4839BASH=$ac_cv_path_BASH
4840if test -n "$BASH"; then
4841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4842$as_echo "$BASH" >&6; }
4843else
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4845$as_echo "no" >&6; }
4846fi
4847
4848
4849        if test "x$BASH" = x; then
4850          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4851        fi
4852      else
4853        # Otherwise we believe it is a complete path. Use it as it is.
4854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4855$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4857$as_echo_n "checking for BASH... " >&6; }
4858        if test ! -x "$tool_specified"; then
4859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4860$as_echo "not found" >&6; }
4861          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4862        fi
4863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4864$as_echo "$tool_specified" >&6; }
4865      fi
4866    fi
4867  fi
4868
4869
4870
4871  if test "x$BASH" = x; then
4872    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4873  fi
4874
4875
4876
4877
4878
4879  # Publish this variable in the help.
4880
4881
4882  if test "x$CAT" = x; then
4883    # The variable is not set by user, try to locate tool using the code snippet
4884    for ac_prog in cat
4885do
4886  # Extract the first word of "$ac_prog", so it can be a program name with args.
4887set dummy $ac_prog; ac_word=$2
4888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4889$as_echo_n "checking for $ac_word... " >&6; }
4890if ${ac_cv_path_CAT+:} false; then :
4891  $as_echo_n "(cached) " >&6
4892else
4893  case $CAT in
4894  [\\/]* | ?:[\\/]*)
4895  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4896  ;;
4897  *)
4898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4899for as_dir in $PATH
4900do
4901  IFS=$as_save_IFS
4902  test -z "$as_dir" && as_dir=.
4903    for ac_exec_ext in '' $ac_executable_extensions; do
4904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4905    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4907    break 2
4908  fi
4909done
4910  done
4911IFS=$as_save_IFS
4912
4913  ;;
4914esac
4915fi
4916CAT=$ac_cv_path_CAT
4917if test -n "$CAT"; then
4918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4919$as_echo "$CAT" >&6; }
4920else
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922$as_echo "no" >&6; }
4923fi
4924
4925
4926  test -n "$CAT" && break
4927done
4928
4929  else
4930    # The variable is set, but is it from the command line or the environment?
4931
4932    # Try to remove the string !CAT! from our list.
4933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4935      # If it failed, the variable was not from the command line. Ignore it,
4936      # but warn the user (except for BASH, which is always set by the calling BASH).
4937      if test "xCAT" != xBASH; then
4938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4939$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4940      fi
4941      # Try to locate tool using the code snippet
4942      for ac_prog in cat
4943do
4944  # Extract the first word of "$ac_prog", so it can be a program name with args.
4945set dummy $ac_prog; ac_word=$2
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947$as_echo_n "checking for $ac_word... " >&6; }
4948if ${ac_cv_path_CAT+:} false; then :
4949  $as_echo_n "(cached) " >&6
4950else
4951  case $CAT in
4952  [\\/]* | ?:[\\/]*)
4953  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4954  ;;
4955  *)
4956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4957for as_dir in $PATH
4958do
4959  IFS=$as_save_IFS
4960  test -z "$as_dir" && as_dir=.
4961    for ac_exec_ext in '' $ac_executable_extensions; do
4962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4963    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4965    break 2
4966  fi
4967done
4968  done
4969IFS=$as_save_IFS
4970
4971  ;;
4972esac
4973fi
4974CAT=$ac_cv_path_CAT
4975if test -n "$CAT"; then
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4977$as_echo "$CAT" >&6; }
4978else
4979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4980$as_echo "no" >&6; }
4981fi
4982
4983
4984  test -n "$CAT" && break
4985done
4986
4987    else
4988      # If it succeeded, then it was overridden by the user. We will use it
4989      # for the tool.
4990
4991      # First remove it from the list of overridden variables, so we can test
4992      # for unknown variables in the end.
4993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4994
4995      # Check if the provided tool contains a complete path.
4996      tool_specified="$CAT"
4997      tool_basename="${tool_specified##*/}"
4998      if test "x$tool_basename" = "x$tool_specified"; then
4999        # A command without a complete path is provided, search $PATH.
5000        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5001$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5002        # Extract the first word of "$tool_basename", so it can be a program name with args.
5003set dummy $tool_basename; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
5006if ${ac_cv_path_CAT+:} false; then :
5007  $as_echo_n "(cached) " >&6
5008else
5009  case $CAT in
5010  [\\/]* | ?:[\\/]*)
5011  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5012  ;;
5013  *)
5014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015for as_dir in $PATH
5016do
5017  IFS=$as_save_IFS
5018  test -z "$as_dir" && as_dir=.
5019    for ac_exec_ext in '' $ac_executable_extensions; do
5020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5021    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023    break 2
5024  fi
5025done
5026  done
5027IFS=$as_save_IFS
5028
5029  ;;
5030esac
5031fi
5032CAT=$ac_cv_path_CAT
5033if test -n "$CAT"; then
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5035$as_echo "$CAT" >&6; }
5036else
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041
5042        if test "x$CAT" = x; then
5043          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5044        fi
5045      else
5046        # Otherwise we believe it is a complete path. Use it as it is.
5047        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5048$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5050$as_echo_n "checking for CAT... " >&6; }
5051        if test ! -x "$tool_specified"; then
5052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5053$as_echo "not found" >&6; }
5054          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5055        fi
5056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5057$as_echo "$tool_specified" >&6; }
5058      fi
5059    fi
5060  fi
5061
5062
5063
5064  if test "x$CAT" = x; then
5065    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5066  fi
5067
5068
5069
5070
5071
5072  # Publish this variable in the help.
5073
5074
5075  if test "x$CHMOD" = x; then
5076    # The variable is not set by user, try to locate tool using the code snippet
5077    for ac_prog in chmod
5078do
5079  # Extract the first word of "$ac_prog", so it can be a program name with args.
5080set dummy $ac_prog; ac_word=$2
5081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5082$as_echo_n "checking for $ac_word... " >&6; }
5083if ${ac_cv_path_CHMOD+:} false; then :
5084  $as_echo_n "(cached) " >&6
5085else
5086  case $CHMOD in
5087  [\\/]* | ?:[\\/]*)
5088  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5089  ;;
5090  *)
5091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094  IFS=$as_save_IFS
5095  test -z "$as_dir" && as_dir=.
5096    for ac_exec_ext in '' $ac_executable_extensions; do
5097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5098    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5100    break 2
5101  fi
5102done
5103  done
5104IFS=$as_save_IFS
5105
5106  ;;
5107esac
5108fi
5109CHMOD=$ac_cv_path_CHMOD
5110if test -n "$CHMOD"; then
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5112$as_echo "$CHMOD" >&6; }
5113else
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115$as_echo "no" >&6; }
5116fi
5117
5118
5119  test -n "$CHMOD" && break
5120done
5121
5122  else
5123    # The variable is set, but is it from the command line or the environment?
5124
5125    # Try to remove the string !CHMOD! from our list.
5126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5128      # If it failed, the variable was not from the command line. Ignore it,
5129      # but warn the user (except for BASH, which is always set by the calling BASH).
5130      if test "xCHMOD" != xBASH; then
5131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5132$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5133      fi
5134      # Try to locate tool using the code snippet
5135      for ac_prog in chmod
5136do
5137  # Extract the first word of "$ac_prog", so it can be a program name with args.
5138set dummy $ac_prog; ac_word=$2
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140$as_echo_n "checking for $ac_word... " >&6; }
5141if ${ac_cv_path_CHMOD+:} false; then :
5142  $as_echo_n "(cached) " >&6
5143else
5144  case $CHMOD in
5145  [\\/]* | ?:[\\/]*)
5146  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5147  ;;
5148  *)
5149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152  IFS=$as_save_IFS
5153  test -z "$as_dir" && as_dir=.
5154    for ac_exec_ext in '' $ac_executable_extensions; do
5155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5156    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5158    break 2
5159  fi
5160done
5161  done
5162IFS=$as_save_IFS
5163
5164  ;;
5165esac
5166fi
5167CHMOD=$ac_cv_path_CHMOD
5168if test -n "$CHMOD"; then
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5170$as_echo "$CHMOD" >&6; }
5171else
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
5174fi
5175
5176
5177  test -n "$CHMOD" && break
5178done
5179
5180    else
5181      # If it succeeded, then it was overridden by the user. We will use it
5182      # for the tool.
5183
5184      # First remove it from the list of overridden variables, so we can test
5185      # for unknown variables in the end.
5186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5187
5188      # Check if the provided tool contains a complete path.
5189      tool_specified="$CHMOD"
5190      tool_basename="${tool_specified##*/}"
5191      if test "x$tool_basename" = "x$tool_specified"; then
5192        # A command without a complete path is provided, search $PATH.
5193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5194$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5195        # Extract the first word of "$tool_basename", so it can be a program name with args.
5196set dummy $tool_basename; ac_word=$2
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5198$as_echo_n "checking for $ac_word... " >&6; }
5199if ${ac_cv_path_CHMOD+:} false; then :
5200  $as_echo_n "(cached) " >&6
5201else
5202  case $CHMOD in
5203  [\\/]* | ?:[\\/]*)
5204  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5205  ;;
5206  *)
5207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5208for as_dir in $PATH
5209do
5210  IFS=$as_save_IFS
5211  test -z "$as_dir" && as_dir=.
5212    for ac_exec_ext in '' $ac_executable_extensions; do
5213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5214    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5216    break 2
5217  fi
5218done
5219  done
5220IFS=$as_save_IFS
5221
5222  ;;
5223esac
5224fi
5225CHMOD=$ac_cv_path_CHMOD
5226if test -n "$CHMOD"; then
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5228$as_echo "$CHMOD" >&6; }
5229else
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5231$as_echo "no" >&6; }
5232fi
5233
5234
5235        if test "x$CHMOD" = x; then
5236          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5237        fi
5238      else
5239        # Otherwise we believe it is a complete path. Use it as it is.
5240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5241$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5243$as_echo_n "checking for CHMOD... " >&6; }
5244        if test ! -x "$tool_specified"; then
5245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5246$as_echo "not found" >&6; }
5247          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5248        fi
5249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5250$as_echo "$tool_specified" >&6; }
5251      fi
5252    fi
5253  fi
5254
5255
5256
5257  if test "x$CHMOD" = x; then
5258    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5259  fi
5260
5261
5262
5263
5264
5265  # Publish this variable in the help.
5266
5267
5268  if test "x$CMP" = x; then
5269    # The variable is not set by user, try to locate tool using the code snippet
5270    for ac_prog in cmp
5271do
5272  # Extract the first word of "$ac_prog", so it can be a program name with args.
5273set dummy $ac_prog; ac_word=$2
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5275$as_echo_n "checking for $ac_word... " >&6; }
5276if ${ac_cv_path_CMP+:} false; then :
5277  $as_echo_n "(cached) " >&6
5278else
5279  case $CMP in
5280  [\\/]* | ?:[\\/]*)
5281  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5282  ;;
5283  *)
5284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287  IFS=$as_save_IFS
5288  test -z "$as_dir" && as_dir=.
5289    for ac_exec_ext in '' $ac_executable_extensions; do
5290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5291    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5293    break 2
5294  fi
5295done
5296  done
5297IFS=$as_save_IFS
5298
5299  ;;
5300esac
5301fi
5302CMP=$ac_cv_path_CMP
5303if test -n "$CMP"; then
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5305$as_echo "$CMP" >&6; }
5306else
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308$as_echo "no" >&6; }
5309fi
5310
5311
5312  test -n "$CMP" && break
5313done
5314
5315  else
5316    # The variable is set, but is it from the command line or the environment?
5317
5318    # Try to remove the string !CMP! from our list.
5319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5321      # If it failed, the variable was not from the command line. Ignore it,
5322      # but warn the user (except for BASH, which is always set by the calling BASH).
5323      if test "xCMP" != xBASH; then
5324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5325$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5326      fi
5327      # Try to locate tool using the code snippet
5328      for ac_prog in cmp
5329do
5330  # Extract the first word of "$ac_prog", so it can be a program name with args.
5331set dummy $ac_prog; ac_word=$2
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333$as_echo_n "checking for $ac_word... " >&6; }
5334if ${ac_cv_path_CMP+:} false; then :
5335  $as_echo_n "(cached) " >&6
5336else
5337  case $CMP in
5338  [\\/]* | ?:[\\/]*)
5339  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5340  ;;
5341  *)
5342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343for as_dir in $PATH
5344do
5345  IFS=$as_save_IFS
5346  test -z "$as_dir" && as_dir=.
5347    for ac_exec_ext in '' $ac_executable_extensions; do
5348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351    break 2
5352  fi
5353done
5354  done
5355IFS=$as_save_IFS
5356
5357  ;;
5358esac
5359fi
5360CMP=$ac_cv_path_CMP
5361if test -n "$CMP"; then
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5363$as_echo "$CMP" >&6; }
5364else
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
5367fi
5368
5369
5370  test -n "$CMP" && break
5371done
5372
5373    else
5374      # If it succeeded, then it was overridden by the user. We will use it
5375      # for the tool.
5376
5377      # First remove it from the list of overridden variables, so we can test
5378      # for unknown variables in the end.
5379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5380
5381      # Check if the provided tool contains a complete path.
5382      tool_specified="$CMP"
5383      tool_basename="${tool_specified##*/}"
5384      if test "x$tool_basename" = "x$tool_specified"; then
5385        # A command without a complete path is provided, search $PATH.
5386        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5387$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5388        # Extract the first word of "$tool_basename", so it can be a program name with args.
5389set dummy $tool_basename; ac_word=$2
5390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5391$as_echo_n "checking for $ac_word... " >&6; }
5392if ${ac_cv_path_CMP+:} false; then :
5393  $as_echo_n "(cached) " >&6
5394else
5395  case $CMP in
5396  [\\/]* | ?:[\\/]*)
5397  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5398  ;;
5399  *)
5400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5401for as_dir in $PATH
5402do
5403  IFS=$as_save_IFS
5404  test -z "$as_dir" && as_dir=.
5405    for ac_exec_ext in '' $ac_executable_extensions; do
5406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5407    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5409    break 2
5410  fi
5411done
5412  done
5413IFS=$as_save_IFS
5414
5415  ;;
5416esac
5417fi
5418CMP=$ac_cv_path_CMP
5419if test -n "$CMP"; then
5420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5421$as_echo "$CMP" >&6; }
5422else
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5424$as_echo "no" >&6; }
5425fi
5426
5427
5428        if test "x$CMP" = x; then
5429          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5430        fi
5431      else
5432        # Otherwise we believe it is a complete path. Use it as it is.
5433        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5434$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5436$as_echo_n "checking for CMP... " >&6; }
5437        if test ! -x "$tool_specified"; then
5438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5439$as_echo "not found" >&6; }
5440          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5441        fi
5442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5443$as_echo "$tool_specified" >&6; }
5444      fi
5445    fi
5446  fi
5447
5448
5449
5450  if test "x$CMP" = x; then
5451    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5452  fi
5453
5454
5455
5456
5457
5458  # Publish this variable in the help.
5459
5460
5461  if test "x$COMM" = x; then
5462    # The variable is not set by user, try to locate tool using the code snippet
5463    for ac_prog in comm
5464do
5465  # Extract the first word of "$ac_prog", so it can be a program name with args.
5466set dummy $ac_prog; ac_word=$2
5467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5468$as_echo_n "checking for $ac_word... " >&6; }
5469if ${ac_cv_path_COMM+:} false; then :
5470  $as_echo_n "(cached) " >&6
5471else
5472  case $COMM in
5473  [\\/]* | ?:[\\/]*)
5474  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5475  ;;
5476  *)
5477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5478for as_dir in $PATH
5479do
5480  IFS=$as_save_IFS
5481  test -z "$as_dir" && as_dir=.
5482    for ac_exec_ext in '' $ac_executable_extensions; do
5483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5484    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5486    break 2
5487  fi
5488done
5489  done
5490IFS=$as_save_IFS
5491
5492  ;;
5493esac
5494fi
5495COMM=$ac_cv_path_COMM
5496if test -n "$COMM"; then
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5498$as_echo "$COMM" >&6; }
5499else
5500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5501$as_echo "no" >&6; }
5502fi
5503
5504
5505  test -n "$COMM" && break
5506done
5507
5508  else
5509    # The variable is set, but is it from the command line or the environment?
5510
5511    # Try to remove the string !COMM! from our list.
5512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5514      # If it failed, the variable was not from the command line. Ignore it,
5515      # but warn the user (except for BASH, which is always set by the calling BASH).
5516      if test "xCOMM" != xBASH; then
5517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5518$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5519      fi
5520      # Try to locate tool using the code snippet
5521      for ac_prog in comm
5522do
5523  # Extract the first word of "$ac_prog", so it can be a program name with args.
5524set dummy $ac_prog; ac_word=$2
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5526$as_echo_n "checking for $ac_word... " >&6; }
5527if ${ac_cv_path_COMM+:} false; then :
5528  $as_echo_n "(cached) " >&6
5529else
5530  case $COMM in
5531  [\\/]* | ?:[\\/]*)
5532  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5533  ;;
5534  *)
5535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5536for as_dir in $PATH
5537do
5538  IFS=$as_save_IFS
5539  test -z "$as_dir" && as_dir=.
5540    for ac_exec_ext in '' $ac_executable_extensions; do
5541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5542    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5544    break 2
5545  fi
5546done
5547  done
5548IFS=$as_save_IFS
5549
5550  ;;
5551esac
5552fi
5553COMM=$ac_cv_path_COMM
5554if test -n "$COMM"; then
5555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5556$as_echo "$COMM" >&6; }
5557else
5558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5559$as_echo "no" >&6; }
5560fi
5561
5562
5563  test -n "$COMM" && break
5564done
5565
5566    else
5567      # If it succeeded, then it was overridden by the user. We will use it
5568      # for the tool.
5569
5570      # First remove it from the list of overridden variables, so we can test
5571      # for unknown variables in the end.
5572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5573
5574      # Check if the provided tool contains a complete path.
5575      tool_specified="$COMM"
5576      tool_basename="${tool_specified##*/}"
5577      if test "x$tool_basename" = "x$tool_specified"; then
5578        # A command without a complete path is provided, search $PATH.
5579        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5580$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5581        # Extract the first word of "$tool_basename", so it can be a program name with args.
5582set dummy $tool_basename; ac_word=$2
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5584$as_echo_n "checking for $ac_word... " >&6; }
5585if ${ac_cv_path_COMM+:} false; then :
5586  $as_echo_n "(cached) " >&6
5587else
5588  case $COMM in
5589  [\\/]* | ?:[\\/]*)
5590  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5591  ;;
5592  *)
5593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5594for as_dir in $PATH
5595do
5596  IFS=$as_save_IFS
5597  test -z "$as_dir" && as_dir=.
5598    for ac_exec_ext in '' $ac_executable_extensions; do
5599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5600    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5602    break 2
5603  fi
5604done
5605  done
5606IFS=$as_save_IFS
5607
5608  ;;
5609esac
5610fi
5611COMM=$ac_cv_path_COMM
5612if test -n "$COMM"; then
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5614$as_echo "$COMM" >&6; }
5615else
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5617$as_echo "no" >&6; }
5618fi
5619
5620
5621        if test "x$COMM" = x; then
5622          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5623        fi
5624      else
5625        # Otherwise we believe it is a complete path. Use it as it is.
5626        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5627$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5629$as_echo_n "checking for COMM... " >&6; }
5630        if test ! -x "$tool_specified"; then
5631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5632$as_echo "not found" >&6; }
5633          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5634        fi
5635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5636$as_echo "$tool_specified" >&6; }
5637      fi
5638    fi
5639  fi
5640
5641
5642
5643  if test "x$COMM" = x; then
5644    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5645  fi
5646
5647
5648
5649
5650
5651  # Publish this variable in the help.
5652
5653
5654  if test "x$CP" = x; then
5655    # The variable is not set by user, try to locate tool using the code snippet
5656    for ac_prog in cp
5657do
5658  # Extract the first word of "$ac_prog", so it can be a program name with args.
5659set dummy $ac_prog; ac_word=$2
5660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5661$as_echo_n "checking for $ac_word... " >&6; }
5662if ${ac_cv_path_CP+:} false; then :
5663  $as_echo_n "(cached) " >&6
5664else
5665  case $CP in
5666  [\\/]* | ?:[\\/]*)
5667  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5668  ;;
5669  *)
5670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5671for as_dir in $PATH
5672do
5673  IFS=$as_save_IFS
5674  test -z "$as_dir" && as_dir=.
5675    for ac_exec_ext in '' $ac_executable_extensions; do
5676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5677    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5679    break 2
5680  fi
5681done
5682  done
5683IFS=$as_save_IFS
5684
5685  ;;
5686esac
5687fi
5688CP=$ac_cv_path_CP
5689if test -n "$CP"; then
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5691$as_echo "$CP" >&6; }
5692else
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5694$as_echo "no" >&6; }
5695fi
5696
5697
5698  test -n "$CP" && break
5699done
5700
5701  else
5702    # The variable is set, but is it from the command line or the environment?
5703
5704    # Try to remove the string !CP! from our list.
5705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5707      # If it failed, the variable was not from the command line. Ignore it,
5708      # but warn the user (except for BASH, which is always set by the calling BASH).
5709      if test "xCP" != xBASH; then
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5711$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5712      fi
5713      # Try to locate tool using the code snippet
5714      for ac_prog in cp
5715do
5716  # Extract the first word of "$ac_prog", so it can be a program name with args.
5717set dummy $ac_prog; ac_word=$2
5718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5719$as_echo_n "checking for $ac_word... " >&6; }
5720if ${ac_cv_path_CP+:} false; then :
5721  $as_echo_n "(cached) " >&6
5722else
5723  case $CP in
5724  [\\/]* | ?:[\\/]*)
5725  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5726  ;;
5727  *)
5728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5729for as_dir in $PATH
5730do
5731  IFS=$as_save_IFS
5732  test -z "$as_dir" && as_dir=.
5733    for ac_exec_ext in '' $ac_executable_extensions; do
5734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5735    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5737    break 2
5738  fi
5739done
5740  done
5741IFS=$as_save_IFS
5742
5743  ;;
5744esac
5745fi
5746CP=$ac_cv_path_CP
5747if test -n "$CP"; then
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5749$as_echo "$CP" >&6; }
5750else
5751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5752$as_echo "no" >&6; }
5753fi
5754
5755
5756  test -n "$CP" && break
5757done
5758
5759    else
5760      # If it succeeded, then it was overridden by the user. We will use it
5761      # for the tool.
5762
5763      # First remove it from the list of overridden variables, so we can test
5764      # for unknown variables in the end.
5765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5766
5767      # Check if the provided tool contains a complete path.
5768      tool_specified="$CP"
5769      tool_basename="${tool_specified##*/}"
5770      if test "x$tool_basename" = "x$tool_specified"; then
5771        # A command without a complete path is provided, search $PATH.
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5773$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5774        # Extract the first word of "$tool_basename", so it can be a program name with args.
5775set dummy $tool_basename; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_CP+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CP in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804CP=$ac_cv_path_CP
5805if test -n "$CP"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5807$as_echo "$CP" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814        if test "x$CP" = x; then
5815          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5816        fi
5817      else
5818        # Otherwise we believe it is a complete path. Use it as it is.
5819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5820$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5822$as_echo_n "checking for CP... " >&6; }
5823        if test ! -x "$tool_specified"; then
5824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5825$as_echo "not found" >&6; }
5826          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5827        fi
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5829$as_echo "$tool_specified" >&6; }
5830      fi
5831    fi
5832  fi
5833
5834
5835
5836  if test "x$CP" = x; then
5837    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5838  fi
5839
5840
5841
5842
5843
5844  # Publish this variable in the help.
5845
5846
5847  if test "x$CUT" = x; then
5848    # The variable is not set by user, try to locate tool using the code snippet
5849    for ac_prog in cut
5850do
5851  # Extract the first word of "$ac_prog", so it can be a program name with args.
5852set dummy $ac_prog; ac_word=$2
5853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5854$as_echo_n "checking for $ac_word... " >&6; }
5855if ${ac_cv_path_CUT+:} false; then :
5856  $as_echo_n "(cached) " >&6
5857else
5858  case $CUT in
5859  [\\/]* | ?:[\\/]*)
5860  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5861  ;;
5862  *)
5863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5864for as_dir in $PATH
5865do
5866  IFS=$as_save_IFS
5867  test -z "$as_dir" && as_dir=.
5868    for ac_exec_ext in '' $ac_executable_extensions; do
5869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5870    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5872    break 2
5873  fi
5874done
5875  done
5876IFS=$as_save_IFS
5877
5878  ;;
5879esac
5880fi
5881CUT=$ac_cv_path_CUT
5882if test -n "$CUT"; then
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5884$as_echo "$CUT" >&6; }
5885else
5886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5887$as_echo "no" >&6; }
5888fi
5889
5890
5891  test -n "$CUT" && break
5892done
5893
5894  else
5895    # The variable is set, but is it from the command line or the environment?
5896
5897    # Try to remove the string !CUT! from our list.
5898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5900      # If it failed, the variable was not from the command line. Ignore it,
5901      # but warn the user (except for BASH, which is always set by the calling BASH).
5902      if test "xCUT" != xBASH; then
5903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5904$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5905      fi
5906      # Try to locate tool using the code snippet
5907      for ac_prog in cut
5908do
5909  # Extract the first word of "$ac_prog", so it can be a program name with args.
5910set dummy $ac_prog; ac_word=$2
5911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5912$as_echo_n "checking for $ac_word... " >&6; }
5913if ${ac_cv_path_CUT+:} false; then :
5914  $as_echo_n "(cached) " >&6
5915else
5916  case $CUT in
5917  [\\/]* | ?:[\\/]*)
5918  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5919  ;;
5920  *)
5921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5922for as_dir in $PATH
5923do
5924  IFS=$as_save_IFS
5925  test -z "$as_dir" && as_dir=.
5926    for ac_exec_ext in '' $ac_executable_extensions; do
5927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5928    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5930    break 2
5931  fi
5932done
5933  done
5934IFS=$as_save_IFS
5935
5936  ;;
5937esac
5938fi
5939CUT=$ac_cv_path_CUT
5940if test -n "$CUT"; then
5941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5942$as_echo "$CUT" >&6; }
5943else
5944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5945$as_echo "no" >&6; }
5946fi
5947
5948
5949  test -n "$CUT" && break
5950done
5951
5952    else
5953      # If it succeeded, then it was overridden by the user. We will use it
5954      # for the tool.
5955
5956      # First remove it from the list of overridden variables, so we can test
5957      # for unknown variables in the end.
5958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5959
5960      # Check if the provided tool contains a complete path.
5961      tool_specified="$CUT"
5962      tool_basename="${tool_specified##*/}"
5963      if test "x$tool_basename" = "x$tool_specified"; then
5964        # A command without a complete path is provided, search $PATH.
5965        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5966$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5967        # Extract the first word of "$tool_basename", so it can be a program name with args.
5968set dummy $tool_basename; ac_word=$2
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970$as_echo_n "checking for $ac_word... " >&6; }
5971if ${ac_cv_path_CUT+:} false; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974  case $CUT in
5975  [\\/]* | ?:[\\/]*)
5976  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5977  ;;
5978  *)
5979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH
5981do
5982  IFS=$as_save_IFS
5983  test -z "$as_dir" && as_dir=.
5984    for ac_exec_ext in '' $ac_executable_extensions; do
5985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5986    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5988    break 2
5989  fi
5990done
5991  done
5992IFS=$as_save_IFS
5993
5994  ;;
5995esac
5996fi
5997CUT=$ac_cv_path_CUT
5998if test -n "$CUT"; then
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6000$as_echo "$CUT" >&6; }
6001else
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005
6006
6007        if test "x$CUT" = x; then
6008          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6009        fi
6010      else
6011        # Otherwise we believe it is a complete path. Use it as it is.
6012        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6013$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6015$as_echo_n "checking for CUT... " >&6; }
6016        if test ! -x "$tool_specified"; then
6017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6018$as_echo "not found" >&6; }
6019          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6020        fi
6021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6022$as_echo "$tool_specified" >&6; }
6023      fi
6024    fi
6025  fi
6026
6027
6028
6029  if test "x$CUT" = x; then
6030    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6031  fi
6032
6033
6034
6035
6036
6037  # Publish this variable in the help.
6038
6039
6040  if test "x$DATE" = x; then
6041    # The variable is not set by user, try to locate tool using the code snippet
6042    for ac_prog in date
6043do
6044  # Extract the first word of "$ac_prog", so it can be a program name with args.
6045set dummy $ac_prog; ac_word=$2
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6047$as_echo_n "checking for $ac_word... " >&6; }
6048if ${ac_cv_path_DATE+:} false; then :
6049  $as_echo_n "(cached) " >&6
6050else
6051  case $DATE in
6052  [\\/]* | ?:[\\/]*)
6053  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6054  ;;
6055  *)
6056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057for as_dir in $PATH
6058do
6059  IFS=$as_save_IFS
6060  test -z "$as_dir" && as_dir=.
6061    for ac_exec_ext in '' $ac_executable_extensions; do
6062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6063    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6065    break 2
6066  fi
6067done
6068  done
6069IFS=$as_save_IFS
6070
6071  ;;
6072esac
6073fi
6074DATE=$ac_cv_path_DATE
6075if test -n "$DATE"; then
6076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6077$as_echo "$DATE" >&6; }
6078else
6079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
6081fi
6082
6083
6084  test -n "$DATE" && break
6085done
6086
6087  else
6088    # The variable is set, but is it from the command line or the environment?
6089
6090    # Try to remove the string !DATE! from our list.
6091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6093      # If it failed, the variable was not from the command line. Ignore it,
6094      # but warn the user (except for BASH, which is always set by the calling BASH).
6095      if test "xDATE" != xBASH; then
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6097$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6098      fi
6099      # Try to locate tool using the code snippet
6100      for ac_prog in date
6101do
6102  # Extract the first word of "$ac_prog", so it can be a program name with args.
6103set dummy $ac_prog; ac_word=$2
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6105$as_echo_n "checking for $ac_word... " >&6; }
6106if ${ac_cv_path_DATE+:} false; then :
6107  $as_echo_n "(cached) " >&6
6108else
6109  case $DATE in
6110  [\\/]* | ?:[\\/]*)
6111  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6112  ;;
6113  *)
6114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115for as_dir in $PATH
6116do
6117  IFS=$as_save_IFS
6118  test -z "$as_dir" && as_dir=.
6119    for ac_exec_ext in '' $ac_executable_extensions; do
6120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6121    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6123    break 2
6124  fi
6125done
6126  done
6127IFS=$as_save_IFS
6128
6129  ;;
6130esac
6131fi
6132DATE=$ac_cv_path_DATE
6133if test -n "$DATE"; then
6134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6135$as_echo "$DATE" >&6; }
6136else
6137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138$as_echo "no" >&6; }
6139fi
6140
6141
6142  test -n "$DATE" && break
6143done
6144
6145    else
6146      # If it succeeded, then it was overridden by the user. We will use it
6147      # for the tool.
6148
6149      # First remove it from the list of overridden variables, so we can test
6150      # for unknown variables in the end.
6151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6152
6153      # Check if the provided tool contains a complete path.
6154      tool_specified="$DATE"
6155      tool_basename="${tool_specified##*/}"
6156      if test "x$tool_basename" = "x$tool_specified"; then
6157        # A command without a complete path is provided, search $PATH.
6158        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6159$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6160        # Extract the first word of "$tool_basename", so it can be a program name with args.
6161set dummy $tool_basename; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_path_DATE+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  case $DATE in
6168  [\\/]* | ?:[\\/]*)
6169  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6170  ;;
6171  *)
6172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175  IFS=$as_save_IFS
6176  test -z "$as_dir" && as_dir=.
6177    for ac_exec_ext in '' $ac_executable_extensions; do
6178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6179    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181    break 2
6182  fi
6183done
6184  done
6185IFS=$as_save_IFS
6186
6187  ;;
6188esac
6189fi
6190DATE=$ac_cv_path_DATE
6191if test -n "$DATE"; then
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6193$as_echo "$DATE" >&6; }
6194else
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200        if test "x$DATE" = x; then
6201          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6202        fi
6203      else
6204        # Otherwise we believe it is a complete path. Use it as it is.
6205        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6206$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6208$as_echo_n "checking for DATE... " >&6; }
6209        if test ! -x "$tool_specified"; then
6210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6211$as_echo "not found" >&6; }
6212          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6213        fi
6214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6215$as_echo "$tool_specified" >&6; }
6216      fi
6217    fi
6218  fi
6219
6220
6221
6222  if test "x$DATE" = x; then
6223    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6224  fi
6225
6226
6227
6228
6229
6230  # Publish this variable in the help.
6231
6232
6233  if test "x$DIFF" = x; then
6234    # The variable is not set by user, try to locate tool using the code snippet
6235    for ac_prog in gdiff diff
6236do
6237  # Extract the first word of "$ac_prog", so it can be a program name with args.
6238set dummy $ac_prog; ac_word=$2
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6240$as_echo_n "checking for $ac_word... " >&6; }
6241if ${ac_cv_path_DIFF+:} false; then :
6242  $as_echo_n "(cached) " >&6
6243else
6244  case $DIFF in
6245  [\\/]* | ?:[\\/]*)
6246  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6247  ;;
6248  *)
6249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250for as_dir in $PATH
6251do
6252  IFS=$as_save_IFS
6253  test -z "$as_dir" && as_dir=.
6254    for ac_exec_ext in '' $ac_executable_extensions; do
6255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6256    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6258    break 2
6259  fi
6260done
6261  done
6262IFS=$as_save_IFS
6263
6264  ;;
6265esac
6266fi
6267DIFF=$ac_cv_path_DIFF
6268if test -n "$DIFF"; then
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6270$as_echo "$DIFF" >&6; }
6271else
6272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6273$as_echo "no" >&6; }
6274fi
6275
6276
6277  test -n "$DIFF" && break
6278done
6279
6280  else
6281    # The variable is set, but is it from the command line or the environment?
6282
6283    # Try to remove the string !DIFF! from our list.
6284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6286      # If it failed, the variable was not from the command line. Ignore it,
6287      # but warn the user (except for BASH, which is always set by the calling BASH).
6288      if test "xDIFF" != xBASH; then
6289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6290$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6291      fi
6292      # Try to locate tool using the code snippet
6293      for ac_prog in gdiff diff
6294do
6295  # Extract the first word of "$ac_prog", so it can be a program name with args.
6296set dummy $ac_prog; ac_word=$2
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6298$as_echo_n "checking for $ac_word... " >&6; }
6299if ${ac_cv_path_DIFF+:} false; then :
6300  $as_echo_n "(cached) " >&6
6301else
6302  case $DIFF in
6303  [\\/]* | ?:[\\/]*)
6304  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6305  ;;
6306  *)
6307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308for as_dir in $PATH
6309do
6310  IFS=$as_save_IFS
6311  test -z "$as_dir" && as_dir=.
6312    for ac_exec_ext in '' $ac_executable_extensions; do
6313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6314    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6316    break 2
6317  fi
6318done
6319  done
6320IFS=$as_save_IFS
6321
6322  ;;
6323esac
6324fi
6325DIFF=$ac_cv_path_DIFF
6326if test -n "$DIFF"; then
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6328$as_echo "$DIFF" >&6; }
6329else
6330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331$as_echo "no" >&6; }
6332fi
6333
6334
6335  test -n "$DIFF" && break
6336done
6337
6338    else
6339      # If it succeeded, then it was overridden by the user. We will use it
6340      # for the tool.
6341
6342      # First remove it from the list of overridden variables, so we can test
6343      # for unknown variables in the end.
6344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6345
6346      # Check if the provided tool contains a complete path.
6347      tool_specified="$DIFF"
6348      tool_basename="${tool_specified##*/}"
6349      if test "x$tool_basename" = "x$tool_specified"; then
6350        # A command without a complete path is provided, search $PATH.
6351        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6352$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6353        # Extract the first word of "$tool_basename", so it can be a program name with args.
6354set dummy $tool_basename; ac_word=$2
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6356$as_echo_n "checking for $ac_word... " >&6; }
6357if ${ac_cv_path_DIFF+:} false; then :
6358  $as_echo_n "(cached) " >&6
6359else
6360  case $DIFF in
6361  [\\/]* | ?:[\\/]*)
6362  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6363  ;;
6364  *)
6365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH
6367do
6368  IFS=$as_save_IFS
6369  test -z "$as_dir" && as_dir=.
6370    for ac_exec_ext in '' $ac_executable_extensions; do
6371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6372    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6374    break 2
6375  fi
6376done
6377  done
6378IFS=$as_save_IFS
6379
6380  ;;
6381esac
6382fi
6383DIFF=$ac_cv_path_DIFF
6384if test -n "$DIFF"; then
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6386$as_echo "$DIFF" >&6; }
6387else
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; }
6390fi
6391
6392
6393        if test "x$DIFF" = x; then
6394          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6395        fi
6396      else
6397        # Otherwise we believe it is a complete path. Use it as it is.
6398        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6399$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6401$as_echo_n "checking for DIFF... " >&6; }
6402        if test ! -x "$tool_specified"; then
6403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6404$as_echo "not found" >&6; }
6405          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6406        fi
6407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6408$as_echo "$tool_specified" >&6; }
6409      fi
6410    fi
6411  fi
6412
6413
6414
6415  if test "x$DIFF" = x; then
6416    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6417  fi
6418
6419
6420
6421
6422
6423  # Publish this variable in the help.
6424
6425
6426  if test "x$DIRNAME" = x; then
6427    # The variable is not set by user, try to locate tool using the code snippet
6428    for ac_prog in dirname
6429do
6430  # Extract the first word of "$ac_prog", so it can be a program name with args.
6431set dummy $ac_prog; ac_word=$2
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6433$as_echo_n "checking for $ac_word... " >&6; }
6434if ${ac_cv_path_DIRNAME+:} false; then :
6435  $as_echo_n "(cached) " >&6
6436else
6437  case $DIRNAME in
6438  [\\/]* | ?:[\\/]*)
6439  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6440  ;;
6441  *)
6442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6443for as_dir in $PATH
6444do
6445  IFS=$as_save_IFS
6446  test -z "$as_dir" && as_dir=.
6447    for ac_exec_ext in '' $ac_executable_extensions; do
6448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6449    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6451    break 2
6452  fi
6453done
6454  done
6455IFS=$as_save_IFS
6456
6457  ;;
6458esac
6459fi
6460DIRNAME=$ac_cv_path_DIRNAME
6461if test -n "$DIRNAME"; then
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6463$as_echo "$DIRNAME" >&6; }
6464else
6465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
6467fi
6468
6469
6470  test -n "$DIRNAME" && break
6471done
6472
6473  else
6474    # The variable is set, but is it from the command line or the environment?
6475
6476    # Try to remove the string !DIRNAME! from our list.
6477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6479      # If it failed, the variable was not from the command line. Ignore it,
6480      # but warn the user (except for BASH, which is always set by the calling BASH).
6481      if test "xDIRNAME" != xBASH; then
6482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6483$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6484      fi
6485      # Try to locate tool using the code snippet
6486      for ac_prog in dirname
6487do
6488  # Extract the first word of "$ac_prog", so it can be a program name with args.
6489set dummy $ac_prog; ac_word=$2
6490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6491$as_echo_n "checking for $ac_word... " >&6; }
6492if ${ac_cv_path_DIRNAME+:} false; then :
6493  $as_echo_n "(cached) " >&6
6494else
6495  case $DIRNAME in
6496  [\\/]* | ?:[\\/]*)
6497  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6498  ;;
6499  *)
6500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501for as_dir in $PATH
6502do
6503  IFS=$as_save_IFS
6504  test -z "$as_dir" && as_dir=.
6505    for ac_exec_ext in '' $ac_executable_extensions; do
6506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509    break 2
6510  fi
6511done
6512  done
6513IFS=$as_save_IFS
6514
6515  ;;
6516esac
6517fi
6518DIRNAME=$ac_cv_path_DIRNAME
6519if test -n "$DIRNAME"; then
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6521$as_echo "$DIRNAME" >&6; }
6522else
6523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524$as_echo "no" >&6; }
6525fi
6526
6527
6528  test -n "$DIRNAME" && break
6529done
6530
6531    else
6532      # If it succeeded, then it was overridden by the user. We will use it
6533      # for the tool.
6534
6535      # First remove it from the list of overridden variables, so we can test
6536      # for unknown variables in the end.
6537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6538
6539      # Check if the provided tool contains a complete path.
6540      tool_specified="$DIRNAME"
6541      tool_basename="${tool_specified##*/}"
6542      if test "x$tool_basename" = "x$tool_specified"; then
6543        # A command without a complete path is provided, search $PATH.
6544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6545$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6546        # Extract the first word of "$tool_basename", so it can be a program name with args.
6547set dummy $tool_basename; ac_word=$2
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6549$as_echo_n "checking for $ac_word... " >&6; }
6550if ${ac_cv_path_DIRNAME+:} false; then :
6551  $as_echo_n "(cached) " >&6
6552else
6553  case $DIRNAME in
6554  [\\/]* | ?:[\\/]*)
6555  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6556  ;;
6557  *)
6558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6559for as_dir in $PATH
6560do
6561  IFS=$as_save_IFS
6562  test -z "$as_dir" && as_dir=.
6563    for ac_exec_ext in '' $ac_executable_extensions; do
6564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6565    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6567    break 2
6568  fi
6569done
6570  done
6571IFS=$as_save_IFS
6572
6573  ;;
6574esac
6575fi
6576DIRNAME=$ac_cv_path_DIRNAME
6577if test -n "$DIRNAME"; then
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6579$as_echo "$DIRNAME" >&6; }
6580else
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585
6586        if test "x$DIRNAME" = x; then
6587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6588        fi
6589      else
6590        # Otherwise we believe it is a complete path. Use it as it is.
6591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6592$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6594$as_echo_n "checking for DIRNAME... " >&6; }
6595        if test ! -x "$tool_specified"; then
6596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6597$as_echo "not found" >&6; }
6598          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6599        fi
6600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6601$as_echo "$tool_specified" >&6; }
6602      fi
6603    fi
6604  fi
6605
6606
6607
6608  if test "x$DIRNAME" = x; then
6609    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6610  fi
6611
6612
6613
6614
6615
6616  # Publish this variable in the help.
6617
6618
6619  if test "x$ECHO" = x; then
6620    # The variable is not set by user, try to locate tool using the code snippet
6621    for ac_prog in echo
6622do
6623  # Extract the first word of "$ac_prog", so it can be a program name with args.
6624set dummy $ac_prog; ac_word=$2
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626$as_echo_n "checking for $ac_word... " >&6; }
6627if ${ac_cv_path_ECHO+:} false; then :
6628  $as_echo_n "(cached) " >&6
6629else
6630  case $ECHO in
6631  [\\/]* | ?:[\\/]*)
6632  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6633  ;;
6634  *)
6635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6636for as_dir in $PATH
6637do
6638  IFS=$as_save_IFS
6639  test -z "$as_dir" && as_dir=.
6640    for ac_exec_ext in '' $ac_executable_extensions; do
6641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6642    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6644    break 2
6645  fi
6646done
6647  done
6648IFS=$as_save_IFS
6649
6650  ;;
6651esac
6652fi
6653ECHO=$ac_cv_path_ECHO
6654if test -n "$ECHO"; then
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6656$as_echo "$ECHO" >&6; }
6657else
6658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6659$as_echo "no" >&6; }
6660fi
6661
6662
6663  test -n "$ECHO" && break
6664done
6665
6666  else
6667    # The variable is set, but is it from the command line or the environment?
6668
6669    # Try to remove the string !ECHO! from our list.
6670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6672      # If it failed, the variable was not from the command line. Ignore it,
6673      # but warn the user (except for BASH, which is always set by the calling BASH).
6674      if test "xECHO" != xBASH; then
6675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6676$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6677      fi
6678      # Try to locate tool using the code snippet
6679      for ac_prog in echo
6680do
6681  # Extract the first word of "$ac_prog", so it can be a program name with args.
6682set dummy $ac_prog; ac_word=$2
6683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6684$as_echo_n "checking for $ac_word... " >&6; }
6685if ${ac_cv_path_ECHO+:} false; then :
6686  $as_echo_n "(cached) " >&6
6687else
6688  case $ECHO in
6689  [\\/]* | ?:[\\/]*)
6690  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6691  ;;
6692  *)
6693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6694for as_dir in $PATH
6695do
6696  IFS=$as_save_IFS
6697  test -z "$as_dir" && as_dir=.
6698    for ac_exec_ext in '' $ac_executable_extensions; do
6699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6700    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6702    break 2
6703  fi
6704done
6705  done
6706IFS=$as_save_IFS
6707
6708  ;;
6709esac
6710fi
6711ECHO=$ac_cv_path_ECHO
6712if test -n "$ECHO"; then
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6714$as_echo "$ECHO" >&6; }
6715else
6716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6717$as_echo "no" >&6; }
6718fi
6719
6720
6721  test -n "$ECHO" && break
6722done
6723
6724    else
6725      # If it succeeded, then it was overridden by the user. We will use it
6726      # for the tool.
6727
6728      # First remove it from the list of overridden variables, so we can test
6729      # for unknown variables in the end.
6730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6731
6732      # Check if the provided tool contains a complete path.
6733      tool_specified="$ECHO"
6734      tool_basename="${tool_specified##*/}"
6735      if test "x$tool_basename" = "x$tool_specified"; then
6736        # A command without a complete path is provided, search $PATH.
6737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6738$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6739        # Extract the first word of "$tool_basename", so it can be a program name with args.
6740set dummy $tool_basename; ac_word=$2
6741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6742$as_echo_n "checking for $ac_word... " >&6; }
6743if ${ac_cv_path_ECHO+:} false; then :
6744  $as_echo_n "(cached) " >&6
6745else
6746  case $ECHO in
6747  [\\/]* | ?:[\\/]*)
6748  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6749  ;;
6750  *)
6751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6752for as_dir in $PATH
6753do
6754  IFS=$as_save_IFS
6755  test -z "$as_dir" && as_dir=.
6756    for ac_exec_ext in '' $ac_executable_extensions; do
6757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6758    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6760    break 2
6761  fi
6762done
6763  done
6764IFS=$as_save_IFS
6765
6766  ;;
6767esac
6768fi
6769ECHO=$ac_cv_path_ECHO
6770if test -n "$ECHO"; then
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6772$as_echo "$ECHO" >&6; }
6773else
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6775$as_echo "no" >&6; }
6776fi
6777
6778
6779        if test "x$ECHO" = x; then
6780          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6781        fi
6782      else
6783        # Otherwise we believe it is a complete path. Use it as it is.
6784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6785$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6787$as_echo_n "checking for ECHO... " >&6; }
6788        if test ! -x "$tool_specified"; then
6789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6790$as_echo "not found" >&6; }
6791          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6792        fi
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6794$as_echo "$tool_specified" >&6; }
6795      fi
6796    fi
6797  fi
6798
6799
6800
6801  if test "x$ECHO" = x; then
6802    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6803  fi
6804
6805
6806
6807
6808
6809  # Publish this variable in the help.
6810
6811
6812  if test "x$EXPR" = x; then
6813    # The variable is not set by user, try to locate tool using the code snippet
6814    for ac_prog in expr
6815do
6816  # Extract the first word of "$ac_prog", so it can be a program name with args.
6817set dummy $ac_prog; ac_word=$2
6818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819$as_echo_n "checking for $ac_word... " >&6; }
6820if ${ac_cv_path_EXPR+:} false; then :
6821  $as_echo_n "(cached) " >&6
6822else
6823  case $EXPR in
6824  [\\/]* | ?:[\\/]*)
6825  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6826  ;;
6827  *)
6828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6829for as_dir in $PATH
6830do
6831  IFS=$as_save_IFS
6832  test -z "$as_dir" && as_dir=.
6833    for ac_exec_ext in '' $ac_executable_extensions; do
6834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6835    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6837    break 2
6838  fi
6839done
6840  done
6841IFS=$as_save_IFS
6842
6843  ;;
6844esac
6845fi
6846EXPR=$ac_cv_path_EXPR
6847if test -n "$EXPR"; then
6848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6849$as_echo "$EXPR" >&6; }
6850else
6851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6852$as_echo "no" >&6; }
6853fi
6854
6855
6856  test -n "$EXPR" && break
6857done
6858
6859  else
6860    # The variable is set, but is it from the command line or the environment?
6861
6862    # Try to remove the string !EXPR! from our list.
6863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6865      # If it failed, the variable was not from the command line. Ignore it,
6866      # but warn the user (except for BASH, which is always set by the calling BASH).
6867      if test "xEXPR" != xBASH; then
6868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6869$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6870      fi
6871      # Try to locate tool using the code snippet
6872      for ac_prog in expr
6873do
6874  # Extract the first word of "$ac_prog", so it can be a program name with args.
6875set dummy $ac_prog; ac_word=$2
6876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6877$as_echo_n "checking for $ac_word... " >&6; }
6878if ${ac_cv_path_EXPR+:} false; then :
6879  $as_echo_n "(cached) " >&6
6880else
6881  case $EXPR in
6882  [\\/]* | ?:[\\/]*)
6883  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6884  ;;
6885  *)
6886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6887for as_dir in $PATH
6888do
6889  IFS=$as_save_IFS
6890  test -z "$as_dir" && as_dir=.
6891    for ac_exec_ext in '' $ac_executable_extensions; do
6892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6893    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6895    break 2
6896  fi
6897done
6898  done
6899IFS=$as_save_IFS
6900
6901  ;;
6902esac
6903fi
6904EXPR=$ac_cv_path_EXPR
6905if test -n "$EXPR"; then
6906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6907$as_echo "$EXPR" >&6; }
6908else
6909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6910$as_echo "no" >&6; }
6911fi
6912
6913
6914  test -n "$EXPR" && break
6915done
6916
6917    else
6918      # If it succeeded, then it was overridden by the user. We will use it
6919      # for the tool.
6920
6921      # First remove it from the list of overridden variables, so we can test
6922      # for unknown variables in the end.
6923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6924
6925      # Check if the provided tool contains a complete path.
6926      tool_specified="$EXPR"
6927      tool_basename="${tool_specified##*/}"
6928      if test "x$tool_basename" = "x$tool_specified"; then
6929        # A command without a complete path is provided, search $PATH.
6930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6931$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6932        # Extract the first word of "$tool_basename", so it can be a program name with args.
6933set dummy $tool_basename; ac_word=$2
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6935$as_echo_n "checking for $ac_word... " >&6; }
6936if ${ac_cv_path_EXPR+:} false; then :
6937  $as_echo_n "(cached) " >&6
6938else
6939  case $EXPR in
6940  [\\/]* | ?:[\\/]*)
6941  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6942  ;;
6943  *)
6944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6945for as_dir in $PATH
6946do
6947  IFS=$as_save_IFS
6948  test -z "$as_dir" && as_dir=.
6949    for ac_exec_ext in '' $ac_executable_extensions; do
6950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6951    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6953    break 2
6954  fi
6955done
6956  done
6957IFS=$as_save_IFS
6958
6959  ;;
6960esac
6961fi
6962EXPR=$ac_cv_path_EXPR
6963if test -n "$EXPR"; then
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6965$as_echo "$EXPR" >&6; }
6966else
6967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6968$as_echo "no" >&6; }
6969fi
6970
6971
6972        if test "x$EXPR" = x; then
6973          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6974        fi
6975      else
6976        # Otherwise we believe it is a complete path. Use it as it is.
6977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6978$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6980$as_echo_n "checking for EXPR... " >&6; }
6981        if test ! -x "$tool_specified"; then
6982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6983$as_echo "not found" >&6; }
6984          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6985        fi
6986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6987$as_echo "$tool_specified" >&6; }
6988      fi
6989    fi
6990  fi
6991
6992
6993
6994  if test "x$EXPR" = x; then
6995    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6996  fi
6997
6998
6999
7000
7001
7002  # Publish this variable in the help.
7003
7004
7005  if test "x$FILE" = x; then
7006    # The variable is not set by user, try to locate tool using the code snippet
7007    for ac_prog in file
7008do
7009  # Extract the first word of "$ac_prog", so it can be a program name with args.
7010set dummy $ac_prog; ac_word=$2
7011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7012$as_echo_n "checking for $ac_word... " >&6; }
7013if ${ac_cv_path_FILE+:} false; then :
7014  $as_echo_n "(cached) " >&6
7015else
7016  case $FILE in
7017  [\\/]* | ?:[\\/]*)
7018  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7019  ;;
7020  *)
7021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7022for as_dir in $PATH
7023do
7024  IFS=$as_save_IFS
7025  test -z "$as_dir" && as_dir=.
7026    for ac_exec_ext in '' $ac_executable_extensions; do
7027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7028    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7030    break 2
7031  fi
7032done
7033  done
7034IFS=$as_save_IFS
7035
7036  ;;
7037esac
7038fi
7039FILE=$ac_cv_path_FILE
7040if test -n "$FILE"; then
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7042$as_echo "$FILE" >&6; }
7043else
7044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7045$as_echo "no" >&6; }
7046fi
7047
7048
7049  test -n "$FILE" && break
7050done
7051
7052  else
7053    # The variable is set, but is it from the command line or the environment?
7054
7055    # Try to remove the string !FILE! from our list.
7056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7058      # If it failed, the variable was not from the command line. Ignore it,
7059      # but warn the user (except for BASH, which is always set by the calling BASH).
7060      if test "xFILE" != xBASH; then
7061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7062$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7063      fi
7064      # Try to locate tool using the code snippet
7065      for ac_prog in file
7066do
7067  # Extract the first word of "$ac_prog", so it can be a program name with args.
7068set dummy $ac_prog; ac_word=$2
7069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7070$as_echo_n "checking for $ac_word... " >&6; }
7071if ${ac_cv_path_FILE+:} false; then :
7072  $as_echo_n "(cached) " >&6
7073else
7074  case $FILE in
7075  [\\/]* | ?:[\\/]*)
7076  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7077  ;;
7078  *)
7079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7080for as_dir in $PATH
7081do
7082  IFS=$as_save_IFS
7083  test -z "$as_dir" && as_dir=.
7084    for ac_exec_ext in '' $ac_executable_extensions; do
7085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7086    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7088    break 2
7089  fi
7090done
7091  done
7092IFS=$as_save_IFS
7093
7094  ;;
7095esac
7096fi
7097FILE=$ac_cv_path_FILE
7098if test -n "$FILE"; then
7099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7100$as_echo "$FILE" >&6; }
7101else
7102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7103$as_echo "no" >&6; }
7104fi
7105
7106
7107  test -n "$FILE" && break
7108done
7109
7110    else
7111      # If it succeeded, then it was overridden by the user. We will use it
7112      # for the tool.
7113
7114      # First remove it from the list of overridden variables, so we can test
7115      # for unknown variables in the end.
7116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7117
7118      # Check if the provided tool contains a complete path.
7119      tool_specified="$FILE"
7120      tool_basename="${tool_specified##*/}"
7121      if test "x$tool_basename" = "x$tool_specified"; then
7122        # A command without a complete path is provided, search $PATH.
7123        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7124$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7125        # Extract the first word of "$tool_basename", so it can be a program name with args.
7126set dummy $tool_basename; ac_word=$2
7127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128$as_echo_n "checking for $ac_word... " >&6; }
7129if ${ac_cv_path_FILE+:} false; then :
7130  $as_echo_n "(cached) " >&6
7131else
7132  case $FILE in
7133  [\\/]* | ?:[\\/]*)
7134  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7135  ;;
7136  *)
7137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138for as_dir in $PATH
7139do
7140  IFS=$as_save_IFS
7141  test -z "$as_dir" && as_dir=.
7142    for ac_exec_ext in '' $ac_executable_extensions; do
7143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7144    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7146    break 2
7147  fi
7148done
7149  done
7150IFS=$as_save_IFS
7151
7152  ;;
7153esac
7154fi
7155FILE=$ac_cv_path_FILE
7156if test -n "$FILE"; then
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7158$as_echo "$FILE" >&6; }
7159else
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
7162fi
7163
7164
7165        if test "x$FILE" = x; then
7166          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7167        fi
7168      else
7169        # Otherwise we believe it is a complete path. Use it as it is.
7170        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7171$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7173$as_echo_n "checking for FILE... " >&6; }
7174        if test ! -x "$tool_specified"; then
7175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7176$as_echo "not found" >&6; }
7177          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7178        fi
7179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7180$as_echo "$tool_specified" >&6; }
7181      fi
7182    fi
7183  fi
7184
7185
7186
7187  if test "x$FILE" = x; then
7188    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7189  fi
7190
7191
7192
7193
7194
7195  # Publish this variable in the help.
7196
7197
7198  if test "x$FIND" = x; then
7199    # The variable is not set by user, try to locate tool using the code snippet
7200    for ac_prog in find
7201do
7202  # Extract the first word of "$ac_prog", so it can be a program name with args.
7203set dummy $ac_prog; ac_word=$2
7204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205$as_echo_n "checking for $ac_word... " >&6; }
7206if ${ac_cv_path_FIND+:} false; then :
7207  $as_echo_n "(cached) " >&6
7208else
7209  case $FIND in
7210  [\\/]* | ?:[\\/]*)
7211  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7212  ;;
7213  *)
7214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217  IFS=$as_save_IFS
7218  test -z "$as_dir" && as_dir=.
7219    for ac_exec_ext in '' $ac_executable_extensions; do
7220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223    break 2
7224  fi
7225done
7226  done
7227IFS=$as_save_IFS
7228
7229  ;;
7230esac
7231fi
7232FIND=$ac_cv_path_FIND
7233if test -n "$FIND"; then
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7235$as_echo "$FIND" >&6; }
7236else
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238$as_echo "no" >&6; }
7239fi
7240
7241
7242  test -n "$FIND" && break
7243done
7244
7245  else
7246    # The variable is set, but is it from the command line or the environment?
7247
7248    # Try to remove the string !FIND! from our list.
7249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7251      # If it failed, the variable was not from the command line. Ignore it,
7252      # but warn the user (except for BASH, which is always set by the calling BASH).
7253      if test "xFIND" != xBASH; then
7254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7255$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7256      fi
7257      # Try to locate tool using the code snippet
7258      for ac_prog in find
7259do
7260  # Extract the first word of "$ac_prog", so it can be a program name with args.
7261set dummy $ac_prog; ac_word=$2
7262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7263$as_echo_n "checking for $ac_word... " >&6; }
7264if ${ac_cv_path_FIND+:} false; then :
7265  $as_echo_n "(cached) " >&6
7266else
7267  case $FIND in
7268  [\\/]* | ?:[\\/]*)
7269  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7270  ;;
7271  *)
7272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7273for as_dir in $PATH
7274do
7275  IFS=$as_save_IFS
7276  test -z "$as_dir" && as_dir=.
7277    for ac_exec_ext in '' $ac_executable_extensions; do
7278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7279    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7281    break 2
7282  fi
7283done
7284  done
7285IFS=$as_save_IFS
7286
7287  ;;
7288esac
7289fi
7290FIND=$ac_cv_path_FIND
7291if test -n "$FIND"; then
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7293$as_echo "$FIND" >&6; }
7294else
7295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7296$as_echo "no" >&6; }
7297fi
7298
7299
7300  test -n "$FIND" && break
7301done
7302
7303    else
7304      # If it succeeded, then it was overridden by the user. We will use it
7305      # for the tool.
7306
7307      # First remove it from the list of overridden variables, so we can test
7308      # for unknown variables in the end.
7309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7310
7311      # Check if the provided tool contains a complete path.
7312      tool_specified="$FIND"
7313      tool_basename="${tool_specified##*/}"
7314      if test "x$tool_basename" = "x$tool_specified"; then
7315        # A command without a complete path is provided, search $PATH.
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7317$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7318        # Extract the first word of "$tool_basename", so it can be a program name with args.
7319set dummy $tool_basename; ac_word=$2
7320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321$as_echo_n "checking for $ac_word... " >&6; }
7322if ${ac_cv_path_FIND+:} false; then :
7323  $as_echo_n "(cached) " >&6
7324else
7325  case $FIND in
7326  [\\/]* | ?:[\\/]*)
7327  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7328  ;;
7329  *)
7330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7331for as_dir in $PATH
7332do
7333  IFS=$as_save_IFS
7334  test -z "$as_dir" && as_dir=.
7335    for ac_exec_ext in '' $ac_executable_extensions; do
7336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7337    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7339    break 2
7340  fi
7341done
7342  done
7343IFS=$as_save_IFS
7344
7345  ;;
7346esac
7347fi
7348FIND=$ac_cv_path_FIND
7349if test -n "$FIND"; then
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7351$as_echo "$FIND" >&6; }
7352else
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
7355fi
7356
7357
7358        if test "x$FIND" = x; then
7359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7360        fi
7361      else
7362        # Otherwise we believe it is a complete path. Use it as it is.
7363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7364$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7366$as_echo_n "checking for FIND... " >&6; }
7367        if test ! -x "$tool_specified"; then
7368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7369$as_echo "not found" >&6; }
7370          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7371        fi
7372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7373$as_echo "$tool_specified" >&6; }
7374      fi
7375    fi
7376  fi
7377
7378
7379
7380  if test "x$FIND" = x; then
7381    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7382  fi
7383
7384
7385
7386
7387
7388  # Publish this variable in the help.
7389
7390
7391  if test "x$HEAD" = x; then
7392    # The variable is not set by user, try to locate tool using the code snippet
7393    for ac_prog in head
7394do
7395  # Extract the first word of "$ac_prog", so it can be a program name with args.
7396set dummy $ac_prog; ac_word=$2
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7398$as_echo_n "checking for $ac_word... " >&6; }
7399if ${ac_cv_path_HEAD+:} false; then :
7400  $as_echo_n "(cached) " >&6
7401else
7402  case $HEAD in
7403  [\\/]* | ?:[\\/]*)
7404  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7405  ;;
7406  *)
7407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7408for as_dir in $PATH
7409do
7410  IFS=$as_save_IFS
7411  test -z "$as_dir" && as_dir=.
7412    for ac_exec_ext in '' $ac_executable_extensions; do
7413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7414    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7416    break 2
7417  fi
7418done
7419  done
7420IFS=$as_save_IFS
7421
7422  ;;
7423esac
7424fi
7425HEAD=$ac_cv_path_HEAD
7426if test -n "$HEAD"; then
7427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7428$as_echo "$HEAD" >&6; }
7429else
7430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7431$as_echo "no" >&6; }
7432fi
7433
7434
7435  test -n "$HEAD" && break
7436done
7437
7438  else
7439    # The variable is set, but is it from the command line or the environment?
7440
7441    # Try to remove the string !HEAD! from our list.
7442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7444      # If it failed, the variable was not from the command line. Ignore it,
7445      # but warn the user (except for BASH, which is always set by the calling BASH).
7446      if test "xHEAD" != xBASH; then
7447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7448$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7449      fi
7450      # Try to locate tool using the code snippet
7451      for ac_prog in head
7452do
7453  # Extract the first word of "$ac_prog", so it can be a program name with args.
7454set dummy $ac_prog; ac_word=$2
7455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7456$as_echo_n "checking for $ac_word... " >&6; }
7457if ${ac_cv_path_HEAD+:} false; then :
7458  $as_echo_n "(cached) " >&6
7459else
7460  case $HEAD in
7461  [\\/]* | ?:[\\/]*)
7462  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7463  ;;
7464  *)
7465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7466for as_dir in $PATH
7467do
7468  IFS=$as_save_IFS
7469  test -z "$as_dir" && as_dir=.
7470    for ac_exec_ext in '' $ac_executable_extensions; do
7471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7472    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7474    break 2
7475  fi
7476done
7477  done
7478IFS=$as_save_IFS
7479
7480  ;;
7481esac
7482fi
7483HEAD=$ac_cv_path_HEAD
7484if test -n "$HEAD"; then
7485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7486$as_echo "$HEAD" >&6; }
7487else
7488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489$as_echo "no" >&6; }
7490fi
7491
7492
7493  test -n "$HEAD" && break
7494done
7495
7496    else
7497      # If it succeeded, then it was overridden by the user. We will use it
7498      # for the tool.
7499
7500      # First remove it from the list of overridden variables, so we can test
7501      # for unknown variables in the end.
7502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7503
7504      # Check if the provided tool contains a complete path.
7505      tool_specified="$HEAD"
7506      tool_basename="${tool_specified##*/}"
7507      if test "x$tool_basename" = "x$tool_specified"; then
7508        # A command without a complete path is provided, search $PATH.
7509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7510$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7511        # Extract the first word of "$tool_basename", so it can be a program name with args.
7512set dummy $tool_basename; ac_word=$2
7513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7514$as_echo_n "checking for $ac_word... " >&6; }
7515if ${ac_cv_path_HEAD+:} false; then :
7516  $as_echo_n "(cached) " >&6
7517else
7518  case $HEAD in
7519  [\\/]* | ?:[\\/]*)
7520  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7521  ;;
7522  *)
7523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7524for as_dir in $PATH
7525do
7526  IFS=$as_save_IFS
7527  test -z "$as_dir" && as_dir=.
7528    for ac_exec_ext in '' $ac_executable_extensions; do
7529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7530    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7532    break 2
7533  fi
7534done
7535  done
7536IFS=$as_save_IFS
7537
7538  ;;
7539esac
7540fi
7541HEAD=$ac_cv_path_HEAD
7542if test -n "$HEAD"; then
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7544$as_echo "$HEAD" >&6; }
7545else
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547$as_echo "no" >&6; }
7548fi
7549
7550
7551        if test "x$HEAD" = x; then
7552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7553        fi
7554      else
7555        # Otherwise we believe it is a complete path. Use it as it is.
7556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7557$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7559$as_echo_n "checking for HEAD... " >&6; }
7560        if test ! -x "$tool_specified"; then
7561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7562$as_echo "not found" >&6; }
7563          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7564        fi
7565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7566$as_echo "$tool_specified" >&6; }
7567      fi
7568    fi
7569  fi
7570
7571
7572
7573  if test "x$HEAD" = x; then
7574    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7575  fi
7576
7577
7578
7579
7580
7581  # Publish this variable in the help.
7582
7583
7584  if test "x$LN" = x; then
7585    # The variable is not set by user, try to locate tool using the code snippet
7586    for ac_prog in ln
7587do
7588  # Extract the first word of "$ac_prog", so it can be a program name with args.
7589set dummy $ac_prog; ac_word=$2
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7591$as_echo_n "checking for $ac_word... " >&6; }
7592if ${ac_cv_path_LN+:} false; then :
7593  $as_echo_n "(cached) " >&6
7594else
7595  case $LN in
7596  [\\/]* | ?:[\\/]*)
7597  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7598  ;;
7599  *)
7600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7601for as_dir in $PATH
7602do
7603  IFS=$as_save_IFS
7604  test -z "$as_dir" && as_dir=.
7605    for ac_exec_ext in '' $ac_executable_extensions; do
7606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7607    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7609    break 2
7610  fi
7611done
7612  done
7613IFS=$as_save_IFS
7614
7615  ;;
7616esac
7617fi
7618LN=$ac_cv_path_LN
7619if test -n "$LN"; then
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7621$as_echo "$LN" >&6; }
7622else
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624$as_echo "no" >&6; }
7625fi
7626
7627
7628  test -n "$LN" && break
7629done
7630
7631  else
7632    # The variable is set, but is it from the command line or the environment?
7633
7634    # Try to remove the string !LN! from our list.
7635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7637      # If it failed, the variable was not from the command line. Ignore it,
7638      # but warn the user (except for BASH, which is always set by the calling BASH).
7639      if test "xLN" != xBASH; then
7640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7641$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7642      fi
7643      # Try to locate tool using the code snippet
7644      for ac_prog in ln
7645do
7646  # Extract the first word of "$ac_prog", so it can be a program name with args.
7647set dummy $ac_prog; ac_word=$2
7648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7649$as_echo_n "checking for $ac_word... " >&6; }
7650if ${ac_cv_path_LN+:} false; then :
7651  $as_echo_n "(cached) " >&6
7652else
7653  case $LN in
7654  [\\/]* | ?:[\\/]*)
7655  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7656  ;;
7657  *)
7658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7659for as_dir in $PATH
7660do
7661  IFS=$as_save_IFS
7662  test -z "$as_dir" && as_dir=.
7663    for ac_exec_ext in '' $ac_executable_extensions; do
7664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7665    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7667    break 2
7668  fi
7669done
7670  done
7671IFS=$as_save_IFS
7672
7673  ;;
7674esac
7675fi
7676LN=$ac_cv_path_LN
7677if test -n "$LN"; then
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7679$as_echo "$LN" >&6; }
7680else
7681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7682$as_echo "no" >&6; }
7683fi
7684
7685
7686  test -n "$LN" && break
7687done
7688
7689    else
7690      # If it succeeded, then it was overridden by the user. We will use it
7691      # for the tool.
7692
7693      # First remove it from the list of overridden variables, so we can test
7694      # for unknown variables in the end.
7695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7696
7697      # Check if the provided tool contains a complete path.
7698      tool_specified="$LN"
7699      tool_basename="${tool_specified##*/}"
7700      if test "x$tool_basename" = "x$tool_specified"; then
7701        # A command without a complete path is provided, search $PATH.
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7703$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7704        # Extract the first word of "$tool_basename", so it can be a program name with args.
7705set dummy $tool_basename; ac_word=$2
7706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7707$as_echo_n "checking for $ac_word... " >&6; }
7708if ${ac_cv_path_LN+:} false; then :
7709  $as_echo_n "(cached) " >&6
7710else
7711  case $LN in
7712  [\\/]* | ?:[\\/]*)
7713  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7714  ;;
7715  *)
7716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7717for as_dir in $PATH
7718do
7719  IFS=$as_save_IFS
7720  test -z "$as_dir" && as_dir=.
7721    for ac_exec_ext in '' $ac_executable_extensions; do
7722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7723    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7725    break 2
7726  fi
7727done
7728  done
7729IFS=$as_save_IFS
7730
7731  ;;
7732esac
7733fi
7734LN=$ac_cv_path_LN
7735if test -n "$LN"; then
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7737$as_echo "$LN" >&6; }
7738else
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740$as_echo "no" >&6; }
7741fi
7742
7743
7744        if test "x$LN" = x; then
7745          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7746        fi
7747      else
7748        # Otherwise we believe it is a complete path. Use it as it is.
7749        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7750$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7752$as_echo_n "checking for LN... " >&6; }
7753        if test ! -x "$tool_specified"; then
7754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7755$as_echo "not found" >&6; }
7756          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7757        fi
7758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7759$as_echo "$tool_specified" >&6; }
7760      fi
7761    fi
7762  fi
7763
7764
7765
7766  if test "x$LN" = x; then
7767    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7768  fi
7769
7770
7771
7772
7773
7774  # Publish this variable in the help.
7775
7776
7777  if test "x$LS" = x; then
7778    # The variable is not set by user, try to locate tool using the code snippet
7779    for ac_prog in ls
7780do
7781  # Extract the first word of "$ac_prog", so it can be a program name with args.
7782set dummy $ac_prog; ac_word=$2
7783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7784$as_echo_n "checking for $ac_word... " >&6; }
7785if ${ac_cv_path_LS+:} false; then :
7786  $as_echo_n "(cached) " >&6
7787else
7788  case $LS in
7789  [\\/]* | ?:[\\/]*)
7790  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7791  ;;
7792  *)
7793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7794for as_dir in $PATH
7795do
7796  IFS=$as_save_IFS
7797  test -z "$as_dir" && as_dir=.
7798    for ac_exec_ext in '' $ac_executable_extensions; do
7799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7800    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7802    break 2
7803  fi
7804done
7805  done
7806IFS=$as_save_IFS
7807
7808  ;;
7809esac
7810fi
7811LS=$ac_cv_path_LS
7812if test -n "$LS"; then
7813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7814$as_echo "$LS" >&6; }
7815else
7816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7817$as_echo "no" >&6; }
7818fi
7819
7820
7821  test -n "$LS" && break
7822done
7823
7824  else
7825    # The variable is set, but is it from the command line or the environment?
7826
7827    # Try to remove the string !LS! from our list.
7828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7830      # If it failed, the variable was not from the command line. Ignore it,
7831      # but warn the user (except for BASH, which is always set by the calling BASH).
7832      if test "xLS" != xBASH; then
7833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7834$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7835      fi
7836      # Try to locate tool using the code snippet
7837      for ac_prog in ls
7838do
7839  # Extract the first word of "$ac_prog", so it can be a program name with args.
7840set dummy $ac_prog; ac_word=$2
7841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7842$as_echo_n "checking for $ac_word... " >&6; }
7843if ${ac_cv_path_LS+:} false; then :
7844  $as_echo_n "(cached) " >&6
7845else
7846  case $LS in
7847  [\\/]* | ?:[\\/]*)
7848  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7849  ;;
7850  *)
7851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7852for as_dir in $PATH
7853do
7854  IFS=$as_save_IFS
7855  test -z "$as_dir" && as_dir=.
7856    for ac_exec_ext in '' $ac_executable_extensions; do
7857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7858    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7860    break 2
7861  fi
7862done
7863  done
7864IFS=$as_save_IFS
7865
7866  ;;
7867esac
7868fi
7869LS=$ac_cv_path_LS
7870if test -n "$LS"; then
7871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7872$as_echo "$LS" >&6; }
7873else
7874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7875$as_echo "no" >&6; }
7876fi
7877
7878
7879  test -n "$LS" && break
7880done
7881
7882    else
7883      # If it succeeded, then it was overridden by the user. We will use it
7884      # for the tool.
7885
7886      # First remove it from the list of overridden variables, so we can test
7887      # for unknown variables in the end.
7888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7889
7890      # Check if the provided tool contains a complete path.
7891      tool_specified="$LS"
7892      tool_basename="${tool_specified##*/}"
7893      if test "x$tool_basename" = "x$tool_specified"; then
7894        # A command without a complete path is provided, search $PATH.
7895        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7896$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7897        # Extract the first word of "$tool_basename", so it can be a program name with args.
7898set dummy $tool_basename; ac_word=$2
7899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7900$as_echo_n "checking for $ac_word... " >&6; }
7901if ${ac_cv_path_LS+:} false; then :
7902  $as_echo_n "(cached) " >&6
7903else
7904  case $LS in
7905  [\\/]* | ?:[\\/]*)
7906  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7907  ;;
7908  *)
7909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7910for as_dir in $PATH
7911do
7912  IFS=$as_save_IFS
7913  test -z "$as_dir" && as_dir=.
7914    for ac_exec_ext in '' $ac_executable_extensions; do
7915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7916    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7918    break 2
7919  fi
7920done
7921  done
7922IFS=$as_save_IFS
7923
7924  ;;
7925esac
7926fi
7927LS=$ac_cv_path_LS
7928if test -n "$LS"; then
7929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7930$as_echo "$LS" >&6; }
7931else
7932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933$as_echo "no" >&6; }
7934fi
7935
7936
7937        if test "x$LS" = x; then
7938          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7939        fi
7940      else
7941        # Otherwise we believe it is a complete path. Use it as it is.
7942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7943$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7945$as_echo_n "checking for LS... " >&6; }
7946        if test ! -x "$tool_specified"; then
7947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7948$as_echo "not found" >&6; }
7949          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7950        fi
7951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7952$as_echo "$tool_specified" >&6; }
7953      fi
7954    fi
7955  fi
7956
7957
7958
7959  if test "x$LS" = x; then
7960    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7961  fi
7962
7963
7964
7965
7966
7967  # Publish this variable in the help.
7968
7969
7970  if test "x$MKDIR" = x; then
7971    # The variable is not set by user, try to locate tool using the code snippet
7972    for ac_prog in mkdir
7973do
7974  # Extract the first word of "$ac_prog", so it can be a program name with args.
7975set dummy $ac_prog; ac_word=$2
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7977$as_echo_n "checking for $ac_word... " >&6; }
7978if ${ac_cv_path_MKDIR+:} false; then :
7979  $as_echo_n "(cached) " >&6
7980else
7981  case $MKDIR in
7982  [\\/]* | ?:[\\/]*)
7983  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7984  ;;
7985  *)
7986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7987for as_dir in $PATH
7988do
7989  IFS=$as_save_IFS
7990  test -z "$as_dir" && as_dir=.
7991    for ac_exec_ext in '' $ac_executable_extensions; do
7992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7993    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7995    break 2
7996  fi
7997done
7998  done
7999IFS=$as_save_IFS
8000
8001  ;;
8002esac
8003fi
8004MKDIR=$ac_cv_path_MKDIR
8005if test -n "$MKDIR"; then
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8007$as_echo "$MKDIR" >&6; }
8008else
8009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8010$as_echo "no" >&6; }
8011fi
8012
8013
8014  test -n "$MKDIR" && break
8015done
8016
8017  else
8018    # The variable is set, but is it from the command line or the environment?
8019
8020    # Try to remove the string !MKDIR! from our list.
8021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8023      # If it failed, the variable was not from the command line. Ignore it,
8024      # but warn the user (except for BASH, which is always set by the calling BASH).
8025      if test "xMKDIR" != xBASH; then
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8027$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8028      fi
8029      # Try to locate tool using the code snippet
8030      for ac_prog in mkdir
8031do
8032  # Extract the first word of "$ac_prog", so it can be a program name with args.
8033set dummy $ac_prog; ac_word=$2
8034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8035$as_echo_n "checking for $ac_word... " >&6; }
8036if ${ac_cv_path_MKDIR+:} false; then :
8037  $as_echo_n "(cached) " >&6
8038else
8039  case $MKDIR in
8040  [\\/]* | ?:[\\/]*)
8041  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8042  ;;
8043  *)
8044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8045for as_dir in $PATH
8046do
8047  IFS=$as_save_IFS
8048  test -z "$as_dir" && as_dir=.
8049    for ac_exec_ext in '' $ac_executable_extensions; do
8050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8051    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8053    break 2
8054  fi
8055done
8056  done
8057IFS=$as_save_IFS
8058
8059  ;;
8060esac
8061fi
8062MKDIR=$ac_cv_path_MKDIR
8063if test -n "$MKDIR"; then
8064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8065$as_echo "$MKDIR" >&6; }
8066else
8067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8068$as_echo "no" >&6; }
8069fi
8070
8071
8072  test -n "$MKDIR" && break
8073done
8074
8075    else
8076      # If it succeeded, then it was overridden by the user. We will use it
8077      # for the tool.
8078
8079      # First remove it from the list of overridden variables, so we can test
8080      # for unknown variables in the end.
8081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8082
8083      # Check if the provided tool contains a complete path.
8084      tool_specified="$MKDIR"
8085      tool_basename="${tool_specified##*/}"
8086      if test "x$tool_basename" = "x$tool_specified"; then
8087        # A command without a complete path is provided, search $PATH.
8088        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8089$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8090        # Extract the first word of "$tool_basename", so it can be a program name with args.
8091set dummy $tool_basename; ac_word=$2
8092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8093$as_echo_n "checking for $ac_word... " >&6; }
8094if ${ac_cv_path_MKDIR+:} false; then :
8095  $as_echo_n "(cached) " >&6
8096else
8097  case $MKDIR in
8098  [\\/]* | ?:[\\/]*)
8099  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8100  ;;
8101  *)
8102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8103for as_dir in $PATH
8104do
8105  IFS=$as_save_IFS
8106  test -z "$as_dir" && as_dir=.
8107    for ac_exec_ext in '' $ac_executable_extensions; do
8108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8109    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8111    break 2
8112  fi
8113done
8114  done
8115IFS=$as_save_IFS
8116
8117  ;;
8118esac
8119fi
8120MKDIR=$ac_cv_path_MKDIR
8121if test -n "$MKDIR"; then
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8123$as_echo "$MKDIR" >&6; }
8124else
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8126$as_echo "no" >&6; }
8127fi
8128
8129
8130        if test "x$MKDIR" = x; then
8131          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8132        fi
8133      else
8134        # Otherwise we believe it is a complete path. Use it as it is.
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8136$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8138$as_echo_n "checking for MKDIR... " >&6; }
8139        if test ! -x "$tool_specified"; then
8140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8141$as_echo "not found" >&6; }
8142          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8143        fi
8144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8145$as_echo "$tool_specified" >&6; }
8146      fi
8147    fi
8148  fi
8149
8150
8151
8152  if test "x$MKDIR" = x; then
8153    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8154  fi
8155
8156
8157
8158
8159
8160  # Publish this variable in the help.
8161
8162
8163  if test "x$MKTEMP" = x; then
8164    # The variable is not set by user, try to locate tool using the code snippet
8165    for ac_prog in mktemp
8166do
8167  # Extract the first word of "$ac_prog", so it can be a program name with args.
8168set dummy $ac_prog; ac_word=$2
8169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8170$as_echo_n "checking for $ac_word... " >&6; }
8171if ${ac_cv_path_MKTEMP+:} false; then :
8172  $as_echo_n "(cached) " >&6
8173else
8174  case $MKTEMP in
8175  [\\/]* | ?:[\\/]*)
8176  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8177  ;;
8178  *)
8179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8180for as_dir in $PATH
8181do
8182  IFS=$as_save_IFS
8183  test -z "$as_dir" && as_dir=.
8184    for ac_exec_ext in '' $ac_executable_extensions; do
8185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8186    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8188    break 2
8189  fi
8190done
8191  done
8192IFS=$as_save_IFS
8193
8194  ;;
8195esac
8196fi
8197MKTEMP=$ac_cv_path_MKTEMP
8198if test -n "$MKTEMP"; then
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8200$as_echo "$MKTEMP" >&6; }
8201else
8202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8203$as_echo "no" >&6; }
8204fi
8205
8206
8207  test -n "$MKTEMP" && break
8208done
8209
8210  else
8211    # The variable is set, but is it from the command line or the environment?
8212
8213    # Try to remove the string !MKTEMP! from our list.
8214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8216      # If it failed, the variable was not from the command line. Ignore it,
8217      # but warn the user (except for BASH, which is always set by the calling BASH).
8218      if test "xMKTEMP" != xBASH; then
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8220$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8221      fi
8222      # Try to locate tool using the code snippet
8223      for ac_prog in mktemp
8224do
8225  # Extract the first word of "$ac_prog", so it can be a program name with args.
8226set dummy $ac_prog; ac_word=$2
8227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8228$as_echo_n "checking for $ac_word... " >&6; }
8229if ${ac_cv_path_MKTEMP+:} false; then :
8230  $as_echo_n "(cached) " >&6
8231else
8232  case $MKTEMP in
8233  [\\/]* | ?:[\\/]*)
8234  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8235  ;;
8236  *)
8237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8238for as_dir in $PATH
8239do
8240  IFS=$as_save_IFS
8241  test -z "$as_dir" && as_dir=.
8242    for ac_exec_ext in '' $ac_executable_extensions; do
8243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8244    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8246    break 2
8247  fi
8248done
8249  done
8250IFS=$as_save_IFS
8251
8252  ;;
8253esac
8254fi
8255MKTEMP=$ac_cv_path_MKTEMP
8256if test -n "$MKTEMP"; then
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8258$as_echo "$MKTEMP" >&6; }
8259else
8260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8261$as_echo "no" >&6; }
8262fi
8263
8264
8265  test -n "$MKTEMP" && break
8266done
8267
8268    else
8269      # If it succeeded, then it was overridden by the user. We will use it
8270      # for the tool.
8271
8272      # First remove it from the list of overridden variables, so we can test
8273      # for unknown variables in the end.
8274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8275
8276      # Check if the provided tool contains a complete path.
8277      tool_specified="$MKTEMP"
8278      tool_basename="${tool_specified##*/}"
8279      if test "x$tool_basename" = "x$tool_specified"; then
8280        # A command without a complete path is provided, search $PATH.
8281        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8282$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8283        # Extract the first word of "$tool_basename", so it can be a program name with args.
8284set dummy $tool_basename; ac_word=$2
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
8287if ${ac_cv_path_MKTEMP+:} false; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  case $MKTEMP in
8291  [\\/]* | ?:[\\/]*)
8292  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8293  ;;
8294  *)
8295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298  IFS=$as_save_IFS
8299  test -z "$as_dir" && as_dir=.
8300    for ac_exec_ext in '' $ac_executable_extensions; do
8301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304    break 2
8305  fi
8306done
8307  done
8308IFS=$as_save_IFS
8309
8310  ;;
8311esac
8312fi
8313MKTEMP=$ac_cv_path_MKTEMP
8314if test -n "$MKTEMP"; then
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8316$as_echo "$MKTEMP" >&6; }
8317else
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
8323        if test "x$MKTEMP" = x; then
8324          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8325        fi
8326      else
8327        # Otherwise we believe it is a complete path. Use it as it is.
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8329$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8331$as_echo_n "checking for MKTEMP... " >&6; }
8332        if test ! -x "$tool_specified"; then
8333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8334$as_echo "not found" >&6; }
8335          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8336        fi
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8338$as_echo "$tool_specified" >&6; }
8339      fi
8340    fi
8341  fi
8342
8343
8344
8345  if test "x$MKTEMP" = x; then
8346    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8347  fi
8348
8349
8350
8351
8352
8353  # Publish this variable in the help.
8354
8355
8356  if test "x$MV" = x; then
8357    # The variable is not set by user, try to locate tool using the code snippet
8358    for ac_prog in mv
8359do
8360  # Extract the first word of "$ac_prog", so it can be a program name with args.
8361set dummy $ac_prog; ac_word=$2
8362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8363$as_echo_n "checking for $ac_word... " >&6; }
8364if ${ac_cv_path_MV+:} false; then :
8365  $as_echo_n "(cached) " >&6
8366else
8367  case $MV in
8368  [\\/]* | ?:[\\/]*)
8369  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8370  ;;
8371  *)
8372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8373for as_dir in $PATH
8374do
8375  IFS=$as_save_IFS
8376  test -z "$as_dir" && as_dir=.
8377    for ac_exec_ext in '' $ac_executable_extensions; do
8378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8379    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8381    break 2
8382  fi
8383done
8384  done
8385IFS=$as_save_IFS
8386
8387  ;;
8388esac
8389fi
8390MV=$ac_cv_path_MV
8391if test -n "$MV"; then
8392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8393$as_echo "$MV" >&6; }
8394else
8395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8396$as_echo "no" >&6; }
8397fi
8398
8399
8400  test -n "$MV" && break
8401done
8402
8403  else
8404    # The variable is set, but is it from the command line or the environment?
8405
8406    # Try to remove the string !MV! from our list.
8407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8409      # If it failed, the variable was not from the command line. Ignore it,
8410      # but warn the user (except for BASH, which is always set by the calling BASH).
8411      if test "xMV" != xBASH; then
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8413$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8414      fi
8415      # Try to locate tool using the code snippet
8416      for ac_prog in mv
8417do
8418  # Extract the first word of "$ac_prog", so it can be a program name with args.
8419set dummy $ac_prog; ac_word=$2
8420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8421$as_echo_n "checking for $ac_word... " >&6; }
8422if ${ac_cv_path_MV+:} false; then :
8423  $as_echo_n "(cached) " >&6
8424else
8425  case $MV in
8426  [\\/]* | ?:[\\/]*)
8427  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8428  ;;
8429  *)
8430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8431for as_dir in $PATH
8432do
8433  IFS=$as_save_IFS
8434  test -z "$as_dir" && as_dir=.
8435    for ac_exec_ext in '' $ac_executable_extensions; do
8436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8437    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8439    break 2
8440  fi
8441done
8442  done
8443IFS=$as_save_IFS
8444
8445  ;;
8446esac
8447fi
8448MV=$ac_cv_path_MV
8449if test -n "$MV"; then
8450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8451$as_echo "$MV" >&6; }
8452else
8453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8454$as_echo "no" >&6; }
8455fi
8456
8457
8458  test -n "$MV" && break
8459done
8460
8461    else
8462      # If it succeeded, then it was overridden by the user. We will use it
8463      # for the tool.
8464
8465      # First remove it from the list of overridden variables, so we can test
8466      # for unknown variables in the end.
8467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8468
8469      # Check if the provided tool contains a complete path.
8470      tool_specified="$MV"
8471      tool_basename="${tool_specified##*/}"
8472      if test "x$tool_basename" = "x$tool_specified"; then
8473        # A command without a complete path is provided, search $PATH.
8474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8475$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8476        # Extract the first word of "$tool_basename", so it can be a program name with args.
8477set dummy $tool_basename; ac_word=$2
8478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8479$as_echo_n "checking for $ac_word... " >&6; }
8480if ${ac_cv_path_MV+:} false; then :
8481  $as_echo_n "(cached) " >&6
8482else
8483  case $MV in
8484  [\\/]* | ?:[\\/]*)
8485  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8486  ;;
8487  *)
8488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8489for as_dir in $PATH
8490do
8491  IFS=$as_save_IFS
8492  test -z "$as_dir" && as_dir=.
8493    for ac_exec_ext in '' $ac_executable_extensions; do
8494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8495    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8497    break 2
8498  fi
8499done
8500  done
8501IFS=$as_save_IFS
8502
8503  ;;
8504esac
8505fi
8506MV=$ac_cv_path_MV
8507if test -n "$MV"; then
8508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8509$as_echo "$MV" >&6; }
8510else
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8512$as_echo "no" >&6; }
8513fi
8514
8515
8516        if test "x$MV" = x; then
8517          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8518        fi
8519      else
8520        # Otherwise we believe it is a complete path. Use it as it is.
8521        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8522$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8524$as_echo_n "checking for MV... " >&6; }
8525        if test ! -x "$tool_specified"; then
8526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8527$as_echo "not found" >&6; }
8528          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8529        fi
8530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8531$as_echo "$tool_specified" >&6; }
8532      fi
8533    fi
8534  fi
8535
8536
8537
8538  if test "x$MV" = x; then
8539    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8540  fi
8541
8542
8543
8544
8545
8546  # Publish this variable in the help.
8547
8548
8549  if test "x$NAWK" = x; then
8550    # The variable is not set by user, try to locate tool using the code snippet
8551    for ac_prog in nawk gawk awk
8552do
8553  # Extract the first word of "$ac_prog", so it can be a program name with args.
8554set dummy $ac_prog; ac_word=$2
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556$as_echo_n "checking for $ac_word... " >&6; }
8557if ${ac_cv_path_NAWK+:} false; then :
8558  $as_echo_n "(cached) " >&6
8559else
8560  case $NAWK in
8561  [\\/]* | ?:[\\/]*)
8562  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8563  ;;
8564  *)
8565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8566for as_dir in $PATH
8567do
8568  IFS=$as_save_IFS
8569  test -z "$as_dir" && as_dir=.
8570    for ac_exec_ext in '' $ac_executable_extensions; do
8571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8572    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8574    break 2
8575  fi
8576done
8577  done
8578IFS=$as_save_IFS
8579
8580  ;;
8581esac
8582fi
8583NAWK=$ac_cv_path_NAWK
8584if test -n "$NAWK"; then
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8586$as_echo "$NAWK" >&6; }
8587else
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589$as_echo "no" >&6; }
8590fi
8591
8592
8593  test -n "$NAWK" && break
8594done
8595
8596  else
8597    # The variable is set, but is it from the command line or the environment?
8598
8599    # Try to remove the string !NAWK! from our list.
8600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8602      # If it failed, the variable was not from the command line. Ignore it,
8603      # but warn the user (except for BASH, which is always set by the calling BASH).
8604      if test "xNAWK" != xBASH; then
8605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8606$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8607      fi
8608      # Try to locate tool using the code snippet
8609      for ac_prog in nawk gawk awk
8610do
8611  # Extract the first word of "$ac_prog", so it can be a program name with args.
8612set dummy $ac_prog; ac_word=$2
8613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8614$as_echo_n "checking for $ac_word... " >&6; }
8615if ${ac_cv_path_NAWK+:} false; then :
8616  $as_echo_n "(cached) " >&6
8617else
8618  case $NAWK in
8619  [\\/]* | ?:[\\/]*)
8620  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8621  ;;
8622  *)
8623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8624for as_dir in $PATH
8625do
8626  IFS=$as_save_IFS
8627  test -z "$as_dir" && as_dir=.
8628    for ac_exec_ext in '' $ac_executable_extensions; do
8629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8630    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8632    break 2
8633  fi
8634done
8635  done
8636IFS=$as_save_IFS
8637
8638  ;;
8639esac
8640fi
8641NAWK=$ac_cv_path_NAWK
8642if test -n "$NAWK"; then
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8644$as_echo "$NAWK" >&6; }
8645else
8646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8647$as_echo "no" >&6; }
8648fi
8649
8650
8651  test -n "$NAWK" && break
8652done
8653
8654    else
8655      # If it succeeded, then it was overridden by the user. We will use it
8656      # for the tool.
8657
8658      # First remove it from the list of overridden variables, so we can test
8659      # for unknown variables in the end.
8660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8661
8662      # Check if the provided tool contains a complete path.
8663      tool_specified="$NAWK"
8664      tool_basename="${tool_specified##*/}"
8665      if test "x$tool_basename" = "x$tool_specified"; then
8666        # A command without a complete path is provided, search $PATH.
8667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8668$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8669        # Extract the first word of "$tool_basename", so it can be a program name with args.
8670set dummy $tool_basename; ac_word=$2
8671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8672$as_echo_n "checking for $ac_word... " >&6; }
8673if ${ac_cv_path_NAWK+:} false; then :
8674  $as_echo_n "(cached) " >&6
8675else
8676  case $NAWK in
8677  [\\/]* | ?:[\\/]*)
8678  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8679  ;;
8680  *)
8681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8682for as_dir in $PATH
8683do
8684  IFS=$as_save_IFS
8685  test -z "$as_dir" && as_dir=.
8686    for ac_exec_ext in '' $ac_executable_extensions; do
8687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8688    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8690    break 2
8691  fi
8692done
8693  done
8694IFS=$as_save_IFS
8695
8696  ;;
8697esac
8698fi
8699NAWK=$ac_cv_path_NAWK
8700if test -n "$NAWK"; then
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8702$as_echo "$NAWK" >&6; }
8703else
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8705$as_echo "no" >&6; }
8706fi
8707
8708
8709        if test "x$NAWK" = x; then
8710          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8711        fi
8712      else
8713        # Otherwise we believe it is a complete path. Use it as it is.
8714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8715$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8717$as_echo_n "checking for NAWK... " >&6; }
8718        if test ! -x "$tool_specified"; then
8719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8720$as_echo "not found" >&6; }
8721          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8722        fi
8723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8724$as_echo "$tool_specified" >&6; }
8725      fi
8726    fi
8727  fi
8728
8729
8730
8731  if test "x$NAWK" = x; then
8732    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8733  fi
8734
8735
8736
8737
8738
8739  # Publish this variable in the help.
8740
8741
8742  if test "x$PRINTF" = x; then
8743    # The variable is not set by user, try to locate tool using the code snippet
8744    for ac_prog in printf
8745do
8746  # Extract the first word of "$ac_prog", so it can be a program name with args.
8747set dummy $ac_prog; ac_word=$2
8748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8749$as_echo_n "checking for $ac_word... " >&6; }
8750if ${ac_cv_path_PRINTF+:} false; then :
8751  $as_echo_n "(cached) " >&6
8752else
8753  case $PRINTF in
8754  [\\/]* | ?:[\\/]*)
8755  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8756  ;;
8757  *)
8758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8759for as_dir in $PATH
8760do
8761  IFS=$as_save_IFS
8762  test -z "$as_dir" && as_dir=.
8763    for ac_exec_ext in '' $ac_executable_extensions; do
8764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8765    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8767    break 2
8768  fi
8769done
8770  done
8771IFS=$as_save_IFS
8772
8773  ;;
8774esac
8775fi
8776PRINTF=$ac_cv_path_PRINTF
8777if test -n "$PRINTF"; then
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8779$as_echo "$PRINTF" >&6; }
8780else
8781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8782$as_echo "no" >&6; }
8783fi
8784
8785
8786  test -n "$PRINTF" && break
8787done
8788
8789  else
8790    # The variable is set, but is it from the command line or the environment?
8791
8792    # Try to remove the string !PRINTF! from our list.
8793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8795      # If it failed, the variable was not from the command line. Ignore it,
8796      # but warn the user (except for BASH, which is always set by the calling BASH).
8797      if test "xPRINTF" != xBASH; then
8798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8799$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8800      fi
8801      # Try to locate tool using the code snippet
8802      for ac_prog in printf
8803do
8804  # Extract the first word of "$ac_prog", so it can be a program name with args.
8805set dummy $ac_prog; ac_word=$2
8806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8807$as_echo_n "checking for $ac_word... " >&6; }
8808if ${ac_cv_path_PRINTF+:} false; then :
8809  $as_echo_n "(cached) " >&6
8810else
8811  case $PRINTF in
8812  [\\/]* | ?:[\\/]*)
8813  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8814  ;;
8815  *)
8816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8817for as_dir in $PATH
8818do
8819  IFS=$as_save_IFS
8820  test -z "$as_dir" && as_dir=.
8821    for ac_exec_ext in '' $ac_executable_extensions; do
8822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8823    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8825    break 2
8826  fi
8827done
8828  done
8829IFS=$as_save_IFS
8830
8831  ;;
8832esac
8833fi
8834PRINTF=$ac_cv_path_PRINTF
8835if test -n "$PRINTF"; then
8836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8837$as_echo "$PRINTF" >&6; }
8838else
8839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8840$as_echo "no" >&6; }
8841fi
8842
8843
8844  test -n "$PRINTF" && break
8845done
8846
8847    else
8848      # If it succeeded, then it was overridden by the user. We will use it
8849      # for the tool.
8850
8851      # First remove it from the list of overridden variables, so we can test
8852      # for unknown variables in the end.
8853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8854
8855      # Check if the provided tool contains a complete path.
8856      tool_specified="$PRINTF"
8857      tool_basename="${tool_specified##*/}"
8858      if test "x$tool_basename" = "x$tool_specified"; then
8859        # A command without a complete path is provided, search $PATH.
8860        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8861$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8862        # Extract the first word of "$tool_basename", so it can be a program name with args.
8863set dummy $tool_basename; ac_word=$2
8864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8865$as_echo_n "checking for $ac_word... " >&6; }
8866if ${ac_cv_path_PRINTF+:} false; then :
8867  $as_echo_n "(cached) " >&6
8868else
8869  case $PRINTF in
8870  [\\/]* | ?:[\\/]*)
8871  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8872  ;;
8873  *)
8874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8875for as_dir in $PATH
8876do
8877  IFS=$as_save_IFS
8878  test -z "$as_dir" && as_dir=.
8879    for ac_exec_ext in '' $ac_executable_extensions; do
8880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8881    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8883    break 2
8884  fi
8885done
8886  done
8887IFS=$as_save_IFS
8888
8889  ;;
8890esac
8891fi
8892PRINTF=$ac_cv_path_PRINTF
8893if test -n "$PRINTF"; then
8894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8895$as_echo "$PRINTF" >&6; }
8896else
8897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8898$as_echo "no" >&6; }
8899fi
8900
8901
8902        if test "x$PRINTF" = x; then
8903          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8904        fi
8905      else
8906        # Otherwise we believe it is a complete path. Use it as it is.
8907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8908$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8910$as_echo_n "checking for PRINTF... " >&6; }
8911        if test ! -x "$tool_specified"; then
8912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8913$as_echo "not found" >&6; }
8914          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8915        fi
8916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8917$as_echo "$tool_specified" >&6; }
8918      fi
8919    fi
8920  fi
8921
8922
8923
8924  if test "x$PRINTF" = x; then
8925    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8926  fi
8927
8928
8929
8930
8931
8932  # Publish this variable in the help.
8933
8934
8935  if test "x$RM" = x; then
8936    # The variable is not set by user, try to locate tool using the code snippet
8937    for ac_prog in rm
8938do
8939  # Extract the first word of "$ac_prog", so it can be a program name with args.
8940set dummy $ac_prog; ac_word=$2
8941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8942$as_echo_n "checking for $ac_word... " >&6; }
8943if ${ac_cv_path_RM+:} false; then :
8944  $as_echo_n "(cached) " >&6
8945else
8946  case $RM in
8947  [\\/]* | ?:[\\/]*)
8948  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8949  ;;
8950  *)
8951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8952for as_dir in $PATH
8953do
8954  IFS=$as_save_IFS
8955  test -z "$as_dir" && as_dir=.
8956    for ac_exec_ext in '' $ac_executable_extensions; do
8957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8958    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8960    break 2
8961  fi
8962done
8963  done
8964IFS=$as_save_IFS
8965
8966  ;;
8967esac
8968fi
8969RM=$ac_cv_path_RM
8970if test -n "$RM"; then
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8972$as_echo "$RM" >&6; }
8973else
8974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975$as_echo "no" >&6; }
8976fi
8977
8978
8979  test -n "$RM" && break
8980done
8981
8982  else
8983    # The variable is set, but is it from the command line or the environment?
8984
8985    # Try to remove the string !RM! from our list.
8986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8988      # If it failed, the variable was not from the command line. Ignore it,
8989      # but warn the user (except for BASH, which is always set by the calling BASH).
8990      if test "xRM" != xBASH; then
8991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8992$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8993      fi
8994      # Try to locate tool using the code snippet
8995      for ac_prog in rm
8996do
8997  # Extract the first word of "$ac_prog", so it can be a program name with args.
8998set dummy $ac_prog; ac_word=$2
8999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9000$as_echo_n "checking for $ac_word... " >&6; }
9001if ${ac_cv_path_RM+:} false; then :
9002  $as_echo_n "(cached) " >&6
9003else
9004  case $RM in
9005  [\\/]* | ?:[\\/]*)
9006  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9007  ;;
9008  *)
9009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9010for as_dir in $PATH
9011do
9012  IFS=$as_save_IFS
9013  test -z "$as_dir" && as_dir=.
9014    for ac_exec_ext in '' $ac_executable_extensions; do
9015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9016    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9018    break 2
9019  fi
9020done
9021  done
9022IFS=$as_save_IFS
9023
9024  ;;
9025esac
9026fi
9027RM=$ac_cv_path_RM
9028if test -n "$RM"; then
9029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9030$as_echo "$RM" >&6; }
9031else
9032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033$as_echo "no" >&6; }
9034fi
9035
9036
9037  test -n "$RM" && break
9038done
9039
9040    else
9041      # If it succeeded, then it was overridden by the user. We will use it
9042      # for the tool.
9043
9044      # First remove it from the list of overridden variables, so we can test
9045      # for unknown variables in the end.
9046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9047
9048      # Check if the provided tool contains a complete path.
9049      tool_specified="$RM"
9050      tool_basename="${tool_specified##*/}"
9051      if test "x$tool_basename" = "x$tool_specified"; then
9052        # A command without a complete path is provided, search $PATH.
9053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9054$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9055        # Extract the first word of "$tool_basename", so it can be a program name with args.
9056set dummy $tool_basename; ac_word=$2
9057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9058$as_echo_n "checking for $ac_word... " >&6; }
9059if ${ac_cv_path_RM+:} false; then :
9060  $as_echo_n "(cached) " >&6
9061else
9062  case $RM in
9063  [\\/]* | ?:[\\/]*)
9064  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9065  ;;
9066  *)
9067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9068for as_dir in $PATH
9069do
9070  IFS=$as_save_IFS
9071  test -z "$as_dir" && as_dir=.
9072    for ac_exec_ext in '' $ac_executable_extensions; do
9073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9074    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9076    break 2
9077  fi
9078done
9079  done
9080IFS=$as_save_IFS
9081
9082  ;;
9083esac
9084fi
9085RM=$ac_cv_path_RM
9086if test -n "$RM"; then
9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9088$as_echo "$RM" >&6; }
9089else
9090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
9092fi
9093
9094
9095        if test "x$RM" = x; then
9096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9097        fi
9098      else
9099        # Otherwise we believe it is a complete path. Use it as it is.
9100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9101$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9103$as_echo_n "checking for RM... " >&6; }
9104        if test ! -x "$tool_specified"; then
9105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9106$as_echo "not found" >&6; }
9107          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9108        fi
9109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9110$as_echo "$tool_specified" >&6; }
9111      fi
9112    fi
9113  fi
9114
9115
9116
9117  if test "x$RM" = x; then
9118    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9119  fi
9120
9121
9122
9123
9124
9125  # Publish this variable in the help.
9126
9127
9128  if test "x$SH" = x; then
9129    # The variable is not set by user, try to locate tool using the code snippet
9130    for ac_prog in sh
9131do
9132  # Extract the first word of "$ac_prog", so it can be a program name with args.
9133set dummy $ac_prog; ac_word=$2
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9135$as_echo_n "checking for $ac_word... " >&6; }
9136if ${ac_cv_path_SH+:} false; then :
9137  $as_echo_n "(cached) " >&6
9138else
9139  case $SH in
9140  [\\/]* | ?:[\\/]*)
9141  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9142  ;;
9143  *)
9144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9145for as_dir in $PATH
9146do
9147  IFS=$as_save_IFS
9148  test -z "$as_dir" && as_dir=.
9149    for ac_exec_ext in '' $ac_executable_extensions; do
9150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9151    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9153    break 2
9154  fi
9155done
9156  done
9157IFS=$as_save_IFS
9158
9159  ;;
9160esac
9161fi
9162SH=$ac_cv_path_SH
9163if test -n "$SH"; then
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9165$as_echo "$SH" >&6; }
9166else
9167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9168$as_echo "no" >&6; }
9169fi
9170
9171
9172  test -n "$SH" && break
9173done
9174
9175  else
9176    # The variable is set, but is it from the command line or the environment?
9177
9178    # Try to remove the string !SH! from our list.
9179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9181      # If it failed, the variable was not from the command line. Ignore it,
9182      # but warn the user (except for BASH, which is always set by the calling BASH).
9183      if test "xSH" != xBASH; then
9184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9185$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9186      fi
9187      # Try to locate tool using the code snippet
9188      for ac_prog in sh
9189do
9190  # Extract the first word of "$ac_prog", so it can be a program name with args.
9191set dummy $ac_prog; ac_word=$2
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9193$as_echo_n "checking for $ac_word... " >&6; }
9194if ${ac_cv_path_SH+:} false; then :
9195  $as_echo_n "(cached) " >&6
9196else
9197  case $SH in
9198  [\\/]* | ?:[\\/]*)
9199  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9200  ;;
9201  *)
9202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9203for as_dir in $PATH
9204do
9205  IFS=$as_save_IFS
9206  test -z "$as_dir" && as_dir=.
9207    for ac_exec_ext in '' $ac_executable_extensions; do
9208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9209    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9211    break 2
9212  fi
9213done
9214  done
9215IFS=$as_save_IFS
9216
9217  ;;
9218esac
9219fi
9220SH=$ac_cv_path_SH
9221if test -n "$SH"; then
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9223$as_echo "$SH" >&6; }
9224else
9225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9226$as_echo "no" >&6; }
9227fi
9228
9229
9230  test -n "$SH" && break
9231done
9232
9233    else
9234      # If it succeeded, then it was overridden by the user. We will use it
9235      # for the tool.
9236
9237      # First remove it from the list of overridden variables, so we can test
9238      # for unknown variables in the end.
9239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9240
9241      # Check if the provided tool contains a complete path.
9242      tool_specified="$SH"
9243      tool_basename="${tool_specified##*/}"
9244      if test "x$tool_basename" = "x$tool_specified"; then
9245        # A command without a complete path is provided, search $PATH.
9246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9247$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9248        # Extract the first word of "$tool_basename", so it can be a program name with args.
9249set dummy $tool_basename; ac_word=$2
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9251$as_echo_n "checking for $ac_word... " >&6; }
9252if ${ac_cv_path_SH+:} false; then :
9253  $as_echo_n "(cached) " >&6
9254else
9255  case $SH in
9256  [\\/]* | ?:[\\/]*)
9257  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9258  ;;
9259  *)
9260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9261for as_dir in $PATH
9262do
9263  IFS=$as_save_IFS
9264  test -z "$as_dir" && as_dir=.
9265    for ac_exec_ext in '' $ac_executable_extensions; do
9266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9267    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9269    break 2
9270  fi
9271done
9272  done
9273IFS=$as_save_IFS
9274
9275  ;;
9276esac
9277fi
9278SH=$ac_cv_path_SH
9279if test -n "$SH"; then
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9281$as_echo "$SH" >&6; }
9282else
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
9285fi
9286
9287
9288        if test "x$SH" = x; then
9289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9290        fi
9291      else
9292        # Otherwise we believe it is a complete path. Use it as it is.
9293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9294$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9296$as_echo_n "checking for SH... " >&6; }
9297        if test ! -x "$tool_specified"; then
9298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9299$as_echo "not found" >&6; }
9300          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9301        fi
9302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9303$as_echo "$tool_specified" >&6; }
9304      fi
9305    fi
9306  fi
9307
9308
9309
9310  if test "x$SH" = x; then
9311    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9312  fi
9313
9314
9315
9316
9317
9318  # Publish this variable in the help.
9319
9320
9321  if test "x$SORT" = x; then
9322    # The variable is not set by user, try to locate tool using the code snippet
9323    for ac_prog in sort
9324do
9325  # Extract the first word of "$ac_prog", so it can be a program name with args.
9326set dummy $ac_prog; ac_word=$2
9327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9328$as_echo_n "checking for $ac_word... " >&6; }
9329if ${ac_cv_path_SORT+:} false; then :
9330  $as_echo_n "(cached) " >&6
9331else
9332  case $SORT in
9333  [\\/]* | ?:[\\/]*)
9334  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9335  ;;
9336  *)
9337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9338for as_dir in $PATH
9339do
9340  IFS=$as_save_IFS
9341  test -z "$as_dir" && as_dir=.
9342    for ac_exec_ext in '' $ac_executable_extensions; do
9343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9344    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9346    break 2
9347  fi
9348done
9349  done
9350IFS=$as_save_IFS
9351
9352  ;;
9353esac
9354fi
9355SORT=$ac_cv_path_SORT
9356if test -n "$SORT"; then
9357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9358$as_echo "$SORT" >&6; }
9359else
9360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9361$as_echo "no" >&6; }
9362fi
9363
9364
9365  test -n "$SORT" && break
9366done
9367
9368  else
9369    # The variable is set, but is it from the command line or the environment?
9370
9371    # Try to remove the string !SORT! from our list.
9372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9374      # If it failed, the variable was not from the command line. Ignore it,
9375      # but warn the user (except for BASH, which is always set by the calling BASH).
9376      if test "xSORT" != xBASH; then
9377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9378$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9379      fi
9380      # Try to locate tool using the code snippet
9381      for ac_prog in sort
9382do
9383  # Extract the first word of "$ac_prog", so it can be a program name with args.
9384set dummy $ac_prog; ac_word=$2
9385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9386$as_echo_n "checking for $ac_word... " >&6; }
9387if ${ac_cv_path_SORT+:} false; then :
9388  $as_echo_n "(cached) " >&6
9389else
9390  case $SORT in
9391  [\\/]* | ?:[\\/]*)
9392  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9393  ;;
9394  *)
9395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9396for as_dir in $PATH
9397do
9398  IFS=$as_save_IFS
9399  test -z "$as_dir" && as_dir=.
9400    for ac_exec_ext in '' $ac_executable_extensions; do
9401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9402    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9404    break 2
9405  fi
9406done
9407  done
9408IFS=$as_save_IFS
9409
9410  ;;
9411esac
9412fi
9413SORT=$ac_cv_path_SORT
9414if test -n "$SORT"; then
9415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9416$as_echo "$SORT" >&6; }
9417else
9418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9419$as_echo "no" >&6; }
9420fi
9421
9422
9423  test -n "$SORT" && break
9424done
9425
9426    else
9427      # If it succeeded, then it was overridden by the user. We will use it
9428      # for the tool.
9429
9430      # First remove it from the list of overridden variables, so we can test
9431      # for unknown variables in the end.
9432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9433
9434      # Check if the provided tool contains a complete path.
9435      tool_specified="$SORT"
9436      tool_basename="${tool_specified##*/}"
9437      if test "x$tool_basename" = "x$tool_specified"; then
9438        # A command without a complete path is provided, search $PATH.
9439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9440$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9441        # Extract the first word of "$tool_basename", so it can be a program name with args.
9442set dummy $tool_basename; ac_word=$2
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9444$as_echo_n "checking for $ac_word... " >&6; }
9445if ${ac_cv_path_SORT+:} false; then :
9446  $as_echo_n "(cached) " >&6
9447else
9448  case $SORT in
9449  [\\/]* | ?:[\\/]*)
9450  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9451  ;;
9452  *)
9453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9454for as_dir in $PATH
9455do
9456  IFS=$as_save_IFS
9457  test -z "$as_dir" && as_dir=.
9458    for ac_exec_ext in '' $ac_executable_extensions; do
9459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9460    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9462    break 2
9463  fi
9464done
9465  done
9466IFS=$as_save_IFS
9467
9468  ;;
9469esac
9470fi
9471SORT=$ac_cv_path_SORT
9472if test -n "$SORT"; then
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9474$as_echo "$SORT" >&6; }
9475else
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
9478fi
9479
9480
9481        if test "x$SORT" = x; then
9482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9483        fi
9484      else
9485        # Otherwise we believe it is a complete path. Use it as it is.
9486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9487$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9489$as_echo_n "checking for SORT... " >&6; }
9490        if test ! -x "$tool_specified"; then
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9492$as_echo "not found" >&6; }
9493          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9494        fi
9495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9496$as_echo "$tool_specified" >&6; }
9497      fi
9498    fi
9499  fi
9500
9501
9502
9503  if test "x$SORT" = x; then
9504    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9505  fi
9506
9507
9508
9509
9510
9511  # Publish this variable in the help.
9512
9513
9514  if test "x$TAIL" = x; then
9515    # The variable is not set by user, try to locate tool using the code snippet
9516    for ac_prog in tail
9517do
9518  # Extract the first word of "$ac_prog", so it can be a program name with args.
9519set dummy $ac_prog; ac_word=$2
9520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9521$as_echo_n "checking for $ac_word... " >&6; }
9522if ${ac_cv_path_TAIL+:} false; then :
9523  $as_echo_n "(cached) " >&6
9524else
9525  case $TAIL in
9526  [\\/]* | ?:[\\/]*)
9527  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9528  ;;
9529  *)
9530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9531for as_dir in $PATH
9532do
9533  IFS=$as_save_IFS
9534  test -z "$as_dir" && as_dir=.
9535    for ac_exec_ext in '' $ac_executable_extensions; do
9536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9537    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9539    break 2
9540  fi
9541done
9542  done
9543IFS=$as_save_IFS
9544
9545  ;;
9546esac
9547fi
9548TAIL=$ac_cv_path_TAIL
9549if test -n "$TAIL"; then
9550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9551$as_echo "$TAIL" >&6; }
9552else
9553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554$as_echo "no" >&6; }
9555fi
9556
9557
9558  test -n "$TAIL" && break
9559done
9560
9561  else
9562    # The variable is set, but is it from the command line or the environment?
9563
9564    # Try to remove the string !TAIL! from our list.
9565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9567      # If it failed, the variable was not from the command line. Ignore it,
9568      # but warn the user (except for BASH, which is always set by the calling BASH).
9569      if test "xTAIL" != xBASH; then
9570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9571$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9572      fi
9573      # Try to locate tool using the code snippet
9574      for ac_prog in tail
9575do
9576  # Extract the first word of "$ac_prog", so it can be a program name with args.
9577set dummy $ac_prog; ac_word=$2
9578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9579$as_echo_n "checking for $ac_word... " >&6; }
9580if ${ac_cv_path_TAIL+:} false; then :
9581  $as_echo_n "(cached) " >&6
9582else
9583  case $TAIL in
9584  [\\/]* | ?:[\\/]*)
9585  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9586  ;;
9587  *)
9588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9589for as_dir in $PATH
9590do
9591  IFS=$as_save_IFS
9592  test -z "$as_dir" && as_dir=.
9593    for ac_exec_ext in '' $ac_executable_extensions; do
9594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9595    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9597    break 2
9598  fi
9599done
9600  done
9601IFS=$as_save_IFS
9602
9603  ;;
9604esac
9605fi
9606TAIL=$ac_cv_path_TAIL
9607if test -n "$TAIL"; then
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9609$as_echo "$TAIL" >&6; }
9610else
9611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9612$as_echo "no" >&6; }
9613fi
9614
9615
9616  test -n "$TAIL" && break
9617done
9618
9619    else
9620      # If it succeeded, then it was overridden by the user. We will use it
9621      # for the tool.
9622
9623      # First remove it from the list of overridden variables, so we can test
9624      # for unknown variables in the end.
9625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9626
9627      # Check if the provided tool contains a complete path.
9628      tool_specified="$TAIL"
9629      tool_basename="${tool_specified##*/}"
9630      if test "x$tool_basename" = "x$tool_specified"; then
9631        # A command without a complete path is provided, search $PATH.
9632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9633$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9634        # Extract the first word of "$tool_basename", so it can be a program name with args.
9635set dummy $tool_basename; ac_word=$2
9636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9637$as_echo_n "checking for $ac_word... " >&6; }
9638if ${ac_cv_path_TAIL+:} false; then :
9639  $as_echo_n "(cached) " >&6
9640else
9641  case $TAIL in
9642  [\\/]* | ?:[\\/]*)
9643  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9644  ;;
9645  *)
9646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9647for as_dir in $PATH
9648do
9649  IFS=$as_save_IFS
9650  test -z "$as_dir" && as_dir=.
9651    for ac_exec_ext in '' $ac_executable_extensions; do
9652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9653    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9655    break 2
9656  fi
9657done
9658  done
9659IFS=$as_save_IFS
9660
9661  ;;
9662esac
9663fi
9664TAIL=$ac_cv_path_TAIL
9665if test -n "$TAIL"; then
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9667$as_echo "$TAIL" >&6; }
9668else
9669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
9671fi
9672
9673
9674        if test "x$TAIL" = x; then
9675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9676        fi
9677      else
9678        # Otherwise we believe it is a complete path. Use it as it is.
9679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9680$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9682$as_echo_n "checking for TAIL... " >&6; }
9683        if test ! -x "$tool_specified"; then
9684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9685$as_echo "not found" >&6; }
9686          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9687        fi
9688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9689$as_echo "$tool_specified" >&6; }
9690      fi
9691    fi
9692  fi
9693
9694
9695
9696  if test "x$TAIL" = x; then
9697    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9698  fi
9699
9700
9701
9702
9703
9704  # Publish this variable in the help.
9705
9706
9707  if test "x$TAR" = x; then
9708    # The variable is not set by user, try to locate tool using the code snippet
9709    for ac_prog in tar
9710do
9711  # Extract the first word of "$ac_prog", so it can be a program name with args.
9712set dummy $ac_prog; ac_word=$2
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9714$as_echo_n "checking for $ac_word... " >&6; }
9715if ${ac_cv_path_TAR+:} false; then :
9716  $as_echo_n "(cached) " >&6
9717else
9718  case $TAR in
9719  [\\/]* | ?:[\\/]*)
9720  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9721  ;;
9722  *)
9723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726  IFS=$as_save_IFS
9727  test -z "$as_dir" && as_dir=.
9728    for ac_exec_ext in '' $ac_executable_extensions; do
9729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9730    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9732    break 2
9733  fi
9734done
9735  done
9736IFS=$as_save_IFS
9737
9738  ;;
9739esac
9740fi
9741TAR=$ac_cv_path_TAR
9742if test -n "$TAR"; then
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9744$as_echo "$TAR" >&6; }
9745else
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748fi
9749
9750
9751  test -n "$TAR" && break
9752done
9753
9754  else
9755    # The variable is set, but is it from the command line or the environment?
9756
9757    # Try to remove the string !TAR! from our list.
9758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9760      # If it failed, the variable was not from the command line. Ignore it,
9761      # but warn the user (except for BASH, which is always set by the calling BASH).
9762      if test "xTAR" != xBASH; then
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9764$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9765      fi
9766      # Try to locate tool using the code snippet
9767      for ac_prog in tar
9768do
9769  # Extract the first word of "$ac_prog", so it can be a program name with args.
9770set dummy $ac_prog; ac_word=$2
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9772$as_echo_n "checking for $ac_word... " >&6; }
9773if ${ac_cv_path_TAR+:} false; then :
9774  $as_echo_n "(cached) " >&6
9775else
9776  case $TAR in
9777  [\\/]* | ?:[\\/]*)
9778  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9779  ;;
9780  *)
9781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9782for as_dir in $PATH
9783do
9784  IFS=$as_save_IFS
9785  test -z "$as_dir" && as_dir=.
9786    for ac_exec_ext in '' $ac_executable_extensions; do
9787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9788    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9790    break 2
9791  fi
9792done
9793  done
9794IFS=$as_save_IFS
9795
9796  ;;
9797esac
9798fi
9799TAR=$ac_cv_path_TAR
9800if test -n "$TAR"; then
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9802$as_echo "$TAR" >&6; }
9803else
9804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805$as_echo "no" >&6; }
9806fi
9807
9808
9809  test -n "$TAR" && break
9810done
9811
9812    else
9813      # If it succeeded, then it was overridden by the user. We will use it
9814      # for the tool.
9815
9816      # First remove it from the list of overridden variables, so we can test
9817      # for unknown variables in the end.
9818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9819
9820      # Check if the provided tool contains a complete path.
9821      tool_specified="$TAR"
9822      tool_basename="${tool_specified##*/}"
9823      if test "x$tool_basename" = "x$tool_specified"; then
9824        # A command without a complete path is provided, search $PATH.
9825        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9826$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9827        # Extract the first word of "$tool_basename", so it can be a program name with args.
9828set dummy $tool_basename; ac_word=$2
9829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9830$as_echo_n "checking for $ac_word... " >&6; }
9831if ${ac_cv_path_TAR+:} false; then :
9832  $as_echo_n "(cached) " >&6
9833else
9834  case $TAR in
9835  [\\/]* | ?:[\\/]*)
9836  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9837  ;;
9838  *)
9839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9840for as_dir in $PATH
9841do
9842  IFS=$as_save_IFS
9843  test -z "$as_dir" && as_dir=.
9844    for ac_exec_ext in '' $ac_executable_extensions; do
9845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9846    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9848    break 2
9849  fi
9850done
9851  done
9852IFS=$as_save_IFS
9853
9854  ;;
9855esac
9856fi
9857TAR=$ac_cv_path_TAR
9858if test -n "$TAR"; then
9859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9860$as_echo "$TAR" >&6; }
9861else
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864fi
9865
9866
9867        if test "x$TAR" = x; then
9868          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9869        fi
9870      else
9871        # Otherwise we believe it is a complete path. Use it as it is.
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9873$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9875$as_echo_n "checking for TAR... " >&6; }
9876        if test ! -x "$tool_specified"; then
9877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9878$as_echo "not found" >&6; }
9879          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9880        fi
9881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9882$as_echo "$tool_specified" >&6; }
9883      fi
9884    fi
9885  fi
9886
9887
9888
9889  if test "x$TAR" = x; then
9890    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9891  fi
9892
9893
9894
9895
9896
9897  # Publish this variable in the help.
9898
9899
9900  if test "x$TEE" = x; then
9901    # The variable is not set by user, try to locate tool using the code snippet
9902    for ac_prog in tee
9903do
9904  # Extract the first word of "$ac_prog", so it can be a program name with args.
9905set dummy $ac_prog; ac_word=$2
9906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9907$as_echo_n "checking for $ac_word... " >&6; }
9908if ${ac_cv_path_TEE+:} false; then :
9909  $as_echo_n "(cached) " >&6
9910else
9911  case $TEE in
9912  [\\/]* | ?:[\\/]*)
9913  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9914  ;;
9915  *)
9916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9917for as_dir in $PATH
9918do
9919  IFS=$as_save_IFS
9920  test -z "$as_dir" && as_dir=.
9921    for ac_exec_ext in '' $ac_executable_extensions; do
9922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9923    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9925    break 2
9926  fi
9927done
9928  done
9929IFS=$as_save_IFS
9930
9931  ;;
9932esac
9933fi
9934TEE=$ac_cv_path_TEE
9935if test -n "$TEE"; then
9936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9937$as_echo "$TEE" >&6; }
9938else
9939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9940$as_echo "no" >&6; }
9941fi
9942
9943
9944  test -n "$TEE" && break
9945done
9946
9947  else
9948    # The variable is set, but is it from the command line or the environment?
9949
9950    # Try to remove the string !TEE! from our list.
9951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9953      # If it failed, the variable was not from the command line. Ignore it,
9954      # but warn the user (except for BASH, which is always set by the calling BASH).
9955      if test "xTEE" != xBASH; then
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9957$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9958      fi
9959      # Try to locate tool using the code snippet
9960      for ac_prog in tee
9961do
9962  # Extract the first word of "$ac_prog", so it can be a program name with args.
9963set dummy $ac_prog; ac_word=$2
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9965$as_echo_n "checking for $ac_word... " >&6; }
9966if ${ac_cv_path_TEE+:} false; then :
9967  $as_echo_n "(cached) " >&6
9968else
9969  case $TEE in
9970  [\\/]* | ?:[\\/]*)
9971  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9972  ;;
9973  *)
9974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9975for as_dir in $PATH
9976do
9977  IFS=$as_save_IFS
9978  test -z "$as_dir" && as_dir=.
9979    for ac_exec_ext in '' $ac_executable_extensions; do
9980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9981    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9983    break 2
9984  fi
9985done
9986  done
9987IFS=$as_save_IFS
9988
9989  ;;
9990esac
9991fi
9992TEE=$ac_cv_path_TEE
9993if test -n "$TEE"; then
9994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9995$as_echo "$TEE" >&6; }
9996else
9997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9998$as_echo "no" >&6; }
9999fi
10000
10001
10002  test -n "$TEE" && break
10003done
10004
10005    else
10006      # If it succeeded, then it was overridden by the user. We will use it
10007      # for the tool.
10008
10009      # First remove it from the list of overridden variables, so we can test
10010      # for unknown variables in the end.
10011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10012
10013      # Check if the provided tool contains a complete path.
10014      tool_specified="$TEE"
10015      tool_basename="${tool_specified##*/}"
10016      if test "x$tool_basename" = "x$tool_specified"; then
10017        # A command without a complete path is provided, search $PATH.
10018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10019$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10020        # Extract the first word of "$tool_basename", so it can be a program name with args.
10021set dummy $tool_basename; ac_word=$2
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10023$as_echo_n "checking for $ac_word... " >&6; }
10024if ${ac_cv_path_TEE+:} false; then :
10025  $as_echo_n "(cached) " >&6
10026else
10027  case $TEE in
10028  [\\/]* | ?:[\\/]*)
10029  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10030  ;;
10031  *)
10032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10033for as_dir in $PATH
10034do
10035  IFS=$as_save_IFS
10036  test -z "$as_dir" && as_dir=.
10037    for ac_exec_ext in '' $ac_executable_extensions; do
10038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10039    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10041    break 2
10042  fi
10043done
10044  done
10045IFS=$as_save_IFS
10046
10047  ;;
10048esac
10049fi
10050TEE=$ac_cv_path_TEE
10051if test -n "$TEE"; then
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10053$as_echo "$TEE" >&6; }
10054else
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056$as_echo "no" >&6; }
10057fi
10058
10059
10060        if test "x$TEE" = x; then
10061          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10062        fi
10063      else
10064        # Otherwise we believe it is a complete path. Use it as it is.
10065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10066$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10068$as_echo_n "checking for TEE... " >&6; }
10069        if test ! -x "$tool_specified"; then
10070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10071$as_echo "not found" >&6; }
10072          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10073        fi
10074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10075$as_echo "$tool_specified" >&6; }
10076      fi
10077    fi
10078  fi
10079
10080
10081
10082  if test "x$TEE" = x; then
10083    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10084  fi
10085
10086
10087
10088
10089
10090  # Publish this variable in the help.
10091
10092
10093  if test "x$TOUCH" = x; then
10094    # The variable is not set by user, try to locate tool using the code snippet
10095    for ac_prog in touch
10096do
10097  # Extract the first word of "$ac_prog", so it can be a program name with args.
10098set dummy $ac_prog; ac_word=$2
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10100$as_echo_n "checking for $ac_word... " >&6; }
10101if ${ac_cv_path_TOUCH+:} false; then :
10102  $as_echo_n "(cached) " >&6
10103else
10104  case $TOUCH in
10105  [\\/]* | ?:[\\/]*)
10106  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10107  ;;
10108  *)
10109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10110for as_dir in $PATH
10111do
10112  IFS=$as_save_IFS
10113  test -z "$as_dir" && as_dir=.
10114    for ac_exec_ext in '' $ac_executable_extensions; do
10115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10116    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10118    break 2
10119  fi
10120done
10121  done
10122IFS=$as_save_IFS
10123
10124  ;;
10125esac
10126fi
10127TOUCH=$ac_cv_path_TOUCH
10128if test -n "$TOUCH"; then
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10130$as_echo "$TOUCH" >&6; }
10131else
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137  test -n "$TOUCH" && break
10138done
10139
10140  else
10141    # The variable is set, but is it from the command line or the environment?
10142
10143    # Try to remove the string !TOUCH! from our list.
10144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10146      # If it failed, the variable was not from the command line. Ignore it,
10147      # but warn the user (except for BASH, which is always set by the calling BASH).
10148      if test "xTOUCH" != xBASH; then
10149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10150$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10151      fi
10152      # Try to locate tool using the code snippet
10153      for ac_prog in touch
10154do
10155  # Extract the first word of "$ac_prog", so it can be a program name with args.
10156set dummy $ac_prog; ac_word=$2
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10158$as_echo_n "checking for $ac_word... " >&6; }
10159if ${ac_cv_path_TOUCH+:} false; then :
10160  $as_echo_n "(cached) " >&6
10161else
10162  case $TOUCH in
10163  [\\/]* | ?:[\\/]*)
10164  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10165  ;;
10166  *)
10167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10168for as_dir in $PATH
10169do
10170  IFS=$as_save_IFS
10171  test -z "$as_dir" && as_dir=.
10172    for ac_exec_ext in '' $ac_executable_extensions; do
10173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10174    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10176    break 2
10177  fi
10178done
10179  done
10180IFS=$as_save_IFS
10181
10182  ;;
10183esac
10184fi
10185TOUCH=$ac_cv_path_TOUCH
10186if test -n "$TOUCH"; then
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10188$as_echo "$TOUCH" >&6; }
10189else
10190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
10192fi
10193
10194
10195  test -n "$TOUCH" && break
10196done
10197
10198    else
10199      # If it succeeded, then it was overridden by the user. We will use it
10200      # for the tool.
10201
10202      # First remove it from the list of overridden variables, so we can test
10203      # for unknown variables in the end.
10204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10205
10206      # Check if the provided tool contains a complete path.
10207      tool_specified="$TOUCH"
10208      tool_basename="${tool_specified##*/}"
10209      if test "x$tool_basename" = "x$tool_specified"; then
10210        # A command without a complete path is provided, search $PATH.
10211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10212$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10213        # Extract the first word of "$tool_basename", so it can be a program name with args.
10214set dummy $tool_basename; ac_word=$2
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10216$as_echo_n "checking for $ac_word... " >&6; }
10217if ${ac_cv_path_TOUCH+:} false; then :
10218  $as_echo_n "(cached) " >&6
10219else
10220  case $TOUCH in
10221  [\\/]* | ?:[\\/]*)
10222  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10223  ;;
10224  *)
10225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10226for as_dir in $PATH
10227do
10228  IFS=$as_save_IFS
10229  test -z "$as_dir" && as_dir=.
10230    for ac_exec_ext in '' $ac_executable_extensions; do
10231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10232    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10234    break 2
10235  fi
10236done
10237  done
10238IFS=$as_save_IFS
10239
10240  ;;
10241esac
10242fi
10243TOUCH=$ac_cv_path_TOUCH
10244if test -n "$TOUCH"; then
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10246$as_echo "$TOUCH" >&6; }
10247else
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
10250fi
10251
10252
10253        if test "x$TOUCH" = x; then
10254          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10255        fi
10256      else
10257        # Otherwise we believe it is a complete path. Use it as it is.
10258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10259$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10261$as_echo_n "checking for TOUCH... " >&6; }
10262        if test ! -x "$tool_specified"; then
10263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10264$as_echo "not found" >&6; }
10265          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10266        fi
10267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10268$as_echo "$tool_specified" >&6; }
10269      fi
10270    fi
10271  fi
10272
10273
10274
10275  if test "x$TOUCH" = x; then
10276    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10277  fi
10278
10279
10280
10281
10282
10283  # Publish this variable in the help.
10284
10285
10286  if test "x$TR" = x; then
10287    # The variable is not set by user, try to locate tool using the code snippet
10288    for ac_prog in tr
10289do
10290  # Extract the first word of "$ac_prog", so it can be a program name with args.
10291set dummy $ac_prog; ac_word=$2
10292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10293$as_echo_n "checking for $ac_word... " >&6; }
10294if ${ac_cv_path_TR+:} false; then :
10295  $as_echo_n "(cached) " >&6
10296else
10297  case $TR in
10298  [\\/]* | ?:[\\/]*)
10299  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10300  ;;
10301  *)
10302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10303for as_dir in $PATH
10304do
10305  IFS=$as_save_IFS
10306  test -z "$as_dir" && as_dir=.
10307    for ac_exec_ext in '' $ac_executable_extensions; do
10308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10309    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10311    break 2
10312  fi
10313done
10314  done
10315IFS=$as_save_IFS
10316
10317  ;;
10318esac
10319fi
10320TR=$ac_cv_path_TR
10321if test -n "$TR"; then
10322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10323$as_echo "$TR" >&6; }
10324else
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10326$as_echo "no" >&6; }
10327fi
10328
10329
10330  test -n "$TR" && break
10331done
10332
10333  else
10334    # The variable is set, but is it from the command line or the environment?
10335
10336    # Try to remove the string !TR! from our list.
10337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10339      # If it failed, the variable was not from the command line. Ignore it,
10340      # but warn the user (except for BASH, which is always set by the calling BASH).
10341      if test "xTR" != xBASH; then
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10343$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10344      fi
10345      # Try to locate tool using the code snippet
10346      for ac_prog in tr
10347do
10348  # Extract the first word of "$ac_prog", so it can be a program name with args.
10349set dummy $ac_prog; ac_word=$2
10350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10351$as_echo_n "checking for $ac_word... " >&6; }
10352if ${ac_cv_path_TR+:} false; then :
10353  $as_echo_n "(cached) " >&6
10354else
10355  case $TR in
10356  [\\/]* | ?:[\\/]*)
10357  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10358  ;;
10359  *)
10360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10361for as_dir in $PATH
10362do
10363  IFS=$as_save_IFS
10364  test -z "$as_dir" && as_dir=.
10365    for ac_exec_ext in '' $ac_executable_extensions; do
10366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10367    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10369    break 2
10370  fi
10371done
10372  done
10373IFS=$as_save_IFS
10374
10375  ;;
10376esac
10377fi
10378TR=$ac_cv_path_TR
10379if test -n "$TR"; then
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10381$as_echo "$TR" >&6; }
10382else
10383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384$as_echo "no" >&6; }
10385fi
10386
10387
10388  test -n "$TR" && break
10389done
10390
10391    else
10392      # If it succeeded, then it was overridden by the user. We will use it
10393      # for the tool.
10394
10395      # First remove it from the list of overridden variables, so we can test
10396      # for unknown variables in the end.
10397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10398
10399      # Check if the provided tool contains a complete path.
10400      tool_specified="$TR"
10401      tool_basename="${tool_specified##*/}"
10402      if test "x$tool_basename" = "x$tool_specified"; then
10403        # A command without a complete path is provided, search $PATH.
10404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10405$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10406        # Extract the first word of "$tool_basename", so it can be a program name with args.
10407set dummy $tool_basename; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if ${ac_cv_path_TR+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $TR in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10416  ;;
10417  *)
10418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10425    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433  ;;
10434esac
10435fi
10436TR=$ac_cv_path_TR
10437if test -n "$TR"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10439$as_echo "$TR" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445
10446        if test "x$TR" = x; then
10447          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10448        fi
10449      else
10450        # Otherwise we believe it is a complete path. Use it as it is.
10451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10452$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10454$as_echo_n "checking for TR... " >&6; }
10455        if test ! -x "$tool_specified"; then
10456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10457$as_echo "not found" >&6; }
10458          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10459        fi
10460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10461$as_echo "$tool_specified" >&6; }
10462      fi
10463    fi
10464  fi
10465
10466
10467
10468  if test "x$TR" = x; then
10469    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10470  fi
10471
10472
10473
10474
10475
10476  # Publish this variable in the help.
10477
10478
10479  if test "x$UNAME" = x; then
10480    # The variable is not set by user, try to locate tool using the code snippet
10481    for ac_prog in uname
10482do
10483  # Extract the first word of "$ac_prog", so it can be a program name with args.
10484set dummy $ac_prog; ac_word=$2
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10486$as_echo_n "checking for $ac_word... " >&6; }
10487if ${ac_cv_path_UNAME+:} false; then :
10488  $as_echo_n "(cached) " >&6
10489else
10490  case $UNAME in
10491  [\\/]* | ?:[\\/]*)
10492  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10493  ;;
10494  *)
10495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10496for as_dir in $PATH
10497do
10498  IFS=$as_save_IFS
10499  test -z "$as_dir" && as_dir=.
10500    for ac_exec_ext in '' $ac_executable_extensions; do
10501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10502    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10504    break 2
10505  fi
10506done
10507  done
10508IFS=$as_save_IFS
10509
10510  ;;
10511esac
10512fi
10513UNAME=$ac_cv_path_UNAME
10514if test -n "$UNAME"; then
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10516$as_echo "$UNAME" >&6; }
10517else
10518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519$as_echo "no" >&6; }
10520fi
10521
10522
10523  test -n "$UNAME" && break
10524done
10525
10526  else
10527    # The variable is set, but is it from the command line or the environment?
10528
10529    # Try to remove the string !UNAME! from our list.
10530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10532      # If it failed, the variable was not from the command line. Ignore it,
10533      # but warn the user (except for BASH, which is always set by the calling BASH).
10534      if test "xUNAME" != xBASH; then
10535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10536$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10537      fi
10538      # Try to locate tool using the code snippet
10539      for ac_prog in uname
10540do
10541  # Extract the first word of "$ac_prog", so it can be a program name with args.
10542set dummy $ac_prog; ac_word=$2
10543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10544$as_echo_n "checking for $ac_word... " >&6; }
10545if ${ac_cv_path_UNAME+:} false; then :
10546  $as_echo_n "(cached) " >&6
10547else
10548  case $UNAME in
10549  [\\/]* | ?:[\\/]*)
10550  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10551  ;;
10552  *)
10553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10554for as_dir in $PATH
10555do
10556  IFS=$as_save_IFS
10557  test -z "$as_dir" && as_dir=.
10558    for ac_exec_ext in '' $ac_executable_extensions; do
10559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10560    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10562    break 2
10563  fi
10564done
10565  done
10566IFS=$as_save_IFS
10567
10568  ;;
10569esac
10570fi
10571UNAME=$ac_cv_path_UNAME
10572if test -n "$UNAME"; then
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10574$as_echo "$UNAME" >&6; }
10575else
10576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577$as_echo "no" >&6; }
10578fi
10579
10580
10581  test -n "$UNAME" && break
10582done
10583
10584    else
10585      # If it succeeded, then it was overridden by the user. We will use it
10586      # for the tool.
10587
10588      # First remove it from the list of overridden variables, so we can test
10589      # for unknown variables in the end.
10590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10591
10592      # Check if the provided tool contains a complete path.
10593      tool_specified="$UNAME"
10594      tool_basename="${tool_specified##*/}"
10595      if test "x$tool_basename" = "x$tool_specified"; then
10596        # A command without a complete path is provided, search $PATH.
10597        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10598$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10599        # Extract the first word of "$tool_basename", so it can be a program name with args.
10600set dummy $tool_basename; ac_word=$2
10601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10602$as_echo_n "checking for $ac_word... " >&6; }
10603if ${ac_cv_path_UNAME+:} false; then :
10604  $as_echo_n "(cached) " >&6
10605else
10606  case $UNAME in
10607  [\\/]* | ?:[\\/]*)
10608  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10609  ;;
10610  *)
10611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10612for as_dir in $PATH
10613do
10614  IFS=$as_save_IFS
10615  test -z "$as_dir" && as_dir=.
10616    for ac_exec_ext in '' $ac_executable_extensions; do
10617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10618    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10620    break 2
10621  fi
10622done
10623  done
10624IFS=$as_save_IFS
10625
10626  ;;
10627esac
10628fi
10629UNAME=$ac_cv_path_UNAME
10630if test -n "$UNAME"; then
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10632$as_echo "$UNAME" >&6; }
10633else
10634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10635$as_echo "no" >&6; }
10636fi
10637
10638
10639        if test "x$UNAME" = x; then
10640          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10641        fi
10642      else
10643        # Otherwise we believe it is a complete path. Use it as it is.
10644        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10645$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10647$as_echo_n "checking for UNAME... " >&6; }
10648        if test ! -x "$tool_specified"; then
10649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10650$as_echo "not found" >&6; }
10651          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10652        fi
10653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10654$as_echo "$tool_specified" >&6; }
10655      fi
10656    fi
10657  fi
10658
10659
10660
10661  if test "x$UNAME" = x; then
10662    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10663  fi
10664
10665
10666
10667
10668
10669  # Publish this variable in the help.
10670
10671
10672  if test "x$UNIQ" = x; then
10673    # The variable is not set by user, try to locate tool using the code snippet
10674    for ac_prog in uniq
10675do
10676  # Extract the first word of "$ac_prog", so it can be a program name with args.
10677set dummy $ac_prog; ac_word=$2
10678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679$as_echo_n "checking for $ac_word... " >&6; }
10680if ${ac_cv_path_UNIQ+:} false; then :
10681  $as_echo_n "(cached) " >&6
10682else
10683  case $UNIQ in
10684  [\\/]* | ?:[\\/]*)
10685  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10686  ;;
10687  *)
10688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689for as_dir in $PATH
10690do
10691  IFS=$as_save_IFS
10692  test -z "$as_dir" && as_dir=.
10693    for ac_exec_ext in '' $ac_executable_extensions; do
10694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10695    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10697    break 2
10698  fi
10699done
10700  done
10701IFS=$as_save_IFS
10702
10703  ;;
10704esac
10705fi
10706UNIQ=$ac_cv_path_UNIQ
10707if test -n "$UNIQ"; then
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10709$as_echo "$UNIQ" >&6; }
10710else
10711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
10713fi
10714
10715
10716  test -n "$UNIQ" && break
10717done
10718
10719  else
10720    # The variable is set, but is it from the command line or the environment?
10721
10722    # Try to remove the string !UNIQ! from our list.
10723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10725      # If it failed, the variable was not from the command line. Ignore it,
10726      # but warn the user (except for BASH, which is always set by the calling BASH).
10727      if test "xUNIQ" != xBASH; then
10728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10729$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10730      fi
10731      # Try to locate tool using the code snippet
10732      for ac_prog in uniq
10733do
10734  # Extract the first word of "$ac_prog", so it can be a program name with args.
10735set dummy $ac_prog; ac_word=$2
10736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10737$as_echo_n "checking for $ac_word... " >&6; }
10738if ${ac_cv_path_UNIQ+:} false; then :
10739  $as_echo_n "(cached) " >&6
10740else
10741  case $UNIQ in
10742  [\\/]* | ?:[\\/]*)
10743  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10744  ;;
10745  *)
10746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10747for as_dir in $PATH
10748do
10749  IFS=$as_save_IFS
10750  test -z "$as_dir" && as_dir=.
10751    for ac_exec_ext in '' $ac_executable_extensions; do
10752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10753    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10755    break 2
10756  fi
10757done
10758  done
10759IFS=$as_save_IFS
10760
10761  ;;
10762esac
10763fi
10764UNIQ=$ac_cv_path_UNIQ
10765if test -n "$UNIQ"; then
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10767$as_echo "$UNIQ" >&6; }
10768else
10769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10770$as_echo "no" >&6; }
10771fi
10772
10773
10774  test -n "$UNIQ" && break
10775done
10776
10777    else
10778      # If it succeeded, then it was overridden by the user. We will use it
10779      # for the tool.
10780
10781      # First remove it from the list of overridden variables, so we can test
10782      # for unknown variables in the end.
10783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10784
10785      # Check if the provided tool contains a complete path.
10786      tool_specified="$UNIQ"
10787      tool_basename="${tool_specified##*/}"
10788      if test "x$tool_basename" = "x$tool_specified"; then
10789        # A command without a complete path is provided, search $PATH.
10790        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10791$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10792        # Extract the first word of "$tool_basename", so it can be a program name with args.
10793set dummy $tool_basename; ac_word=$2
10794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10795$as_echo_n "checking for $ac_word... " >&6; }
10796if ${ac_cv_path_UNIQ+:} false; then :
10797  $as_echo_n "(cached) " >&6
10798else
10799  case $UNIQ in
10800  [\\/]* | ?:[\\/]*)
10801  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10802  ;;
10803  *)
10804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10805for as_dir in $PATH
10806do
10807  IFS=$as_save_IFS
10808  test -z "$as_dir" && as_dir=.
10809    for ac_exec_ext in '' $ac_executable_extensions; do
10810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10811    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10813    break 2
10814  fi
10815done
10816  done
10817IFS=$as_save_IFS
10818
10819  ;;
10820esac
10821fi
10822UNIQ=$ac_cv_path_UNIQ
10823if test -n "$UNIQ"; then
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10825$as_echo "$UNIQ" >&6; }
10826else
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828$as_echo "no" >&6; }
10829fi
10830
10831
10832        if test "x$UNIQ" = x; then
10833          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10834        fi
10835      else
10836        # Otherwise we believe it is a complete path. Use it as it is.
10837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10838$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10839        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10840$as_echo_n "checking for UNIQ... " >&6; }
10841        if test ! -x "$tool_specified"; then
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10843$as_echo "not found" >&6; }
10844          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10845        fi
10846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10847$as_echo "$tool_specified" >&6; }
10848      fi
10849    fi
10850  fi
10851
10852
10853
10854  if test "x$UNIQ" = x; then
10855    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10856  fi
10857
10858
10859
10860
10861
10862  # Publish this variable in the help.
10863
10864
10865  if test "x$WC" = x; then
10866    # The variable is not set by user, try to locate tool using the code snippet
10867    for ac_prog in wc
10868do
10869  # Extract the first word of "$ac_prog", so it can be a program name with args.
10870set dummy $ac_prog; ac_word=$2
10871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10872$as_echo_n "checking for $ac_word... " >&6; }
10873if ${ac_cv_path_WC+:} false; then :
10874  $as_echo_n "(cached) " >&6
10875else
10876  case $WC in
10877  [\\/]* | ?:[\\/]*)
10878  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10879  ;;
10880  *)
10881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10882for as_dir in $PATH
10883do
10884  IFS=$as_save_IFS
10885  test -z "$as_dir" && as_dir=.
10886    for ac_exec_ext in '' $ac_executable_extensions; do
10887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10888    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10890    break 2
10891  fi
10892done
10893  done
10894IFS=$as_save_IFS
10895
10896  ;;
10897esac
10898fi
10899WC=$ac_cv_path_WC
10900if test -n "$WC"; then
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10902$as_echo "$WC" >&6; }
10903else
10904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10905$as_echo "no" >&6; }
10906fi
10907
10908
10909  test -n "$WC" && break
10910done
10911
10912  else
10913    # The variable is set, but is it from the command line or the environment?
10914
10915    # Try to remove the string !WC! from our list.
10916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10918      # If it failed, the variable was not from the command line. Ignore it,
10919      # but warn the user (except for BASH, which is always set by the calling BASH).
10920      if test "xWC" != xBASH; then
10921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10922$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10923      fi
10924      # Try to locate tool using the code snippet
10925      for ac_prog in wc
10926do
10927  # Extract the first word of "$ac_prog", so it can be a program name with args.
10928set dummy $ac_prog; ac_word=$2
10929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10930$as_echo_n "checking for $ac_word... " >&6; }
10931if ${ac_cv_path_WC+:} false; then :
10932  $as_echo_n "(cached) " >&6
10933else
10934  case $WC in
10935  [\\/]* | ?:[\\/]*)
10936  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10937  ;;
10938  *)
10939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10940for as_dir in $PATH
10941do
10942  IFS=$as_save_IFS
10943  test -z "$as_dir" && as_dir=.
10944    for ac_exec_ext in '' $ac_executable_extensions; do
10945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10946    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10948    break 2
10949  fi
10950done
10951  done
10952IFS=$as_save_IFS
10953
10954  ;;
10955esac
10956fi
10957WC=$ac_cv_path_WC
10958if test -n "$WC"; then
10959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10960$as_echo "$WC" >&6; }
10961else
10962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
10964fi
10965
10966
10967  test -n "$WC" && break
10968done
10969
10970    else
10971      # If it succeeded, then it was overridden by the user. We will use it
10972      # for the tool.
10973
10974      # First remove it from the list of overridden variables, so we can test
10975      # for unknown variables in the end.
10976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10977
10978      # Check if the provided tool contains a complete path.
10979      tool_specified="$WC"
10980      tool_basename="${tool_specified##*/}"
10981      if test "x$tool_basename" = "x$tool_specified"; then
10982        # A command without a complete path is provided, search $PATH.
10983        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10984$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10985        # Extract the first word of "$tool_basename", so it can be a program name with args.
10986set dummy $tool_basename; ac_word=$2
10987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10988$as_echo_n "checking for $ac_word... " >&6; }
10989if ${ac_cv_path_WC+:} false; then :
10990  $as_echo_n "(cached) " >&6
10991else
10992  case $WC in
10993  [\\/]* | ?:[\\/]*)
10994  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10995  ;;
10996  *)
10997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10998for as_dir in $PATH
10999do
11000  IFS=$as_save_IFS
11001  test -z "$as_dir" && as_dir=.
11002    for ac_exec_ext in '' $ac_executable_extensions; do
11003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11004    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11006    break 2
11007  fi
11008done
11009  done
11010IFS=$as_save_IFS
11011
11012  ;;
11013esac
11014fi
11015WC=$ac_cv_path_WC
11016if test -n "$WC"; then
11017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11018$as_echo "$WC" >&6; }
11019else
11020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11021$as_echo "no" >&6; }
11022fi
11023
11024
11025        if test "x$WC" = x; then
11026          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11027        fi
11028      else
11029        # Otherwise we believe it is a complete path. Use it as it is.
11030        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11031$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11033$as_echo_n "checking for WC... " >&6; }
11034        if test ! -x "$tool_specified"; then
11035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11036$as_echo "not found" >&6; }
11037          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11038        fi
11039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11040$as_echo "$tool_specified" >&6; }
11041      fi
11042    fi
11043  fi
11044
11045
11046
11047  if test "x$WC" = x; then
11048    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11049  fi
11050
11051
11052
11053
11054
11055  # Publish this variable in the help.
11056
11057
11058  if test "x$WHICH" = x; then
11059    # The variable is not set by user, try to locate tool using the code snippet
11060    for ac_prog in which
11061do
11062  # Extract the first word of "$ac_prog", so it can be a program name with args.
11063set dummy $ac_prog; ac_word=$2
11064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11065$as_echo_n "checking for $ac_word... " >&6; }
11066if ${ac_cv_path_WHICH+:} false; then :
11067  $as_echo_n "(cached) " >&6
11068else
11069  case $WHICH in
11070  [\\/]* | ?:[\\/]*)
11071  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11072  ;;
11073  *)
11074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11075for as_dir in $PATH
11076do
11077  IFS=$as_save_IFS
11078  test -z "$as_dir" && as_dir=.
11079    for ac_exec_ext in '' $ac_executable_extensions; do
11080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11081    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11083    break 2
11084  fi
11085done
11086  done
11087IFS=$as_save_IFS
11088
11089  ;;
11090esac
11091fi
11092WHICH=$ac_cv_path_WHICH
11093if test -n "$WHICH"; then
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11095$as_echo "$WHICH" >&6; }
11096else
11097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11098$as_echo "no" >&6; }
11099fi
11100
11101
11102  test -n "$WHICH" && break
11103done
11104
11105  else
11106    # The variable is set, but is it from the command line or the environment?
11107
11108    # Try to remove the string !WHICH! from our list.
11109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11111      # If it failed, the variable was not from the command line. Ignore it,
11112      # but warn the user (except for BASH, which is always set by the calling BASH).
11113      if test "xWHICH" != xBASH; then
11114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11115$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11116      fi
11117      # Try to locate tool using the code snippet
11118      for ac_prog in which
11119do
11120  # Extract the first word of "$ac_prog", so it can be a program name with args.
11121set dummy $ac_prog; ac_word=$2
11122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11123$as_echo_n "checking for $ac_word... " >&6; }
11124if ${ac_cv_path_WHICH+:} false; then :
11125  $as_echo_n "(cached) " >&6
11126else
11127  case $WHICH in
11128  [\\/]* | ?:[\\/]*)
11129  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11130  ;;
11131  *)
11132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11133for as_dir in $PATH
11134do
11135  IFS=$as_save_IFS
11136  test -z "$as_dir" && as_dir=.
11137    for ac_exec_ext in '' $ac_executable_extensions; do
11138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11139    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11141    break 2
11142  fi
11143done
11144  done
11145IFS=$as_save_IFS
11146
11147  ;;
11148esac
11149fi
11150WHICH=$ac_cv_path_WHICH
11151if test -n "$WHICH"; then
11152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11153$as_echo "$WHICH" >&6; }
11154else
11155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11156$as_echo "no" >&6; }
11157fi
11158
11159
11160  test -n "$WHICH" && break
11161done
11162
11163    else
11164      # If it succeeded, then it was overridden by the user. We will use it
11165      # for the tool.
11166
11167      # First remove it from the list of overridden variables, so we can test
11168      # for unknown variables in the end.
11169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11170
11171      # Check if the provided tool contains a complete path.
11172      tool_specified="$WHICH"
11173      tool_basename="${tool_specified##*/}"
11174      if test "x$tool_basename" = "x$tool_specified"; then
11175        # A command without a complete path is provided, search $PATH.
11176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11177$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11178        # Extract the first word of "$tool_basename", so it can be a program name with args.
11179set dummy $tool_basename; ac_word=$2
11180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11181$as_echo_n "checking for $ac_word... " >&6; }
11182if ${ac_cv_path_WHICH+:} false; then :
11183  $as_echo_n "(cached) " >&6
11184else
11185  case $WHICH in
11186  [\\/]* | ?:[\\/]*)
11187  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11188  ;;
11189  *)
11190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11191for as_dir in $PATH
11192do
11193  IFS=$as_save_IFS
11194  test -z "$as_dir" && as_dir=.
11195    for ac_exec_ext in '' $ac_executable_extensions; do
11196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11197    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11199    break 2
11200  fi
11201done
11202  done
11203IFS=$as_save_IFS
11204
11205  ;;
11206esac
11207fi
11208WHICH=$ac_cv_path_WHICH
11209if test -n "$WHICH"; then
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11211$as_echo "$WHICH" >&6; }
11212else
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
11215fi
11216
11217
11218        if test "x$WHICH" = x; then
11219          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11220        fi
11221      else
11222        # Otherwise we believe it is a complete path. Use it as it is.
11223        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11224$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11226$as_echo_n "checking for WHICH... " >&6; }
11227        if test ! -x "$tool_specified"; then
11228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11229$as_echo "not found" >&6; }
11230          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11231        fi
11232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11233$as_echo "$tool_specified" >&6; }
11234      fi
11235    fi
11236  fi
11237
11238
11239
11240  if test "x$WHICH" = x; then
11241    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11242  fi
11243
11244
11245
11246
11247
11248  # Publish this variable in the help.
11249
11250
11251  if test "x$XARGS" = x; then
11252    # The variable is not set by user, try to locate tool using the code snippet
11253    for ac_prog in xargs
11254do
11255  # Extract the first word of "$ac_prog", so it can be a program name with args.
11256set dummy $ac_prog; ac_word=$2
11257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11258$as_echo_n "checking for $ac_word... " >&6; }
11259if ${ac_cv_path_XARGS+:} false; then :
11260  $as_echo_n "(cached) " >&6
11261else
11262  case $XARGS in
11263  [\\/]* | ?:[\\/]*)
11264  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11265  ;;
11266  *)
11267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11268for as_dir in $PATH
11269do
11270  IFS=$as_save_IFS
11271  test -z "$as_dir" && as_dir=.
11272    for ac_exec_ext in '' $ac_executable_extensions; do
11273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11274    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11276    break 2
11277  fi
11278done
11279  done
11280IFS=$as_save_IFS
11281
11282  ;;
11283esac
11284fi
11285XARGS=$ac_cv_path_XARGS
11286if test -n "$XARGS"; then
11287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11288$as_echo "$XARGS" >&6; }
11289else
11290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11291$as_echo "no" >&6; }
11292fi
11293
11294
11295  test -n "$XARGS" && break
11296done
11297
11298  else
11299    # The variable is set, but is it from the command line or the environment?
11300
11301    # Try to remove the string !XARGS! from our list.
11302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11304      # If it failed, the variable was not from the command line. Ignore it,
11305      # but warn the user (except for BASH, which is always set by the calling BASH).
11306      if test "xXARGS" != xBASH; then
11307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11308$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11309      fi
11310      # Try to locate tool using the code snippet
11311      for ac_prog in xargs
11312do
11313  # Extract the first word of "$ac_prog", so it can be a program name with args.
11314set dummy $ac_prog; ac_word=$2
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11316$as_echo_n "checking for $ac_word... " >&6; }
11317if ${ac_cv_path_XARGS+:} false; then :
11318  $as_echo_n "(cached) " >&6
11319else
11320  case $XARGS in
11321  [\\/]* | ?:[\\/]*)
11322  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11323  ;;
11324  *)
11325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11326for as_dir in $PATH
11327do
11328  IFS=$as_save_IFS
11329  test -z "$as_dir" && as_dir=.
11330    for ac_exec_ext in '' $ac_executable_extensions; do
11331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11332    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11334    break 2
11335  fi
11336done
11337  done
11338IFS=$as_save_IFS
11339
11340  ;;
11341esac
11342fi
11343XARGS=$ac_cv_path_XARGS
11344if test -n "$XARGS"; then
11345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11346$as_echo "$XARGS" >&6; }
11347else
11348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
11350fi
11351
11352
11353  test -n "$XARGS" && break
11354done
11355
11356    else
11357      # If it succeeded, then it was overridden by the user. We will use it
11358      # for the tool.
11359
11360      # First remove it from the list of overridden variables, so we can test
11361      # for unknown variables in the end.
11362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11363
11364      # Check if the provided tool contains a complete path.
11365      tool_specified="$XARGS"
11366      tool_basename="${tool_specified##*/}"
11367      if test "x$tool_basename" = "x$tool_specified"; then
11368        # A command without a complete path is provided, search $PATH.
11369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11370$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11371        # Extract the first word of "$tool_basename", so it can be a program name with args.
11372set dummy $tool_basename; ac_word=$2
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11374$as_echo_n "checking for $ac_word... " >&6; }
11375if ${ac_cv_path_XARGS+:} false; then :
11376  $as_echo_n "(cached) " >&6
11377else
11378  case $XARGS in
11379  [\\/]* | ?:[\\/]*)
11380  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11381  ;;
11382  *)
11383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11384for as_dir in $PATH
11385do
11386  IFS=$as_save_IFS
11387  test -z "$as_dir" && as_dir=.
11388    for ac_exec_ext in '' $ac_executable_extensions; do
11389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11390    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11392    break 2
11393  fi
11394done
11395  done
11396IFS=$as_save_IFS
11397
11398  ;;
11399esac
11400fi
11401XARGS=$ac_cv_path_XARGS
11402if test -n "$XARGS"; then
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11404$as_echo "$XARGS" >&6; }
11405else
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
11408fi
11409
11410
11411        if test "x$XARGS" = x; then
11412          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11413        fi
11414      else
11415        # Otherwise we believe it is a complete path. Use it as it is.
11416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11417$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11419$as_echo_n "checking for XARGS... " >&6; }
11420        if test ! -x "$tool_specified"; then
11421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11422$as_echo "not found" >&6; }
11423          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11424        fi
11425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11426$as_echo "$tool_specified" >&6; }
11427      fi
11428    fi
11429  fi
11430
11431
11432
11433  if test "x$XARGS" = x; then
11434    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11435  fi
11436
11437
11438
11439  # Then required tools that require some special treatment.
11440
11441
11442  # Publish this variable in the help.
11443
11444
11445  if test "x$AWK" = x; then
11446    # The variable is not set by user, try to locate tool using the code snippet
11447    for ac_prog in gawk mawk nawk awk
11448do
11449  # Extract the first word of "$ac_prog", so it can be a program name with args.
11450set dummy $ac_prog; ac_word=$2
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452$as_echo_n "checking for $ac_word... " >&6; }
11453if ${ac_cv_prog_AWK+:} false; then :
11454  $as_echo_n "(cached) " >&6
11455else
11456  if test -n "$AWK"; then
11457  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11458else
11459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11460for as_dir in $PATH
11461do
11462  IFS=$as_save_IFS
11463  test -z "$as_dir" && as_dir=.
11464    for ac_exec_ext in '' $ac_executable_extensions; do
11465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11466    ac_cv_prog_AWK="$ac_prog"
11467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11468    break 2
11469  fi
11470done
11471  done
11472IFS=$as_save_IFS
11473
11474fi
11475fi
11476AWK=$ac_cv_prog_AWK
11477if test -n "$AWK"; then
11478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11479$as_echo "$AWK" >&6; }
11480else
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
11483fi
11484
11485
11486  test -n "$AWK" && break
11487done
11488
11489  else
11490    # The variable is set, but is it from the command line or the environment?
11491
11492    # Try to remove the string !AWK! from our list.
11493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11495      # If it failed, the variable was not from the command line. Ignore it,
11496      # but warn the user (except for BASH, which is always set by the calling BASH).
11497      if test "xAWK" != xBASH; then
11498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11499$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11500      fi
11501      # Try to locate tool using the code snippet
11502      for ac_prog in gawk mawk nawk awk
11503do
11504  # Extract the first word of "$ac_prog", so it can be a program name with args.
11505set dummy $ac_prog; ac_word=$2
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11507$as_echo_n "checking for $ac_word... " >&6; }
11508if ${ac_cv_prog_AWK+:} false; then :
11509  $as_echo_n "(cached) " >&6
11510else
11511  if test -n "$AWK"; then
11512  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11513else
11514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11515for as_dir in $PATH
11516do
11517  IFS=$as_save_IFS
11518  test -z "$as_dir" && as_dir=.
11519    for ac_exec_ext in '' $ac_executable_extensions; do
11520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11521    ac_cv_prog_AWK="$ac_prog"
11522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11523    break 2
11524  fi
11525done
11526  done
11527IFS=$as_save_IFS
11528
11529fi
11530fi
11531AWK=$ac_cv_prog_AWK
11532if test -n "$AWK"; then
11533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11534$as_echo "$AWK" >&6; }
11535else
11536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11537$as_echo "no" >&6; }
11538fi
11539
11540
11541  test -n "$AWK" && break
11542done
11543
11544    else
11545      # If it succeeded, then it was overridden by the user. We will use it
11546      # for the tool.
11547
11548      # First remove it from the list of overridden variables, so we can test
11549      # for unknown variables in the end.
11550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11551
11552      # Check if the provided tool contains a complete path.
11553      tool_specified="$AWK"
11554      tool_basename="${tool_specified##*/}"
11555      if test "x$tool_basename" = "x$tool_specified"; then
11556        # A command without a complete path is provided, search $PATH.
11557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11558$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11559        # Extract the first word of "$tool_basename", so it can be a program name with args.
11560set dummy $tool_basename; ac_word=$2
11561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11562$as_echo_n "checking for $ac_word... " >&6; }
11563if ${ac_cv_path_AWK+:} false; then :
11564  $as_echo_n "(cached) " >&6
11565else
11566  case $AWK in
11567  [\\/]* | ?:[\\/]*)
11568  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11569  ;;
11570  *)
11571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11572for as_dir in $PATH
11573do
11574  IFS=$as_save_IFS
11575  test -z "$as_dir" && as_dir=.
11576    for ac_exec_ext in '' $ac_executable_extensions; do
11577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11578    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11580    break 2
11581  fi
11582done
11583  done
11584IFS=$as_save_IFS
11585
11586  ;;
11587esac
11588fi
11589AWK=$ac_cv_path_AWK
11590if test -n "$AWK"; then
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11592$as_echo "$AWK" >&6; }
11593else
11594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11595$as_echo "no" >&6; }
11596fi
11597
11598
11599        if test "x$AWK" = x; then
11600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11601        fi
11602      else
11603        # Otherwise we believe it is a complete path. Use it as it is.
11604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11605$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11607$as_echo_n "checking for AWK... " >&6; }
11608        if test ! -x "$tool_specified"; then
11609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11610$as_echo "not found" >&6; }
11611          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11612        fi
11613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11614$as_echo "$tool_specified" >&6; }
11615      fi
11616    fi
11617  fi
11618
11619
11620  if test "x$AWK" = x; then
11621    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11622  fi
11623
11624
11625
11626
11627  # Publish this variable in the help.
11628
11629
11630  if test "x$GREP" = x; then
11631    # The variable is not set by user, try to locate tool using the code snippet
11632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11633$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11634if ${ac_cv_path_GREP+:} false; then :
11635  $as_echo_n "(cached) " >&6
11636else
11637  if test -z "$GREP"; then
11638  ac_path_GREP_found=false
11639  # Loop through the user's path and test for each of PROGNAME-LIST
11640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11641for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11642do
11643  IFS=$as_save_IFS
11644  test -z "$as_dir" && as_dir=.
11645    for ac_prog in grep ggrep; do
11646    for ac_exec_ext in '' $ac_executable_extensions; do
11647      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11648      as_fn_executable_p "$ac_path_GREP" || continue
11649# Check for GNU ac_path_GREP and select it if it is found.
11650  # Check for GNU $ac_path_GREP
11651case `"$ac_path_GREP" --version 2>&1` in
11652*GNU*)
11653  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11654*)
11655  ac_count=0
11656  $as_echo_n 0123456789 >"conftest.in"
11657  while :
11658  do
11659    cat "conftest.in" "conftest.in" >"conftest.tmp"
11660    mv "conftest.tmp" "conftest.in"
11661    cp "conftest.in" "conftest.nl"
11662    $as_echo 'GREP' >> "conftest.nl"
11663    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11664    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11665    as_fn_arith $ac_count + 1 && ac_count=$as_val
11666    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11667      # Best one so far, save it but keep looking for a better one
11668      ac_cv_path_GREP="$ac_path_GREP"
11669      ac_path_GREP_max=$ac_count
11670    fi
11671    # 10*(2^10) chars as input seems more than enough
11672    test $ac_count -gt 10 && break
11673  done
11674  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11675esac
11676
11677      $ac_path_GREP_found && break 3
11678    done
11679  done
11680  done
11681IFS=$as_save_IFS
11682  if test -z "$ac_cv_path_GREP"; then
11683    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11684  fi
11685else
11686  ac_cv_path_GREP=$GREP
11687fi
11688
11689fi
11690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11691$as_echo "$ac_cv_path_GREP" >&6; }
11692 GREP="$ac_cv_path_GREP"
11693
11694
11695  else
11696    # The variable is set, but is it from the command line or the environment?
11697
11698    # Try to remove the string !GREP! from our list.
11699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11701      # If it failed, the variable was not from the command line. Ignore it,
11702      # but warn the user (except for BASH, which is always set by the calling BASH).
11703      if test "xGREP" != xBASH; then
11704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11705$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11706      fi
11707      # Try to locate tool using the code snippet
11708      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11709$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11710if ${ac_cv_path_GREP+:} false; then :
11711  $as_echo_n "(cached) " >&6
11712else
11713  if test -z "$GREP"; then
11714  ac_path_GREP_found=false
11715  # Loop through the user's path and test for each of PROGNAME-LIST
11716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11717for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11718do
11719  IFS=$as_save_IFS
11720  test -z "$as_dir" && as_dir=.
11721    for ac_prog in grep ggrep; do
11722    for ac_exec_ext in '' $ac_executable_extensions; do
11723      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11724      as_fn_executable_p "$ac_path_GREP" || continue
11725# Check for GNU ac_path_GREP and select it if it is found.
11726  # Check for GNU $ac_path_GREP
11727case `"$ac_path_GREP" --version 2>&1` in
11728*GNU*)
11729  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11730*)
11731  ac_count=0
11732  $as_echo_n 0123456789 >"conftest.in"
11733  while :
11734  do
11735    cat "conftest.in" "conftest.in" >"conftest.tmp"
11736    mv "conftest.tmp" "conftest.in"
11737    cp "conftest.in" "conftest.nl"
11738    $as_echo 'GREP' >> "conftest.nl"
11739    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11740    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11741    as_fn_arith $ac_count + 1 && ac_count=$as_val
11742    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11743      # Best one so far, save it but keep looking for a better one
11744      ac_cv_path_GREP="$ac_path_GREP"
11745      ac_path_GREP_max=$ac_count
11746    fi
11747    # 10*(2^10) chars as input seems more than enough
11748    test $ac_count -gt 10 && break
11749  done
11750  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11751esac
11752
11753      $ac_path_GREP_found && break 3
11754    done
11755  done
11756  done
11757IFS=$as_save_IFS
11758  if test -z "$ac_cv_path_GREP"; then
11759    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11760  fi
11761else
11762  ac_cv_path_GREP=$GREP
11763fi
11764
11765fi
11766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11767$as_echo "$ac_cv_path_GREP" >&6; }
11768 GREP="$ac_cv_path_GREP"
11769
11770
11771    else
11772      # If it succeeded, then it was overridden by the user. We will use it
11773      # for the tool.
11774
11775      # First remove it from the list of overridden variables, so we can test
11776      # for unknown variables in the end.
11777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11778
11779      # Check if the provided tool contains a complete path.
11780      tool_specified="$GREP"
11781      tool_basename="${tool_specified##*/}"
11782      if test "x$tool_basename" = "x$tool_specified"; then
11783        # A command without a complete path is provided, search $PATH.
11784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11785$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11786        # Extract the first word of "$tool_basename", so it can be a program name with args.
11787set dummy $tool_basename; ac_word=$2
11788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11789$as_echo_n "checking for $ac_word... " >&6; }
11790if ${ac_cv_path_GREP+:} false; then :
11791  $as_echo_n "(cached) " >&6
11792else
11793  case $GREP in
11794  [\\/]* | ?:[\\/]*)
11795  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11796  ;;
11797  *)
11798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11799for as_dir in $PATH
11800do
11801  IFS=$as_save_IFS
11802  test -z "$as_dir" && as_dir=.
11803    for ac_exec_ext in '' $ac_executable_extensions; do
11804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11805    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11807    break 2
11808  fi
11809done
11810  done
11811IFS=$as_save_IFS
11812
11813  ;;
11814esac
11815fi
11816GREP=$ac_cv_path_GREP
11817if test -n "$GREP"; then
11818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11819$as_echo "$GREP" >&6; }
11820else
11821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11822$as_echo "no" >&6; }
11823fi
11824
11825
11826        if test "x$GREP" = x; then
11827          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11828        fi
11829      else
11830        # Otherwise we believe it is a complete path. Use it as it is.
11831        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11832$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11834$as_echo_n "checking for GREP... " >&6; }
11835        if test ! -x "$tool_specified"; then
11836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11837$as_echo "not found" >&6; }
11838          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11839        fi
11840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11841$as_echo "$tool_specified" >&6; }
11842      fi
11843    fi
11844  fi
11845
11846
11847  if test "x$GREP" = x; then
11848    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11849  fi
11850
11851
11852
11853
11854  # Publish this variable in the help.
11855
11856
11857  if test "x$EGREP" = x; then
11858    # The variable is not set by user, try to locate tool using the code snippet
11859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11860$as_echo_n "checking for egrep... " >&6; }
11861if ${ac_cv_path_EGREP+:} false; then :
11862  $as_echo_n "(cached) " >&6
11863else
11864  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11865   then ac_cv_path_EGREP="$GREP -E"
11866   else
11867     if test -z "$EGREP"; then
11868  ac_path_EGREP_found=false
11869  # Loop through the user's path and test for each of PROGNAME-LIST
11870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11871for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11872do
11873  IFS=$as_save_IFS
11874  test -z "$as_dir" && as_dir=.
11875    for ac_prog in egrep; do
11876    for ac_exec_ext in '' $ac_executable_extensions; do
11877      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11878      as_fn_executable_p "$ac_path_EGREP" || continue
11879# Check for GNU ac_path_EGREP and select it if it is found.
11880  # Check for GNU $ac_path_EGREP
11881case `"$ac_path_EGREP" --version 2>&1` in
11882*GNU*)
11883  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11884*)
11885  ac_count=0
11886  $as_echo_n 0123456789 >"conftest.in"
11887  while :
11888  do
11889    cat "conftest.in" "conftest.in" >"conftest.tmp"
11890    mv "conftest.tmp" "conftest.in"
11891    cp "conftest.in" "conftest.nl"
11892    $as_echo 'EGREP' >> "conftest.nl"
11893    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11894    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11895    as_fn_arith $ac_count + 1 && ac_count=$as_val
11896    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11897      # Best one so far, save it but keep looking for a better one
11898      ac_cv_path_EGREP="$ac_path_EGREP"
11899      ac_path_EGREP_max=$ac_count
11900    fi
11901    # 10*(2^10) chars as input seems more than enough
11902    test $ac_count -gt 10 && break
11903  done
11904  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11905esac
11906
11907      $ac_path_EGREP_found && break 3
11908    done
11909  done
11910  done
11911IFS=$as_save_IFS
11912  if test -z "$ac_cv_path_EGREP"; then
11913    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11914  fi
11915else
11916  ac_cv_path_EGREP=$EGREP
11917fi
11918
11919   fi
11920fi
11921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11922$as_echo "$ac_cv_path_EGREP" >&6; }
11923 EGREP="$ac_cv_path_EGREP"
11924
11925
11926  else
11927    # The variable is set, but is it from the command line or the environment?
11928
11929    # Try to remove the string !EGREP! from our list.
11930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11932      # If it failed, the variable was not from the command line. Ignore it,
11933      # but warn the user (except for BASH, which is always set by the calling BASH).
11934      if test "xEGREP" != xBASH; then
11935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11936$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11937      fi
11938      # Try to locate tool using the code snippet
11939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11940$as_echo_n "checking for egrep... " >&6; }
11941if ${ac_cv_path_EGREP+:} false; then :
11942  $as_echo_n "(cached) " >&6
11943else
11944  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11945   then ac_cv_path_EGREP="$GREP -E"
11946   else
11947     if test -z "$EGREP"; then
11948  ac_path_EGREP_found=false
11949  # Loop through the user's path and test for each of PROGNAME-LIST
11950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11951for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11952do
11953  IFS=$as_save_IFS
11954  test -z "$as_dir" && as_dir=.
11955    for ac_prog in egrep; do
11956    for ac_exec_ext in '' $ac_executable_extensions; do
11957      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11958      as_fn_executable_p "$ac_path_EGREP" || continue
11959# Check for GNU ac_path_EGREP and select it if it is found.
11960  # Check for GNU $ac_path_EGREP
11961case `"$ac_path_EGREP" --version 2>&1` in
11962*GNU*)
11963  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11964*)
11965  ac_count=0
11966  $as_echo_n 0123456789 >"conftest.in"
11967  while :
11968  do
11969    cat "conftest.in" "conftest.in" >"conftest.tmp"
11970    mv "conftest.tmp" "conftest.in"
11971    cp "conftest.in" "conftest.nl"
11972    $as_echo 'EGREP' >> "conftest.nl"
11973    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11974    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11975    as_fn_arith $ac_count + 1 && ac_count=$as_val
11976    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11977      # Best one so far, save it but keep looking for a better one
11978      ac_cv_path_EGREP="$ac_path_EGREP"
11979      ac_path_EGREP_max=$ac_count
11980    fi
11981    # 10*(2^10) chars as input seems more than enough
11982    test $ac_count -gt 10 && break
11983  done
11984  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11985esac
11986
11987      $ac_path_EGREP_found && break 3
11988    done
11989  done
11990  done
11991IFS=$as_save_IFS
11992  if test -z "$ac_cv_path_EGREP"; then
11993    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11994  fi
11995else
11996  ac_cv_path_EGREP=$EGREP
11997fi
11998
11999   fi
12000fi
12001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12002$as_echo "$ac_cv_path_EGREP" >&6; }
12003 EGREP="$ac_cv_path_EGREP"
12004
12005
12006    else
12007      # If it succeeded, then it was overridden by the user. We will use it
12008      # for the tool.
12009
12010      # First remove it from the list of overridden variables, so we can test
12011      # for unknown variables in the end.
12012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12013
12014      # Check if the provided tool contains a complete path.
12015      tool_specified="$EGREP"
12016      tool_basename="${tool_specified##*/}"
12017      if test "x$tool_basename" = "x$tool_specified"; then
12018        # A command without a complete path is provided, search $PATH.
12019        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12020$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12021        # Extract the first word of "$tool_basename", so it can be a program name with args.
12022set dummy $tool_basename; ac_word=$2
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024$as_echo_n "checking for $ac_word... " >&6; }
12025if ${ac_cv_path_EGREP+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  case $EGREP in
12029  [\\/]* | ?:[\\/]*)
12030  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12031  ;;
12032  *)
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12040    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12042    break 2
12043  fi
12044done
12045  done
12046IFS=$as_save_IFS
12047
12048  ;;
12049esac
12050fi
12051EGREP=$ac_cv_path_EGREP
12052if test -n "$EGREP"; then
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12054$as_echo "$EGREP" >&6; }
12055else
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
12058fi
12059
12060
12061        if test "x$EGREP" = x; then
12062          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12063        fi
12064      else
12065        # Otherwise we believe it is a complete path. Use it as it is.
12066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12067$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12069$as_echo_n "checking for EGREP... " >&6; }
12070        if test ! -x "$tool_specified"; then
12071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12072$as_echo "not found" >&6; }
12073          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12074        fi
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12076$as_echo "$tool_specified" >&6; }
12077      fi
12078    fi
12079  fi
12080
12081
12082  if test "x$EGREP" = x; then
12083    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12084  fi
12085
12086
12087
12088
12089  # Publish this variable in the help.
12090
12091
12092  if test "x$FGREP" = x; then
12093    # The variable is not set by user, try to locate tool using the code snippet
12094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12095$as_echo_n "checking for fgrep... " >&6; }
12096if ${ac_cv_path_FGREP+:} false; then :
12097  $as_echo_n "(cached) " >&6
12098else
12099  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12100   then ac_cv_path_FGREP="$GREP -F"
12101   else
12102     if test -z "$FGREP"; then
12103  ac_path_FGREP_found=false
12104  # Loop through the user's path and test for each of PROGNAME-LIST
12105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12106for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12107do
12108  IFS=$as_save_IFS
12109  test -z "$as_dir" && as_dir=.
12110    for ac_prog in fgrep; do
12111    for ac_exec_ext in '' $ac_executable_extensions; do
12112      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12113      as_fn_executable_p "$ac_path_FGREP" || continue
12114# Check for GNU ac_path_FGREP and select it if it is found.
12115  # Check for GNU $ac_path_FGREP
12116case `"$ac_path_FGREP" --version 2>&1` in
12117*GNU*)
12118  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12119*)
12120  ac_count=0
12121  $as_echo_n 0123456789 >"conftest.in"
12122  while :
12123  do
12124    cat "conftest.in" "conftest.in" >"conftest.tmp"
12125    mv "conftest.tmp" "conftest.in"
12126    cp "conftest.in" "conftest.nl"
12127    $as_echo 'FGREP' >> "conftest.nl"
12128    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12129    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12130    as_fn_arith $ac_count + 1 && ac_count=$as_val
12131    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12132      # Best one so far, save it but keep looking for a better one
12133      ac_cv_path_FGREP="$ac_path_FGREP"
12134      ac_path_FGREP_max=$ac_count
12135    fi
12136    # 10*(2^10) chars as input seems more than enough
12137    test $ac_count -gt 10 && break
12138  done
12139  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12140esac
12141
12142      $ac_path_FGREP_found && break 3
12143    done
12144  done
12145  done
12146IFS=$as_save_IFS
12147  if test -z "$ac_cv_path_FGREP"; then
12148    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12149  fi
12150else
12151  ac_cv_path_FGREP=$FGREP
12152fi
12153
12154   fi
12155fi
12156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12157$as_echo "$ac_cv_path_FGREP" >&6; }
12158 FGREP="$ac_cv_path_FGREP"
12159
12160
12161  else
12162    # The variable is set, but is it from the command line or the environment?
12163
12164    # Try to remove the string !FGREP! from our list.
12165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12167      # If it failed, the variable was not from the command line. Ignore it,
12168      # but warn the user (except for BASH, which is always set by the calling BASH).
12169      if test "xFGREP" != xBASH; then
12170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12171$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12172      fi
12173      # Try to locate tool using the code snippet
12174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12175$as_echo_n "checking for fgrep... " >&6; }
12176if ${ac_cv_path_FGREP+:} false; then :
12177  $as_echo_n "(cached) " >&6
12178else
12179  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12180   then ac_cv_path_FGREP="$GREP -F"
12181   else
12182     if test -z "$FGREP"; then
12183  ac_path_FGREP_found=false
12184  # Loop through the user's path and test for each of PROGNAME-LIST
12185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12186for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12187do
12188  IFS=$as_save_IFS
12189  test -z "$as_dir" && as_dir=.
12190    for ac_prog in fgrep; do
12191    for ac_exec_ext in '' $ac_executable_extensions; do
12192      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12193      as_fn_executable_p "$ac_path_FGREP" || continue
12194# Check for GNU ac_path_FGREP and select it if it is found.
12195  # Check for GNU $ac_path_FGREP
12196case `"$ac_path_FGREP" --version 2>&1` in
12197*GNU*)
12198  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12199*)
12200  ac_count=0
12201  $as_echo_n 0123456789 >"conftest.in"
12202  while :
12203  do
12204    cat "conftest.in" "conftest.in" >"conftest.tmp"
12205    mv "conftest.tmp" "conftest.in"
12206    cp "conftest.in" "conftest.nl"
12207    $as_echo 'FGREP' >> "conftest.nl"
12208    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12209    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12210    as_fn_arith $ac_count + 1 && ac_count=$as_val
12211    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12212      # Best one so far, save it but keep looking for a better one
12213      ac_cv_path_FGREP="$ac_path_FGREP"
12214      ac_path_FGREP_max=$ac_count
12215    fi
12216    # 10*(2^10) chars as input seems more than enough
12217    test $ac_count -gt 10 && break
12218  done
12219  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12220esac
12221
12222      $ac_path_FGREP_found && break 3
12223    done
12224  done
12225  done
12226IFS=$as_save_IFS
12227  if test -z "$ac_cv_path_FGREP"; then
12228    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12229  fi
12230else
12231  ac_cv_path_FGREP=$FGREP
12232fi
12233
12234   fi
12235fi
12236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12237$as_echo "$ac_cv_path_FGREP" >&6; }
12238 FGREP="$ac_cv_path_FGREP"
12239
12240
12241    else
12242      # If it succeeded, then it was overridden by the user. We will use it
12243      # for the tool.
12244
12245      # First remove it from the list of overridden variables, so we can test
12246      # for unknown variables in the end.
12247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12248
12249      # Check if the provided tool contains a complete path.
12250      tool_specified="$FGREP"
12251      tool_basename="${tool_specified##*/}"
12252      if test "x$tool_basename" = "x$tool_specified"; then
12253        # A command without a complete path is provided, search $PATH.
12254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12255$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12256        # Extract the first word of "$tool_basename", so it can be a program name with args.
12257set dummy $tool_basename; ac_word=$2
12258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12259$as_echo_n "checking for $ac_word... " >&6; }
12260if ${ac_cv_path_FGREP+:} false; then :
12261  $as_echo_n "(cached) " >&6
12262else
12263  case $FGREP in
12264  [\\/]* | ?:[\\/]*)
12265  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12266  ;;
12267  *)
12268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12269for as_dir in $PATH
12270do
12271  IFS=$as_save_IFS
12272  test -z "$as_dir" && as_dir=.
12273    for ac_exec_ext in '' $ac_executable_extensions; do
12274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12275    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12277    break 2
12278  fi
12279done
12280  done
12281IFS=$as_save_IFS
12282
12283  ;;
12284esac
12285fi
12286FGREP=$ac_cv_path_FGREP
12287if test -n "$FGREP"; then
12288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12289$as_echo "$FGREP" >&6; }
12290else
12291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12292$as_echo "no" >&6; }
12293fi
12294
12295
12296        if test "x$FGREP" = x; then
12297          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12298        fi
12299      else
12300        # Otherwise we believe it is a complete path. Use it as it is.
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12302$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12304$as_echo_n "checking for FGREP... " >&6; }
12305        if test ! -x "$tool_specified"; then
12306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12307$as_echo "not found" >&6; }
12308          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12309        fi
12310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12311$as_echo "$tool_specified" >&6; }
12312      fi
12313    fi
12314  fi
12315
12316
12317  if test "x$FGREP" = x; then
12318    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12319  fi
12320
12321
12322
12323
12324  # Publish this variable in the help.
12325
12326
12327  if test "x$SED" = x; then
12328    # The variable is not set by user, try to locate tool using the code snippet
12329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12330$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12331if ${ac_cv_path_SED+:} false; then :
12332  $as_echo_n "(cached) " >&6
12333else
12334            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12335     for ac_i in 1 2 3 4 5 6 7; do
12336       ac_script="$ac_script$as_nl$ac_script"
12337     done
12338     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12339     { ac_script=; unset ac_script;}
12340     if test -z "$SED"; then
12341  ac_path_SED_found=false
12342  # Loop through the user's path and test for each of PROGNAME-LIST
12343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12344for as_dir in $PATH
12345do
12346  IFS=$as_save_IFS
12347  test -z "$as_dir" && as_dir=.
12348    for ac_prog in sed gsed; do
12349    for ac_exec_ext in '' $ac_executable_extensions; do
12350      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12351      as_fn_executable_p "$ac_path_SED" || continue
12352# Check for GNU ac_path_SED and select it if it is found.
12353  # Check for GNU $ac_path_SED
12354case `"$ac_path_SED" --version 2>&1` in
12355*GNU*)
12356  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12357*)
12358  ac_count=0
12359  $as_echo_n 0123456789 >"conftest.in"
12360  while :
12361  do
12362    cat "conftest.in" "conftest.in" >"conftest.tmp"
12363    mv "conftest.tmp" "conftest.in"
12364    cp "conftest.in" "conftest.nl"
12365    $as_echo '' >> "conftest.nl"
12366    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12367    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12368    as_fn_arith $ac_count + 1 && ac_count=$as_val
12369    if test $ac_count -gt ${ac_path_SED_max-0}; then
12370      # Best one so far, save it but keep looking for a better one
12371      ac_cv_path_SED="$ac_path_SED"
12372      ac_path_SED_max=$ac_count
12373    fi
12374    # 10*(2^10) chars as input seems more than enough
12375    test $ac_count -gt 10 && break
12376  done
12377  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12378esac
12379
12380      $ac_path_SED_found && break 3
12381    done
12382  done
12383  done
12384IFS=$as_save_IFS
12385  if test -z "$ac_cv_path_SED"; then
12386    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12387  fi
12388else
12389  ac_cv_path_SED=$SED
12390fi
12391
12392fi
12393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12394$as_echo "$ac_cv_path_SED" >&6; }
12395 SED="$ac_cv_path_SED"
12396  rm -f conftest.sed
12397
12398  else
12399    # The variable is set, but is it from the command line or the environment?
12400
12401    # Try to remove the string !SED! from our list.
12402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12404      # If it failed, the variable was not from the command line. Ignore it,
12405      # but warn the user (except for BASH, which is always set by the calling BASH).
12406      if test "xSED" != xBASH; then
12407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12408$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12409      fi
12410      # Try to locate tool using the code snippet
12411      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12412$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12413if ${ac_cv_path_SED+:} false; then :
12414  $as_echo_n "(cached) " >&6
12415else
12416            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12417     for ac_i in 1 2 3 4 5 6 7; do
12418       ac_script="$ac_script$as_nl$ac_script"
12419     done
12420     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12421     { ac_script=; unset ac_script;}
12422     if test -z "$SED"; then
12423  ac_path_SED_found=false
12424  # Loop through the user's path and test for each of PROGNAME-LIST
12425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12426for as_dir in $PATH
12427do
12428  IFS=$as_save_IFS
12429  test -z "$as_dir" && as_dir=.
12430    for ac_prog in sed gsed; do
12431    for ac_exec_ext in '' $ac_executable_extensions; do
12432      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12433      as_fn_executable_p "$ac_path_SED" || continue
12434# Check for GNU ac_path_SED and select it if it is found.
12435  # Check for GNU $ac_path_SED
12436case `"$ac_path_SED" --version 2>&1` in
12437*GNU*)
12438  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12439*)
12440  ac_count=0
12441  $as_echo_n 0123456789 >"conftest.in"
12442  while :
12443  do
12444    cat "conftest.in" "conftest.in" >"conftest.tmp"
12445    mv "conftest.tmp" "conftest.in"
12446    cp "conftest.in" "conftest.nl"
12447    $as_echo '' >> "conftest.nl"
12448    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12449    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12450    as_fn_arith $ac_count + 1 && ac_count=$as_val
12451    if test $ac_count -gt ${ac_path_SED_max-0}; then
12452      # Best one so far, save it but keep looking for a better one
12453      ac_cv_path_SED="$ac_path_SED"
12454      ac_path_SED_max=$ac_count
12455    fi
12456    # 10*(2^10) chars as input seems more than enough
12457    test $ac_count -gt 10 && break
12458  done
12459  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12460esac
12461
12462      $ac_path_SED_found && break 3
12463    done
12464  done
12465  done
12466IFS=$as_save_IFS
12467  if test -z "$ac_cv_path_SED"; then
12468    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12469  fi
12470else
12471  ac_cv_path_SED=$SED
12472fi
12473
12474fi
12475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12476$as_echo "$ac_cv_path_SED" >&6; }
12477 SED="$ac_cv_path_SED"
12478  rm -f conftest.sed
12479
12480    else
12481      # If it succeeded, then it was overridden by the user. We will use it
12482      # for the tool.
12483
12484      # First remove it from the list of overridden variables, so we can test
12485      # for unknown variables in the end.
12486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12487
12488      # Check if the provided tool contains a complete path.
12489      tool_specified="$SED"
12490      tool_basename="${tool_specified##*/}"
12491      if test "x$tool_basename" = "x$tool_specified"; then
12492        # A command without a complete path is provided, search $PATH.
12493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12494$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12495        # Extract the first word of "$tool_basename", so it can be a program name with args.
12496set dummy $tool_basename; ac_word=$2
12497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12498$as_echo_n "checking for $ac_word... " >&6; }
12499if ${ac_cv_path_SED+:} false; then :
12500  $as_echo_n "(cached) " >&6
12501else
12502  case $SED in
12503  [\\/]* | ?:[\\/]*)
12504  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12505  ;;
12506  *)
12507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12508for as_dir in $PATH
12509do
12510  IFS=$as_save_IFS
12511  test -z "$as_dir" && as_dir=.
12512    for ac_exec_ext in '' $ac_executable_extensions; do
12513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12514    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12516    break 2
12517  fi
12518done
12519  done
12520IFS=$as_save_IFS
12521
12522  ;;
12523esac
12524fi
12525SED=$ac_cv_path_SED
12526if test -n "$SED"; then
12527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12528$as_echo "$SED" >&6; }
12529else
12530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12531$as_echo "no" >&6; }
12532fi
12533
12534
12535        if test "x$SED" = x; then
12536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12537        fi
12538      else
12539        # Otherwise we believe it is a complete path. Use it as it is.
12540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12541$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12543$as_echo_n "checking for SED... " >&6; }
12544        if test ! -x "$tool_specified"; then
12545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12546$as_echo "not found" >&6; }
12547          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12548        fi
12549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12550$as_echo "$tool_specified" >&6; }
12551      fi
12552    fi
12553  fi
12554
12555
12556  if test "x$SED" = x; then
12557    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12558  fi
12559
12560
12561
12562  # Always force rm.
12563  RM="$RM -f"
12564
12565  # pwd behaves differently on various platforms and some don't support the -L flag.
12566  # Always use the bash builtin pwd to get uniform behavior.
12567  THEPWDCMD=pwd
12568
12569  # These are not required on all platforms
12570
12571
12572  # Publish this variable in the help.
12573
12574
12575  if test "x$CYGPATH" = x; then
12576    # The variable is not set by user, try to locate tool using the code snippet
12577    for ac_prog in cygpath
12578do
12579  # Extract the first word of "$ac_prog", so it can be a program name with args.
12580set dummy $ac_prog; ac_word=$2
12581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12582$as_echo_n "checking for $ac_word... " >&6; }
12583if ${ac_cv_path_CYGPATH+:} false; then :
12584  $as_echo_n "(cached) " >&6
12585else
12586  case $CYGPATH in
12587  [\\/]* | ?:[\\/]*)
12588  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12589  ;;
12590  *)
12591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12592for as_dir in $PATH
12593do
12594  IFS=$as_save_IFS
12595  test -z "$as_dir" && as_dir=.
12596    for ac_exec_ext in '' $ac_executable_extensions; do
12597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12598    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12600    break 2
12601  fi
12602done
12603  done
12604IFS=$as_save_IFS
12605
12606  ;;
12607esac
12608fi
12609CYGPATH=$ac_cv_path_CYGPATH
12610if test -n "$CYGPATH"; then
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12612$as_echo "$CYGPATH" >&6; }
12613else
12614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12615$as_echo "no" >&6; }
12616fi
12617
12618
12619  test -n "$CYGPATH" && break
12620done
12621
12622  else
12623    # The variable is set, but is it from the command line or the environment?
12624
12625    # Try to remove the string !CYGPATH! from our list.
12626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12628      # If it failed, the variable was not from the command line. Ignore it,
12629      # but warn the user (except for BASH, which is always set by the calling BASH).
12630      if test "xCYGPATH" != xBASH; then
12631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12632$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12633      fi
12634      # Try to locate tool using the code snippet
12635      for ac_prog in cygpath
12636do
12637  # Extract the first word of "$ac_prog", so it can be a program name with args.
12638set dummy $ac_prog; ac_word=$2
12639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12640$as_echo_n "checking for $ac_word... " >&6; }
12641if ${ac_cv_path_CYGPATH+:} false; then :
12642  $as_echo_n "(cached) " >&6
12643else
12644  case $CYGPATH in
12645  [\\/]* | ?:[\\/]*)
12646  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12647  ;;
12648  *)
12649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12650for as_dir in $PATH
12651do
12652  IFS=$as_save_IFS
12653  test -z "$as_dir" && as_dir=.
12654    for ac_exec_ext in '' $ac_executable_extensions; do
12655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12656    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12658    break 2
12659  fi
12660done
12661  done
12662IFS=$as_save_IFS
12663
12664  ;;
12665esac
12666fi
12667CYGPATH=$ac_cv_path_CYGPATH
12668if test -n "$CYGPATH"; then
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12670$as_echo "$CYGPATH" >&6; }
12671else
12672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12673$as_echo "no" >&6; }
12674fi
12675
12676
12677  test -n "$CYGPATH" && break
12678done
12679
12680    else
12681      # If it succeeded, then it was overridden by the user. We will use it
12682      # for the tool.
12683
12684      # First remove it from the list of overridden variables, so we can test
12685      # for unknown variables in the end.
12686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12687
12688      # Check if the provided tool contains a complete path.
12689      tool_specified="$CYGPATH"
12690      tool_basename="${tool_specified##*/}"
12691      if test "x$tool_basename" = "x$tool_specified"; then
12692        # A command without a complete path is provided, search $PATH.
12693        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12694$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12695        # Extract the first word of "$tool_basename", so it can be a program name with args.
12696set dummy $tool_basename; ac_word=$2
12697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12698$as_echo_n "checking for $ac_word... " >&6; }
12699if ${ac_cv_path_CYGPATH+:} false; then :
12700  $as_echo_n "(cached) " >&6
12701else
12702  case $CYGPATH in
12703  [\\/]* | ?:[\\/]*)
12704  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12705  ;;
12706  *)
12707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12708for as_dir in $PATH
12709do
12710  IFS=$as_save_IFS
12711  test -z "$as_dir" && as_dir=.
12712    for ac_exec_ext in '' $ac_executable_extensions; do
12713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12714    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12716    break 2
12717  fi
12718done
12719  done
12720IFS=$as_save_IFS
12721
12722  ;;
12723esac
12724fi
12725CYGPATH=$ac_cv_path_CYGPATH
12726if test -n "$CYGPATH"; then
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12728$as_echo "$CYGPATH" >&6; }
12729else
12730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12731$as_echo "no" >&6; }
12732fi
12733
12734
12735        if test "x$CYGPATH" = x; then
12736          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12737        fi
12738      else
12739        # Otherwise we believe it is a complete path. Use it as it is.
12740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12741$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12743$as_echo_n "checking for CYGPATH... " >&6; }
12744        if test ! -x "$tool_specified"; then
12745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12746$as_echo "not found" >&6; }
12747          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12748        fi
12749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12750$as_echo "$tool_specified" >&6; }
12751      fi
12752    fi
12753  fi
12754
12755
12756
12757
12758  # Publish this variable in the help.
12759
12760
12761  if test "x$READLINK" = x; then
12762    # The variable is not set by user, try to locate tool using the code snippet
12763    for ac_prog in greadlink readlink
12764do
12765  # Extract the first word of "$ac_prog", so it can be a program name with args.
12766set dummy $ac_prog; ac_word=$2
12767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12768$as_echo_n "checking for $ac_word... " >&6; }
12769if ${ac_cv_path_READLINK+:} false; then :
12770  $as_echo_n "(cached) " >&6
12771else
12772  case $READLINK in
12773  [\\/]* | ?:[\\/]*)
12774  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12775  ;;
12776  *)
12777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12778for as_dir in $PATH
12779do
12780  IFS=$as_save_IFS
12781  test -z "$as_dir" && as_dir=.
12782    for ac_exec_ext in '' $ac_executable_extensions; do
12783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12784    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12786    break 2
12787  fi
12788done
12789  done
12790IFS=$as_save_IFS
12791
12792  ;;
12793esac
12794fi
12795READLINK=$ac_cv_path_READLINK
12796if test -n "$READLINK"; then
12797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12798$as_echo "$READLINK" >&6; }
12799else
12800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12801$as_echo "no" >&6; }
12802fi
12803
12804
12805  test -n "$READLINK" && break
12806done
12807
12808  else
12809    # The variable is set, but is it from the command line or the environment?
12810
12811    # Try to remove the string !READLINK! from our list.
12812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12814      # If it failed, the variable was not from the command line. Ignore it,
12815      # but warn the user (except for BASH, which is always set by the calling BASH).
12816      if test "xREADLINK" != xBASH; then
12817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12818$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12819      fi
12820      # Try to locate tool using the code snippet
12821      for ac_prog in greadlink readlink
12822do
12823  # Extract the first word of "$ac_prog", so it can be a program name with args.
12824set dummy $ac_prog; ac_word=$2
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12826$as_echo_n "checking for $ac_word... " >&6; }
12827if ${ac_cv_path_READLINK+:} false; then :
12828  $as_echo_n "(cached) " >&6
12829else
12830  case $READLINK in
12831  [\\/]* | ?:[\\/]*)
12832  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12833  ;;
12834  *)
12835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12836for as_dir in $PATH
12837do
12838  IFS=$as_save_IFS
12839  test -z "$as_dir" && as_dir=.
12840    for ac_exec_ext in '' $ac_executable_extensions; do
12841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12842    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12844    break 2
12845  fi
12846done
12847  done
12848IFS=$as_save_IFS
12849
12850  ;;
12851esac
12852fi
12853READLINK=$ac_cv_path_READLINK
12854if test -n "$READLINK"; then
12855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12856$as_echo "$READLINK" >&6; }
12857else
12858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12859$as_echo "no" >&6; }
12860fi
12861
12862
12863  test -n "$READLINK" && break
12864done
12865
12866    else
12867      # If it succeeded, then it was overridden by the user. We will use it
12868      # for the tool.
12869
12870      # First remove it from the list of overridden variables, so we can test
12871      # for unknown variables in the end.
12872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12873
12874      # Check if the provided tool contains a complete path.
12875      tool_specified="$READLINK"
12876      tool_basename="${tool_specified##*/}"
12877      if test "x$tool_basename" = "x$tool_specified"; then
12878        # A command without a complete path is provided, search $PATH.
12879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12880$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12881        # Extract the first word of "$tool_basename", so it can be a program name with args.
12882set dummy $tool_basename; ac_word=$2
12883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12884$as_echo_n "checking for $ac_word... " >&6; }
12885if ${ac_cv_path_READLINK+:} false; then :
12886  $as_echo_n "(cached) " >&6
12887else
12888  case $READLINK in
12889  [\\/]* | ?:[\\/]*)
12890  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12891  ;;
12892  *)
12893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12894for as_dir in $PATH
12895do
12896  IFS=$as_save_IFS
12897  test -z "$as_dir" && as_dir=.
12898    for ac_exec_ext in '' $ac_executable_extensions; do
12899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12900    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12902    break 2
12903  fi
12904done
12905  done
12906IFS=$as_save_IFS
12907
12908  ;;
12909esac
12910fi
12911READLINK=$ac_cv_path_READLINK
12912if test -n "$READLINK"; then
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12914$as_echo "$READLINK" >&6; }
12915else
12916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12917$as_echo "no" >&6; }
12918fi
12919
12920
12921        if test "x$READLINK" = x; then
12922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12923        fi
12924      else
12925        # Otherwise we believe it is a complete path. Use it as it is.
12926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12927$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12929$as_echo_n "checking for READLINK... " >&6; }
12930        if test ! -x "$tool_specified"; then
12931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12932$as_echo "not found" >&6; }
12933          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12934        fi
12935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12936$as_echo "$tool_specified" >&6; }
12937      fi
12938    fi
12939  fi
12940
12941
12942
12943
12944  # Publish this variable in the help.
12945
12946
12947  if test "x$DF" = x; then
12948    # The variable is not set by user, try to locate tool using the code snippet
12949    for ac_prog in df
12950do
12951  # Extract the first word of "$ac_prog", so it can be a program name with args.
12952set dummy $ac_prog; ac_word=$2
12953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12954$as_echo_n "checking for $ac_word... " >&6; }
12955if ${ac_cv_path_DF+:} false; then :
12956  $as_echo_n "(cached) " >&6
12957else
12958  case $DF in
12959  [\\/]* | ?:[\\/]*)
12960  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12961  ;;
12962  *)
12963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12964for as_dir in $PATH
12965do
12966  IFS=$as_save_IFS
12967  test -z "$as_dir" && as_dir=.
12968    for ac_exec_ext in '' $ac_executable_extensions; do
12969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12970    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12972    break 2
12973  fi
12974done
12975  done
12976IFS=$as_save_IFS
12977
12978  ;;
12979esac
12980fi
12981DF=$ac_cv_path_DF
12982if test -n "$DF"; then
12983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12984$as_echo "$DF" >&6; }
12985else
12986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12987$as_echo "no" >&6; }
12988fi
12989
12990
12991  test -n "$DF" && break
12992done
12993
12994  else
12995    # The variable is set, but is it from the command line or the environment?
12996
12997    # Try to remove the string !DF! from our list.
12998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13000      # If it failed, the variable was not from the command line. Ignore it,
13001      # but warn the user (except for BASH, which is always set by the calling BASH).
13002      if test "xDF" != xBASH; then
13003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13004$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13005      fi
13006      # Try to locate tool using the code snippet
13007      for ac_prog in df
13008do
13009  # Extract the first word of "$ac_prog", so it can be a program name with args.
13010set dummy $ac_prog; ac_word=$2
13011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13012$as_echo_n "checking for $ac_word... " >&6; }
13013if ${ac_cv_path_DF+:} false; then :
13014  $as_echo_n "(cached) " >&6
13015else
13016  case $DF in
13017  [\\/]* | ?:[\\/]*)
13018  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13019  ;;
13020  *)
13021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13022for as_dir in $PATH
13023do
13024  IFS=$as_save_IFS
13025  test -z "$as_dir" && as_dir=.
13026    for ac_exec_ext in '' $ac_executable_extensions; do
13027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13028    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13030    break 2
13031  fi
13032done
13033  done
13034IFS=$as_save_IFS
13035
13036  ;;
13037esac
13038fi
13039DF=$ac_cv_path_DF
13040if test -n "$DF"; then
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13042$as_echo "$DF" >&6; }
13043else
13044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13045$as_echo "no" >&6; }
13046fi
13047
13048
13049  test -n "$DF" && break
13050done
13051
13052    else
13053      # If it succeeded, then it was overridden by the user. We will use it
13054      # for the tool.
13055
13056      # First remove it from the list of overridden variables, so we can test
13057      # for unknown variables in the end.
13058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13059
13060      # Check if the provided tool contains a complete path.
13061      tool_specified="$DF"
13062      tool_basename="${tool_specified##*/}"
13063      if test "x$tool_basename" = "x$tool_specified"; then
13064        # A command without a complete path is provided, search $PATH.
13065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13066$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13067        # Extract the first word of "$tool_basename", so it can be a program name with args.
13068set dummy $tool_basename; ac_word=$2
13069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13070$as_echo_n "checking for $ac_word... " >&6; }
13071if ${ac_cv_path_DF+:} false; then :
13072  $as_echo_n "(cached) " >&6
13073else
13074  case $DF in
13075  [\\/]* | ?:[\\/]*)
13076  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13077  ;;
13078  *)
13079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13080for as_dir in $PATH
13081do
13082  IFS=$as_save_IFS
13083  test -z "$as_dir" && as_dir=.
13084    for ac_exec_ext in '' $ac_executable_extensions; do
13085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13086    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13088    break 2
13089  fi
13090done
13091  done
13092IFS=$as_save_IFS
13093
13094  ;;
13095esac
13096fi
13097DF=$ac_cv_path_DF
13098if test -n "$DF"; then
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13100$as_echo "$DF" >&6; }
13101else
13102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13103$as_echo "no" >&6; }
13104fi
13105
13106
13107        if test "x$DF" = x; then
13108          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13109        fi
13110      else
13111        # Otherwise we believe it is a complete path. Use it as it is.
13112        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13113$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13115$as_echo_n "checking for DF... " >&6; }
13116        if test ! -x "$tool_specified"; then
13117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13118$as_echo "not found" >&6; }
13119          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13120        fi
13121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13122$as_echo "$tool_specified" >&6; }
13123      fi
13124    fi
13125  fi
13126
13127
13128
13129
13130  # Publish this variable in the help.
13131
13132
13133  if test "x$SETFILE" = x; then
13134    # The variable is not set by user, try to locate tool using the code snippet
13135    for ac_prog in SetFile
13136do
13137  # Extract the first word of "$ac_prog", so it can be a program name with args.
13138set dummy $ac_prog; ac_word=$2
13139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13140$as_echo_n "checking for $ac_word... " >&6; }
13141if ${ac_cv_path_SETFILE+:} false; then :
13142  $as_echo_n "(cached) " >&6
13143else
13144  case $SETFILE in
13145  [\\/]* | ?:[\\/]*)
13146  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13147  ;;
13148  *)
13149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13150for as_dir in $PATH
13151do
13152  IFS=$as_save_IFS
13153  test -z "$as_dir" && as_dir=.
13154    for ac_exec_ext in '' $ac_executable_extensions; do
13155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13156    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13158    break 2
13159  fi
13160done
13161  done
13162IFS=$as_save_IFS
13163
13164  ;;
13165esac
13166fi
13167SETFILE=$ac_cv_path_SETFILE
13168if test -n "$SETFILE"; then
13169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13170$as_echo "$SETFILE" >&6; }
13171else
13172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13173$as_echo "no" >&6; }
13174fi
13175
13176
13177  test -n "$SETFILE" && break
13178done
13179
13180  else
13181    # The variable is set, but is it from the command line or the environment?
13182
13183    # Try to remove the string !SETFILE! from our list.
13184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13186      # If it failed, the variable was not from the command line. Ignore it,
13187      # but warn the user (except for BASH, which is always set by the calling BASH).
13188      if test "xSETFILE" != xBASH; then
13189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13190$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13191      fi
13192      # Try to locate tool using the code snippet
13193      for ac_prog in SetFile
13194do
13195  # Extract the first word of "$ac_prog", so it can be a program name with args.
13196set dummy $ac_prog; ac_word=$2
13197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13198$as_echo_n "checking for $ac_word... " >&6; }
13199if ${ac_cv_path_SETFILE+:} false; then :
13200  $as_echo_n "(cached) " >&6
13201else
13202  case $SETFILE in
13203  [\\/]* | ?:[\\/]*)
13204  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13205  ;;
13206  *)
13207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13208for as_dir in $PATH
13209do
13210  IFS=$as_save_IFS
13211  test -z "$as_dir" && as_dir=.
13212    for ac_exec_ext in '' $ac_executable_extensions; do
13213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13214    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13216    break 2
13217  fi
13218done
13219  done
13220IFS=$as_save_IFS
13221
13222  ;;
13223esac
13224fi
13225SETFILE=$ac_cv_path_SETFILE
13226if test -n "$SETFILE"; then
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13228$as_echo "$SETFILE" >&6; }
13229else
13230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13231$as_echo "no" >&6; }
13232fi
13233
13234
13235  test -n "$SETFILE" && break
13236done
13237
13238    else
13239      # If it succeeded, then it was overridden by the user. We will use it
13240      # for the tool.
13241
13242      # First remove it from the list of overridden variables, so we can test
13243      # for unknown variables in the end.
13244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13245
13246      # Check if the provided tool contains a complete path.
13247      tool_specified="$SETFILE"
13248      tool_basename="${tool_specified##*/}"
13249      if test "x$tool_basename" = "x$tool_specified"; then
13250        # A command without a complete path is provided, search $PATH.
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13252$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13253        # Extract the first word of "$tool_basename", so it can be a program name with args.
13254set dummy $tool_basename; ac_word=$2
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13256$as_echo_n "checking for $ac_word... " >&6; }
13257if ${ac_cv_path_SETFILE+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  case $SETFILE in
13261  [\\/]* | ?:[\\/]*)
13262  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13263  ;;
13264  *)
13265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13266for as_dir in $PATH
13267do
13268  IFS=$as_save_IFS
13269  test -z "$as_dir" && as_dir=.
13270    for ac_exec_ext in '' $ac_executable_extensions; do
13271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13272    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13274    break 2
13275  fi
13276done
13277  done
13278IFS=$as_save_IFS
13279
13280  ;;
13281esac
13282fi
13283SETFILE=$ac_cv_path_SETFILE
13284if test -n "$SETFILE"; then
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13286$as_echo "$SETFILE" >&6; }
13287else
13288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13289$as_echo "no" >&6; }
13290fi
13291
13292
13293        if test "x$SETFILE" = x; then
13294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13295        fi
13296      else
13297        # Otherwise we believe it is a complete path. Use it as it is.
13298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13299$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13301$as_echo_n "checking for SETFILE... " >&6; }
13302        if test ! -x "$tool_specified"; then
13303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13304$as_echo "not found" >&6; }
13305          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13306        fi
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13308$as_echo "$tool_specified" >&6; }
13309      fi
13310    fi
13311  fi
13312
13313
13314
13315
13316  # Publish this variable in the help.
13317
13318
13319  if test "x$CPIO" = x; then
13320    # The variable is not set by user, try to locate tool using the code snippet
13321    for ac_prog in cpio bsdcpio
13322do
13323  # Extract the first word of "$ac_prog", so it can be a program name with args.
13324set dummy $ac_prog; ac_word=$2
13325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13326$as_echo_n "checking for $ac_word... " >&6; }
13327if ${ac_cv_path_CPIO+:} false; then :
13328  $as_echo_n "(cached) " >&6
13329else
13330  case $CPIO in
13331  [\\/]* | ?:[\\/]*)
13332  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13333  ;;
13334  *)
13335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13336for as_dir in $PATH
13337do
13338  IFS=$as_save_IFS
13339  test -z "$as_dir" && as_dir=.
13340    for ac_exec_ext in '' $ac_executable_extensions; do
13341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13342    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13344    break 2
13345  fi
13346done
13347  done
13348IFS=$as_save_IFS
13349
13350  ;;
13351esac
13352fi
13353CPIO=$ac_cv_path_CPIO
13354if test -n "$CPIO"; then
13355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13356$as_echo "$CPIO" >&6; }
13357else
13358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13359$as_echo "no" >&6; }
13360fi
13361
13362
13363  test -n "$CPIO" && break
13364done
13365
13366  else
13367    # The variable is set, but is it from the command line or the environment?
13368
13369    # Try to remove the string !CPIO! from our list.
13370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13372      # If it failed, the variable was not from the command line. Ignore it,
13373      # but warn the user (except for BASH, which is always set by the calling BASH).
13374      if test "xCPIO" != xBASH; then
13375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13376$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13377      fi
13378      # Try to locate tool using the code snippet
13379      for ac_prog in cpio bsdcpio
13380do
13381  # Extract the first word of "$ac_prog", so it can be a program name with args.
13382set dummy $ac_prog; ac_word=$2
13383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13384$as_echo_n "checking for $ac_word... " >&6; }
13385if ${ac_cv_path_CPIO+:} false; then :
13386  $as_echo_n "(cached) " >&6
13387else
13388  case $CPIO in
13389  [\\/]* | ?:[\\/]*)
13390  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13391  ;;
13392  *)
13393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13394for as_dir in $PATH
13395do
13396  IFS=$as_save_IFS
13397  test -z "$as_dir" && as_dir=.
13398    for ac_exec_ext in '' $ac_executable_extensions; do
13399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13400    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13402    break 2
13403  fi
13404done
13405  done
13406IFS=$as_save_IFS
13407
13408  ;;
13409esac
13410fi
13411CPIO=$ac_cv_path_CPIO
13412if test -n "$CPIO"; then
13413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13414$as_echo "$CPIO" >&6; }
13415else
13416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13417$as_echo "no" >&6; }
13418fi
13419
13420
13421  test -n "$CPIO" && break
13422done
13423
13424    else
13425      # If it succeeded, then it was overridden by the user. We will use it
13426      # for the tool.
13427
13428      # First remove it from the list of overridden variables, so we can test
13429      # for unknown variables in the end.
13430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13431
13432      # Check if the provided tool contains a complete path.
13433      tool_specified="$CPIO"
13434      tool_basename="${tool_specified##*/}"
13435      if test "x$tool_basename" = "x$tool_specified"; then
13436        # A command without a complete path is provided, search $PATH.
13437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13438$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13439        # Extract the first word of "$tool_basename", so it can be a program name with args.
13440set dummy $tool_basename; ac_word=$2
13441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13442$as_echo_n "checking for $ac_word... " >&6; }
13443if ${ac_cv_path_CPIO+:} false; then :
13444  $as_echo_n "(cached) " >&6
13445else
13446  case $CPIO in
13447  [\\/]* | ?:[\\/]*)
13448  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13449  ;;
13450  *)
13451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13452for as_dir in $PATH
13453do
13454  IFS=$as_save_IFS
13455  test -z "$as_dir" && as_dir=.
13456    for ac_exec_ext in '' $ac_executable_extensions; do
13457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13458    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13460    break 2
13461  fi
13462done
13463  done
13464IFS=$as_save_IFS
13465
13466  ;;
13467esac
13468fi
13469CPIO=$ac_cv_path_CPIO
13470if test -n "$CPIO"; then
13471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13472$as_echo "$CPIO" >&6; }
13473else
13474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13475$as_echo "no" >&6; }
13476fi
13477
13478
13479        if test "x$CPIO" = x; then
13480          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13481        fi
13482      else
13483        # Otherwise we believe it is a complete path. Use it as it is.
13484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13485$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13487$as_echo_n "checking for CPIO... " >&6; }
13488        if test ! -x "$tool_specified"; then
13489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13490$as_echo "not found" >&6; }
13491          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13492        fi
13493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13494$as_echo "$tool_specified" >&6; }
13495      fi
13496    fi
13497  fi
13498
13499
13500
13501
13502# Now we can determine OpenJDK build and target platforms. This is required to
13503# have early on.
13504# Make sure we can run config.sub.
13505$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13506  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13507
13508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13509$as_echo_n "checking build system type... " >&6; }
13510if ${ac_cv_build+:} false; then :
13511  $as_echo_n "(cached) " >&6
13512else
13513  ac_build_alias=$build_alias
13514test "x$ac_build_alias" = x &&
13515  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13516test "x$ac_build_alias" = x &&
13517  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13518ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13519  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13520
13521fi
13522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13523$as_echo "$ac_cv_build" >&6; }
13524case $ac_cv_build in
13525*-*-*) ;;
13526*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13527esac
13528build=$ac_cv_build
13529ac_save_IFS=$IFS; IFS='-'
13530set x $ac_cv_build
13531shift
13532build_cpu=$1
13533build_vendor=$2
13534shift; shift
13535# Remember, the first character of IFS is used to create $*,
13536# except with old shells:
13537build_os=$*
13538IFS=$ac_save_IFS
13539case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13540
13541
13542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13543$as_echo_n "checking host system type... " >&6; }
13544if ${ac_cv_host+:} false; then :
13545  $as_echo_n "(cached) " >&6
13546else
13547  if test "x$host_alias" = x; then
13548  ac_cv_host=$ac_cv_build
13549else
13550  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13551    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13552fi
13553
13554fi
13555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13556$as_echo "$ac_cv_host" >&6; }
13557case $ac_cv_host in
13558*-*-*) ;;
13559*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13560esac
13561host=$ac_cv_host
13562ac_save_IFS=$IFS; IFS='-'
13563set x $ac_cv_host
13564shift
13565host_cpu=$1
13566host_vendor=$2
13567shift; shift
13568# Remember, the first character of IFS is used to create $*,
13569# except with old shells:
13570host_os=$*
13571IFS=$ac_save_IFS
13572case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13573
13574
13575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13576$as_echo_n "checking target system type... " >&6; }
13577if ${ac_cv_target+:} false; then :
13578  $as_echo_n "(cached) " >&6
13579else
13580  if test "x$target_alias" = x; then
13581  ac_cv_target=$ac_cv_host
13582else
13583  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13584    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13585fi
13586
13587fi
13588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13589$as_echo "$ac_cv_target" >&6; }
13590case $ac_cv_target in
13591*-*-*) ;;
13592*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13593esac
13594target=$ac_cv_target
13595ac_save_IFS=$IFS; IFS='-'
13596set x $ac_cv_target
13597shift
13598target_cpu=$1
13599target_vendor=$2
13600shift; shift
13601# Remember, the first character of IFS is used to create $*,
13602# except with old shells:
13603target_os=$*
13604IFS=$ac_save_IFS
13605case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13606
13607
13608# The aliases save the names the user supplied, while $host etc.
13609# will get canonicalized.
13610test -n "$target_alias" &&
13611  test "$program_prefix$program_suffix$program_transform_name" = \
13612    NONENONEs,x,x, &&
13613  program_prefix=${target_alias}-
13614
13615  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13616  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13617  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13618  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13619  # to use the configure naming style.
13620
13621
13622
13623
13624
13625  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13626  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13627  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13628  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13629  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13630  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13631
13632
13633
13634  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13635
13636  case "$build_os" in
13637    *linux*)
13638      VAR_OS=linux
13639      VAR_OS_TYPE=unix
13640      ;;
13641    *solaris*)
13642      VAR_OS=solaris
13643      VAR_OS_TYPE=unix
13644      ;;
13645    *darwin*)
13646      VAR_OS=macosx
13647      VAR_OS_TYPE=unix
13648      ;;
13649    *bsd*)
13650      VAR_OS=bsd
13651      VAR_OS_TYPE=unix
13652      ;;
13653    *cygwin*)
13654      VAR_OS=windows
13655      VAR_OS_ENV=windows.cygwin
13656      ;;
13657    *mingw*)
13658      VAR_OS=windows
13659      VAR_OS_ENV=windows.msys
13660      ;;
13661    *aix*)
13662      VAR_OS=aix
13663      VAR_OS_TYPE=unix
13664      ;;
13665    *)
13666      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13667      ;;
13668  esac
13669
13670
13671  # First argument is the cpu name from the trip/quad
13672  case "$build_cpu" in
13673    x86_64)
13674      VAR_CPU=x86_64
13675      VAR_CPU_ARCH=x86
13676      VAR_CPU_BITS=64
13677      VAR_CPU_ENDIAN=little
13678      ;;
13679    i?86)
13680      VAR_CPU=x86
13681      VAR_CPU_ARCH=x86
13682      VAR_CPU_BITS=32
13683      VAR_CPU_ENDIAN=little
13684      ;;
13685    arm*)
13686      VAR_CPU=arm
13687      VAR_CPU_ARCH=arm
13688      VAR_CPU_BITS=32
13689      VAR_CPU_ENDIAN=little
13690      ;;
13691    aarch64)
13692      VAR_CPU=aarch64
13693      VAR_CPU_ARCH=aarch64
13694      VAR_CPU_BITS=64
13695      VAR_CPU_ENDIAN=little
13696      ;;
13697    powerpc)
13698      VAR_CPU=ppc
13699      VAR_CPU_ARCH=ppc
13700      VAR_CPU_BITS=32
13701      VAR_CPU_ENDIAN=big
13702      ;;
13703    powerpc64)
13704      VAR_CPU=ppc64
13705      VAR_CPU_ARCH=ppc
13706      VAR_CPU_BITS=64
13707      VAR_CPU_ENDIAN=big
13708      ;;
13709    powerpc64le)
13710      VAR_CPU=ppc64
13711      VAR_CPU_ARCH=ppc
13712      VAR_CPU_BITS=64
13713      VAR_CPU_ENDIAN=little
13714      ;;
13715    s390)
13716      VAR_CPU=s390
13717      VAR_CPU_ARCH=s390
13718      VAR_CPU_BITS=32
13719      VAR_CPU_ENDIAN=big
13720      ;;
13721    s390x)
13722      VAR_CPU=s390x
13723      VAR_CPU_ARCH=s390
13724      VAR_CPU_BITS=64
13725      VAR_CPU_ENDIAN=big
13726      ;;
13727    sparc)
13728      VAR_CPU=sparc
13729      VAR_CPU_ARCH=sparc
13730      VAR_CPU_BITS=32
13731      VAR_CPU_ENDIAN=big
13732      ;;
13733    sparcv9|sparc64)
13734      VAR_CPU=sparcv9
13735      VAR_CPU_ARCH=sparc
13736      VAR_CPU_BITS=64
13737      VAR_CPU_ENDIAN=big
13738      ;;
13739    *)
13740      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13741      ;;
13742  esac
13743
13744  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13745  OPENJDK_BUILD_OS="$VAR_OS"
13746  if test "x$VAR_OS_TYPE" != x; then
13747    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13748  else
13749    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13750  fi
13751  if test "x$VAR_OS_ENV" != x; then
13752    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13753  else
13754    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13755  fi
13756  OPENJDK_BUILD_CPU="$VAR_CPU"
13757  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13758  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13759  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13760
13761
13762
13763
13764
13765
13766
13767
13768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13769$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13771$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13772
13773  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13774
13775  case "$host_os" in
13776    *linux*)
13777      VAR_OS=linux
13778      VAR_OS_TYPE=unix
13779      ;;
13780    *solaris*)
13781      VAR_OS=solaris
13782      VAR_OS_TYPE=unix
13783      ;;
13784    *darwin*)
13785      VAR_OS=macosx
13786      VAR_OS_TYPE=unix
13787      ;;
13788    *bsd*)
13789      VAR_OS=bsd
13790      VAR_OS_TYPE=unix
13791      ;;
13792    *cygwin*)
13793      VAR_OS=windows
13794      VAR_OS_ENV=windows.cygwin
13795      ;;
13796    *mingw*)
13797      VAR_OS=windows
13798      VAR_OS_ENV=windows.msys
13799      ;;
13800    *aix*)
13801      VAR_OS=aix
13802      VAR_OS_TYPE=unix
13803      ;;
13804    *)
13805      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13806      ;;
13807  esac
13808
13809
13810  # First argument is the cpu name from the trip/quad
13811  case "$host_cpu" in
13812    x86_64)
13813      VAR_CPU=x86_64
13814      VAR_CPU_ARCH=x86
13815      VAR_CPU_BITS=64
13816      VAR_CPU_ENDIAN=little
13817      ;;
13818    i?86)
13819      VAR_CPU=x86
13820      VAR_CPU_ARCH=x86
13821      VAR_CPU_BITS=32
13822      VAR_CPU_ENDIAN=little
13823      ;;
13824    arm*)
13825      VAR_CPU=arm
13826      VAR_CPU_ARCH=arm
13827      VAR_CPU_BITS=32
13828      VAR_CPU_ENDIAN=little
13829      ;;
13830    aarch64)
13831      VAR_CPU=aarch64
13832      VAR_CPU_ARCH=aarch64
13833      VAR_CPU_BITS=64
13834      VAR_CPU_ENDIAN=little
13835      ;;
13836    powerpc)
13837      VAR_CPU=ppc
13838      VAR_CPU_ARCH=ppc
13839      VAR_CPU_BITS=32
13840      VAR_CPU_ENDIAN=big
13841      ;;
13842    powerpc64)
13843      VAR_CPU=ppc64
13844      VAR_CPU_ARCH=ppc
13845      VAR_CPU_BITS=64
13846      VAR_CPU_ENDIAN=big
13847      ;;
13848    powerpc64le)
13849      VAR_CPU=ppc64
13850      VAR_CPU_ARCH=ppc
13851      VAR_CPU_BITS=64
13852      VAR_CPU_ENDIAN=little
13853      ;;
13854    s390)
13855      VAR_CPU=s390
13856      VAR_CPU_ARCH=s390
13857      VAR_CPU_BITS=32
13858      VAR_CPU_ENDIAN=big
13859      ;;
13860    s390x)
13861      VAR_CPU=s390x
13862      VAR_CPU_ARCH=s390
13863      VAR_CPU_BITS=64
13864      VAR_CPU_ENDIAN=big
13865      ;;
13866    sparc)
13867      VAR_CPU=sparc
13868      VAR_CPU_ARCH=sparc
13869      VAR_CPU_BITS=32
13870      VAR_CPU_ENDIAN=big
13871      ;;
13872    sparcv9|sparc64)
13873      VAR_CPU=sparcv9
13874      VAR_CPU_ARCH=sparc
13875      VAR_CPU_BITS=64
13876      VAR_CPU_ENDIAN=big
13877      ;;
13878    *)
13879      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13880      ;;
13881  esac
13882
13883  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13884  OPENJDK_TARGET_OS="$VAR_OS"
13885  if test "x$VAR_OS_TYPE" != x; then
13886    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13887  else
13888    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13889  fi
13890  if test "x$VAR_OS_ENV" != x; then
13891    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13892  else
13893    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13894  fi
13895  OPENJDK_TARGET_CPU="$VAR_CPU"
13896  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13897  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13898  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13899
13900
13901
13902
13903
13904
13905
13906
13907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13908$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13910$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13911
13912
13913
13914# Check whether --with-target-bits was given.
13915if test "${with_target_bits+set}" = set; then :
13916  withval=$with_target_bits;
13917fi
13918
13919
13920  # We have three types of compiles:
13921  # native  == normal compilation, target system == build system
13922  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13923  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13924  #
13925  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13926    # We're doing a proper cross-compilation
13927    COMPILE_TYPE="cross"
13928  else
13929    COMPILE_TYPE="native"
13930  fi
13931
13932  if test "x$with_target_bits" != x; then
13933    if test "x$COMPILE_TYPE" = "xcross"; then
13934      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13935    fi
13936
13937    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13938      # A reduced build is requested
13939      COMPILE_TYPE="reduced"
13940      OPENJDK_TARGET_CPU_BITS=32
13941      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13942        OPENJDK_TARGET_CPU=x86
13943      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13944        OPENJDK_TARGET_CPU=sparc
13945      else
13946        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13947      fi
13948    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13949      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
13950    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13951      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13952$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13953    else
13954      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13955    fi
13956  fi
13957
13958
13959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13960$as_echo_n "checking compilation type... " >&6; }
13961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13962$as_echo "$COMPILE_TYPE" >&6; }
13963
13964
13965  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13966    REQUIRED_OS_NAME=SunOS
13967    REQUIRED_OS_VERSION=5.10
13968  fi
13969  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13970    REQUIRED_OS_NAME=Linux
13971    REQUIRED_OS_VERSION=2.6
13972  fi
13973  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13974    REQUIRED_OS_NAME=Windows
13975    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13976      REQUIRED_OS_VERSION=5.2
13977    else
13978      REQUIRED_OS_VERSION=5.1
13979    fi
13980  fi
13981  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13982    REQUIRED_OS_NAME=Darwin
13983    REQUIRED_OS_VERSION=11.2
13984  fi
13985
13986
13987
13988
13989
13990  # Also store the legacy naming of the cpu.
13991  # Ie i586 and amd64 instead of x86 and x86_64
13992  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13993  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13994    OPENJDK_TARGET_CPU_LEGACY="i586"
13995  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13996    # On all platforms except MacOSX replace x86_64 with amd64.
13997    OPENJDK_TARGET_CPU_LEGACY="amd64"
13998  fi
13999
14000
14001  # And the second legacy naming of the cpu.
14002  # Ie i386 and amd64 instead of x86 and x86_64.
14003  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14004  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14005    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14006  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14007    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14008  fi
14009
14010
14011  # This is the name of the cpu (but using i386 and amd64 instead of
14012  # x86 and x86_64, respectively), preceeded by a /, to be used when
14013  # locating libraries. On macosx, it's empty, though.
14014  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14015  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14016    OPENJDK_TARGET_CPU_LIBDIR=""
14017  fi
14018
14019
14020  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14021  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14022  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14023  OPENJDK_TARGET_CPU_ISADIR=""
14024  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14025    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14026      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14027    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14028      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14029    fi
14030  fi
14031
14032
14033  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14034  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14035  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14036    # On linux only, we replace x86 with i386.
14037    OPENJDK_TARGET_CPU_OSARCH="i386"
14038  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14039    # On all platforms except macosx, we replace x86_64 with amd64.
14040    OPENJDK_TARGET_CPU_OSARCH="amd64"
14041  fi
14042
14043
14044  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14045  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14046    OPENJDK_TARGET_CPU_JLI="i386"
14047  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14048    # On all platforms except macosx, we replace x86_64 with amd64.
14049    OPENJDK_TARGET_CPU_JLI="amd64"
14050  fi
14051  # Now setup the -D flags for building libjli.
14052  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14053  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14054    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14055      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14056    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14057      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14058    fi
14059  fi
14060
14061
14062  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14063      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14064  else
14065      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14066  fi
14067
14068
14069  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14070    A_LP64="LP64:="
14071    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14072    # unpack200.exe
14073    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14074      ADD_LP64="-D_LP64=1"
14075    fi
14076  fi
14077  LP64=$A_LP64
14078
14079
14080  if test "x$COMPILE_TYPE" = "xcross"; then
14081    # FIXME: ... or should this include reduced builds..?
14082    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14083  else
14084    DEFINE_CROSS_COMPILE_ARCH=""
14085  fi
14086
14087
14088  # ZERO_ARCHDEF is used to enable architecture-specific code
14089  case "${OPENJDK_TARGET_CPU}" in
14090    ppc)     ZERO_ARCHDEF=PPC32 ;;
14091    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14092    s390*)   ZERO_ARCHDEF=S390  ;;
14093    sparc*)  ZERO_ARCHDEF=SPARC ;;
14094    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14095    x86)     ZERO_ARCHDEF=IA32  ;;
14096    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14097  esac
14098
14099
14100
14101
14102# Continue setting up basic stuff. Most remaining code require fundamental tools.
14103
14104  # Save the current directory this script was started from
14105  CURDIR="$PWD"
14106
14107  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14108    PATH_SEP=";"
14109
14110  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14111  if test $SRC_ROOT_LENGTH -gt 100; then
14112    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14113  fi
14114
14115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14117$as_echo_n "checking cygwin release... " >&6; }
14118    CYGWIN_VERSION=`$UNAME -r`
14119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14120$as_echo "$CYGWIN_VERSION" >&6; }
14121    WINDOWS_ENV_VENDOR='cygwin'
14122    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14123
14124    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14125    if test "x$CYGWIN_VERSION_OLD" != x; then
14126      { $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
14127$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;}
14128      as_fn_error $? "Cannot continue" "$LINENO" 5
14129    fi
14130    if test "x$CYGPATH" = x; then
14131      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14132    fi
14133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14134$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14135    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14136    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14137    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14138    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14140$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14141    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14142    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14143    if test "x$test_cygdrive_prefix" = x; then
14144      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14145    fi
14146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14148$as_echo_n "checking msys release... " >&6; }
14149    MSYS_VERSION=`$UNAME -r`
14150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14151$as_echo "$MSYS_VERSION" >&6; }
14152
14153    WINDOWS_ENV_VENDOR='msys'
14154    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14155
14156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14157$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14158    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14159    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14160
14161  windows_path="$MSYS_ROOT_PATH"
14162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14163    unix_path=`$CYGPATH -u "$windows_path"`
14164    MSYS_ROOT_PATH="$unix_path"
14165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14167    MSYS_ROOT_PATH="$unix_path"
14168  fi
14169
14170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14171$as_echo "$MSYS_ROOT_PATH" >&6; }
14172    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14173  else
14174    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14175  fi
14176
14177  # Test if windows or unix (cygwin/msys) find is first in path.
14178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14179$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14180  FIND_BINARY_OUTPUT=`find --version 2>&1`
14181  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14183$as_echo "unix style" >&6; }
14184  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14186$as_echo "Windows" >&6; }
14187    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14188$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14189    { $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
14190$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14191    as_fn_error $? "Cannot continue" "$LINENO" 5
14192  else
14193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14194$as_echo "unknown" >&6; }
14195    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14196$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14197  fi
14198
14199  else
14200    PATH_SEP=":"
14201  fi
14202
14203
14204  # We get the top-level directory from the supporting wrappers.
14205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14206$as_echo_n "checking for top-level directory... " >&6; }
14207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14208$as_echo "$TOPDIR" >&6; }
14209
14210
14211  # Save the original version of TOPDIR for string comparisons
14212  ORIGINAL_TOPDIR="$TOPDIR"
14213
14214
14215  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14216
14217  # Only process if variable expands to non-empty
14218
14219  if test "x$CURDIR" != x; then
14220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14221
14222  # Input might be given as Windows format, start by converting to
14223  # unix format.
14224  path="$CURDIR"
14225  new_path=`$CYGPATH -u "$path"`
14226
14227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14230  # "foo.exe" is OK but "foo" is an error.
14231  #
14232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14233  # It is also a way to make sure we got the proper file name for the real test later on.
14234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14235  if test "x$test_shortpath" = x; then
14236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14237$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14238    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14239  fi
14240
14241  # Call helper function which possibly converts this using DOS-style short mode.
14242  # If so, the updated path is stored in $new_path.
14243
14244  input_path="$new_path"
14245  # Check if we need to convert this using DOS-style short mode. If the path
14246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14247  # take no chances and rewrite it.
14248  # Note: m4 eats our [], so we need to use [ and ] instead.
14249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14250  if test "x$has_forbidden_chars" != x; then
14251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14255      # Going to short mode and back again did indeed matter. Since short mode is
14256      # case insensitive, let's make it lowercase to improve readability.
14257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14258      # Now convert it back to Unix-style (cygpath)
14259      input_path=`$CYGPATH -u "$shortmode_path"`
14260      new_path="$input_path"
14261    fi
14262  fi
14263
14264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14265  if test "x$test_cygdrive_prefix" = x; then
14266    # As a simple fix, exclude /usr/bin since it's not a real path.
14267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14269      # a path prefixed by /cygdrive for fixpath to work.
14270      new_path="$CYGWIN_ROOT_PATH$input_path"
14271    fi
14272  fi
14273
14274
14275  if test "x$path" != "x$new_path"; then
14276    CURDIR="$new_path"
14277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14278$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14279  fi
14280
14281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14282
14283  path="$CURDIR"
14284  has_colon=`$ECHO $path | $GREP ^.:`
14285  new_path="$path"
14286  if test "x$has_colon" = x; then
14287    # Not in mixed or Windows style, start by that.
14288    new_path=`cmd //c echo $path`
14289  fi
14290
14291
14292  input_path="$new_path"
14293  # Check if we need to convert this using DOS-style short mode. If the path
14294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14295  # take no chances and rewrite it.
14296  # Note: m4 eats our [], so we need to use [ and ] instead.
14297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14298  if test "x$has_forbidden_chars" != x; then
14299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14301  fi
14302
14303
14304  windows_path="$new_path"
14305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14306    unix_path=`$CYGPATH -u "$windows_path"`
14307    new_path="$unix_path"
14308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14310    new_path="$unix_path"
14311  fi
14312
14313  if test "x$path" != "x$new_path"; then
14314    CURDIR="$new_path"
14315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14316$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14317  fi
14318
14319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14321
14322    else
14323      # We're on a unix platform. Hooray! :)
14324      path="$CURDIR"
14325      has_space=`$ECHO "$path" | $GREP " "`
14326      if test "x$has_space" != x; then
14327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14328$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14329        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14330      fi
14331
14332      # Use eval to expand a potential ~
14333      eval path="$path"
14334      if test ! -f "$path" && test ! -d "$path"; then
14335        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14336      fi
14337
14338      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14339    fi
14340  fi
14341
14342
14343  # Only process if variable expands to non-empty
14344
14345  if test "x$TOPDIR" != x; then
14346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14347
14348  # Input might be given as Windows format, start by converting to
14349  # unix format.
14350  path="$TOPDIR"
14351  new_path=`$CYGPATH -u "$path"`
14352
14353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14356  # "foo.exe" is OK but "foo" is an error.
14357  #
14358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14359  # It is also a way to make sure we got the proper file name for the real test later on.
14360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14361  if test "x$test_shortpath" = x; then
14362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14363$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14364    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14365  fi
14366
14367  # Call helper function which possibly converts this using DOS-style short mode.
14368  # If so, the updated path is stored in $new_path.
14369
14370  input_path="$new_path"
14371  # Check if we need to convert this using DOS-style short mode. If the path
14372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14373  # take no chances and rewrite it.
14374  # Note: m4 eats our [], so we need to use [ and ] instead.
14375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14376  if test "x$has_forbidden_chars" != x; then
14377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14381      # Going to short mode and back again did indeed matter. Since short mode is
14382      # case insensitive, let's make it lowercase to improve readability.
14383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14384      # Now convert it back to Unix-style (cygpath)
14385      input_path=`$CYGPATH -u "$shortmode_path"`
14386      new_path="$input_path"
14387    fi
14388  fi
14389
14390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14391  if test "x$test_cygdrive_prefix" = x; then
14392    # As a simple fix, exclude /usr/bin since it's not a real path.
14393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14395      # a path prefixed by /cygdrive for fixpath to work.
14396      new_path="$CYGWIN_ROOT_PATH$input_path"
14397    fi
14398  fi
14399
14400
14401  if test "x$path" != "x$new_path"; then
14402    TOPDIR="$new_path"
14403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14404$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14405  fi
14406
14407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14408
14409  path="$TOPDIR"
14410  has_colon=`$ECHO $path | $GREP ^.:`
14411  new_path="$path"
14412  if test "x$has_colon" = x; then
14413    # Not in mixed or Windows style, start by that.
14414    new_path=`cmd //c echo $path`
14415  fi
14416
14417
14418  input_path="$new_path"
14419  # Check if we need to convert this using DOS-style short mode. If the path
14420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14421  # take no chances and rewrite it.
14422  # Note: m4 eats our [], so we need to use [ and ] instead.
14423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14424  if test "x$has_forbidden_chars" != x; then
14425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14427  fi
14428
14429
14430  windows_path="$new_path"
14431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14432    unix_path=`$CYGPATH -u "$windows_path"`
14433    new_path="$unix_path"
14434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14436    new_path="$unix_path"
14437  fi
14438
14439  if test "x$path" != "x$new_path"; then
14440    TOPDIR="$new_path"
14441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14442$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14443  fi
14444
14445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14447
14448    else
14449      # We're on a unix platform. Hooray! :)
14450      path="$TOPDIR"
14451      has_space=`$ECHO "$path" | $GREP " "`
14452      if test "x$has_space" != x; then
14453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14454$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14456      fi
14457
14458      # Use eval to expand a potential ~
14459      eval path="$path"
14460      if test ! -f "$path" && test ! -d "$path"; then
14461        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14462      fi
14463
14464      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14465    fi
14466  fi
14467
14468  # SRC_ROOT is a traditional alias for TOPDIR.
14469  SRC_ROOT=$TOPDIR
14470
14471  # Calculate a canonical version of TOPDIR for string comparisons
14472  CANONICAL_TOPDIR=$TOPDIR
14473
14474  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14475    # Follow a chain of symbolic links. Use readlink
14476    # where it exists, else fall back to horribly
14477    # complicated shell code.
14478    if test "x$READLINK_TESTED" != yes; then
14479      # On MacOSX there is a readlink tool with a different
14480      # purpose than the GNU readlink tool. Check the found readlink.
14481      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14482      if test "x$ISGNU" = x; then
14483        # A readlink that we do not know how to use.
14484        # Are there other non-GNU readlinks out there?
14485        READLINK_TESTED=yes
14486        READLINK=
14487      fi
14488    fi
14489
14490    if test "x$READLINK" != x; then
14491      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14492    else
14493      # Save the current directory for restoring afterwards
14494      STARTDIR=$PWD
14495      COUNTER=0
14496      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14497      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14498      cd $sym_link_dir
14499      # Use -P flag to resolve symlinks in directories.
14500      cd `$THEPWDCMD -P`
14501      sym_link_dir=`$THEPWDCMD -P`
14502      # Resolve file symlinks
14503      while test $COUNTER -lt 20; do
14504        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14505        if test "x$ISLINK" == x; then
14506          # This is not a symbolic link! We are done!
14507          break
14508        fi
14509        # Again resolve directory symlinks since the target of the just found
14510        # link could be in a different directory
14511        cd `$DIRNAME $ISLINK`
14512        sym_link_dir=`$THEPWDCMD -P`
14513        sym_link_file=`$BASENAME $ISLINK`
14514        let COUNTER=COUNTER+1
14515      done
14516      cd $STARTDIR
14517      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14518    fi
14519  fi
14520
14521
14522
14523  # Locate the directory of this script.
14524  AUTOCONF_DIR=$TOPDIR/common/autoconf
14525
14526
14527# Check if it's a pure open build or if custom sources are to be used.
14528
14529  # Check whether --enable-openjdk-only was given.
14530if test "${enable_openjdk_only+set}" = set; then :
14531  enableval=$enable_openjdk_only;
14532else
14533  enable_openjdk_only="no"
14534fi
14535
14536
14537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14538$as_echo_n "checking for presence of closed sources... " >&6; }
14539  if test -d "$SRC_ROOT/jdk/src/closed"; then
14540    CLOSED_SOURCE_PRESENT=yes
14541  else
14542    CLOSED_SOURCE_PRESENT=no
14543  fi
14544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14545$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14546
14547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14548$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14549  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14551$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14552
14553  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14554    OPENJDK=true
14555    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14556      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14557$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14558    fi
14559  else
14560    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14561      OPENJDK=true
14562    else
14563      OPENJDK=false
14564    fi
14565  fi
14566
14567  if test "x$OPENJDK" = "xtrue"; then
14568    SET_OPENJDK="OPENJDK=true"
14569  fi
14570
14571
14572
14573  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14574  # the IncludeCustomExtension macro.
14575
14576
14577# Check whether --with-custom-make-dir was given.
14578if test "${with_custom_make_dir+set}" = set; then :
14579  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
14580$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14581fi
14582
14583
14584
14585
14586# These are needed to be able to create a configuration name (and thus the output directory)
14587
14588  ###############################################################################
14589  #
14590  # Check which variant of the JDK that we want to build.
14591  # Currently we have:
14592  #    normal:   standard edition
14593  # but the custom make system may add other variants
14594  #
14595  # Effectively the JDK variant gives a name to a specific set of
14596  # modules to compile into the JDK. In the future, these modules
14597  # might even be Jigsaw modules.
14598  #
14599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14600$as_echo_n "checking which variant of the JDK to build... " >&6; }
14601
14602# Check whether --with-jdk-variant was given.
14603if test "${with_jdk_variant+set}" = set; then :
14604  withval=$with_jdk_variant;
14605fi
14606
14607
14608  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14609    JDK_VARIANT="normal"
14610  else
14611    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14612  fi
14613
14614
14615
14616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14617$as_echo "$JDK_VARIANT" >&6; }
14618
14619
14620###############################################################################
14621#
14622# Check which interpreter of the JVM we want to build.
14623# Currently we have:
14624#    template: Template interpreter (the default)
14625#    cpp     : C++ interpreter
14626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14627$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14628
14629# Check whether --with-jvm-interpreter was given.
14630if test "${with_jvm_interpreter+set}" = set; then :
14631  withval=$with_jvm_interpreter;
14632fi
14633
14634
14635if test "x$with_jvm_interpreter" = x; then
14636     with_jvm_interpreter="template"
14637fi
14638
14639JVM_INTERPRETER="$with_jvm_interpreter"
14640
14641if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14642   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14643fi
14644
14645
14646
14647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14648$as_echo "$with_jvm_interpreter" >&6; }
14649
14650
14651
14652  ###############################################################################
14653  #
14654  # Check which variants of the JVM that we want to build.
14655  # Currently we have:
14656  #    server: normal interpreter and a tiered C1/C2 compiler
14657  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14658  #    minimal1: reduced form of client with optional VM services and features stripped out
14659  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14660  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14661  #    zero: no machine code interpreter, no compiler
14662  #    zeroshark: zero interpreter and shark/llvm compiler backend
14663#    core: interpreter only, no compiler (only works on some platforms)
14664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14665$as_echo_n "checking which variants of the JVM to build... " >&6; }
14666
14667# Check whether --with-jvm-variants was given.
14668if test "${with_jvm_variants+set}" = set; then :
14669  withval=$with_jvm_variants;
14670fi
14671
14672
14673  if test "x$with_jvm_variants" = x; then
14674    with_jvm_variants="server"
14675  fi
14676
14677  JVM_VARIANTS=",$with_jvm_variants,"
14678  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,//'`
14679
14680  if test "x$TEST_VARIANTS" != "x,"; then
14681     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14682  fi
14683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14684$as_echo "$with_jvm_variants" >&6; }
14685
14686  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14687  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14688  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14689  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14690  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14691  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14692  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14693
14694  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14695    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14696      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14697    fi
14698  fi
14699  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14700    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14701      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14702    fi
14703  fi
14704  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14705    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14706      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14707    fi
14708  fi
14709
14710  # Replace the commas with AND for use in the build directory name.
14711  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14712  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/'`
14713  if test "x$COUNT_VARIANTS" != "x,1"; then
14714    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14715  else
14716    BUILDING_MULTIPLE_JVM_VARIANTS=no
14717  fi
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728  INCLUDE_SA=true
14729  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14730    INCLUDE_SA=false
14731  fi
14732  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14733    INCLUDE_SA=false
14734  fi
14735  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14736    INCLUDE_SA=false
14737  fi
14738  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14739    INCLUDE_SA=false
14740  fi
14741
14742
14743  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14744    MACOSX_UNIVERSAL="true"
14745  fi
14746
14747
14748
14749
14750  ###############################################################################
14751  #
14752  # Set the debug level
14753  #    release: no debug information, all optimizations, no asserts.
14754  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14755  #    fastdebug: debug information (-g), all optimizations, all asserts
14756  #    slowdebug: debug information (-g), no optimizations, all asserts
14757  #
14758  DEBUG_LEVEL="release"
14759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14760$as_echo_n "checking which debug level to use... " >&6; }
14761  # Check whether --enable-debug was given.
14762if test "${enable_debug+set}" = set; then :
14763  enableval=$enable_debug;
14764        ENABLE_DEBUG="${enableval}"
14765        DEBUG_LEVEL="fastdebug"
14766
14767else
14768  ENABLE_DEBUG="no"
14769fi
14770
14771
14772
14773# Check whether --with-debug-level was given.
14774if test "${with_debug_level+set}" = set; then :
14775  withval=$with_debug_level;
14776        DEBUG_LEVEL="${withval}"
14777        if test "x$ENABLE_DEBUG" = xyes; then
14778          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14779        fi
14780
14781fi
14782
14783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14784$as_echo "$DEBUG_LEVEL" >&6; }
14785
14786  if test "x$DEBUG_LEVEL" != xrelease && \
14787      test "x$DEBUG_LEVEL" != xoptimized && \
14788      test "x$DEBUG_LEVEL" != xfastdebug && \
14789      test "x$DEBUG_LEVEL" != xslowdebug; then
14790    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14791  fi
14792
14793
14794  ###############################################################################
14795  #
14796  # Setup legacy vars/targets and new vars to deal with different debug levels.
14797  #
14798
14799  case $DEBUG_LEVEL in
14800    release )
14801      VARIANT="OPT"
14802      FASTDEBUG="false"
14803      DEBUG_CLASSFILES="false"
14804      BUILD_VARIANT_RELEASE=""
14805      HOTSPOT_DEBUG_LEVEL="product"
14806      HOTSPOT_EXPORT="product"
14807      ;;
14808    fastdebug )
14809      VARIANT="DBG"
14810      FASTDEBUG="true"
14811      DEBUG_CLASSFILES="true"
14812      BUILD_VARIANT_RELEASE="-fastdebug"
14813      HOTSPOT_DEBUG_LEVEL="fastdebug"
14814      HOTSPOT_EXPORT="fastdebug"
14815      ;;
14816    slowdebug )
14817      VARIANT="DBG"
14818      FASTDEBUG="false"
14819      DEBUG_CLASSFILES="true"
14820      BUILD_VARIANT_RELEASE="-debug"
14821      HOTSPOT_DEBUG_LEVEL="debug"
14822      HOTSPOT_EXPORT="debug"
14823      ;;
14824    optimized )
14825      VARIANT="OPT"
14826      FASTDEBUG="false"
14827      DEBUG_CLASSFILES="false"
14828      BUILD_VARIANT_RELEASE="-optimized"
14829      HOTSPOT_DEBUG_LEVEL="optimized"
14830      HOTSPOT_EXPORT="optimized"
14831      ;;
14832  esac
14833
14834  # The debug level 'optimized' is a little special because it is currently only
14835  # applicable to the HotSpot build where it means to build a completely
14836  # optimized version of the VM without any debugging code (like for the
14837  # 'release' debug level which is called 'product' in the HotSpot build) but
14838  # with the exception that it can contain additional code which is otherwise
14839  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14840  # test new and/or experimental features which are not intended for customer
14841  # shipment. Because these new features need to be tested and benchmarked in
14842  # real world scenarios, we want to build the containing JDK at the 'release'
14843  # debug level.
14844  if test "x$DEBUG_LEVEL" = xoptimized; then
14845    DEBUG_LEVEL="release"
14846  fi
14847
14848  #####
14849  # Generate the legacy makefile targets for hotspot.
14850  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14851  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14852  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14853  # But until then ...
14854  HOTSPOT_TARGET=""
14855
14856  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14857    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14858  fi
14859
14860  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14861    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14862  fi
14863
14864  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14865    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14866  fi
14867
14868  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14869    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14870  fi
14871
14872  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14873    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14874  fi
14875
14876  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14877    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14878  fi
14879
14880  if test "x$JVM_VARIANT_CORE" = xtrue; then
14881    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14882  fi
14883
14884  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14885
14886  # On Macosx universal binaries are produced, but they only contain
14887  # 64 bit intel. This invalidates control of which jvms are built
14888  # from configure, but only server is valid anyway. Fix this
14889  # when hotspot makefiles are rewritten.
14890  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14891    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14892  fi
14893
14894  #####
14895
14896
14897
14898
14899
14900
14901
14902
14903# With basic setup done, call the custom early hook.
14904
14905
14906# Check if we have devkits, extra paths or sysroot set.
14907
14908
14909# Check whether --with-devkit was given.
14910if test "${with_devkit+set}" = set; then :
14911  withval=$with_devkit;
14912
14913  # Only process if variable expands to non-empty
14914
14915  if test "x$with_devkit" != x; then
14916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14917
14918  # Input might be given as Windows format, start by converting to
14919  # unix format.
14920  path="$with_devkit"
14921  new_path=`$CYGPATH -u "$path"`
14922
14923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14926  # "foo.exe" is OK but "foo" is an error.
14927  #
14928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14929  # It is also a way to make sure we got the proper file name for the real test later on.
14930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14931  if test "x$test_shortpath" = x; then
14932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14933$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14934    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14935  fi
14936
14937  # Call helper function which possibly converts this using DOS-style short mode.
14938  # If so, the updated path is stored in $new_path.
14939
14940  input_path="$new_path"
14941  # Check if we need to convert this using DOS-style short mode. If the path
14942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14943  # take no chances and rewrite it.
14944  # Note: m4 eats our [], so we need to use [ and ] instead.
14945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14946  if test "x$has_forbidden_chars" != x; then
14947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14951      # Going to short mode and back again did indeed matter. Since short mode is
14952      # case insensitive, let's make it lowercase to improve readability.
14953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14954      # Now convert it back to Unix-style (cygpath)
14955      input_path=`$CYGPATH -u "$shortmode_path"`
14956      new_path="$input_path"
14957    fi
14958  fi
14959
14960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14961  if test "x$test_cygdrive_prefix" = x; then
14962    # As a simple fix, exclude /usr/bin since it's not a real path.
14963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14965      # a path prefixed by /cygdrive for fixpath to work.
14966      new_path="$CYGWIN_ROOT_PATH$input_path"
14967    fi
14968  fi
14969
14970
14971  if test "x$path" != "x$new_path"; then
14972    with_devkit="$new_path"
14973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14974$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14975  fi
14976
14977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14978
14979  path="$with_devkit"
14980  has_colon=`$ECHO $path | $GREP ^.:`
14981  new_path="$path"
14982  if test "x$has_colon" = x; then
14983    # Not in mixed or Windows style, start by that.
14984    new_path=`cmd //c echo $path`
14985  fi
14986
14987
14988  input_path="$new_path"
14989  # Check if we need to convert this using DOS-style short mode. If the path
14990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14991  # take no chances and rewrite it.
14992  # Note: m4 eats our [], so we need to use [ and ] instead.
14993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14994  if test "x$has_forbidden_chars" != x; then
14995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14997  fi
14998
14999
15000  windows_path="$new_path"
15001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15002    unix_path=`$CYGPATH -u "$windows_path"`
15003    new_path="$unix_path"
15004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15006    new_path="$unix_path"
15007  fi
15008
15009  if test "x$path" != "x$new_path"; then
15010    with_devkit="$new_path"
15011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15012$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15013  fi
15014
15015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15017
15018    else
15019      # We're on a unix platform. Hooray! :)
15020      path="$with_devkit"
15021      has_space=`$ECHO "$path" | $GREP " "`
15022      if test "x$has_space" != x; then
15023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15024$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15026      fi
15027
15028      # Use eval to expand a potential ~
15029      eval path="$path"
15030      if test ! -f "$path" && test ! -d "$path"; then
15031        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15032      fi
15033
15034      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15035    fi
15036  fi
15037
15038        DEVKIT_ROOT="$with_devkit"
15039        # Check for a meta data info file in the root of the devkit
15040        if test -f "$DEVKIT_ROOT/devkit.info"; then
15041          . $DEVKIT_ROOT/devkit.info
15042          # This potentially sets the following:
15043          # A descriptive name of the devkit
15044
15045  if test "x$DEVKIT_NAME" = x; then
15046    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15047  fi
15048
15049          # Corresponds to --with-extra-path
15050
15051  if test "x$DEVKIT_EXTRA_PATH" = x; then
15052    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15053  fi
15054
15055          # Corresponds to --with-toolchain-path
15056
15057  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15058    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15059  fi
15060
15061          # Corresponds to --with-sysroot
15062
15063  if test "x$DEVKIT_SYSROOT" = x; then
15064    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15065  fi
15066
15067
15068          # Identifies the Visual Studio version in the devkit
15069
15070  if test "x$DEVKIT_VS_VERSION" = x; then
15071    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15072  fi
15073
15074          # The Visual Studio include environment variable
15075
15076  if test "x$DEVKIT_VS_INCLUDE" = x; then
15077    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15078  fi
15079
15080          # The Visual Studio lib environment variable
15081
15082  if test "x$DEVKIT_VS_LIB" = x; then
15083    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15084  fi
15085
15086          # Corresponds to --with-msvcr-dll
15087
15088  if test "x$DEVKIT_MSVCR_DLL" = x; then
15089    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15090  fi
15091
15092          # Corresponds to --with-msvcp-dll
15093
15094  if test "x$DEVKIT_MSVCP_DLL" = x; then
15095    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15096  fi
15097
15098        fi
15099
15100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15101$as_echo_n "checking for devkit... " >&6; }
15102        if test "x$DEVKIT_NAME" != x; then
15103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15104$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15105        else
15106          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15107$as_echo "$DEVKIT_ROOT" >&6; }
15108        fi
15109
15110
15111  if test "x$DEVKIT_EXTRA_PATH" != x; then
15112    if test "x$EXTRA_PATH" = x; then
15113      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15114    else
15115      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15116    fi
15117  fi
15118
15119
15120        # Fallback default of just /bin if DEVKIT_PATH is not defined
15121        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15122          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15123        fi
15124
15125  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15126    if test "x$TOOLCHAIN_PATH" = x; then
15127      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15128    else
15129      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15130    fi
15131  fi
15132
15133
15134        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15135        # places for backwards compatiblity.
15136        if test "x$DEVKIT_SYSROOT" != x; then
15137          SYSROOT="$DEVKIT_SYSROOT"
15138        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15139          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15140        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15141          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15142        fi
15143
15144
15145fi
15146
15147
15148  # You can force the sysroot if the sysroot encoded into the compiler tools
15149  # is not correct.
15150
15151# Check whether --with-sys-root was given.
15152if test "${with_sys_root+set}" = set; then :
15153  withval=$with_sys_root; SYSROOT=$with_sys_root
15154
15155fi
15156
15157
15158
15159# Check whether --with-sysroot was given.
15160if test "${with_sysroot+set}" = set; then :
15161  withval=$with_sysroot; SYSROOT=$with_sysroot
15162
15163fi
15164
15165
15166
15167# Check whether --with-tools-dir was given.
15168if test "${with_tools_dir+set}" = set; then :
15169  withval=$with_tools_dir;
15170  if test "x$with_tools_dir" != x; then
15171    if test "x$TOOLCHAIN_PATH" = x; then
15172      TOOLCHAIN_PATH="$with_tools_dir"
15173    else
15174      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15175    fi
15176  fi
15177
15178
15179fi
15180
15181
15182
15183# Check whether --with-toolchain-path was given.
15184if test "${with_toolchain_path+set}" = set; then :
15185  withval=$with_toolchain_path;
15186  if test "x$with_toolchain_path" != x; then
15187    if test "x$TOOLCHAIN_PATH" = x; then
15188      TOOLCHAIN_PATH="$with_toolchain_path"
15189    else
15190      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15191    fi
15192  fi
15193
15194
15195fi
15196
15197
15198
15199# Check whether --with-extra-path was given.
15200if test "${with_extra_path+set}" = set; then :
15201  withval=$with_extra_path;
15202  if test "x$with_extra_path" != x; then
15203    if test "x$EXTRA_PATH" = x; then
15204      EXTRA_PATH="$with_extra_path"
15205    else
15206      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15207    fi
15208  fi
15209
15210
15211fi
15212
15213
15214  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15215    # detect if Xcode is installed by running xcodebuild -version
15216    # if no Xcode installed, xcodebuild exits with 1
15217    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15218    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15219      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15220      # fall back on the stub binary in /usr/bin/xcodebuild
15221      # Extract the first word of "xcodebuild", so it can be a program name with args.
15222set dummy xcodebuild; ac_word=$2
15223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15224$as_echo_n "checking for $ac_word... " >&6; }
15225if ${ac_cv_path_XCODEBUILD+:} false; then :
15226  $as_echo_n "(cached) " >&6
15227else
15228  case $XCODEBUILD in
15229  [\\/]* | ?:[\\/]*)
15230  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15231  ;;
15232  *)
15233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15234for as_dir in $TOOLCHAIN_PATH
15235do
15236  IFS=$as_save_IFS
15237  test -z "$as_dir" && as_dir=.
15238    for ac_exec_ext in '' $ac_executable_extensions; do
15239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15240    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15242    break 2
15243  fi
15244done
15245  done
15246IFS=$as_save_IFS
15247
15248  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15249  ;;
15250esac
15251fi
15252XCODEBUILD=$ac_cv_path_XCODEBUILD
15253if test -n "$XCODEBUILD"; then
15254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15255$as_echo "$XCODEBUILD" >&6; }
15256else
15257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15258$as_echo "no" >&6; }
15259fi
15260
15261
15262    else
15263      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15264      # when only the command line tools are installed there are no SDKs, so headers
15265      # are copied into the system frameworks
15266      XCODEBUILD=
15267
15268    fi
15269
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15271$as_echo_n "checking for sdk name... " >&6; }
15272
15273# Check whether --with-sdk-name was given.
15274if test "${with_sdk_name+set}" = set; then :
15275  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15276
15277fi
15278
15279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15280$as_echo "$SDKNAME" >&6; }
15281
15282    # if toolchain path is specified then don't rely on system headers, they may not compile
15283    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15284    test -z "$TOOLCHAIN_PATH" && \
15285      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15286
15287    if test -z "$SYSROOT"; then
15288      if test -n "$XCODEBUILD"; then
15289        # if we don't have system headers, use default SDK name (last resort)
15290        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15291          SDKNAME=${SDKNAME:-macosx}
15292        fi
15293
15294        if test -n "$SDKNAME"; then
15295          # Call xcodebuild to determine SYSROOT
15296          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15297        fi
15298      else
15299        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15300          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
15301        fi
15302      fi
15303    else
15304      # warn user if --with-sdk-name was also set
15305      if test -n "$with_sdk_name"; then
15306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15307$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15308      fi
15309    fi
15310
15311    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15312      # If no system framework headers, then SYSROOT must be set, or we won't build
15313      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
15314    fi
15315
15316    # Perform a basic sanity test
15317    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15318      if test -z "$SYSROOT"; then
15319        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
15320      else
15321        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15322      fi
15323    fi
15324
15325    # set SDKROOT too, Xcode tools will pick it up
15326    SDKROOT=$SYSROOT
15327
15328  fi
15329
15330  # Prepend the extra path to the global path
15331
15332  if test "x$EXTRA_PATH" != x; then
15333    if test "x$PATH" = x; then
15334      PATH="$EXTRA_PATH"
15335    else
15336      PATH="$EXTRA_PATH:$PATH"
15337    fi
15338  fi
15339
15340
15341  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15342    # Add extra search paths on solaris for utilities like ar and as etc...
15343    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15344  fi
15345
15346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15347$as_echo_n "checking for sysroot... " >&6; }
15348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15349$as_echo "$SYSROOT" >&6; }
15350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15351$as_echo_n "checking for toolchain path... " >&6; }
15352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15353$as_echo "$TOOLCHAIN_PATH" >&6; }
15354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15355$as_echo_n "checking for extra path... " >&6; }
15356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15357$as_echo "$EXTRA_PATH" >&6; }
15358
15359
15360# To properly create a configuration name, we need to have the OpenJDK target
15361# and options (variants and debug level) parsed.
15362
15363
15364
15365# Check whether --with-conf-name was given.
15366if test "${with_conf_name+set}" = set; then :
15367  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15368fi
15369
15370
15371  # Test from where we are running configure, in or outside of src root.
15372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15373$as_echo_n "checking where to store configuration... " >&6; }
15374  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15375      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15376      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15377    # We are running configure from the src root.
15378    # Create a default ./build/target-variant-debuglevel output root.
15379    if test "x${CONF_NAME}" = x; then
15380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15381$as_echo "in default location" >&6; }
15382      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15383    else
15384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15385$as_echo "in build directory with custom name" >&6; }
15386    fi
15387    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15388    $MKDIR -p "$OUTPUT_ROOT"
15389    if test ! -d "$OUTPUT_ROOT"; then
15390      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15391    fi
15392  else
15393    # We are running configure from outside of the src dir.
15394    # Then use the current directory as output dir!
15395    # If configuration is situated in normal build directory, just use the build
15396    # directory name as configuration name, otherwise use the complete path.
15397    if test "x${CONF_NAME}" = x; then
15398      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15399    fi
15400    OUTPUT_ROOT="$CURDIR"
15401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15402$as_echo "in current directory" >&6; }
15403
15404    # WARNING: This might be a bad thing to do. You need to be sure you want to
15405    # have a configuration in this directory. Do some sanity checks!
15406
15407    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15408      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15409      # other files
15410      files_present=`$LS $OUTPUT_ROOT`
15411      # Configure has already touched config.log and confdefs.h in the current dir when this check
15412      # is performed.
15413      filtered_files=`$ECHO "$files_present" \
15414          | $SED -e 's/config.log//g' \
15415              -e 's/configure.log//g' \
15416              -e 's/confdefs.h//g' \
15417              -e 's/ //g' \
15418          | $TR -d '\n'`
15419      if test "x$filtered_files" != x; then
15420        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15421$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15422        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15423$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15424        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15425$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15426        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15427$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15428        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15429$as_echo "$as_me: seriously mess up just about everything." >&6;}
15430        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15431$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15432        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15433$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15434        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15435      fi
15436    fi
15437  fi
15438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15439$as_echo_n "checking what configuration name to use... " >&6; }
15440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15441$as_echo "$CONF_NAME" >&6; }
15442
15443
15444  # Only process if variable expands to non-empty
15445
15446  if test "x$OUTPUT_ROOT" != x; then
15447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15448
15449  # Input might be given as Windows format, start by converting to
15450  # unix format.
15451  path="$OUTPUT_ROOT"
15452  new_path=`$CYGPATH -u "$path"`
15453
15454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15457  # "foo.exe" is OK but "foo" is an error.
15458  #
15459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15460  # It is also a way to make sure we got the proper file name for the real test later on.
15461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15462  if test "x$test_shortpath" = x; then
15463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15464$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15465    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15466  fi
15467
15468  # Call helper function which possibly converts this using DOS-style short mode.
15469  # If so, the updated path is stored in $new_path.
15470
15471  input_path="$new_path"
15472  # Check if we need to convert this using DOS-style short mode. If the path
15473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15474  # take no chances and rewrite it.
15475  # Note: m4 eats our [], so we need to use [ and ] instead.
15476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15477  if test "x$has_forbidden_chars" != x; then
15478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15482      # Going to short mode and back again did indeed matter. Since short mode is
15483      # case insensitive, let's make it lowercase to improve readability.
15484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15485      # Now convert it back to Unix-style (cygpath)
15486      input_path=`$CYGPATH -u "$shortmode_path"`
15487      new_path="$input_path"
15488    fi
15489  fi
15490
15491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15492  if test "x$test_cygdrive_prefix" = x; then
15493    # As a simple fix, exclude /usr/bin since it's not a real path.
15494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15496      # a path prefixed by /cygdrive for fixpath to work.
15497      new_path="$CYGWIN_ROOT_PATH$input_path"
15498    fi
15499  fi
15500
15501
15502  if test "x$path" != "x$new_path"; then
15503    OUTPUT_ROOT="$new_path"
15504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15505$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15506  fi
15507
15508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15509
15510  path="$OUTPUT_ROOT"
15511  has_colon=`$ECHO $path | $GREP ^.:`
15512  new_path="$path"
15513  if test "x$has_colon" = x; then
15514    # Not in mixed or Windows style, start by that.
15515    new_path=`cmd //c echo $path`
15516  fi
15517
15518
15519  input_path="$new_path"
15520  # Check if we need to convert this using DOS-style short mode. If the path
15521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15522  # take no chances and rewrite it.
15523  # Note: m4 eats our [], so we need to use [ and ] instead.
15524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15525  if test "x$has_forbidden_chars" != x; then
15526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15528  fi
15529
15530
15531  windows_path="$new_path"
15532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15533    unix_path=`$CYGPATH -u "$windows_path"`
15534    new_path="$unix_path"
15535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15537    new_path="$unix_path"
15538  fi
15539
15540  if test "x$path" != "x$new_path"; then
15541    OUTPUT_ROOT="$new_path"
15542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15543$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15544  fi
15545
15546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15548
15549    else
15550      # We're on a unix platform. Hooray! :)
15551      path="$OUTPUT_ROOT"
15552      has_space=`$ECHO "$path" | $GREP " "`
15553      if test "x$has_space" != x; then
15554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15555$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15557      fi
15558
15559      # Use eval to expand a potential ~
15560      eval path="$path"
15561      if test ! -f "$path" && test ! -d "$path"; then
15562        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15563      fi
15564
15565      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15566    fi
15567  fi
15568
15569
15570  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15571  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15572
15573  SPEC=$OUTPUT_ROOT/spec.gmk
15574
15575  CONF_NAME=$CONF_NAME
15576
15577  OUTPUT_ROOT=$OUTPUT_ROOT
15578
15579
15580
15581  # The spec.gmk file contains all variables for the make system.
15582  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15583
15584  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15585  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15586
15587  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15588  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15589
15590  # The compare.sh is used to compare the build output to other builds.
15591  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15592
15593  # The generated Makefile knows where the spec.gmk is and where the source is.
15594  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15595  # which will look for generated configurations
15596  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15597
15598
15599
15600# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15601
15602  for ac_prog in apt-get yum port pkgutil pkgadd
15603do
15604  # Extract the first word of "$ac_prog", so it can be a program name with args.
15605set dummy $ac_prog; ac_word=$2
15606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15607$as_echo_n "checking for $ac_word... " >&6; }
15608if ${ac_cv_prog_PKGHANDLER+:} false; then :
15609  $as_echo_n "(cached) " >&6
15610else
15611  if test -n "$PKGHANDLER"; then
15612  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15613else
15614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15615for as_dir in $PATH
15616do
15617  IFS=$as_save_IFS
15618  test -z "$as_dir" && as_dir=.
15619    for ac_exec_ext in '' $ac_executable_extensions; do
15620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15621    ac_cv_prog_PKGHANDLER="$ac_prog"
15622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15623    break 2
15624  fi
15625done
15626  done
15627IFS=$as_save_IFS
15628
15629fi
15630fi
15631PKGHANDLER=$ac_cv_prog_PKGHANDLER
15632if test -n "$PKGHANDLER"; then
15633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15634$as_echo "$PKGHANDLER" >&6; }
15635else
15636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15637$as_echo "no" >&6; }
15638fi
15639
15640
15641  test -n "$PKGHANDLER" && break
15642done
15643
15644
15645
15646# Setup tools that requires more complex handling, or that is not needed by the configure script.
15647
15648
15649  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15650  if test "x$MAKE" != x; then
15651    # User has supplied a make, test it.
15652    if test ! -f "$MAKE"; then
15653      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15654    fi
15655
15656  MAKE_CANDIDATE=""$MAKE""
15657  DESCRIPTION="user supplied MAKE=$MAKE"
15658
15659  # On Cygwin, we require a newer version of make than on other platforms
15660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15661    MAKE_VERSION_EXPR="-e 4\."
15662    MAKE_REQUIRED_VERSION="4.0"
15663   else
15664    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15665    MAKE_REQUIRED_VERSION="3.81"
15666  fi
15667
15668  if test "x$MAKE_CANDIDATE" != x; then
15669    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15670$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15671    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15672    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15673    if test "x$IS_GNU_MAKE" = x; then
15674      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15675$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15676    else
15677      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15678      if test "x$IS_MODERN_MAKE" = x; then
15679        { $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
15680$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;}
15681      else
15682        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15683          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15684            MAKE_EXPECTED_ENV='cygwin'
15685          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15686            MAKE_EXPECTED_ENV='msys'
15687          else
15688            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15689          fi
15690          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15691          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15692        else
15693          # Not relevant for non-Windows
15694          IS_MAKE_CORRECT_ENV=true
15695        fi
15696        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15697          { $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
15698$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;}
15699        else
15700          FOUND_MAKE=$MAKE_CANDIDATE
15701
15702  # Only process if variable expands to non-empty
15703
15704  if test "x$FOUND_MAKE" != x; then
15705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15706
15707  # First separate the path from the arguments. This will split at the first
15708  # space.
15709  complete="$FOUND_MAKE"
15710  path="${complete%% *}"
15711  tmp="$complete EOL"
15712  arguments="${tmp#* }"
15713
15714  # Input might be given as Windows format, start by converting to
15715  # unix format.
15716  new_path=`$CYGPATH -u "$path"`
15717
15718  # Now try to locate executable using which
15719  new_path=`$WHICH "$new_path" 2> /dev/null`
15720  # bat and cmd files are not always considered executable in cygwin causing which
15721  # to not find them
15722  if test "x$new_path" = x \
15723      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15724      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15725    new_path=`$CYGPATH -u "$path"`
15726  fi
15727  if test "x$new_path" = x; then
15728    # Oops. Which didn't find the executable.
15729    # The splitting of arguments from the executable at a space might have been incorrect,
15730    # since paths with space are more likely in Windows. Give it another try with the whole
15731    # argument.
15732    path="$complete"
15733    arguments="EOL"
15734    new_path=`$CYGPATH -u "$path"`
15735    new_path=`$WHICH "$new_path" 2> /dev/null`
15736    # bat and cmd files are not always considered executable in cygwin causing which
15737    # to not find them
15738    if test "x$new_path" = x \
15739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15741      new_path=`$CYGPATH -u "$path"`
15742    fi
15743    if test "x$new_path" = x; then
15744      # It's still not found. Now this is an unrecoverable error.
15745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15746$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15747      has_space=`$ECHO "$complete" | $GREP " "`
15748      if test "x$has_space" != x; then
15749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15751      fi
15752      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15753    fi
15754  fi
15755
15756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15759  # "foo.exe" is OK but "foo" is an error.
15760  #
15761  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15762  # It is also a way to make sure we got the proper file name for the real test later on.
15763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15764  if test "x$test_shortpath" = x; then
15765    # Short path failed, file does not exist as specified.
15766    # Try adding .exe or .cmd
15767    if test -f "${new_path}.exe"; then
15768      input_to_shortpath="${new_path}.exe"
15769    elif test -f "${new_path}.cmd"; then
15770      input_to_shortpath="${new_path}.cmd"
15771    else
15772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15773$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15775$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15776      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15777    fi
15778  else
15779    input_to_shortpath="$new_path"
15780  fi
15781
15782  # Call helper function which possibly converts this using DOS-style short mode.
15783  # If so, the updated path is stored in $new_path.
15784  new_path="$input_to_shortpath"
15785
15786  input_path="$input_to_shortpath"
15787  # Check if we need to convert this using DOS-style short mode. If the path
15788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15789  # take no chances and rewrite it.
15790  # Note: m4 eats our [], so we need to use [ and ] instead.
15791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15792  if test "x$has_forbidden_chars" != x; then
15793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15797      # Going to short mode and back again did indeed matter. Since short mode is
15798      # case insensitive, let's make it lowercase to improve readability.
15799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15800      # Now convert it back to Unix-style (cygpath)
15801      input_path=`$CYGPATH -u "$shortmode_path"`
15802      new_path="$input_path"
15803    fi
15804  fi
15805
15806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15807  if test "x$test_cygdrive_prefix" = x; then
15808    # As a simple fix, exclude /usr/bin since it's not a real path.
15809    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15811      # a path prefixed by /cygdrive for fixpath to work.
15812      new_path="$CYGWIN_ROOT_PATH$input_path"
15813    fi
15814  fi
15815
15816  # remove trailing .exe if any
15817  new_path="${new_path/%.exe/}"
15818
15819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15820
15821  # First separate the path from the arguments. This will split at the first
15822  # space.
15823  complete="$FOUND_MAKE"
15824  path="${complete%% *}"
15825  tmp="$complete EOL"
15826  arguments="${tmp#* }"
15827
15828  # Input might be given as Windows format, start by converting to
15829  # unix format.
15830  new_path="$path"
15831
15832  windows_path="$new_path"
15833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15834    unix_path=`$CYGPATH -u "$windows_path"`
15835    new_path="$unix_path"
15836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15838    new_path="$unix_path"
15839  fi
15840
15841
15842  # Now try to locate executable using which
15843  new_path=`$WHICH "$new_path" 2> /dev/null`
15844
15845  if test "x$new_path" = x; then
15846    # Oops. Which didn't find the executable.
15847    # The splitting of arguments from the executable at a space might have been incorrect,
15848    # since paths with space are more likely in Windows. Give it another try with the whole
15849    # argument.
15850    path="$complete"
15851    arguments="EOL"
15852    new_path="$path"
15853
15854  windows_path="$new_path"
15855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15856    unix_path=`$CYGPATH -u "$windows_path"`
15857    new_path="$unix_path"
15858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15860    new_path="$unix_path"
15861  fi
15862
15863
15864    new_path=`$WHICH "$new_path" 2> /dev/null`
15865    # bat and cmd files are not always considered executable in MSYS causing which
15866    # to not find them
15867    if test "x$new_path" = x \
15868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15870      new_path="$path"
15871
15872  windows_path="$new_path"
15873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15874    unix_path=`$CYGPATH -u "$windows_path"`
15875    new_path="$unix_path"
15876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15878    new_path="$unix_path"
15879  fi
15880
15881    fi
15882
15883    if test "x$new_path" = x; then
15884      # It's still not found. Now this is an unrecoverable error.
15885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15887      has_space=`$ECHO "$complete" | $GREP " "`
15888      if test "x$has_space" != x; then
15889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15891      fi
15892      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15893    fi
15894  fi
15895
15896  # Now new_path has a complete unix path to the binary
15897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15898    # Keep paths in /bin as-is, but remove trailing .exe if any
15899    new_path="${new_path/%.exe/}"
15900    # Do not save /bin paths to all_fixpath_prefixes!
15901  else
15902    # Not in mixed or Windows style, start by that.
15903    new_path=`cmd //c echo $new_path`
15904
15905  input_path="$new_path"
15906  # Check if we need to convert this using DOS-style short mode. If the path
15907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15908  # take no chances and rewrite it.
15909  # Note: m4 eats our [], so we need to use [ and ] instead.
15910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15911  if test "x$has_forbidden_chars" != x; then
15912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15914  fi
15915
15916    # Output is in $new_path
15917
15918  windows_path="$new_path"
15919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15920    unix_path=`$CYGPATH -u "$windows_path"`
15921    new_path="$unix_path"
15922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15924    new_path="$unix_path"
15925  fi
15926
15927    # remove trailing .exe if any
15928    new_path="${new_path/%.exe/}"
15929
15930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15932  fi
15933
15934    else
15935      # We're on a unix platform. Hooray! :)
15936      # First separate the path from the arguments. This will split at the first
15937      # space.
15938      complete="$FOUND_MAKE"
15939      path="${complete%% *}"
15940      tmp="$complete EOL"
15941      arguments="${tmp#* }"
15942
15943      # Cannot rely on the command "which" here since it doesn't always work.
15944      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15945      if test -z "$is_absolute_path"; then
15946        # Path to executable is not absolute. Find it.
15947        IFS_save="$IFS"
15948        IFS=:
15949        for p in $PATH; do
15950          if test -f "$p/$path" && test -x "$p/$path"; then
15951            new_path="$p/$path"
15952            break
15953          fi
15954        done
15955        IFS="$IFS_save"
15956      else
15957        # This is an absolute path, we can use it without further modifications.
15958        new_path="$path"
15959      fi
15960
15961      if test "x$new_path" = x; then
15962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15964        has_space=`$ECHO "$complete" | $GREP " "`
15965        if test "x$has_space" != x; then
15966          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15967$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15968        fi
15969        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15970      fi
15971    fi
15972
15973    # Now join together the path and the arguments once again
15974    if test "x$arguments" != xEOL; then
15975      new_complete="$new_path ${arguments% *}"
15976    else
15977      new_complete="$new_path"
15978    fi
15979
15980    if test "x$complete" != "x$new_complete"; then
15981      FOUND_MAKE="$new_complete"
15982      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15983$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15984    fi
15985  fi
15986
15987        fi
15988      fi
15989    fi
15990  fi
15991
15992    if test "x$FOUND_MAKE" = x; then
15993      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15994    fi
15995  else
15996    # Try our hardest to locate a correct version of GNU make
15997    for ac_prog in gmake
15998do
15999  # Extract the first word of "$ac_prog", so it can be a program name with args.
16000set dummy $ac_prog; ac_word=$2
16001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16002$as_echo_n "checking for $ac_word... " >&6; }
16003if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16004  $as_echo_n "(cached) " >&6
16005else
16006  case $CHECK_GMAKE in
16007  [\\/]* | ?:[\\/]*)
16008  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16009  ;;
16010  *)
16011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16012for as_dir in $PATH
16013do
16014  IFS=$as_save_IFS
16015  test -z "$as_dir" && as_dir=.
16016    for ac_exec_ext in '' $ac_executable_extensions; do
16017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16018    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16020    break 2
16021  fi
16022done
16023  done
16024IFS=$as_save_IFS
16025
16026  ;;
16027esac
16028fi
16029CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16030if test -n "$CHECK_GMAKE"; then
16031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16032$as_echo "$CHECK_GMAKE" >&6; }
16033else
16034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16035$as_echo "no" >&6; }
16036fi
16037
16038
16039  test -n "$CHECK_GMAKE" && break
16040done
16041
16042
16043  MAKE_CANDIDATE=""$CHECK_GMAKE""
16044  DESCRIPTION="gmake in PATH"
16045
16046  # On Cygwin, we require a newer version of make than on other platforms
16047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16048    MAKE_VERSION_EXPR="-e 4\."
16049    MAKE_REQUIRED_VERSION="4.0"
16050   else
16051    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16052    MAKE_REQUIRED_VERSION="3.81"
16053  fi
16054
16055  if test "x$MAKE_CANDIDATE" != x; then
16056    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16057$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16058    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16059    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16060    if test "x$IS_GNU_MAKE" = x; then
16061      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16062$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16063    else
16064      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16065      if test "x$IS_MODERN_MAKE" = x; then
16066        { $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
16067$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;}
16068      else
16069        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16070          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16071            MAKE_EXPECTED_ENV='cygwin'
16072          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16073            MAKE_EXPECTED_ENV='msys'
16074          else
16075            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16076          fi
16077          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16078          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16079        else
16080          # Not relevant for non-Windows
16081          IS_MAKE_CORRECT_ENV=true
16082        fi
16083        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16084          { $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
16085$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;}
16086        else
16087          FOUND_MAKE=$MAKE_CANDIDATE
16088
16089  # Only process if variable expands to non-empty
16090
16091  if test "x$FOUND_MAKE" != x; then
16092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16093
16094  # First separate the path from the arguments. This will split at the first
16095  # space.
16096  complete="$FOUND_MAKE"
16097  path="${complete%% *}"
16098  tmp="$complete EOL"
16099  arguments="${tmp#* }"
16100
16101  # Input might be given as Windows format, start by converting to
16102  # unix format.
16103  new_path=`$CYGPATH -u "$path"`
16104
16105  # Now try to locate executable using which
16106  new_path=`$WHICH "$new_path" 2> /dev/null`
16107  # bat and cmd files are not always considered executable in cygwin causing which
16108  # to not find them
16109  if test "x$new_path" = x \
16110      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16111      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16112    new_path=`$CYGPATH -u "$path"`
16113  fi
16114  if test "x$new_path" = x; then
16115    # Oops. Which didn't find the executable.
16116    # The splitting of arguments from the executable at a space might have been incorrect,
16117    # since paths with space are more likely in Windows. Give it another try with the whole
16118    # argument.
16119    path="$complete"
16120    arguments="EOL"
16121    new_path=`$CYGPATH -u "$path"`
16122    new_path=`$WHICH "$new_path" 2> /dev/null`
16123    # bat and cmd files are not always considered executable in cygwin causing which
16124    # to not find them
16125    if test "x$new_path" = x \
16126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16128      new_path=`$CYGPATH -u "$path"`
16129    fi
16130    if test "x$new_path" = x; then
16131      # It's still not found. Now this is an unrecoverable error.
16132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16133$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16134      has_space=`$ECHO "$complete" | $GREP " "`
16135      if test "x$has_space" != x; then
16136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16138      fi
16139      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16140    fi
16141  fi
16142
16143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16146  # "foo.exe" is OK but "foo" is an error.
16147  #
16148  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16149  # It is also a way to make sure we got the proper file name for the real test later on.
16150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16151  if test "x$test_shortpath" = x; then
16152    # Short path failed, file does not exist as specified.
16153    # Try adding .exe or .cmd
16154    if test -f "${new_path}.exe"; then
16155      input_to_shortpath="${new_path}.exe"
16156    elif test -f "${new_path}.cmd"; then
16157      input_to_shortpath="${new_path}.cmd"
16158    else
16159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16160$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16163      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16164    fi
16165  else
16166    input_to_shortpath="$new_path"
16167  fi
16168
16169  # Call helper function which possibly converts this using DOS-style short mode.
16170  # If so, the updated path is stored in $new_path.
16171  new_path="$input_to_shortpath"
16172
16173  input_path="$input_to_shortpath"
16174  # Check if we need to convert this using DOS-style short mode. If the path
16175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16176  # take no chances and rewrite it.
16177  # Note: m4 eats our [], so we need to use [ and ] instead.
16178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16179  if test "x$has_forbidden_chars" != x; then
16180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16184      # Going to short mode and back again did indeed matter. Since short mode is
16185      # case insensitive, let's make it lowercase to improve readability.
16186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16187      # Now convert it back to Unix-style (cygpath)
16188      input_path=`$CYGPATH -u "$shortmode_path"`
16189      new_path="$input_path"
16190    fi
16191  fi
16192
16193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16194  if test "x$test_cygdrive_prefix" = x; then
16195    # As a simple fix, exclude /usr/bin since it's not a real path.
16196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16198      # a path prefixed by /cygdrive for fixpath to work.
16199      new_path="$CYGWIN_ROOT_PATH$input_path"
16200    fi
16201  fi
16202
16203  # remove trailing .exe if any
16204  new_path="${new_path/%.exe/}"
16205
16206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16207
16208  # First separate the path from the arguments. This will split at the first
16209  # space.
16210  complete="$FOUND_MAKE"
16211  path="${complete%% *}"
16212  tmp="$complete EOL"
16213  arguments="${tmp#* }"
16214
16215  # Input might be given as Windows format, start by converting to
16216  # unix format.
16217  new_path="$path"
16218
16219  windows_path="$new_path"
16220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16221    unix_path=`$CYGPATH -u "$windows_path"`
16222    new_path="$unix_path"
16223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16225    new_path="$unix_path"
16226  fi
16227
16228
16229  # Now try to locate executable using which
16230  new_path=`$WHICH "$new_path" 2> /dev/null`
16231
16232  if test "x$new_path" = x; then
16233    # Oops. Which didn't find the executable.
16234    # The splitting of arguments from the executable at a space might have been incorrect,
16235    # since paths with space are more likely in Windows. Give it another try with the whole
16236    # argument.
16237    path="$complete"
16238    arguments="EOL"
16239    new_path="$path"
16240
16241  windows_path="$new_path"
16242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16243    unix_path=`$CYGPATH -u "$windows_path"`
16244    new_path="$unix_path"
16245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16247    new_path="$unix_path"
16248  fi
16249
16250
16251    new_path=`$WHICH "$new_path" 2> /dev/null`
16252    # bat and cmd files are not always considered executable in MSYS causing which
16253    # to not find them
16254    if test "x$new_path" = x \
16255        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16256        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16257      new_path="$path"
16258
16259  windows_path="$new_path"
16260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16261    unix_path=`$CYGPATH -u "$windows_path"`
16262    new_path="$unix_path"
16263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16265    new_path="$unix_path"
16266  fi
16267
16268    fi
16269
16270    if test "x$new_path" = x; then
16271      # It's still not found. Now this is an unrecoverable error.
16272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16273$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16274      has_space=`$ECHO "$complete" | $GREP " "`
16275      if test "x$has_space" != x; then
16276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16278      fi
16279      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16280    fi
16281  fi
16282
16283  # Now new_path has a complete unix path to the binary
16284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16285    # Keep paths in /bin as-is, but remove trailing .exe if any
16286    new_path="${new_path/%.exe/}"
16287    # Do not save /bin paths to all_fixpath_prefixes!
16288  else
16289    # Not in mixed or Windows style, start by that.
16290    new_path=`cmd //c echo $new_path`
16291
16292  input_path="$new_path"
16293  # Check if we need to convert this using DOS-style short mode. If the path
16294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16295  # take no chances and rewrite it.
16296  # Note: m4 eats our [], so we need to use [ and ] instead.
16297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16298  if test "x$has_forbidden_chars" != x; then
16299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16301  fi
16302
16303    # Output is in $new_path
16304
16305  windows_path="$new_path"
16306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16307    unix_path=`$CYGPATH -u "$windows_path"`
16308    new_path="$unix_path"
16309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16311    new_path="$unix_path"
16312  fi
16313
16314    # remove trailing .exe if any
16315    new_path="${new_path/%.exe/}"
16316
16317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16319  fi
16320
16321    else
16322      # We're on a unix platform. Hooray! :)
16323      # First separate the path from the arguments. This will split at the first
16324      # space.
16325      complete="$FOUND_MAKE"
16326      path="${complete%% *}"
16327      tmp="$complete EOL"
16328      arguments="${tmp#* }"
16329
16330      # Cannot rely on the command "which" here since it doesn't always work.
16331      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16332      if test -z "$is_absolute_path"; then
16333        # Path to executable is not absolute. Find it.
16334        IFS_save="$IFS"
16335        IFS=:
16336        for p in $PATH; do
16337          if test -f "$p/$path" && test -x "$p/$path"; then
16338            new_path="$p/$path"
16339            break
16340          fi
16341        done
16342        IFS="$IFS_save"
16343      else
16344        # This is an absolute path, we can use it without further modifications.
16345        new_path="$path"
16346      fi
16347
16348      if test "x$new_path" = x; then
16349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16350$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16351        has_space=`$ECHO "$complete" | $GREP " "`
16352        if test "x$has_space" != x; then
16353          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16355        fi
16356        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16357      fi
16358    fi
16359
16360    # Now join together the path and the arguments once again
16361    if test "x$arguments" != xEOL; then
16362      new_complete="$new_path ${arguments% *}"
16363    else
16364      new_complete="$new_path"
16365    fi
16366
16367    if test "x$complete" != "x$new_complete"; then
16368      FOUND_MAKE="$new_complete"
16369      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16370$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16371    fi
16372  fi
16373
16374        fi
16375      fi
16376    fi
16377  fi
16378
16379
16380    if test "x$FOUND_MAKE" = x; then
16381      for ac_prog in make
16382do
16383  # Extract the first word of "$ac_prog", so it can be a program name with args.
16384set dummy $ac_prog; ac_word=$2
16385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16386$as_echo_n "checking for $ac_word... " >&6; }
16387if ${ac_cv_path_CHECK_MAKE+:} false; then :
16388  $as_echo_n "(cached) " >&6
16389else
16390  case $CHECK_MAKE in
16391  [\\/]* | ?:[\\/]*)
16392  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16393  ;;
16394  *)
16395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16396for as_dir in $PATH
16397do
16398  IFS=$as_save_IFS
16399  test -z "$as_dir" && as_dir=.
16400    for ac_exec_ext in '' $ac_executable_extensions; do
16401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16402    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16404    break 2
16405  fi
16406done
16407  done
16408IFS=$as_save_IFS
16409
16410  ;;
16411esac
16412fi
16413CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16414if test -n "$CHECK_MAKE"; then
16415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16416$as_echo "$CHECK_MAKE" >&6; }
16417else
16418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16419$as_echo "no" >&6; }
16420fi
16421
16422
16423  test -n "$CHECK_MAKE" && break
16424done
16425
16426
16427  MAKE_CANDIDATE=""$CHECK_MAKE""
16428  DESCRIPTION="make in PATH"
16429
16430  # On Cygwin, we require a newer version of make than on other platforms
16431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16432    MAKE_VERSION_EXPR="-e 4\."
16433    MAKE_REQUIRED_VERSION="4.0"
16434   else
16435    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16436    MAKE_REQUIRED_VERSION="3.81"
16437  fi
16438
16439  if test "x$MAKE_CANDIDATE" != x; then
16440    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16441$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16442    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16443    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16444    if test "x$IS_GNU_MAKE" = x; then
16445      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16446$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16447    else
16448      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16449      if test "x$IS_MODERN_MAKE" = x; then
16450        { $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
16451$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;}
16452      else
16453        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16454          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16455            MAKE_EXPECTED_ENV='cygwin'
16456          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16457            MAKE_EXPECTED_ENV='msys'
16458          else
16459            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16460          fi
16461          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16462          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16463        else
16464          # Not relevant for non-Windows
16465          IS_MAKE_CORRECT_ENV=true
16466        fi
16467        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16468          { $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
16469$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;}
16470        else
16471          FOUND_MAKE=$MAKE_CANDIDATE
16472
16473  # Only process if variable expands to non-empty
16474
16475  if test "x$FOUND_MAKE" != x; then
16476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16477
16478  # First separate the path from the arguments. This will split at the first
16479  # space.
16480  complete="$FOUND_MAKE"
16481  path="${complete%% *}"
16482  tmp="$complete EOL"
16483  arguments="${tmp#* }"
16484
16485  # Input might be given as Windows format, start by converting to
16486  # unix format.
16487  new_path=`$CYGPATH -u "$path"`
16488
16489  # Now try to locate executable using which
16490  new_path=`$WHICH "$new_path" 2> /dev/null`
16491  # bat and cmd files are not always considered executable in cygwin causing which
16492  # to not find them
16493  if test "x$new_path" = x \
16494      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16495      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16496    new_path=`$CYGPATH -u "$path"`
16497  fi
16498  if test "x$new_path" = x; then
16499    # Oops. Which didn't find the executable.
16500    # The splitting of arguments from the executable at a space might have been incorrect,
16501    # since paths with space are more likely in Windows. Give it another try with the whole
16502    # argument.
16503    path="$complete"
16504    arguments="EOL"
16505    new_path=`$CYGPATH -u "$path"`
16506    new_path=`$WHICH "$new_path" 2> /dev/null`
16507    # bat and cmd files are not always considered executable in cygwin causing which
16508    # to not find them
16509    if test "x$new_path" = x \
16510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16512      new_path=`$CYGPATH -u "$path"`
16513    fi
16514    if test "x$new_path" = x; then
16515      # It's still not found. Now this is an unrecoverable error.
16516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16517$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16518      has_space=`$ECHO "$complete" | $GREP " "`
16519      if test "x$has_space" != x; then
16520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16522      fi
16523      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16524    fi
16525  fi
16526
16527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16530  # "foo.exe" is OK but "foo" is an error.
16531  #
16532  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16533  # It is also a way to make sure we got the proper file name for the real test later on.
16534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16535  if test "x$test_shortpath" = x; then
16536    # Short path failed, file does not exist as specified.
16537    # Try adding .exe or .cmd
16538    if test -f "${new_path}.exe"; then
16539      input_to_shortpath="${new_path}.exe"
16540    elif test -f "${new_path}.cmd"; then
16541      input_to_shortpath="${new_path}.cmd"
16542    else
16543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16544$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16545      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16546$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16547      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16548    fi
16549  else
16550    input_to_shortpath="$new_path"
16551  fi
16552
16553  # Call helper function which possibly converts this using DOS-style short mode.
16554  # If so, the updated path is stored in $new_path.
16555  new_path="$input_to_shortpath"
16556
16557  input_path="$input_to_shortpath"
16558  # Check if we need to convert this using DOS-style short mode. If the path
16559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16560  # take no chances and rewrite it.
16561  # Note: m4 eats our [], so we need to use [ and ] instead.
16562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16563  if test "x$has_forbidden_chars" != x; then
16564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16568      # Going to short mode and back again did indeed matter. Since short mode is
16569      # case insensitive, let's make it lowercase to improve readability.
16570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16571      # Now convert it back to Unix-style (cygpath)
16572      input_path=`$CYGPATH -u "$shortmode_path"`
16573      new_path="$input_path"
16574    fi
16575  fi
16576
16577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16578  if test "x$test_cygdrive_prefix" = x; then
16579    # As a simple fix, exclude /usr/bin since it's not a real path.
16580    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16582      # a path prefixed by /cygdrive for fixpath to work.
16583      new_path="$CYGWIN_ROOT_PATH$input_path"
16584    fi
16585  fi
16586
16587  # remove trailing .exe if any
16588  new_path="${new_path/%.exe/}"
16589
16590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16591
16592  # First separate the path from the arguments. This will split at the first
16593  # space.
16594  complete="$FOUND_MAKE"
16595  path="${complete%% *}"
16596  tmp="$complete EOL"
16597  arguments="${tmp#* }"
16598
16599  # Input might be given as Windows format, start by converting to
16600  # unix format.
16601  new_path="$path"
16602
16603  windows_path="$new_path"
16604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16605    unix_path=`$CYGPATH -u "$windows_path"`
16606    new_path="$unix_path"
16607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16609    new_path="$unix_path"
16610  fi
16611
16612
16613  # Now try to locate executable using which
16614  new_path=`$WHICH "$new_path" 2> /dev/null`
16615
16616  if test "x$new_path" = x; then
16617    # Oops. Which didn't find the executable.
16618    # The splitting of arguments from the executable at a space might have been incorrect,
16619    # since paths with space are more likely in Windows. Give it another try with the whole
16620    # argument.
16621    path="$complete"
16622    arguments="EOL"
16623    new_path="$path"
16624
16625  windows_path="$new_path"
16626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16627    unix_path=`$CYGPATH -u "$windows_path"`
16628    new_path="$unix_path"
16629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16631    new_path="$unix_path"
16632  fi
16633
16634
16635    new_path=`$WHICH "$new_path" 2> /dev/null`
16636    # bat and cmd files are not always considered executable in MSYS causing which
16637    # to not find them
16638    if test "x$new_path" = x \
16639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16641      new_path="$path"
16642
16643  windows_path="$new_path"
16644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16645    unix_path=`$CYGPATH -u "$windows_path"`
16646    new_path="$unix_path"
16647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16649    new_path="$unix_path"
16650  fi
16651
16652    fi
16653
16654    if test "x$new_path" = x; then
16655      # It's still not found. Now this is an unrecoverable error.
16656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16658      has_space=`$ECHO "$complete" | $GREP " "`
16659      if test "x$has_space" != x; then
16660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16662      fi
16663      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16664    fi
16665  fi
16666
16667  # Now new_path has a complete unix path to the binary
16668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16669    # Keep paths in /bin as-is, but remove trailing .exe if any
16670    new_path="${new_path/%.exe/}"
16671    # Do not save /bin paths to all_fixpath_prefixes!
16672  else
16673    # Not in mixed or Windows style, start by that.
16674    new_path=`cmd //c echo $new_path`
16675
16676  input_path="$new_path"
16677  # Check if we need to convert this using DOS-style short mode. If the path
16678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16679  # take no chances and rewrite it.
16680  # Note: m4 eats our [], so we need to use [ and ] instead.
16681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16682  if test "x$has_forbidden_chars" != x; then
16683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16685  fi
16686
16687    # Output is in $new_path
16688
16689  windows_path="$new_path"
16690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16691    unix_path=`$CYGPATH -u "$windows_path"`
16692    new_path="$unix_path"
16693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16695    new_path="$unix_path"
16696  fi
16697
16698    # remove trailing .exe if any
16699    new_path="${new_path/%.exe/}"
16700
16701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16703  fi
16704
16705    else
16706      # We're on a unix platform. Hooray! :)
16707      # First separate the path from the arguments. This will split at the first
16708      # space.
16709      complete="$FOUND_MAKE"
16710      path="${complete%% *}"
16711      tmp="$complete EOL"
16712      arguments="${tmp#* }"
16713
16714      # Cannot rely on the command "which" here since it doesn't always work.
16715      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16716      if test -z "$is_absolute_path"; then
16717        # Path to executable is not absolute. Find it.
16718        IFS_save="$IFS"
16719        IFS=:
16720        for p in $PATH; do
16721          if test -f "$p/$path" && test -x "$p/$path"; then
16722            new_path="$p/$path"
16723            break
16724          fi
16725        done
16726        IFS="$IFS_save"
16727      else
16728        # This is an absolute path, we can use it without further modifications.
16729        new_path="$path"
16730      fi
16731
16732      if test "x$new_path" = x; then
16733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16734$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16735        has_space=`$ECHO "$complete" | $GREP " "`
16736        if test "x$has_space" != x; then
16737          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16739        fi
16740        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16741      fi
16742    fi
16743
16744    # Now join together the path and the arguments once again
16745    if test "x$arguments" != xEOL; then
16746      new_complete="$new_path ${arguments% *}"
16747    else
16748      new_complete="$new_path"
16749    fi
16750
16751    if test "x$complete" != "x$new_complete"; then
16752      FOUND_MAKE="$new_complete"
16753      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16754$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16755    fi
16756  fi
16757
16758        fi
16759      fi
16760    fi
16761  fi
16762
16763    fi
16764
16765    if test "x$FOUND_MAKE" = x; then
16766      if test "x$TOOLCHAIN_PATH" != x; then
16767        # We have a toolchain path, check that as well before giving up.
16768        OLD_PATH=$PATH
16769        PATH=$TOOLCHAIN_PATH:$PATH
16770        for ac_prog in gmake
16771do
16772  # Extract the first word of "$ac_prog", so it can be a program name with args.
16773set dummy $ac_prog; ac_word=$2
16774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16775$as_echo_n "checking for $ac_word... " >&6; }
16776if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16777  $as_echo_n "(cached) " >&6
16778else
16779  case $CHECK_TOOLSDIR_GMAKE in
16780  [\\/]* | ?:[\\/]*)
16781  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16782  ;;
16783  *)
16784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16785for as_dir in $PATH
16786do
16787  IFS=$as_save_IFS
16788  test -z "$as_dir" && as_dir=.
16789    for ac_exec_ext in '' $ac_executable_extensions; do
16790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16791    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16793    break 2
16794  fi
16795done
16796  done
16797IFS=$as_save_IFS
16798
16799  ;;
16800esac
16801fi
16802CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16803if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16805$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16806else
16807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16808$as_echo "no" >&6; }
16809fi
16810
16811
16812  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16813done
16814
16815
16816  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16817  DESCRIPTION="gmake in tools-dir"
16818
16819  # On Cygwin, we require a newer version of make than on other platforms
16820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16821    MAKE_VERSION_EXPR="-e 4\."
16822    MAKE_REQUIRED_VERSION="4.0"
16823   else
16824    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16825    MAKE_REQUIRED_VERSION="3.81"
16826  fi
16827
16828  if test "x$MAKE_CANDIDATE" != x; then
16829    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16830$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16831    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16832    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16833    if test "x$IS_GNU_MAKE" = x; then
16834      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16835$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16836    else
16837      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16838      if test "x$IS_MODERN_MAKE" = x; then
16839        { $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
16840$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;}
16841      else
16842        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16843          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16844            MAKE_EXPECTED_ENV='cygwin'
16845          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16846            MAKE_EXPECTED_ENV='msys'
16847          else
16848            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16849          fi
16850          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16851          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16852        else
16853          # Not relevant for non-Windows
16854          IS_MAKE_CORRECT_ENV=true
16855        fi
16856        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16857          { $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
16858$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;}
16859        else
16860          FOUND_MAKE=$MAKE_CANDIDATE
16861
16862  # Only process if variable expands to non-empty
16863
16864  if test "x$FOUND_MAKE" != x; then
16865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866
16867  # First separate the path from the arguments. This will split at the first
16868  # space.
16869  complete="$FOUND_MAKE"
16870  path="${complete%% *}"
16871  tmp="$complete EOL"
16872  arguments="${tmp#* }"
16873
16874  # Input might be given as Windows format, start by converting to
16875  # unix format.
16876  new_path=`$CYGPATH -u "$path"`
16877
16878  # Now try to locate executable using which
16879  new_path=`$WHICH "$new_path" 2> /dev/null`
16880  # bat and cmd files are not always considered executable in cygwin causing which
16881  # to not find them
16882  if test "x$new_path" = x \
16883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16885    new_path=`$CYGPATH -u "$path"`
16886  fi
16887  if test "x$new_path" = x; then
16888    # Oops. Which didn't find the executable.
16889    # The splitting of arguments from the executable at a space might have been incorrect,
16890    # since paths with space are more likely in Windows. Give it another try with the whole
16891    # argument.
16892    path="$complete"
16893    arguments="EOL"
16894    new_path=`$CYGPATH -u "$path"`
16895    new_path=`$WHICH "$new_path" 2> /dev/null`
16896    # bat and cmd files are not always considered executable in cygwin causing which
16897    # to not find them
16898    if test "x$new_path" = x \
16899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16901      new_path=`$CYGPATH -u "$path"`
16902    fi
16903    if test "x$new_path" = x; then
16904      # It's still not found. Now this is an unrecoverable error.
16905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16906$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16907      has_space=`$ECHO "$complete" | $GREP " "`
16908      if test "x$has_space" != x; then
16909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16911      fi
16912      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16913    fi
16914  fi
16915
16916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16919  # "foo.exe" is OK but "foo" is an error.
16920  #
16921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16922  # It is also a way to make sure we got the proper file name for the real test later on.
16923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16924  if test "x$test_shortpath" = x; then
16925    # Short path failed, file does not exist as specified.
16926    # Try adding .exe or .cmd
16927    if test -f "${new_path}.exe"; then
16928      input_to_shortpath="${new_path}.exe"
16929    elif test -f "${new_path}.cmd"; then
16930      input_to_shortpath="${new_path}.cmd"
16931    else
16932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16933$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16936      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16937    fi
16938  else
16939    input_to_shortpath="$new_path"
16940  fi
16941
16942  # Call helper function which possibly converts this using DOS-style short mode.
16943  # If so, the updated path is stored in $new_path.
16944  new_path="$input_to_shortpath"
16945
16946  input_path="$input_to_shortpath"
16947  # Check if we need to convert this using DOS-style short mode. If the path
16948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16949  # take no chances and rewrite it.
16950  # Note: m4 eats our [], so we need to use [ and ] instead.
16951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16952  if test "x$has_forbidden_chars" != x; then
16953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16957      # Going to short mode and back again did indeed matter. Since short mode is
16958      # case insensitive, let's make it lowercase to improve readability.
16959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16960      # Now convert it back to Unix-style (cygpath)
16961      input_path=`$CYGPATH -u "$shortmode_path"`
16962      new_path="$input_path"
16963    fi
16964  fi
16965
16966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16967  if test "x$test_cygdrive_prefix" = x; then
16968    # As a simple fix, exclude /usr/bin since it's not a real path.
16969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16971      # a path prefixed by /cygdrive for fixpath to work.
16972      new_path="$CYGWIN_ROOT_PATH$input_path"
16973    fi
16974  fi
16975
16976  # remove trailing .exe if any
16977  new_path="${new_path/%.exe/}"
16978
16979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980
16981  # First separate the path from the arguments. This will split at the first
16982  # space.
16983  complete="$FOUND_MAKE"
16984  path="${complete%% *}"
16985  tmp="$complete EOL"
16986  arguments="${tmp#* }"
16987
16988  # Input might be given as Windows format, start by converting to
16989  # unix format.
16990  new_path="$path"
16991
16992  windows_path="$new_path"
16993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16994    unix_path=`$CYGPATH -u "$windows_path"`
16995    new_path="$unix_path"
16996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16998    new_path="$unix_path"
16999  fi
17000
17001
17002  # Now try to locate executable using which
17003  new_path=`$WHICH "$new_path" 2> /dev/null`
17004
17005  if test "x$new_path" = x; then
17006    # Oops. Which didn't find the executable.
17007    # The splitting of arguments from the executable at a space might have been incorrect,
17008    # since paths with space are more likely in Windows. Give it another try with the whole
17009    # argument.
17010    path="$complete"
17011    arguments="EOL"
17012    new_path="$path"
17013
17014  windows_path="$new_path"
17015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17016    unix_path=`$CYGPATH -u "$windows_path"`
17017    new_path="$unix_path"
17018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17020    new_path="$unix_path"
17021  fi
17022
17023
17024    new_path=`$WHICH "$new_path" 2> /dev/null`
17025    # bat and cmd files are not always considered executable in MSYS causing which
17026    # to not find them
17027    if test "x$new_path" = x \
17028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17030      new_path="$path"
17031
17032  windows_path="$new_path"
17033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17034    unix_path=`$CYGPATH -u "$windows_path"`
17035    new_path="$unix_path"
17036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17038    new_path="$unix_path"
17039  fi
17040
17041    fi
17042
17043    if test "x$new_path" = x; then
17044      # It's still not found. Now this is an unrecoverable error.
17045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17046$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17047      has_space=`$ECHO "$complete" | $GREP " "`
17048      if test "x$has_space" != x; then
17049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17051      fi
17052      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17053    fi
17054  fi
17055
17056  # Now new_path has a complete unix path to the binary
17057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17058    # Keep paths in /bin as-is, but remove trailing .exe if any
17059    new_path="${new_path/%.exe/}"
17060    # Do not save /bin paths to all_fixpath_prefixes!
17061  else
17062    # Not in mixed or Windows style, start by that.
17063    new_path=`cmd //c echo $new_path`
17064
17065  input_path="$new_path"
17066  # Check if we need to convert this using DOS-style short mode. If the path
17067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17068  # take no chances and rewrite it.
17069  # Note: m4 eats our [], so we need to use [ and ] instead.
17070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17071  if test "x$has_forbidden_chars" != x; then
17072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17074  fi
17075
17076    # Output is in $new_path
17077
17078  windows_path="$new_path"
17079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17080    unix_path=`$CYGPATH -u "$windows_path"`
17081    new_path="$unix_path"
17082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17084    new_path="$unix_path"
17085  fi
17086
17087    # remove trailing .exe if any
17088    new_path="${new_path/%.exe/}"
17089
17090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17092  fi
17093
17094    else
17095      # We're on a unix platform. Hooray! :)
17096      # First separate the path from the arguments. This will split at the first
17097      # space.
17098      complete="$FOUND_MAKE"
17099      path="${complete%% *}"
17100      tmp="$complete EOL"
17101      arguments="${tmp#* }"
17102
17103      # Cannot rely on the command "which" here since it doesn't always work.
17104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17105      if test -z "$is_absolute_path"; then
17106        # Path to executable is not absolute. Find it.
17107        IFS_save="$IFS"
17108        IFS=:
17109        for p in $PATH; do
17110          if test -f "$p/$path" && test -x "$p/$path"; then
17111            new_path="$p/$path"
17112            break
17113          fi
17114        done
17115        IFS="$IFS_save"
17116      else
17117        # This is an absolute path, we can use it without further modifications.
17118        new_path="$path"
17119      fi
17120
17121      if test "x$new_path" = x; then
17122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17123$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17124        has_space=`$ECHO "$complete" | $GREP " "`
17125        if test "x$has_space" != x; then
17126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17128        fi
17129        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17130      fi
17131    fi
17132
17133    # Now join together the path and the arguments once again
17134    if test "x$arguments" != xEOL; then
17135      new_complete="$new_path ${arguments% *}"
17136    else
17137      new_complete="$new_path"
17138    fi
17139
17140    if test "x$complete" != "x$new_complete"; then
17141      FOUND_MAKE="$new_complete"
17142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17143$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17144    fi
17145  fi
17146
17147        fi
17148      fi
17149    fi
17150  fi
17151
17152        if test "x$FOUND_MAKE" = x; then
17153          for ac_prog in make
17154do
17155  # Extract the first word of "$ac_prog", so it can be a program name with args.
17156set dummy $ac_prog; ac_word=$2
17157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17158$as_echo_n "checking for $ac_word... " >&6; }
17159if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17160  $as_echo_n "(cached) " >&6
17161else
17162  case $CHECK_TOOLSDIR_MAKE in
17163  [\\/]* | ?:[\\/]*)
17164  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17165  ;;
17166  *)
17167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17168for as_dir in $PATH
17169do
17170  IFS=$as_save_IFS
17171  test -z "$as_dir" && as_dir=.
17172    for ac_exec_ext in '' $ac_executable_extensions; do
17173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17174    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17176    break 2
17177  fi
17178done
17179  done
17180IFS=$as_save_IFS
17181
17182  ;;
17183esac
17184fi
17185CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17186if test -n "$CHECK_TOOLSDIR_MAKE"; then
17187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17188$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17189else
17190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17191$as_echo "no" >&6; }
17192fi
17193
17194
17195  test -n "$CHECK_TOOLSDIR_MAKE" && break
17196done
17197
17198
17199  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17200  DESCRIPTION="make in tools-dir"
17201
17202  # On Cygwin, we require a newer version of make than on other platforms
17203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17204    MAKE_VERSION_EXPR="-e 4\."
17205    MAKE_REQUIRED_VERSION="4.0"
17206   else
17207    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17208    MAKE_REQUIRED_VERSION="3.81"
17209  fi
17210
17211  if test "x$MAKE_CANDIDATE" != x; then
17212    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17213$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17214    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17215    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17216    if test "x$IS_GNU_MAKE" = x; then
17217      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17218$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17219    else
17220      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17221      if test "x$IS_MODERN_MAKE" = x; then
17222        { $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
17223$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;}
17224      else
17225        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17226          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17227            MAKE_EXPECTED_ENV='cygwin'
17228          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17229            MAKE_EXPECTED_ENV='msys'
17230          else
17231            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17232          fi
17233          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17234          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17235        else
17236          # Not relevant for non-Windows
17237          IS_MAKE_CORRECT_ENV=true
17238        fi
17239        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17240          { $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
17241$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;}
17242        else
17243          FOUND_MAKE=$MAKE_CANDIDATE
17244
17245  # Only process if variable expands to non-empty
17246
17247  if test "x$FOUND_MAKE" != x; then
17248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17249
17250  # First separate the path from the arguments. This will split at the first
17251  # space.
17252  complete="$FOUND_MAKE"
17253  path="${complete%% *}"
17254  tmp="$complete EOL"
17255  arguments="${tmp#* }"
17256
17257  # Input might be given as Windows format, start by converting to
17258  # unix format.
17259  new_path=`$CYGPATH -u "$path"`
17260
17261  # Now try to locate executable using which
17262  new_path=`$WHICH "$new_path" 2> /dev/null`
17263  # bat and cmd files are not always considered executable in cygwin causing which
17264  # to not find them
17265  if test "x$new_path" = x \
17266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17268    new_path=`$CYGPATH -u "$path"`
17269  fi
17270  if test "x$new_path" = x; then
17271    # Oops. Which didn't find the executable.
17272    # The splitting of arguments from the executable at a space might have been incorrect,
17273    # since paths with space are more likely in Windows. Give it another try with the whole
17274    # argument.
17275    path="$complete"
17276    arguments="EOL"
17277    new_path=`$CYGPATH -u "$path"`
17278    new_path=`$WHICH "$new_path" 2> /dev/null`
17279    # bat and cmd files are not always considered executable in cygwin causing which
17280    # to not find them
17281    if test "x$new_path" = x \
17282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17284      new_path=`$CYGPATH -u "$path"`
17285    fi
17286    if test "x$new_path" = x; then
17287      # It's still not found. Now this is an unrecoverable error.
17288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17289$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17290      has_space=`$ECHO "$complete" | $GREP " "`
17291      if test "x$has_space" != x; then
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17294      fi
17295      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17296    fi
17297  fi
17298
17299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17302  # "foo.exe" is OK but "foo" is an error.
17303  #
17304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17305  # It is also a way to make sure we got the proper file name for the real test later on.
17306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17307  if test "x$test_shortpath" = x; then
17308    # Short path failed, file does not exist as specified.
17309    # Try adding .exe or .cmd
17310    if test -f "${new_path}.exe"; then
17311      input_to_shortpath="${new_path}.exe"
17312    elif test -f "${new_path}.cmd"; then
17313      input_to_shortpath="${new_path}.cmd"
17314    else
17315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17316$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17319      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17320    fi
17321  else
17322    input_to_shortpath="$new_path"
17323  fi
17324
17325  # Call helper function which possibly converts this using DOS-style short mode.
17326  # If so, the updated path is stored in $new_path.
17327  new_path="$input_to_shortpath"
17328
17329  input_path="$input_to_shortpath"
17330  # Check if we need to convert this using DOS-style short mode. If the path
17331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17332  # take no chances and rewrite it.
17333  # Note: m4 eats our [], so we need to use [ and ] instead.
17334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17335  if test "x$has_forbidden_chars" != x; then
17336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17340      # Going to short mode and back again did indeed matter. Since short mode is
17341      # case insensitive, let's make it lowercase to improve readability.
17342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17343      # Now convert it back to Unix-style (cygpath)
17344      input_path=`$CYGPATH -u "$shortmode_path"`
17345      new_path="$input_path"
17346    fi
17347  fi
17348
17349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17350  if test "x$test_cygdrive_prefix" = x; then
17351    # As a simple fix, exclude /usr/bin since it's not a real path.
17352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17354      # a path prefixed by /cygdrive for fixpath to work.
17355      new_path="$CYGWIN_ROOT_PATH$input_path"
17356    fi
17357  fi
17358
17359  # remove trailing .exe if any
17360  new_path="${new_path/%.exe/}"
17361
17362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17363
17364  # First separate the path from the arguments. This will split at the first
17365  # space.
17366  complete="$FOUND_MAKE"
17367  path="${complete%% *}"
17368  tmp="$complete EOL"
17369  arguments="${tmp#* }"
17370
17371  # Input might be given as Windows format, start by converting to
17372  # unix format.
17373  new_path="$path"
17374
17375  windows_path="$new_path"
17376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17377    unix_path=`$CYGPATH -u "$windows_path"`
17378    new_path="$unix_path"
17379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17381    new_path="$unix_path"
17382  fi
17383
17384
17385  # Now try to locate executable using which
17386  new_path=`$WHICH "$new_path" 2> /dev/null`
17387
17388  if test "x$new_path" = x; then
17389    # Oops. Which didn't find the executable.
17390    # The splitting of arguments from the executable at a space might have been incorrect,
17391    # since paths with space are more likely in Windows. Give it another try with the whole
17392    # argument.
17393    path="$complete"
17394    arguments="EOL"
17395    new_path="$path"
17396
17397  windows_path="$new_path"
17398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17399    unix_path=`$CYGPATH -u "$windows_path"`
17400    new_path="$unix_path"
17401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17403    new_path="$unix_path"
17404  fi
17405
17406
17407    new_path=`$WHICH "$new_path" 2> /dev/null`
17408    # bat and cmd files are not always considered executable in MSYS causing which
17409    # to not find them
17410    if test "x$new_path" = x \
17411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17413      new_path="$path"
17414
17415  windows_path="$new_path"
17416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17417    unix_path=`$CYGPATH -u "$windows_path"`
17418    new_path="$unix_path"
17419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17421    new_path="$unix_path"
17422  fi
17423
17424    fi
17425
17426    if test "x$new_path" = x; then
17427      # It's still not found. Now this is an unrecoverable error.
17428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17429$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17430      has_space=`$ECHO "$complete" | $GREP " "`
17431      if test "x$has_space" != x; then
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17434      fi
17435      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17436    fi
17437  fi
17438
17439  # Now new_path has a complete unix path to the binary
17440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17441    # Keep paths in /bin as-is, but remove trailing .exe if any
17442    new_path="${new_path/%.exe/}"
17443    # Do not save /bin paths to all_fixpath_prefixes!
17444  else
17445    # Not in mixed or Windows style, start by that.
17446    new_path=`cmd //c echo $new_path`
17447
17448  input_path="$new_path"
17449  # Check if we need to convert this using DOS-style short mode. If the path
17450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17451  # take no chances and rewrite it.
17452  # Note: m4 eats our [], so we need to use [ and ] instead.
17453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17454  if test "x$has_forbidden_chars" != x; then
17455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17457  fi
17458
17459    # Output is in $new_path
17460
17461  windows_path="$new_path"
17462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17463    unix_path=`$CYGPATH -u "$windows_path"`
17464    new_path="$unix_path"
17465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17467    new_path="$unix_path"
17468  fi
17469
17470    # remove trailing .exe if any
17471    new_path="${new_path/%.exe/}"
17472
17473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17475  fi
17476
17477    else
17478      # We're on a unix platform. Hooray! :)
17479      # First separate the path from the arguments. This will split at the first
17480      # space.
17481      complete="$FOUND_MAKE"
17482      path="${complete%% *}"
17483      tmp="$complete EOL"
17484      arguments="${tmp#* }"
17485
17486      # Cannot rely on the command "which" here since it doesn't always work.
17487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17488      if test -z "$is_absolute_path"; then
17489        # Path to executable is not absolute. Find it.
17490        IFS_save="$IFS"
17491        IFS=:
17492        for p in $PATH; do
17493          if test -f "$p/$path" && test -x "$p/$path"; then
17494            new_path="$p/$path"
17495            break
17496          fi
17497        done
17498        IFS="$IFS_save"
17499      else
17500        # This is an absolute path, we can use it without further modifications.
17501        new_path="$path"
17502      fi
17503
17504      if test "x$new_path" = x; then
17505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17506$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17507        has_space=`$ECHO "$complete" | $GREP " "`
17508        if test "x$has_space" != x; then
17509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17511        fi
17512        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17513      fi
17514    fi
17515
17516    # Now join together the path and the arguments once again
17517    if test "x$arguments" != xEOL; then
17518      new_complete="$new_path ${arguments% *}"
17519    else
17520      new_complete="$new_path"
17521    fi
17522
17523    if test "x$complete" != "x$new_complete"; then
17524      FOUND_MAKE="$new_complete"
17525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17526$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17527    fi
17528  fi
17529
17530        fi
17531      fi
17532    fi
17533  fi
17534
17535        fi
17536        PATH=$OLD_PATH
17537      fi
17538    fi
17539
17540    if test "x$FOUND_MAKE" = x; then
17541      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
17542    fi
17543  fi
17544
17545  MAKE=$FOUND_MAKE
17546
17547  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17548$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17549
17550
17551  # Check if make supports the output sync option and if so, setup using it.
17552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17553$as_echo_n "checking if make --output-sync is supported... " >&6; }
17554  if $MAKE --version -O > /dev/null 2>&1; then
17555    OUTPUT_SYNC_SUPPORTED=true
17556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17557$as_echo "yes" >&6; }
17558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17559$as_echo_n "checking for output-sync value... " >&6; }
17560
17561# Check whether --with-output-sync was given.
17562if test "${with_output_sync+set}" = set; then :
17563  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17564fi
17565
17566    if test "x$OUTPUT_SYNC" = "x"; then
17567      OUTPUT_SYNC=none
17568    fi
17569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17570$as_echo "$OUTPUT_SYNC" >&6; }
17571    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17572      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17573    fi
17574  else
17575    OUTPUT_SYNC_SUPPORTED=false
17576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17577$as_echo "no" >&6; }
17578  fi
17579
17580
17581
17582
17583
17584
17585  # Test if find supports -delete
17586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17587$as_echo_n "checking if find supports -delete... " >&6; }
17588  FIND_DELETE="-delete"
17589
17590  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17591
17592  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17593
17594  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17595  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17596    # No, it does not.
17597    rm $DELETEDIR/TestIfFindSupportsDelete
17598    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17599      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17600      FIND_DELETE="-print | xargs rm"
17601    else
17602      FIND_DELETE="-exec rm \{\} \+"
17603    fi
17604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17605$as_echo "no" >&6; }
17606  else
17607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17608$as_echo "yes" >&6; }
17609  fi
17610  rmdir $DELETEDIR
17611
17612
17613
17614  # These tools might not be installed by default,
17615  # need hint on how to install them.
17616
17617
17618
17619  # Publish this variable in the help.
17620
17621
17622  if test "x$UNZIP" = x; then
17623    # The variable is not set by user, try to locate tool using the code snippet
17624    for ac_prog in unzip
17625do
17626  # Extract the first word of "$ac_prog", so it can be a program name with args.
17627set dummy $ac_prog; ac_word=$2
17628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17629$as_echo_n "checking for $ac_word... " >&6; }
17630if ${ac_cv_path_UNZIP+:} false; then :
17631  $as_echo_n "(cached) " >&6
17632else
17633  case $UNZIP in
17634  [\\/]* | ?:[\\/]*)
17635  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17636  ;;
17637  *)
17638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17639for as_dir in $PATH
17640do
17641  IFS=$as_save_IFS
17642  test -z "$as_dir" && as_dir=.
17643    for ac_exec_ext in '' $ac_executable_extensions; do
17644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17645    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17647    break 2
17648  fi
17649done
17650  done
17651IFS=$as_save_IFS
17652
17653  ;;
17654esac
17655fi
17656UNZIP=$ac_cv_path_UNZIP
17657if test -n "$UNZIP"; then
17658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17659$as_echo "$UNZIP" >&6; }
17660else
17661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17662$as_echo "no" >&6; }
17663fi
17664
17665
17666  test -n "$UNZIP" && break
17667done
17668
17669  else
17670    # The variable is set, but is it from the command line or the environment?
17671
17672    # Try to remove the string !UNZIP! from our list.
17673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17675      # If it failed, the variable was not from the command line. Ignore it,
17676      # but warn the user (except for BASH, which is always set by the calling BASH).
17677      if test "xUNZIP" != xBASH; then
17678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17679$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17680      fi
17681      # Try to locate tool using the code snippet
17682      for ac_prog in unzip
17683do
17684  # Extract the first word of "$ac_prog", so it can be a program name with args.
17685set dummy $ac_prog; ac_word=$2
17686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17687$as_echo_n "checking for $ac_word... " >&6; }
17688if ${ac_cv_path_UNZIP+:} false; then :
17689  $as_echo_n "(cached) " >&6
17690else
17691  case $UNZIP in
17692  [\\/]* | ?:[\\/]*)
17693  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17694  ;;
17695  *)
17696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17697for as_dir in $PATH
17698do
17699  IFS=$as_save_IFS
17700  test -z "$as_dir" && as_dir=.
17701    for ac_exec_ext in '' $ac_executable_extensions; do
17702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17703    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17705    break 2
17706  fi
17707done
17708  done
17709IFS=$as_save_IFS
17710
17711  ;;
17712esac
17713fi
17714UNZIP=$ac_cv_path_UNZIP
17715if test -n "$UNZIP"; then
17716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17717$as_echo "$UNZIP" >&6; }
17718else
17719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17720$as_echo "no" >&6; }
17721fi
17722
17723
17724  test -n "$UNZIP" && break
17725done
17726
17727    else
17728      # If it succeeded, then it was overridden by the user. We will use it
17729      # for the tool.
17730
17731      # First remove it from the list of overridden variables, so we can test
17732      # for unknown variables in the end.
17733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17734
17735      # Check if the provided tool contains a complete path.
17736      tool_specified="$UNZIP"
17737      tool_basename="${tool_specified##*/}"
17738      if test "x$tool_basename" = "x$tool_specified"; then
17739        # A command without a complete path is provided, search $PATH.
17740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17741$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17742        # Extract the first word of "$tool_basename", so it can be a program name with args.
17743set dummy $tool_basename; ac_word=$2
17744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17745$as_echo_n "checking for $ac_word... " >&6; }
17746if ${ac_cv_path_UNZIP+:} false; then :
17747  $as_echo_n "(cached) " >&6
17748else
17749  case $UNZIP in
17750  [\\/]* | ?:[\\/]*)
17751  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17752  ;;
17753  *)
17754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17755for as_dir in $PATH
17756do
17757  IFS=$as_save_IFS
17758  test -z "$as_dir" && as_dir=.
17759    for ac_exec_ext in '' $ac_executable_extensions; do
17760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17761    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17763    break 2
17764  fi
17765done
17766  done
17767IFS=$as_save_IFS
17768
17769  ;;
17770esac
17771fi
17772UNZIP=$ac_cv_path_UNZIP
17773if test -n "$UNZIP"; then
17774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17775$as_echo "$UNZIP" >&6; }
17776else
17777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17778$as_echo "no" >&6; }
17779fi
17780
17781
17782        if test "x$UNZIP" = x; then
17783          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17784        fi
17785      else
17786        # Otherwise we believe it is a complete path. Use it as it is.
17787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17788$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17790$as_echo_n "checking for UNZIP... " >&6; }
17791        if test ! -x "$tool_specified"; then
17792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17793$as_echo "not found" >&6; }
17794          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17795        fi
17796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17797$as_echo "$tool_specified" >&6; }
17798      fi
17799    fi
17800  fi
17801
17802
17803
17804  if test "x$UNZIP" = x; then
17805    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17806  fi
17807
17808
17809
17810
17811
17812  # Publish this variable in the help.
17813
17814
17815  if test "x$ZIP" = x; then
17816    # The variable is not set by user, try to locate tool using the code snippet
17817    for ac_prog in zip
17818do
17819  # Extract the first word of "$ac_prog", so it can be a program name with args.
17820set dummy $ac_prog; ac_word=$2
17821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17822$as_echo_n "checking for $ac_word... " >&6; }
17823if ${ac_cv_path_ZIP+:} false; then :
17824  $as_echo_n "(cached) " >&6
17825else
17826  case $ZIP in
17827  [\\/]* | ?:[\\/]*)
17828  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17829  ;;
17830  *)
17831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17832for as_dir in $PATH
17833do
17834  IFS=$as_save_IFS
17835  test -z "$as_dir" && as_dir=.
17836    for ac_exec_ext in '' $ac_executable_extensions; do
17837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17838    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17840    break 2
17841  fi
17842done
17843  done
17844IFS=$as_save_IFS
17845
17846  ;;
17847esac
17848fi
17849ZIP=$ac_cv_path_ZIP
17850if test -n "$ZIP"; then
17851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17852$as_echo "$ZIP" >&6; }
17853else
17854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17855$as_echo "no" >&6; }
17856fi
17857
17858
17859  test -n "$ZIP" && break
17860done
17861
17862  else
17863    # The variable is set, but is it from the command line or the environment?
17864
17865    # Try to remove the string !ZIP! from our list.
17866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17868      # If it failed, the variable was not from the command line. Ignore it,
17869      # but warn the user (except for BASH, which is always set by the calling BASH).
17870      if test "xZIP" != xBASH; then
17871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17872$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17873      fi
17874      # Try to locate tool using the code snippet
17875      for ac_prog in zip
17876do
17877  # Extract the first word of "$ac_prog", so it can be a program name with args.
17878set dummy $ac_prog; ac_word=$2
17879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17880$as_echo_n "checking for $ac_word... " >&6; }
17881if ${ac_cv_path_ZIP+:} false; then :
17882  $as_echo_n "(cached) " >&6
17883else
17884  case $ZIP in
17885  [\\/]* | ?:[\\/]*)
17886  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17887  ;;
17888  *)
17889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17890for as_dir in $PATH
17891do
17892  IFS=$as_save_IFS
17893  test -z "$as_dir" && as_dir=.
17894    for ac_exec_ext in '' $ac_executable_extensions; do
17895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17896    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17898    break 2
17899  fi
17900done
17901  done
17902IFS=$as_save_IFS
17903
17904  ;;
17905esac
17906fi
17907ZIP=$ac_cv_path_ZIP
17908if test -n "$ZIP"; then
17909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17910$as_echo "$ZIP" >&6; }
17911else
17912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17913$as_echo "no" >&6; }
17914fi
17915
17916
17917  test -n "$ZIP" && break
17918done
17919
17920    else
17921      # If it succeeded, then it was overridden by the user. We will use it
17922      # for the tool.
17923
17924      # First remove it from the list of overridden variables, so we can test
17925      # for unknown variables in the end.
17926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17927
17928      # Check if the provided tool contains a complete path.
17929      tool_specified="$ZIP"
17930      tool_basename="${tool_specified##*/}"
17931      if test "x$tool_basename" = "x$tool_specified"; then
17932        # A command without a complete path is provided, search $PATH.
17933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17934$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17935        # Extract the first word of "$tool_basename", so it can be a program name with args.
17936set dummy $tool_basename; ac_word=$2
17937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17938$as_echo_n "checking for $ac_word... " >&6; }
17939if ${ac_cv_path_ZIP+:} false; then :
17940  $as_echo_n "(cached) " >&6
17941else
17942  case $ZIP in
17943  [\\/]* | ?:[\\/]*)
17944  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17945  ;;
17946  *)
17947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17948for as_dir in $PATH
17949do
17950  IFS=$as_save_IFS
17951  test -z "$as_dir" && as_dir=.
17952    for ac_exec_ext in '' $ac_executable_extensions; do
17953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17954    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17956    break 2
17957  fi
17958done
17959  done
17960IFS=$as_save_IFS
17961
17962  ;;
17963esac
17964fi
17965ZIP=$ac_cv_path_ZIP
17966if test -n "$ZIP"; then
17967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17968$as_echo "$ZIP" >&6; }
17969else
17970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17971$as_echo "no" >&6; }
17972fi
17973
17974
17975        if test "x$ZIP" = x; then
17976          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17977        fi
17978      else
17979        # Otherwise we believe it is a complete path. Use it as it is.
17980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17981$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17983$as_echo_n "checking for ZIP... " >&6; }
17984        if test ! -x "$tool_specified"; then
17985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17986$as_echo "not found" >&6; }
17987          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17988        fi
17989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17990$as_echo "$tool_specified" >&6; }
17991      fi
17992    fi
17993  fi
17994
17995
17996
17997  if test "x$ZIP" = x; then
17998    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17999  fi
18000
18001
18002
18003  # Non-required basic tools
18004
18005
18006
18007  # Publish this variable in the help.
18008
18009
18010  if test "x$LDD" = x; then
18011    # The variable is not set by user, try to locate tool using the code snippet
18012    for ac_prog in ldd
18013do
18014  # Extract the first word of "$ac_prog", so it can be a program name with args.
18015set dummy $ac_prog; ac_word=$2
18016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18017$as_echo_n "checking for $ac_word... " >&6; }
18018if ${ac_cv_path_LDD+:} false; then :
18019  $as_echo_n "(cached) " >&6
18020else
18021  case $LDD in
18022  [\\/]* | ?:[\\/]*)
18023  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18024  ;;
18025  *)
18026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18027for as_dir in $PATH
18028do
18029  IFS=$as_save_IFS
18030  test -z "$as_dir" && as_dir=.
18031    for ac_exec_ext in '' $ac_executable_extensions; do
18032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18033    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18035    break 2
18036  fi
18037done
18038  done
18039IFS=$as_save_IFS
18040
18041  ;;
18042esac
18043fi
18044LDD=$ac_cv_path_LDD
18045if test -n "$LDD"; then
18046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18047$as_echo "$LDD" >&6; }
18048else
18049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18050$as_echo "no" >&6; }
18051fi
18052
18053
18054  test -n "$LDD" && break
18055done
18056
18057  else
18058    # The variable is set, but is it from the command line or the environment?
18059
18060    # Try to remove the string !LDD! from our list.
18061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
18062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18063      # If it failed, the variable was not from the command line. Ignore it,
18064      # but warn the user (except for BASH, which is always set by the calling BASH).
18065      if test "xLDD" != xBASH; then
18066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
18067$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
18068      fi
18069      # Try to locate tool using the code snippet
18070      for ac_prog in ldd
18071do
18072  # Extract the first word of "$ac_prog", so it can be a program name with args.
18073set dummy $ac_prog; ac_word=$2
18074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18075$as_echo_n "checking for $ac_word... " >&6; }
18076if ${ac_cv_path_LDD+:} false; then :
18077  $as_echo_n "(cached) " >&6
18078else
18079  case $LDD in
18080  [\\/]* | ?:[\\/]*)
18081  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18082  ;;
18083  *)
18084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18085for as_dir in $PATH
18086do
18087  IFS=$as_save_IFS
18088  test -z "$as_dir" && as_dir=.
18089    for ac_exec_ext in '' $ac_executable_extensions; do
18090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18091    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18093    break 2
18094  fi
18095done
18096  done
18097IFS=$as_save_IFS
18098
18099  ;;
18100esac
18101fi
18102LDD=$ac_cv_path_LDD
18103if test -n "$LDD"; then
18104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18105$as_echo "$LDD" >&6; }
18106else
18107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18108$as_echo "no" >&6; }
18109fi
18110
18111
18112  test -n "$LDD" && break
18113done
18114
18115    else
18116      # If it succeeded, then it was overridden by the user. We will use it
18117      # for the tool.
18118
18119      # First remove it from the list of overridden variables, so we can test
18120      # for unknown variables in the end.
18121      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18122
18123      # Check if the provided tool contains a complete path.
18124      tool_specified="$LDD"
18125      tool_basename="${tool_specified##*/}"
18126      if test "x$tool_basename" = "x$tool_specified"; then
18127        # A command without a complete path is provided, search $PATH.
18128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18129$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18130        # Extract the first word of "$tool_basename", so it can be a program name with args.
18131set dummy $tool_basename; ac_word=$2
18132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18133$as_echo_n "checking for $ac_word... " >&6; }
18134if ${ac_cv_path_LDD+:} false; then :
18135  $as_echo_n "(cached) " >&6
18136else
18137  case $LDD in
18138  [\\/]* | ?:[\\/]*)
18139  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18140  ;;
18141  *)
18142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18143for as_dir in $PATH
18144do
18145  IFS=$as_save_IFS
18146  test -z "$as_dir" && as_dir=.
18147    for ac_exec_ext in '' $ac_executable_extensions; do
18148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18149    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18151    break 2
18152  fi
18153done
18154  done
18155IFS=$as_save_IFS
18156
18157  ;;
18158esac
18159fi
18160LDD=$ac_cv_path_LDD
18161if test -n "$LDD"; then
18162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18163$as_echo "$LDD" >&6; }
18164else
18165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18166$as_echo "no" >&6; }
18167fi
18168
18169
18170        if test "x$LDD" = x; then
18171          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18172        fi
18173      else
18174        # Otherwise we believe it is a complete path. Use it as it is.
18175        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18176$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18177        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18178$as_echo_n "checking for LDD... " >&6; }
18179        if test ! -x "$tool_specified"; then
18180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18181$as_echo "not found" >&6; }
18182          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18183        fi
18184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18185$as_echo "$tool_specified" >&6; }
18186      fi
18187    fi
18188  fi
18189
18190
18191  if test "x$LDD" = "x"; then
18192    # List shared lib dependencies is used for
18193    # debug output and checking for forbidden dependencies.
18194    # We can build without it.
18195    LDD="true"
18196  fi
18197
18198
18199  # Publish this variable in the help.
18200
18201
18202  if test "x$OTOOL" = x; then
18203    # The variable is not set by user, try to locate tool using the code snippet
18204    for ac_prog in otool
18205do
18206  # Extract the first word of "$ac_prog", so it can be a program name with args.
18207set dummy $ac_prog; ac_word=$2
18208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18209$as_echo_n "checking for $ac_word... " >&6; }
18210if ${ac_cv_path_OTOOL+:} false; then :
18211  $as_echo_n "(cached) " >&6
18212else
18213  case $OTOOL in
18214  [\\/]* | ?:[\\/]*)
18215  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18216  ;;
18217  *)
18218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18219for as_dir in $PATH
18220do
18221  IFS=$as_save_IFS
18222  test -z "$as_dir" && as_dir=.
18223    for ac_exec_ext in '' $ac_executable_extensions; do
18224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18225    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18227    break 2
18228  fi
18229done
18230  done
18231IFS=$as_save_IFS
18232
18233  ;;
18234esac
18235fi
18236OTOOL=$ac_cv_path_OTOOL
18237if test -n "$OTOOL"; then
18238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18239$as_echo "$OTOOL" >&6; }
18240else
18241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18242$as_echo "no" >&6; }
18243fi
18244
18245
18246  test -n "$OTOOL" && break
18247done
18248
18249  else
18250    # The variable is set, but is it from the command line or the environment?
18251
18252    # Try to remove the string !OTOOL! from our list.
18253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18255      # If it failed, the variable was not from the command line. Ignore it,
18256      # but warn the user (except for BASH, which is always set by the calling BASH).
18257      if test "xOTOOL" != xBASH; then
18258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18259$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18260      fi
18261      # Try to locate tool using the code snippet
18262      for ac_prog in otool
18263do
18264  # Extract the first word of "$ac_prog", so it can be a program name with args.
18265set dummy $ac_prog; ac_word=$2
18266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18267$as_echo_n "checking for $ac_word... " >&6; }
18268if ${ac_cv_path_OTOOL+:} false; then :
18269  $as_echo_n "(cached) " >&6
18270else
18271  case $OTOOL in
18272  [\\/]* | ?:[\\/]*)
18273  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18274  ;;
18275  *)
18276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18277for as_dir in $PATH
18278do
18279  IFS=$as_save_IFS
18280  test -z "$as_dir" && as_dir=.
18281    for ac_exec_ext in '' $ac_executable_extensions; do
18282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18283    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18285    break 2
18286  fi
18287done
18288  done
18289IFS=$as_save_IFS
18290
18291  ;;
18292esac
18293fi
18294OTOOL=$ac_cv_path_OTOOL
18295if test -n "$OTOOL"; then
18296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18297$as_echo "$OTOOL" >&6; }
18298else
18299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18300$as_echo "no" >&6; }
18301fi
18302
18303
18304  test -n "$OTOOL" && break
18305done
18306
18307    else
18308      # If it succeeded, then it was overridden by the user. We will use it
18309      # for the tool.
18310
18311      # First remove it from the list of overridden variables, so we can test
18312      # for unknown variables in the end.
18313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18314
18315      # Check if the provided tool contains a complete path.
18316      tool_specified="$OTOOL"
18317      tool_basename="${tool_specified##*/}"
18318      if test "x$tool_basename" = "x$tool_specified"; then
18319        # A command without a complete path is provided, search $PATH.
18320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18321$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18322        # Extract the first word of "$tool_basename", so it can be a program name with args.
18323set dummy $tool_basename; ac_word=$2
18324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18325$as_echo_n "checking for $ac_word... " >&6; }
18326if ${ac_cv_path_OTOOL+:} false; then :
18327  $as_echo_n "(cached) " >&6
18328else
18329  case $OTOOL in
18330  [\\/]* | ?:[\\/]*)
18331  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18332  ;;
18333  *)
18334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18335for as_dir in $PATH
18336do
18337  IFS=$as_save_IFS
18338  test -z "$as_dir" && as_dir=.
18339    for ac_exec_ext in '' $ac_executable_extensions; do
18340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18341    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18343    break 2
18344  fi
18345done
18346  done
18347IFS=$as_save_IFS
18348
18349  ;;
18350esac
18351fi
18352OTOOL=$ac_cv_path_OTOOL
18353if test -n "$OTOOL"; then
18354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18355$as_echo "$OTOOL" >&6; }
18356else
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18358$as_echo "no" >&6; }
18359fi
18360
18361
18362        if test "x$OTOOL" = x; then
18363          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18364        fi
18365      else
18366        # Otherwise we believe it is a complete path. Use it as it is.
18367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18368$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18370$as_echo_n "checking for OTOOL... " >&6; }
18371        if test ! -x "$tool_specified"; then
18372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18373$as_echo "not found" >&6; }
18374          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18375        fi
18376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18377$as_echo "$tool_specified" >&6; }
18378      fi
18379    fi
18380  fi
18381
18382
18383  if test "x$OTOOL" = "x"; then
18384    OTOOL="true"
18385  fi
18386
18387
18388  # Publish this variable in the help.
18389
18390
18391  if test "x$READELF" = x; then
18392    # The variable is not set by user, try to locate tool using the code snippet
18393    for ac_prog in greadelf readelf
18394do
18395  # Extract the first word of "$ac_prog", so it can be a program name with args.
18396set dummy $ac_prog; ac_word=$2
18397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18398$as_echo_n "checking for $ac_word... " >&6; }
18399if ${ac_cv_path_READELF+:} false; then :
18400  $as_echo_n "(cached) " >&6
18401else
18402  case $READELF in
18403  [\\/]* | ?:[\\/]*)
18404  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18405  ;;
18406  *)
18407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18408for as_dir in $PATH
18409do
18410  IFS=$as_save_IFS
18411  test -z "$as_dir" && as_dir=.
18412    for ac_exec_ext in '' $ac_executable_extensions; do
18413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18414    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18416    break 2
18417  fi
18418done
18419  done
18420IFS=$as_save_IFS
18421
18422  ;;
18423esac
18424fi
18425READELF=$ac_cv_path_READELF
18426if test -n "$READELF"; then
18427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18428$as_echo "$READELF" >&6; }
18429else
18430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18431$as_echo "no" >&6; }
18432fi
18433
18434
18435  test -n "$READELF" && break
18436done
18437
18438  else
18439    # The variable is set, but is it from the command line or the environment?
18440
18441    # Try to remove the string !READELF! from our list.
18442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18444      # If it failed, the variable was not from the command line. Ignore it,
18445      # but warn the user (except for BASH, which is always set by the calling BASH).
18446      if test "xREADELF" != xBASH; then
18447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18448$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18449      fi
18450      # Try to locate tool using the code snippet
18451      for ac_prog in greadelf readelf
18452do
18453  # Extract the first word of "$ac_prog", so it can be a program name with args.
18454set dummy $ac_prog; ac_word=$2
18455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18456$as_echo_n "checking for $ac_word... " >&6; }
18457if ${ac_cv_path_READELF+:} false; then :
18458  $as_echo_n "(cached) " >&6
18459else
18460  case $READELF in
18461  [\\/]* | ?:[\\/]*)
18462  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18463  ;;
18464  *)
18465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18466for as_dir in $PATH
18467do
18468  IFS=$as_save_IFS
18469  test -z "$as_dir" && as_dir=.
18470    for ac_exec_ext in '' $ac_executable_extensions; do
18471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18472    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18474    break 2
18475  fi
18476done
18477  done
18478IFS=$as_save_IFS
18479
18480  ;;
18481esac
18482fi
18483READELF=$ac_cv_path_READELF
18484if test -n "$READELF"; then
18485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18486$as_echo "$READELF" >&6; }
18487else
18488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18489$as_echo "no" >&6; }
18490fi
18491
18492
18493  test -n "$READELF" && break
18494done
18495
18496    else
18497      # If it succeeded, then it was overridden by the user. We will use it
18498      # for the tool.
18499
18500      # First remove it from the list of overridden variables, so we can test
18501      # for unknown variables in the end.
18502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18503
18504      # Check if the provided tool contains a complete path.
18505      tool_specified="$READELF"
18506      tool_basename="${tool_specified##*/}"
18507      if test "x$tool_basename" = "x$tool_specified"; then
18508        # A command without a complete path is provided, search $PATH.
18509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18510$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18511        # Extract the first word of "$tool_basename", so it can be a program name with args.
18512set dummy $tool_basename; ac_word=$2
18513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18514$as_echo_n "checking for $ac_word... " >&6; }
18515if ${ac_cv_path_READELF+:} false; then :
18516  $as_echo_n "(cached) " >&6
18517else
18518  case $READELF in
18519  [\\/]* | ?:[\\/]*)
18520  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18521  ;;
18522  *)
18523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18524for as_dir in $PATH
18525do
18526  IFS=$as_save_IFS
18527  test -z "$as_dir" && as_dir=.
18528    for ac_exec_ext in '' $ac_executable_extensions; do
18529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18530    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18532    break 2
18533  fi
18534done
18535  done
18536IFS=$as_save_IFS
18537
18538  ;;
18539esac
18540fi
18541READELF=$ac_cv_path_READELF
18542if test -n "$READELF"; then
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18544$as_echo "$READELF" >&6; }
18545else
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547$as_echo "no" >&6; }
18548fi
18549
18550
18551        if test "x$READELF" = x; then
18552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18553        fi
18554      else
18555        # Otherwise we believe it is a complete path. Use it as it is.
18556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18557$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18559$as_echo_n "checking for READELF... " >&6; }
18560        if test ! -x "$tool_specified"; then
18561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18562$as_echo "not found" >&6; }
18563          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18564        fi
18565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18566$as_echo "$tool_specified" >&6; }
18567      fi
18568    fi
18569  fi
18570
18571
18572
18573
18574  # Publish this variable in the help.
18575
18576
18577  if test "x$HG" = x; then
18578    # The variable is not set by user, try to locate tool using the code snippet
18579    for ac_prog in hg
18580do
18581  # Extract the first word of "$ac_prog", so it can be a program name with args.
18582set dummy $ac_prog; ac_word=$2
18583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18584$as_echo_n "checking for $ac_word... " >&6; }
18585if ${ac_cv_path_HG+:} false; then :
18586  $as_echo_n "(cached) " >&6
18587else
18588  case $HG in
18589  [\\/]* | ?:[\\/]*)
18590  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18591  ;;
18592  *)
18593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18594for as_dir in $PATH
18595do
18596  IFS=$as_save_IFS
18597  test -z "$as_dir" && as_dir=.
18598    for ac_exec_ext in '' $ac_executable_extensions; do
18599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18600    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18602    break 2
18603  fi
18604done
18605  done
18606IFS=$as_save_IFS
18607
18608  ;;
18609esac
18610fi
18611HG=$ac_cv_path_HG
18612if test -n "$HG"; then
18613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18614$as_echo "$HG" >&6; }
18615else
18616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18617$as_echo "no" >&6; }
18618fi
18619
18620
18621  test -n "$HG" && break
18622done
18623
18624  else
18625    # The variable is set, but is it from the command line or the environment?
18626
18627    # Try to remove the string !HG! from our list.
18628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18630      # If it failed, the variable was not from the command line. Ignore it,
18631      # but warn the user (except for BASH, which is always set by the calling BASH).
18632      if test "xHG" != xBASH; then
18633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18634$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18635      fi
18636      # Try to locate tool using the code snippet
18637      for ac_prog in hg
18638do
18639  # Extract the first word of "$ac_prog", so it can be a program name with args.
18640set dummy $ac_prog; ac_word=$2
18641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18642$as_echo_n "checking for $ac_word... " >&6; }
18643if ${ac_cv_path_HG+:} false; then :
18644  $as_echo_n "(cached) " >&6
18645else
18646  case $HG in
18647  [\\/]* | ?:[\\/]*)
18648  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18649  ;;
18650  *)
18651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18652for as_dir in $PATH
18653do
18654  IFS=$as_save_IFS
18655  test -z "$as_dir" && as_dir=.
18656    for ac_exec_ext in '' $ac_executable_extensions; do
18657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18658    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18660    break 2
18661  fi
18662done
18663  done
18664IFS=$as_save_IFS
18665
18666  ;;
18667esac
18668fi
18669HG=$ac_cv_path_HG
18670if test -n "$HG"; then
18671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18672$as_echo "$HG" >&6; }
18673else
18674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18675$as_echo "no" >&6; }
18676fi
18677
18678
18679  test -n "$HG" && break
18680done
18681
18682    else
18683      # If it succeeded, then it was overridden by the user. We will use it
18684      # for the tool.
18685
18686      # First remove it from the list of overridden variables, so we can test
18687      # for unknown variables in the end.
18688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18689
18690      # Check if the provided tool contains a complete path.
18691      tool_specified="$HG"
18692      tool_basename="${tool_specified##*/}"
18693      if test "x$tool_basename" = "x$tool_specified"; then
18694        # A command without a complete path is provided, search $PATH.
18695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18696$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18697        # Extract the first word of "$tool_basename", so it can be a program name with args.
18698set dummy $tool_basename; ac_word=$2
18699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18700$as_echo_n "checking for $ac_word... " >&6; }
18701if ${ac_cv_path_HG+:} false; then :
18702  $as_echo_n "(cached) " >&6
18703else
18704  case $HG in
18705  [\\/]* | ?:[\\/]*)
18706  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18707  ;;
18708  *)
18709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18710for as_dir in $PATH
18711do
18712  IFS=$as_save_IFS
18713  test -z "$as_dir" && as_dir=.
18714    for ac_exec_ext in '' $ac_executable_extensions; do
18715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18716    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18718    break 2
18719  fi
18720done
18721  done
18722IFS=$as_save_IFS
18723
18724  ;;
18725esac
18726fi
18727HG=$ac_cv_path_HG
18728if test -n "$HG"; then
18729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18730$as_echo "$HG" >&6; }
18731else
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18733$as_echo "no" >&6; }
18734fi
18735
18736
18737        if test "x$HG" = x; then
18738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18739        fi
18740      else
18741        # Otherwise we believe it is a complete path. Use it as it is.
18742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18743$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18745$as_echo_n "checking for HG... " >&6; }
18746        if test ! -x "$tool_specified"; then
18747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18748$as_echo "not found" >&6; }
18749          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18750        fi
18751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18752$as_echo "$tool_specified" >&6; }
18753      fi
18754    fi
18755  fi
18756
18757
18758
18759
18760  # Publish this variable in the help.
18761
18762
18763  if test "x$STAT" = x; then
18764    # The variable is not set by user, try to locate tool using the code snippet
18765    for ac_prog in stat
18766do
18767  # Extract the first word of "$ac_prog", so it can be a program name with args.
18768set dummy $ac_prog; ac_word=$2
18769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18770$as_echo_n "checking for $ac_word... " >&6; }
18771if ${ac_cv_path_STAT+:} false; then :
18772  $as_echo_n "(cached) " >&6
18773else
18774  case $STAT in
18775  [\\/]* | ?:[\\/]*)
18776  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18777  ;;
18778  *)
18779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18780for as_dir in $PATH
18781do
18782  IFS=$as_save_IFS
18783  test -z "$as_dir" && as_dir=.
18784    for ac_exec_ext in '' $ac_executable_extensions; do
18785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18786    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18788    break 2
18789  fi
18790done
18791  done
18792IFS=$as_save_IFS
18793
18794  ;;
18795esac
18796fi
18797STAT=$ac_cv_path_STAT
18798if test -n "$STAT"; then
18799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18800$as_echo "$STAT" >&6; }
18801else
18802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18803$as_echo "no" >&6; }
18804fi
18805
18806
18807  test -n "$STAT" && break
18808done
18809
18810  else
18811    # The variable is set, but is it from the command line or the environment?
18812
18813    # Try to remove the string !STAT! from our list.
18814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18816      # If it failed, the variable was not from the command line. Ignore it,
18817      # but warn the user (except for BASH, which is always set by the calling BASH).
18818      if test "xSTAT" != xBASH; then
18819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18820$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18821      fi
18822      # Try to locate tool using the code snippet
18823      for ac_prog in stat
18824do
18825  # Extract the first word of "$ac_prog", so it can be a program name with args.
18826set dummy $ac_prog; ac_word=$2
18827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18828$as_echo_n "checking for $ac_word... " >&6; }
18829if ${ac_cv_path_STAT+:} false; then :
18830  $as_echo_n "(cached) " >&6
18831else
18832  case $STAT in
18833  [\\/]* | ?:[\\/]*)
18834  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18835  ;;
18836  *)
18837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18838for as_dir in $PATH
18839do
18840  IFS=$as_save_IFS
18841  test -z "$as_dir" && as_dir=.
18842    for ac_exec_ext in '' $ac_executable_extensions; do
18843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18844    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18846    break 2
18847  fi
18848done
18849  done
18850IFS=$as_save_IFS
18851
18852  ;;
18853esac
18854fi
18855STAT=$ac_cv_path_STAT
18856if test -n "$STAT"; then
18857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18858$as_echo "$STAT" >&6; }
18859else
18860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18861$as_echo "no" >&6; }
18862fi
18863
18864
18865  test -n "$STAT" && break
18866done
18867
18868    else
18869      # If it succeeded, then it was overridden by the user. We will use it
18870      # for the tool.
18871
18872      # First remove it from the list of overridden variables, so we can test
18873      # for unknown variables in the end.
18874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18875
18876      # Check if the provided tool contains a complete path.
18877      tool_specified="$STAT"
18878      tool_basename="${tool_specified##*/}"
18879      if test "x$tool_basename" = "x$tool_specified"; then
18880        # A command without a complete path is provided, search $PATH.
18881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18882$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18883        # Extract the first word of "$tool_basename", so it can be a program name with args.
18884set dummy $tool_basename; ac_word=$2
18885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18886$as_echo_n "checking for $ac_word... " >&6; }
18887if ${ac_cv_path_STAT+:} false; then :
18888  $as_echo_n "(cached) " >&6
18889else
18890  case $STAT in
18891  [\\/]* | ?:[\\/]*)
18892  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18893  ;;
18894  *)
18895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18896for as_dir in $PATH
18897do
18898  IFS=$as_save_IFS
18899  test -z "$as_dir" && as_dir=.
18900    for ac_exec_ext in '' $ac_executable_extensions; do
18901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18902    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18904    break 2
18905  fi
18906done
18907  done
18908IFS=$as_save_IFS
18909
18910  ;;
18911esac
18912fi
18913STAT=$ac_cv_path_STAT
18914if test -n "$STAT"; then
18915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18916$as_echo "$STAT" >&6; }
18917else
18918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18919$as_echo "no" >&6; }
18920fi
18921
18922
18923        if test "x$STAT" = x; then
18924          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18925        fi
18926      else
18927        # Otherwise we believe it is a complete path. Use it as it is.
18928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18929$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18931$as_echo_n "checking for STAT... " >&6; }
18932        if test ! -x "$tool_specified"; then
18933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18934$as_echo "not found" >&6; }
18935          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18936        fi
18937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18938$as_echo "$tool_specified" >&6; }
18939      fi
18940    fi
18941  fi
18942
18943
18944
18945
18946  # Publish this variable in the help.
18947
18948
18949  if test "x$TIME" = x; then
18950    # The variable is not set by user, try to locate tool using the code snippet
18951    for ac_prog in time
18952do
18953  # Extract the first word of "$ac_prog", so it can be a program name with args.
18954set dummy $ac_prog; ac_word=$2
18955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18956$as_echo_n "checking for $ac_word... " >&6; }
18957if ${ac_cv_path_TIME+:} false; then :
18958  $as_echo_n "(cached) " >&6
18959else
18960  case $TIME in
18961  [\\/]* | ?:[\\/]*)
18962  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18963  ;;
18964  *)
18965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18966for as_dir in $PATH
18967do
18968  IFS=$as_save_IFS
18969  test -z "$as_dir" && as_dir=.
18970    for ac_exec_ext in '' $ac_executable_extensions; do
18971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18972    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18974    break 2
18975  fi
18976done
18977  done
18978IFS=$as_save_IFS
18979
18980  ;;
18981esac
18982fi
18983TIME=$ac_cv_path_TIME
18984if test -n "$TIME"; then
18985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18986$as_echo "$TIME" >&6; }
18987else
18988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18989$as_echo "no" >&6; }
18990fi
18991
18992
18993  test -n "$TIME" && break
18994done
18995
18996  else
18997    # The variable is set, but is it from the command line or the environment?
18998
18999    # Try to remove the string !TIME! from our list.
19000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
19001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19002      # If it failed, the variable was not from the command line. Ignore it,
19003      # but warn the user (except for BASH, which is always set by the calling BASH).
19004      if test "xTIME" != xBASH; then
19005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
19006$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
19007      fi
19008      # Try to locate tool using the code snippet
19009      for ac_prog in time
19010do
19011  # Extract the first word of "$ac_prog", so it can be a program name with args.
19012set dummy $ac_prog; ac_word=$2
19013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19014$as_echo_n "checking for $ac_word... " >&6; }
19015if ${ac_cv_path_TIME+:} false; then :
19016  $as_echo_n "(cached) " >&6
19017else
19018  case $TIME in
19019  [\\/]* | ?:[\\/]*)
19020  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19021  ;;
19022  *)
19023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19024for as_dir in $PATH
19025do
19026  IFS=$as_save_IFS
19027  test -z "$as_dir" && as_dir=.
19028    for ac_exec_ext in '' $ac_executable_extensions; do
19029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19030    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19032    break 2
19033  fi
19034done
19035  done
19036IFS=$as_save_IFS
19037
19038  ;;
19039esac
19040fi
19041TIME=$ac_cv_path_TIME
19042if test -n "$TIME"; then
19043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19044$as_echo "$TIME" >&6; }
19045else
19046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19047$as_echo "no" >&6; }
19048fi
19049
19050
19051  test -n "$TIME" && break
19052done
19053
19054    else
19055      # If it succeeded, then it was overridden by the user. We will use it
19056      # for the tool.
19057
19058      # First remove it from the list of overridden variables, so we can test
19059      # for unknown variables in the end.
19060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19061
19062      # Check if the provided tool contains a complete path.
19063      tool_specified="$TIME"
19064      tool_basename="${tool_specified##*/}"
19065      if test "x$tool_basename" = "x$tool_specified"; then
19066        # A command without a complete path is provided, search $PATH.
19067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
19068$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
19069        # Extract the first word of "$tool_basename", so it can be a program name with args.
19070set dummy $tool_basename; ac_word=$2
19071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19072$as_echo_n "checking for $ac_word... " >&6; }
19073if ${ac_cv_path_TIME+:} false; then :
19074  $as_echo_n "(cached) " >&6
19075else
19076  case $TIME in
19077  [\\/]* | ?:[\\/]*)
19078  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19079  ;;
19080  *)
19081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19082for as_dir in $PATH
19083do
19084  IFS=$as_save_IFS
19085  test -z "$as_dir" && as_dir=.
19086    for ac_exec_ext in '' $ac_executable_extensions; do
19087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19088    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19090    break 2
19091  fi
19092done
19093  done
19094IFS=$as_save_IFS
19095
19096  ;;
19097esac
19098fi
19099TIME=$ac_cv_path_TIME
19100if test -n "$TIME"; then
19101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19102$as_echo "$TIME" >&6; }
19103else
19104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19105$as_echo "no" >&6; }
19106fi
19107
19108
19109        if test "x$TIME" = x; then
19110          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19111        fi
19112      else
19113        # Otherwise we believe it is a complete path. Use it as it is.
19114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19115$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19117$as_echo_n "checking for TIME... " >&6; }
19118        if test ! -x "$tool_specified"; then
19119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19120$as_echo "not found" >&6; }
19121          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19122        fi
19123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19124$as_echo "$tool_specified" >&6; }
19125      fi
19126    fi
19127  fi
19128
19129
19130  # Check if it's GNU time
19131  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19132  if test "x$IS_GNU_TIME" != x; then
19133    IS_GNU_TIME=yes
19134  else
19135    IS_GNU_TIME=no
19136  fi
19137
19138
19139  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19140
19141
19142
19143  # Publish this variable in the help.
19144
19145
19146  if test "x$DSYMUTIL" = x; then
19147    # The variable is not set by user, try to locate tool using the code snippet
19148    for ac_prog in dsymutil
19149do
19150  # Extract the first word of "$ac_prog", so it can be a program name with args.
19151set dummy $ac_prog; ac_word=$2
19152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19153$as_echo_n "checking for $ac_word... " >&6; }
19154if ${ac_cv_path_DSYMUTIL+:} false; then :
19155  $as_echo_n "(cached) " >&6
19156else
19157  case $DSYMUTIL in
19158  [\\/]* | ?:[\\/]*)
19159  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19160  ;;
19161  *)
19162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19163for as_dir in $PATH
19164do
19165  IFS=$as_save_IFS
19166  test -z "$as_dir" && as_dir=.
19167    for ac_exec_ext in '' $ac_executable_extensions; do
19168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19169    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19171    break 2
19172  fi
19173done
19174  done
19175IFS=$as_save_IFS
19176
19177  ;;
19178esac
19179fi
19180DSYMUTIL=$ac_cv_path_DSYMUTIL
19181if test -n "$DSYMUTIL"; then
19182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19183$as_echo "$DSYMUTIL" >&6; }
19184else
19185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19186$as_echo "no" >&6; }
19187fi
19188
19189
19190  test -n "$DSYMUTIL" && break
19191done
19192
19193  else
19194    # The variable is set, but is it from the command line or the environment?
19195
19196    # Try to remove the string !DSYMUTIL! from our list.
19197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19199      # If it failed, the variable was not from the command line. Ignore it,
19200      # but warn the user (except for BASH, which is always set by the calling BASH).
19201      if test "xDSYMUTIL" != xBASH; then
19202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19203$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19204      fi
19205      # Try to locate tool using the code snippet
19206      for ac_prog in dsymutil
19207do
19208  # Extract the first word of "$ac_prog", so it can be a program name with args.
19209set dummy $ac_prog; ac_word=$2
19210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19211$as_echo_n "checking for $ac_word... " >&6; }
19212if ${ac_cv_path_DSYMUTIL+:} false; then :
19213  $as_echo_n "(cached) " >&6
19214else
19215  case $DSYMUTIL in
19216  [\\/]* | ?:[\\/]*)
19217  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19218  ;;
19219  *)
19220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19221for as_dir in $PATH
19222do
19223  IFS=$as_save_IFS
19224  test -z "$as_dir" && as_dir=.
19225    for ac_exec_ext in '' $ac_executable_extensions; do
19226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19227    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19229    break 2
19230  fi
19231done
19232  done
19233IFS=$as_save_IFS
19234
19235  ;;
19236esac
19237fi
19238DSYMUTIL=$ac_cv_path_DSYMUTIL
19239if test -n "$DSYMUTIL"; then
19240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19241$as_echo "$DSYMUTIL" >&6; }
19242else
19243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19244$as_echo "no" >&6; }
19245fi
19246
19247
19248  test -n "$DSYMUTIL" && break
19249done
19250
19251    else
19252      # If it succeeded, then it was overridden by the user. We will use it
19253      # for the tool.
19254
19255      # First remove it from the list of overridden variables, so we can test
19256      # for unknown variables in the end.
19257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19258
19259      # Check if the provided tool contains a complete path.
19260      tool_specified="$DSYMUTIL"
19261      tool_basename="${tool_specified##*/}"
19262      if test "x$tool_basename" = "x$tool_specified"; then
19263        # A command without a complete path is provided, search $PATH.
19264        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19265$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19266        # Extract the first word of "$tool_basename", so it can be a program name with args.
19267set dummy $tool_basename; ac_word=$2
19268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19269$as_echo_n "checking for $ac_word... " >&6; }
19270if ${ac_cv_path_DSYMUTIL+:} false; then :
19271  $as_echo_n "(cached) " >&6
19272else
19273  case $DSYMUTIL in
19274  [\\/]* | ?:[\\/]*)
19275  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19276  ;;
19277  *)
19278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19279for as_dir in $PATH
19280do
19281  IFS=$as_save_IFS
19282  test -z "$as_dir" && as_dir=.
19283    for ac_exec_ext in '' $ac_executable_extensions; do
19284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19285    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19287    break 2
19288  fi
19289done
19290  done
19291IFS=$as_save_IFS
19292
19293  ;;
19294esac
19295fi
19296DSYMUTIL=$ac_cv_path_DSYMUTIL
19297if test -n "$DSYMUTIL"; then
19298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19299$as_echo "$DSYMUTIL" >&6; }
19300else
19301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19302$as_echo "no" >&6; }
19303fi
19304
19305
19306        if test "x$DSYMUTIL" = x; then
19307          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19308        fi
19309      else
19310        # Otherwise we believe it is a complete path. Use it as it is.
19311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19312$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19314$as_echo_n "checking for DSYMUTIL... " >&6; }
19315        if test ! -x "$tool_specified"; then
19316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19317$as_echo "not found" >&6; }
19318          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19319        fi
19320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19321$as_echo "$tool_specified" >&6; }
19322      fi
19323    fi
19324  fi
19325
19326
19327
19328  if test "x$DSYMUTIL" = x; then
19329    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19330  fi
19331
19332
19333
19334
19335
19336  # Publish this variable in the help.
19337
19338
19339  if test "x$XATTR" = x; then
19340    # The variable is not set by user, try to locate tool using the code snippet
19341    for ac_prog in xattr
19342do
19343  # Extract the first word of "$ac_prog", so it can be a program name with args.
19344set dummy $ac_prog; ac_word=$2
19345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19346$as_echo_n "checking for $ac_word... " >&6; }
19347if ${ac_cv_path_XATTR+:} false; then :
19348  $as_echo_n "(cached) " >&6
19349else
19350  case $XATTR in
19351  [\\/]* | ?:[\\/]*)
19352  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19353  ;;
19354  *)
19355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19356for as_dir in $PATH
19357do
19358  IFS=$as_save_IFS
19359  test -z "$as_dir" && as_dir=.
19360    for ac_exec_ext in '' $ac_executable_extensions; do
19361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19362    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19364    break 2
19365  fi
19366done
19367  done
19368IFS=$as_save_IFS
19369
19370  ;;
19371esac
19372fi
19373XATTR=$ac_cv_path_XATTR
19374if test -n "$XATTR"; then
19375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19376$as_echo "$XATTR" >&6; }
19377else
19378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19379$as_echo "no" >&6; }
19380fi
19381
19382
19383  test -n "$XATTR" && break
19384done
19385
19386  else
19387    # The variable is set, but is it from the command line or the environment?
19388
19389    # Try to remove the string !XATTR! from our list.
19390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19392      # If it failed, the variable was not from the command line. Ignore it,
19393      # but warn the user (except for BASH, which is always set by the calling BASH).
19394      if test "xXATTR" != xBASH; then
19395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19396$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19397      fi
19398      # Try to locate tool using the code snippet
19399      for ac_prog in xattr
19400do
19401  # Extract the first word of "$ac_prog", so it can be a program name with args.
19402set dummy $ac_prog; ac_word=$2
19403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19404$as_echo_n "checking for $ac_word... " >&6; }
19405if ${ac_cv_path_XATTR+:} false; then :
19406  $as_echo_n "(cached) " >&6
19407else
19408  case $XATTR in
19409  [\\/]* | ?:[\\/]*)
19410  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19411  ;;
19412  *)
19413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19414for as_dir in $PATH
19415do
19416  IFS=$as_save_IFS
19417  test -z "$as_dir" && as_dir=.
19418    for ac_exec_ext in '' $ac_executable_extensions; do
19419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19420    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19422    break 2
19423  fi
19424done
19425  done
19426IFS=$as_save_IFS
19427
19428  ;;
19429esac
19430fi
19431XATTR=$ac_cv_path_XATTR
19432if test -n "$XATTR"; then
19433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19434$as_echo "$XATTR" >&6; }
19435else
19436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19437$as_echo "no" >&6; }
19438fi
19439
19440
19441  test -n "$XATTR" && break
19442done
19443
19444    else
19445      # If it succeeded, then it was overridden by the user. We will use it
19446      # for the tool.
19447
19448      # First remove it from the list of overridden variables, so we can test
19449      # for unknown variables in the end.
19450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19451
19452      # Check if the provided tool contains a complete path.
19453      tool_specified="$XATTR"
19454      tool_basename="${tool_specified##*/}"
19455      if test "x$tool_basename" = "x$tool_specified"; then
19456        # A command without a complete path is provided, search $PATH.
19457        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19458$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19459        # Extract the first word of "$tool_basename", so it can be a program name with args.
19460set dummy $tool_basename; ac_word=$2
19461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19462$as_echo_n "checking for $ac_word... " >&6; }
19463if ${ac_cv_path_XATTR+:} false; then :
19464  $as_echo_n "(cached) " >&6
19465else
19466  case $XATTR in
19467  [\\/]* | ?:[\\/]*)
19468  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19469  ;;
19470  *)
19471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19472for as_dir in $PATH
19473do
19474  IFS=$as_save_IFS
19475  test -z "$as_dir" && as_dir=.
19476    for ac_exec_ext in '' $ac_executable_extensions; do
19477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19478    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19480    break 2
19481  fi
19482done
19483  done
19484IFS=$as_save_IFS
19485
19486  ;;
19487esac
19488fi
19489XATTR=$ac_cv_path_XATTR
19490if test -n "$XATTR"; then
19491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19492$as_echo "$XATTR" >&6; }
19493else
19494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19495$as_echo "no" >&6; }
19496fi
19497
19498
19499        if test "x$XATTR" = x; then
19500          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19501        fi
19502      else
19503        # Otherwise we believe it is a complete path. Use it as it is.
19504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19505$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19507$as_echo_n "checking for XATTR... " >&6; }
19508        if test ! -x "$tool_specified"; then
19509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19510$as_echo "not found" >&6; }
19511          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19512        fi
19513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19514$as_echo "$tool_specified" >&6; }
19515      fi
19516    fi
19517  fi
19518
19519
19520
19521  if test "x$XATTR" = x; then
19522    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19523  fi
19524
19525
19526
19527
19528  # Publish this variable in the help.
19529
19530
19531  if test "x$CODESIGN" = x; then
19532    # The variable is not set by user, try to locate tool using the code snippet
19533    for ac_prog in codesign
19534do
19535  # Extract the first word of "$ac_prog", so it can be a program name with args.
19536set dummy $ac_prog; ac_word=$2
19537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19538$as_echo_n "checking for $ac_word... " >&6; }
19539if ${ac_cv_path_CODESIGN+:} false; then :
19540  $as_echo_n "(cached) " >&6
19541else
19542  case $CODESIGN in
19543  [\\/]* | ?:[\\/]*)
19544  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19545  ;;
19546  *)
19547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19548for as_dir in $PATH
19549do
19550  IFS=$as_save_IFS
19551  test -z "$as_dir" && as_dir=.
19552    for ac_exec_ext in '' $ac_executable_extensions; do
19553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19554    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19556    break 2
19557  fi
19558done
19559  done
19560IFS=$as_save_IFS
19561
19562  ;;
19563esac
19564fi
19565CODESIGN=$ac_cv_path_CODESIGN
19566if test -n "$CODESIGN"; then
19567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19568$as_echo "$CODESIGN" >&6; }
19569else
19570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19571$as_echo "no" >&6; }
19572fi
19573
19574
19575  test -n "$CODESIGN" && break
19576done
19577
19578  else
19579    # The variable is set, but is it from the command line or the environment?
19580
19581    # Try to remove the string !CODESIGN! from our list.
19582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19584      # If it failed, the variable was not from the command line. Ignore it,
19585      # but warn the user (except for BASH, which is always set by the calling BASH).
19586      if test "xCODESIGN" != xBASH; then
19587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19588$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19589      fi
19590      # Try to locate tool using the code snippet
19591      for ac_prog in codesign
19592do
19593  # Extract the first word of "$ac_prog", so it can be a program name with args.
19594set dummy $ac_prog; ac_word=$2
19595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19596$as_echo_n "checking for $ac_word... " >&6; }
19597if ${ac_cv_path_CODESIGN+:} false; then :
19598  $as_echo_n "(cached) " >&6
19599else
19600  case $CODESIGN in
19601  [\\/]* | ?:[\\/]*)
19602  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19603  ;;
19604  *)
19605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19606for as_dir in $PATH
19607do
19608  IFS=$as_save_IFS
19609  test -z "$as_dir" && as_dir=.
19610    for ac_exec_ext in '' $ac_executable_extensions; do
19611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19612    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19614    break 2
19615  fi
19616done
19617  done
19618IFS=$as_save_IFS
19619
19620  ;;
19621esac
19622fi
19623CODESIGN=$ac_cv_path_CODESIGN
19624if test -n "$CODESIGN"; then
19625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19626$as_echo "$CODESIGN" >&6; }
19627else
19628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19629$as_echo "no" >&6; }
19630fi
19631
19632
19633  test -n "$CODESIGN" && break
19634done
19635
19636    else
19637      # If it succeeded, then it was overridden by the user. We will use it
19638      # for the tool.
19639
19640      # First remove it from the list of overridden variables, so we can test
19641      # for unknown variables in the end.
19642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19643
19644      # Check if the provided tool contains a complete path.
19645      tool_specified="$CODESIGN"
19646      tool_basename="${tool_specified##*/}"
19647      if test "x$tool_basename" = "x$tool_specified"; then
19648        # A command without a complete path is provided, search $PATH.
19649        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19650$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19651        # Extract the first word of "$tool_basename", so it can be a program name with args.
19652set dummy $tool_basename; ac_word=$2
19653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19654$as_echo_n "checking for $ac_word... " >&6; }
19655if ${ac_cv_path_CODESIGN+:} false; then :
19656  $as_echo_n "(cached) " >&6
19657else
19658  case $CODESIGN in
19659  [\\/]* | ?:[\\/]*)
19660  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19661  ;;
19662  *)
19663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19664for as_dir in $PATH
19665do
19666  IFS=$as_save_IFS
19667  test -z "$as_dir" && as_dir=.
19668    for ac_exec_ext in '' $ac_executable_extensions; do
19669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19670    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19672    break 2
19673  fi
19674done
19675  done
19676IFS=$as_save_IFS
19677
19678  ;;
19679esac
19680fi
19681CODESIGN=$ac_cv_path_CODESIGN
19682if test -n "$CODESIGN"; then
19683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19684$as_echo "$CODESIGN" >&6; }
19685else
19686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19687$as_echo "no" >&6; }
19688fi
19689
19690
19691        if test "x$CODESIGN" = x; then
19692          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19693        fi
19694      else
19695        # Otherwise we believe it is a complete path. Use it as it is.
19696        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19697$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19699$as_echo_n "checking for CODESIGN... " >&6; }
19700        if test ! -x "$tool_specified"; then
19701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19702$as_echo "not found" >&6; }
19703          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19704        fi
19705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19706$as_echo "$tool_specified" >&6; }
19707      fi
19708    fi
19709  fi
19710
19711
19712    if test "x$CODESIGN" != "x"; then
19713      # Verify that the openjdk_codesign certificate is present
19714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19715$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19716      rm -f codesign-testfile
19717      touch codesign-testfile
19718      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19719      rm -f codesign-testfile
19720      if test "x$CODESIGN" = x; then
19721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19722$as_echo "no" >&6; }
19723      else
19724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19725$as_echo "yes" >&6; }
19726      fi
19727    fi
19728  fi
19729
19730
19731  # Test if bash supports pipefail.
19732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19733$as_echo_n "checking if bash supports pipefail... " >&6; }
19734  if ${BASH} -c 'set -o pipefail'; then
19735    BASH_ARGS="$BASH_ARGS -o pipefail"
19736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19737$as_echo "yes" >&6; }
19738  else
19739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19740$as_echo "no" >&6; }
19741  fi
19742
19743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19744$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19745  if ${BASH} -e -c 'true'; then
19746    BASH_ARGS="$BASH_ARGS -e"
19747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19748$as_echo "yes" >&6; }
19749  else
19750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19751$as_echo "no" >&6; }
19752  fi
19753
19754
19755
19756
19757# Check if pkg-config is available.
19758
19759
19760if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19761	if test -n "$ac_tool_prefix"; then
19762  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19763set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19765$as_echo_n "checking for $ac_word... " >&6; }
19766if ${ac_cv_path_PKG_CONFIG+:} false; then :
19767  $as_echo_n "(cached) " >&6
19768else
19769  case $PKG_CONFIG in
19770  [\\/]* | ?:[\\/]*)
19771  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19772  ;;
19773  *)
19774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19775for as_dir in $PATH
19776do
19777  IFS=$as_save_IFS
19778  test -z "$as_dir" && as_dir=.
19779    for ac_exec_ext in '' $ac_executable_extensions; do
19780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19781    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19783    break 2
19784  fi
19785done
19786  done
19787IFS=$as_save_IFS
19788
19789  ;;
19790esac
19791fi
19792PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19793if test -n "$PKG_CONFIG"; then
19794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19795$as_echo "$PKG_CONFIG" >&6; }
19796else
19797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19798$as_echo "no" >&6; }
19799fi
19800
19801
19802fi
19803if test -z "$ac_cv_path_PKG_CONFIG"; then
19804  ac_pt_PKG_CONFIG=$PKG_CONFIG
19805  # Extract the first word of "pkg-config", so it can be a program name with args.
19806set dummy pkg-config; ac_word=$2
19807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19808$as_echo_n "checking for $ac_word... " >&6; }
19809if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19810  $as_echo_n "(cached) " >&6
19811else
19812  case $ac_pt_PKG_CONFIG in
19813  [\\/]* | ?:[\\/]*)
19814  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19815  ;;
19816  *)
19817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19818for as_dir in $PATH
19819do
19820  IFS=$as_save_IFS
19821  test -z "$as_dir" && as_dir=.
19822    for ac_exec_ext in '' $ac_executable_extensions; do
19823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19824    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19826    break 2
19827  fi
19828done
19829  done
19830IFS=$as_save_IFS
19831
19832  ;;
19833esac
19834fi
19835ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19836if test -n "$ac_pt_PKG_CONFIG"; then
19837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19838$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19839else
19840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19841$as_echo "no" >&6; }
19842fi
19843
19844  if test "x$ac_pt_PKG_CONFIG" = x; then
19845    PKG_CONFIG=""
19846  else
19847    case $cross_compiling:$ac_tool_warned in
19848yes:)
19849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19851ac_tool_warned=yes ;;
19852esac
19853    PKG_CONFIG=$ac_pt_PKG_CONFIG
19854  fi
19855else
19856  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19857fi
19858
19859fi
19860if test -n "$PKG_CONFIG"; then
19861	_pkg_min_version=0.9.0
19862	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19863$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19864	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19865		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19866$as_echo "yes" >&6; }
19867	else
19868		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19869$as_echo "no" >&6; }
19870		PKG_CONFIG=""
19871	fi
19872
19873fi
19874
19875# After basic tools have been setup, we can check build os specific details.
19876
19877  ###############################################################################
19878
19879  # Note that this is the build platform OS version!
19880
19881  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19882  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19883  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19884  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19885
19886
19887
19888
19889
19890# Setup builddeps, for automatic downloading of tools we need.
19891# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19892# boot-jdk setup, but we need to have basic tools setup first.
19893
19894
19895# Check whether --with-builddeps-conf was given.
19896if test "${with_builddeps_conf+set}" = set; then :
19897  withval=$with_builddeps_conf;
19898fi
19899
19900
19901
19902# Check whether --with-builddeps-server was given.
19903if test "${with_builddeps_server+set}" = set; then :
19904  withval=$with_builddeps_server;
19905fi
19906
19907
19908
19909# Check whether --with-builddeps-dir was given.
19910if test "${with_builddeps_dir+set}" = set; then :
19911  withval=$with_builddeps_dir;
19912else
19913  with_builddeps_dir=/localhome/builddeps
19914fi
19915
19916
19917
19918# Check whether --with-builddeps-group was given.
19919if test "${with_builddeps_group+set}" = set; then :
19920  withval=$with_builddeps_group;
19921fi
19922
19923
19924
19925
19926  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19927    if test "x$with_builddeps_conf" != x; then
19928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19929$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19930      builddepsfile=$with_builddeps_conf
19931      if test -s $builddepsfile; then
19932        . $builddepsfile
19933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19934$as_echo "loaded!" >&6; }
19935      else
19936        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19937      fi
19938    else
19939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19940$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19941      builddepsfile=`mktemp`
19942      touch $builddepsfile
19943      # Put all found confs into a single file.
19944      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19945      # Source the file to acquire the variables
19946      if test -s $builddepsfile; then
19947        . $builddepsfile
19948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19949$as_echo "found at least one!" >&6; }
19950      else
19951        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19952      fi
19953    fi
19954    # Create build and target names that use _ instead of "-" and ".".
19955    # This is necessary to use them in variable names.
19956    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19957    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19958    # Extract rewrite information for build and target
19959    eval rewritten_build=\${REWRITE_${build_var}}
19960    if test "x$rewritten_build" = x; then
19961      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19962      echo Build stays the same $rewritten_build
19963    else
19964      echo Rewriting build for builddeps into $rewritten_build
19965    fi
19966    eval rewritten_target=\${REWRITE_${target_var}}
19967    if test "x$rewritten_target" = x; then
19968      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19969      echo Target stays the same $rewritten_target
19970    else
19971      echo Rewriting target for builddeps into $rewritten_target
19972    fi
19973    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19974    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19975  fi
19976  for ac_prog in 7z unzip
19977do
19978  # Extract the first word of "$ac_prog", so it can be a program name with args.
19979set dummy $ac_prog; ac_word=$2
19980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19981$as_echo_n "checking for $ac_word... " >&6; }
19982if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19983  $as_echo_n "(cached) " >&6
19984else
19985  if test -n "$BDEPS_UNZIP"; then
19986  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19987else
19988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19989for as_dir in $PATH
19990do
19991  IFS=$as_save_IFS
19992  test -z "$as_dir" && as_dir=.
19993    for ac_exec_ext in '' $ac_executable_extensions; do
19994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19995    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19997    break 2
19998  fi
19999done
20000  done
20001IFS=$as_save_IFS
20002
20003fi
20004fi
20005BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20006if test -n "$BDEPS_UNZIP"; then
20007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20008$as_echo "$BDEPS_UNZIP" >&6; }
20009else
20010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20011$as_echo "no" >&6; }
20012fi
20013
20014
20015  test -n "$BDEPS_UNZIP" && break
20016done
20017
20018  if test "x$BDEPS_UNZIP" = x7z; then
20019    BDEPS_UNZIP="7z x"
20020  fi
20021
20022  for ac_prog in wget lftp ftp
20023do
20024  # Extract the first word of "$ac_prog", so it can be a program name with args.
20025set dummy $ac_prog; ac_word=$2
20026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20027$as_echo_n "checking for $ac_word... " >&6; }
20028if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20029  $as_echo_n "(cached) " >&6
20030else
20031  if test -n "$BDEPS_FTP"; then
20032  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20033else
20034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20035for as_dir in $PATH
20036do
20037  IFS=$as_save_IFS
20038  test -z "$as_dir" && as_dir=.
20039    for ac_exec_ext in '' $ac_executable_extensions; do
20040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20041    ac_cv_prog_BDEPS_FTP="$ac_prog"
20042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20043    break 2
20044  fi
20045done
20046  done
20047IFS=$as_save_IFS
20048
20049fi
20050fi
20051BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20052if test -n "$BDEPS_FTP"; then
20053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20054$as_echo "$BDEPS_FTP" >&6; }
20055else
20056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20057$as_echo "no" >&6; }
20058fi
20059
20060
20061  test -n "$BDEPS_FTP" && break
20062done
20063
20064
20065
20066###############################################################################
20067#
20068# Determine OpenJDK variants, options and version numbers.
20069#
20070###############################################################################
20071
20072# We need build & target for this.
20073
20074
20075  ###############################################################################
20076  #
20077  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20078  # We always build headless support.
20079  #
20080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20081$as_echo_n "checking headful support... " >&6; }
20082  # Check whether --enable-headful was given.
20083if test "${enable_headful+set}" = set; then :
20084  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20085else
20086  SUPPORT_HEADFUL=yes
20087fi
20088
20089
20090  SUPPORT_HEADLESS=yes
20091  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20092
20093  if test "x$SUPPORT_HEADFUL" = xyes; then
20094    # We are building both headful and headless.
20095    headful_msg="include support for both headful and headless"
20096  fi
20097
20098  if test "x$SUPPORT_HEADFUL" = xno; then
20099    # Thus we are building headless only.
20100    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20101    headful_msg="headless only"
20102  fi
20103
20104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20105$as_echo "$headful_msg" >&6; }
20106
20107
20108
20109
20110
20111  # Control wether Hotspot runs Queens test after build.
20112  # Check whether --enable-hotspot-test-in-build was given.
20113if test "${enable_hotspot_test_in_build+set}" = set; then :
20114  enableval=$enable_hotspot_test_in_build;
20115else
20116  enable_hotspot_test_in_build=no
20117fi
20118
20119  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20120    TEST_IN_BUILD=true
20121  else
20122    TEST_IN_BUILD=false
20123  fi
20124
20125
20126  ###############################################################################
20127  #
20128  # Choose cacerts source file
20129  #
20130
20131# Check whether --with-cacerts-file was given.
20132if test "${with_cacerts_file+set}" = set; then :
20133  withval=$with_cacerts_file;
20134fi
20135
20136  if test "x$with_cacerts_file" != x; then
20137    CACERTS_FILE=$with_cacerts_file
20138  fi
20139
20140
20141  ###############################################################################
20142  #
20143  # Enable or disable unlimited crypto
20144  #
20145  # Check whether --enable-unlimited-crypto was given.
20146if test "${enable_unlimited_crypto+set}" = set; then :
20147  enableval=$enable_unlimited_crypto;
20148else
20149  enable_unlimited_crypto=no
20150fi
20151
20152  if test "x$enable_unlimited_crypto" = "xyes"; then
20153    UNLIMITED_CRYPTO=true
20154  else
20155    UNLIMITED_CRYPTO=false
20156  fi
20157
20158
20159  ###############################################################################
20160  #
20161  # --enable-rmiconnector-iiop
20162  #
20163  # Check whether --enable-rmiconnector-iiop was given.
20164if test "${enable_rmiconnector_iiop+set}" = set; then :
20165  enableval=$enable_rmiconnector_iiop;
20166fi
20167
20168  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20169    RMICONNECTOR_IIOP=true
20170  else
20171    RMICONNECTOR_IIOP=false
20172  fi
20173
20174
20175  ###############################################################################
20176  #
20177  # Compress jars
20178  #
20179  COMPRESS_JARS=false
20180
20181
20182
20183  # Setup default copyright year. Mostly overridden when building close to a new year.
20184
20185# Check whether --with-copyright-year was given.
20186if test "${with_copyright_year+set}" = set; then :
20187  withval=$with_copyright_year;
20188fi
20189
20190  if test "x$with_copyright_year" = xyes; then
20191    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20192  elif test "x$with_copyright_year" != x; then
20193    COPYRIGHT_YEAR="$with_copyright_year"
20194  else
20195    COPYRIGHT_YEAR=`date +'%Y'`
20196  fi
20197
20198
20199
20200  # Warn user that old version arguments are deprecated.
20201
20202
20203# Check whether --with-milestone was given.
20204if test "${with_milestone+set}" = set; then :
20205  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20206$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20207fi
20208
20209
20210
20211
20212# Check whether --with-update-version was given.
20213if test "${with_update_version+set}" = set; then :
20214  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20215$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20216fi
20217
20218
20219
20220
20221# Check whether --with-user-release-suffix was given.
20222if test "${with_user_release_suffix+set}" = set; then :
20223  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
20224$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20225fi
20226
20227
20228
20229
20230# Check whether --with-build-number was given.
20231if test "${with_build_number+set}" = set; then :
20232  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20233$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20234fi
20235
20236
20237
20238  # Source the version numbers file
20239  . $AUTOCONF_DIR/version-numbers
20240
20241  # Some non-version number information is set in that file
20242
20243
20244
20245
20246
20247
20248
20249
20250  # Override version from arguments
20251
20252  # If --with-version-string is set, process it first. It is possible to
20253  # override parts with more specific flags, since these are processed later.
20254
20255# Check whether --with-version-string was given.
20256if test "${with_version_string+set}" = set; then :
20257  withval=$with_version_string;
20258fi
20259
20260  if test "x$with_version_string" = xyes; then
20261    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20262  elif test "x$with_version_string" != x; then
20263    # Additional [] needed to keep m4 from mangling shell constructs.
20264    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?(\.([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
20265      VERSION_MAJOR=${BASH_REMATCH[1]}
20266      VERSION_MINOR=${BASH_REMATCH[3]}
20267      VERSION_SECURITY=${BASH_REMATCH[5]}
20268      VERSION_PATCH=${BASH_REMATCH[7]}
20269      VERSION_PRE_BASE=${BASH_REMATCH[9]}
20270      VERSION_PRE_DEBUGLEVEL=${BASH_REMATCH[11]}
20271      version_plus_separator=${BASH_REMATCH[13]}
20272      VERSION_BUILD=${BASH_REMATCH[14]}
20273      VERSION_OPT=${BASH_REMATCH[16]}
20274      # Unspecified numerical fields are interpreted as 0.
20275      if test "x$VERSION_MINOR" = x; then
20276        VERSION_MINOR=0
20277      fi
20278      if test "x$VERSION_SECURITY" = x; then
20279        VERSION_SECURITY=0
20280      fi
20281      if test "x$VERSION_PATCH" = x; then
20282        VERSION_PATCH=0
20283      fi
20284      if test "x$version_plus_separator" != x && test "x$VERSION_BUILD$VERSION_OPT" = x; then
20285        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20286      fi
20287      # Stop the version part process from setting default values.
20288      # We still allow them to explicitely override though.
20289      NO_DEFAULT_VERSION_PARTS=true
20290    else
20291      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20292    fi
20293  fi
20294
20295
20296# Check whether --with-version-pre-base was given.
20297if test "${with_version_pre_base+set}" = set; then :
20298  withval=$with_version_pre_base; with_version_pre_base_present=true
20299else
20300  with_version_pre_base_present=false
20301fi
20302
20303
20304  if test "x$with_version_pre_base_present" = xtrue; then
20305    if test "x$with_version_pre_base" = xyes; then
20306      as_fn_error $? "--with-version-pre-base must have a value" "$LINENO" 5
20307    elif test "x$with_version_pre_base" = xno; then
20308      # Interpret --without-* as empty string instead of the literal "no"
20309      VERSION_PRE_BASE=
20310    else
20311      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20312       VERSION_PRE_BASE=`$ECHO "$with_version_pre_base" | $TR -c -d '[a-z][A-Z]'`
20313      if test "x$VERSION_PRE_BASE" != "x$with_version_pre_base"; then
20314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&5
20315$as_echo "$as_me: WARNING: --with-version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&2;}
20316      fi
20317    fi
20318  else
20319    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20320      # Default is to use "internal" as pre
20321      VERSION_PRE_BASE="internal"
20322    fi
20323  fi
20324
20325
20326# Check whether --with-version-pre-debuglevel was given.
20327if test "${with_version_pre_debuglevel+set}" = set; then :
20328  withval=$with_version_pre_debuglevel; with_version_pre_debuglevel_present=true
20329else
20330  with_version_pre_debuglevel_present=false
20331fi
20332
20333
20334  if test "x$with_version_pre_debuglevel_present" = xtrue; then
20335    if test "x$with_version_pre_debuglevel" = xyes; then
20336      as_fn_error $? "--with-version-pre-debuglevel must have a value" "$LINENO" 5
20337    elif test "x$with_version_pre_debuglevel" = xno; then
20338      # Interpret --without-* as empty string instead of the literal "no"
20339      VERSION_PRE_DEBUGLEVEL=
20340    else
20341      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20342       VERSION_PRE_DEBUGLEVEL=`$ECHO "$with_version_pre_debuglevel" | $TR -c -d '[a-z][A-Z]'`
20343      if test "x$VERSION_PRE_DEBUGLEVEL" != "x$with_version_pre_debuglevel"; then
20344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&5
20345$as_echo "$as_me: WARNING: --with-version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&2;}
20346      fi
20347    fi
20348  else
20349    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20350      # Default is to use the debug level name, except for release which is empty.
20351      if test "x$DEBUG_LEVEL" != "xrelease"; then
20352        VERSION_PRE_DEBUGLEVEL="$DEBUG_LEVEL"
20353      else
20354        VERSION_PRE_DEBUGLEVEL=""
20355      fi
20356    fi
20357  fi
20358
20359
20360# Check whether --with-version-opt was given.
20361if test "${with_version_opt+set}" = set; then :
20362  withval=$with_version_opt; with_version_opt_present=true
20363else
20364  with_version_opt_present=false
20365fi
20366
20367
20368  if test "x$with_version_opt_present" = xtrue; then
20369    if test "x$with_version_opt" = xyes; then
20370      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
20371    elif test "x$with_version_opt" = xno; then
20372      # Interpret --without-* as empty string instead of the literal "no"
20373      VERSION_OPT=
20374    else
20375      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
20376       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
20377      if test "x$VERSION_OPT" != "x$with_version_opt"; then
20378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
20379$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
20380      fi
20381    fi
20382  else
20383    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20384      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20385      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20386      # Outer [ ] to quote m4.
20387       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20388       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20389      VERSION_OPT="$timestamp.$username.$basedirname"
20390    fi
20391  fi
20392
20393
20394# Check whether --with-version-build was given.
20395if test "${with_version_build+set}" = set; then :
20396  withval=$with_version_build; with_version_build_present=true
20397else
20398  with_version_build_present=false
20399fi
20400
20401
20402  if test "x$with_version_build_present" = xtrue; then
20403    if test "x$with_version_build" = xyes; then
20404      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20405    elif test "x$with_version_build" = xno; then
20406      # Interpret --without-* as empty string instead of the literal "no"
20407      VERSION_BUILD=
20408    elif test "x$with_version_build" = x; then
20409      VERSION_BUILD=
20410    else
20411
20412  # Additional [] needed to keep m4 from mangling shell constructs.
20413  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20414    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20415  fi
20416  # Extract the version number without leading zeros.
20417  cleaned_value=${BASH_REMATCH[1]}
20418  if test "x$cleaned_value" = x; then
20419    # Special case for zero
20420    cleaned_value=${BASH_REMATCH[2]}
20421  fi
20422
20423  if test $cleaned_value -gt 255; then
20424    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20425  fi
20426  if test "x$cleaned_value" != "x$with_version_build"; then
20427    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20428$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20429  fi
20430  VERSION_BUILD=$cleaned_value
20431
20432    fi
20433  else
20434    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20435      # Default is to not have a build number.
20436      VERSION_BUILD=""
20437      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20438      VERSION_BUILD=0
20439    fi
20440  fi
20441
20442
20443# Check whether --with-version-major was given.
20444if test "${with_version_major+set}" = set; then :
20445  withval=$with_version_major; with_version_major_present=true
20446else
20447  with_version_major_present=false
20448fi
20449
20450
20451  if test "x$with_version_major_present" = xtrue; then
20452    if test "x$with_version_major" = xyes; then
20453      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20454    else
20455
20456  # Additional [] needed to keep m4 from mangling shell constructs.
20457  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20458    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20459  fi
20460  # Extract the version number without leading zeros.
20461  cleaned_value=${BASH_REMATCH[1]}
20462  if test "x$cleaned_value" = x; then
20463    # Special case for zero
20464    cleaned_value=${BASH_REMATCH[2]}
20465  fi
20466
20467  if test $cleaned_value -gt 255; then
20468    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20469  fi
20470  if test "x$cleaned_value" != "x$with_version_major"; then
20471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20472$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20473  fi
20474  VERSION_MAJOR=$cleaned_value
20475
20476    fi
20477  else
20478    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20479      # Default is to get value from version-numbers
20480      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20481    fi
20482  fi
20483
20484
20485# Check whether --with-version-minor was given.
20486if test "${with_version_minor+set}" = set; then :
20487  withval=$with_version_minor; with_version_minor_present=true
20488else
20489  with_version_minor_present=false
20490fi
20491
20492
20493  if test "x$with_version_minor_present" = xtrue; then
20494    if test "x$with_version_minor" = xyes; then
20495      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20496    elif test "x$with_version_minor" = xno; then
20497      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20498      VERSION_MINOR=0
20499    elif test "x$with_version_minor" = x; then
20500      VERSION_MINOR=0
20501    else
20502
20503  # Additional [] needed to keep m4 from mangling shell constructs.
20504  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20505    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20506  fi
20507  # Extract the version number without leading zeros.
20508  cleaned_value=${BASH_REMATCH[1]}
20509  if test "x$cleaned_value" = x; then
20510    # Special case for zero
20511    cleaned_value=${BASH_REMATCH[2]}
20512  fi
20513
20514  if test $cleaned_value -gt 255; then
20515    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20516  fi
20517  if test "x$cleaned_value" != "x$with_version_minor"; then
20518    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20519$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20520  fi
20521  VERSION_MINOR=$cleaned_value
20522
20523    fi
20524  else
20525    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20526      # Default is 0, if unspecified
20527      VERSION_MINOR=0
20528    fi
20529  fi
20530
20531
20532# Check whether --with-version-security was given.
20533if test "${with_version_security+set}" = set; then :
20534  withval=$with_version_security; with_version_security_present=true
20535else
20536  with_version_security_present=false
20537fi
20538
20539
20540  if test "x$with_version_security_present" = xtrue; then
20541    if test "x$with_version_security" = xyes; then
20542      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20543    elif test "x$with_version_security" = xno; then
20544      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20545      VERSION_SECURITY=0
20546    elif test "x$with_version_security" = x; then
20547      VERSION_SECURITY=0
20548    else
20549
20550  # Additional [] needed to keep m4 from mangling shell constructs.
20551  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20552    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20553  fi
20554  # Extract the version number without leading zeros.
20555  cleaned_value=${BASH_REMATCH[1]}
20556  if test "x$cleaned_value" = x; then
20557    # Special case for zero
20558    cleaned_value=${BASH_REMATCH[2]}
20559  fi
20560
20561  if test $cleaned_value -gt 255; then
20562    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20563  fi
20564  if test "x$cleaned_value" != "x$with_version_security"; then
20565    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20566$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20567  fi
20568  VERSION_SECURITY=$cleaned_value
20569
20570    fi
20571  else
20572    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20573      # Default is 0, if unspecified
20574      VERSION_SECURITY=0
20575    fi
20576  fi
20577
20578
20579# Check whether --with-version-patch was given.
20580if test "${with_version_patch+set}" = set; then :
20581  withval=$with_version_patch; with_version_patch_present=true
20582else
20583  with_version_patch_present=false
20584fi
20585
20586
20587  if test "x$with_version_patch_present" = xtrue; then
20588    if test "x$with_version_patch" = xyes; then
20589      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20590    elif test "x$with_version_patch" = xno; then
20591      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20592      VERSION_PATCH=0
20593    elif test "x$with_version_patch" = x; then
20594      VERSION_PATCH=0
20595    else
20596
20597  # Additional [] needed to keep m4 from mangling shell constructs.
20598  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20599    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20600  fi
20601  # Extract the version number without leading zeros.
20602  cleaned_value=${BASH_REMATCH[1]}
20603  if test "x$cleaned_value" = x; then
20604    # Special case for zero
20605    cleaned_value=${BASH_REMATCH[2]}
20606  fi
20607
20608  if test $cleaned_value -gt 255; then
20609    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20610  fi
20611  if test "x$cleaned_value" != "x$with_version_patch"; then
20612    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20613$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20614  fi
20615  VERSION_PATCH=$cleaned_value
20616
20617    fi
20618  else
20619    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20620      # Default is 0, if unspecified
20621      VERSION_PATCH=0
20622    fi
20623  fi
20624
20625  # Calculate derived version properties
20626
20627  # Set pre to "pre-base" if debug level is empty (i.e. release), or
20628  # "pre-base.debug-level" otherwise.
20629  if test "x$VERSION_PRE_BASE" = x && test "x$VERSION_PRE_DEBUGLEVEL" != x; then
20630    as_fn_error $? "Cannot set version-pre-debuglevel when version-pre-base is empty" "$LINENO" 5
20631  fi
20632  VERSION_PRE=$VERSION_PRE_BASE${VERSION_PRE_DEBUGLEVEL:+.$VERSION_PRE_DEBUGLEVEL}
20633
20634  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20635  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20636
20637  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20638  # Strip trailing zeroes from stripped_version_number
20639  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20640  VERSION_NUMBER=$stripped_version_number
20641
20642  # The complete version string, with additional build information
20643  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20644    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20645  else
20646    # If either build or opt is set, we need a + separator
20647    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20648  fi
20649
20650  # The short version string, just VERSION_NUMBER and PRE, if present.
20651  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20652
20653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20654$as_echo_n "checking for version string... " >&6; }
20655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20656$as_echo "$VERSION_STRING" >&6; }
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671###############################################################################
20672#
20673# Setup BootJDK, used to bootstrap the build.
20674#
20675###############################################################################
20676
20677
20678  BOOT_JDK_FOUND=no
20679
20680# Check whether --with-boot-jdk was given.
20681if test "${with_boot_jdk+set}" = set; then :
20682  withval=$with_boot_jdk;
20683fi
20684
20685
20686  # We look for the Boot JDK through various means, going from more certain to
20687  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20688  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20689  # must check if this is indeed valid; otherwise we'll continue looking.
20690
20691  # Test: Is bootjdk explicitely set by command line arguments?
20692
20693  if test "x$BOOT_JDK_FOUND" = xno; then
20694    # Now execute the test
20695
20696  if test "x$with_boot_jdk" != x; then
20697    BOOT_JDK=$with_boot_jdk
20698    BOOT_JDK_FOUND=maybe
20699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20700$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20701  fi
20702
20703
20704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20706      # Do we have a bin/java?
20707      if test ! -x "$BOOT_JDK/bin/java"; then
20708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20710        BOOT_JDK_FOUND=no
20711      else
20712        # Do we have a bin/javac?
20713        if test ! -x "$BOOT_JDK/bin/javac"; then
20714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20718          BOOT_JDK_FOUND=no
20719        else
20720          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20721          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20722
20723          # Extra M4 quote needed to protect [] in grep expression.
20724          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20725          if test "x$FOUND_CORRECT_VERSION" = x; then
20726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20728            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20729$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20730            BOOT_JDK_FOUND=no
20731          else
20732            # We're done! :-)
20733            BOOT_JDK_FOUND=yes
20734
20735  # Only process if variable expands to non-empty
20736
20737  if test "x$BOOT_JDK" != x; then
20738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20739
20740  # Input might be given as Windows format, start by converting to
20741  # unix format.
20742  path="$BOOT_JDK"
20743  new_path=`$CYGPATH -u "$path"`
20744
20745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20748  # "foo.exe" is OK but "foo" is an error.
20749  #
20750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20751  # It is also a way to make sure we got the proper file name for the real test later on.
20752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20753  if test "x$test_shortpath" = x; then
20754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20757  fi
20758
20759  # Call helper function which possibly converts this using DOS-style short mode.
20760  # If so, the updated path is stored in $new_path.
20761
20762  input_path="$new_path"
20763  # Check if we need to convert this using DOS-style short mode. If the path
20764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20765  # take no chances and rewrite it.
20766  # Note: m4 eats our [], so we need to use [ and ] instead.
20767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20768  if test "x$has_forbidden_chars" != x; then
20769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20773      # Going to short mode and back again did indeed matter. Since short mode is
20774      # case insensitive, let's make it lowercase to improve readability.
20775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20776      # Now convert it back to Unix-style (cygpath)
20777      input_path=`$CYGPATH -u "$shortmode_path"`
20778      new_path="$input_path"
20779    fi
20780  fi
20781
20782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20783  if test "x$test_cygdrive_prefix" = x; then
20784    # As a simple fix, exclude /usr/bin since it's not a real path.
20785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20787      # a path prefixed by /cygdrive for fixpath to work.
20788      new_path="$CYGWIN_ROOT_PATH$input_path"
20789    fi
20790  fi
20791
20792
20793  if test "x$path" != "x$new_path"; then
20794    BOOT_JDK="$new_path"
20795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20797  fi
20798
20799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20800
20801  path="$BOOT_JDK"
20802  has_colon=`$ECHO $path | $GREP ^.:`
20803  new_path="$path"
20804  if test "x$has_colon" = x; then
20805    # Not in mixed or Windows style, start by that.
20806    new_path=`cmd //c echo $path`
20807  fi
20808
20809
20810  input_path="$new_path"
20811  # Check if we need to convert this using DOS-style short mode. If the path
20812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20813  # take no chances and rewrite it.
20814  # Note: m4 eats our [], so we need to use [ and ] instead.
20815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20816  if test "x$has_forbidden_chars" != x; then
20817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20819  fi
20820
20821
20822  windows_path="$new_path"
20823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20824    unix_path=`$CYGPATH -u "$windows_path"`
20825    new_path="$unix_path"
20826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20828    new_path="$unix_path"
20829  fi
20830
20831  if test "x$path" != "x$new_path"; then
20832    BOOT_JDK="$new_path"
20833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20835  fi
20836
20837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20839
20840    else
20841      # We're on a unix platform. Hooray! :)
20842      path="$BOOT_JDK"
20843      has_space=`$ECHO "$path" | $GREP " "`
20844      if test "x$has_space" != x; then
20845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20848      fi
20849
20850      # Use eval to expand a potential ~
20851      eval path="$path"
20852      if test ! -f "$path" && test ! -d "$path"; then
20853        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20854      fi
20855
20856      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20857    fi
20858  fi
20859
20860            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20861$as_echo_n "checking for Boot JDK... " >&6; }
20862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20863$as_echo "$BOOT_JDK" >&6; }
20864            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20865$as_echo_n "checking Boot JDK version... " >&6; }
20866            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20868$as_echo "$BOOT_JDK_VERSION" >&6; }
20869          fi # end check jdk version
20870        fi # end check javac
20871      fi # end check java
20872    fi # end check boot jdk found
20873  fi
20874
20875  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20876    # Having specified an argument which is incorrect will produce an instant failure;
20877    # we should not go on looking
20878    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20879  fi
20880
20881  # Test: Is bootjdk available from builddeps?
20882
20883  if test "x$BOOT_JDK_FOUND" = xno; then
20884    # Now execute the test
20885
20886
20887
20888  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20889    # Source the builddeps file again, to make sure it uses the latest variables!
20890    . $builddepsfile
20891    # Look for a target and build machine specific resource!
20892    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20893    if test "x$resource" = x; then
20894      # Ok, lets instead look for a target specific resource
20895      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20896    fi
20897    if test "x$resource" = x; then
20898      # Ok, lets instead look for a build specific resource
20899      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20900    fi
20901    if test "x$resource" = x; then
20902      # Ok, lets instead look for a generic resource
20903      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20904      resource=${builddep_bootjdk}
20905    fi
20906    if test "x$resource" != x; then
20907      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20908$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20909      # If the resource in the builddeps.conf file is an existing directory,
20910      # for example /java/linux/cups
20911      if test -d ${resource}; then
20912        depdir=${resource}
20913      else
20914
20915  # bootjdk is for example mymodule
20916  # $resource is for example libs/general/libmymod_1_2_3.zip
20917  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20918  # $with_builddeps_dir is for example /localhome/builddeps
20919  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20920  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20921  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20922  filename=`basename $resource`
20923  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20924  filebase=${filename%%.*}
20925  extension=${filename#*.}
20926  installdir=$with_builddeps_dir/$filebase
20927  if test ! -f $installdir/$filename.unpacked; then
20928    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20929$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20930    if test ! -d $installdir; then
20931      mkdir -p $installdir
20932    fi
20933    if test ! -d $installdir; then
20934      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20935    fi
20936    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20937    touch $tmpfile
20938    if test ! -f $tmpfile; then
20939      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20940    fi
20941
20942  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20943  # $tmpfile is the local file name for the downloaded file.
20944  VALID_TOOL=no
20945  if test "x$BDEPS_FTP" = xwget; then
20946    VALID_TOOL=yes
20947    wget -O $tmpfile $with_builddeps_server/$resource
20948  fi
20949  if test "x$BDEPS_FTP" = xlftp; then
20950    VALID_TOOL=yes
20951    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20952  fi
20953  if test "x$BDEPS_FTP" = xftp; then
20954    VALID_TOOL=yes
20955    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20956    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20957    FTPUSERPWD=${FTPSERVER%%@*}
20958    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20959      FTPUSER=${userpwd%%:*}
20960      FTPPWD=${userpwd#*@}
20961      FTPSERVER=${FTPSERVER#*@}
20962    else
20963      FTPUSER=ftp
20964      FTPPWD=ftp
20965    fi
20966    # the "pass" command does not work on some
20967    # ftp clients (read ftp.exe) but if it works,
20968    # passive mode is better!
20969    ( \
20970        echo "user $FTPUSER $FTPPWD"        ; \
20971        echo "pass"                         ; \
20972        echo "bin"                          ; \
20973        echo "get $FTPPATH $tmpfile"              ; \
20974    ) | ftp -in $FTPSERVER
20975  fi
20976  if test "x$VALID_TOOL" != xyes; then
20977    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20978  fi
20979
20980    mv $tmpfile $installdir/$filename
20981    if test ! -s $installdir/$filename; then
20982      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20983    fi
20984    case "$extension" in
20985      zip)  echo "Unzipping $installdir/$filename..."
20986        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20987        ;;
20988      tar.gz) echo "Untaring $installdir/$filename..."
20989        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20990        ;;
20991      tgz) echo "Untaring $installdir/$filename..."
20992        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20993        ;;
20994      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20995        ;;
20996    esac
20997  fi
20998  if test -f $installdir/$filename.unpacked; then
20999    depdir=$installdir
21000  fi
21001
21002      fi
21003      # Source the builddeps file again, because in the previous command, the depdir
21004      # was updated to point at the current build dependency install directory.
21005      . $builddepsfile
21006      # Now extract variables from the builddeps.conf files.
21007      theroot=${builddep_bootjdk_ROOT}
21008      thecflags=${builddep_bootjdk_CFLAGS}
21009      thelibs=${builddep_bootjdk_LIBS}
21010      if test "x$depdir" = x; then
21011        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21012      fi
21013      BOOT_JDK=$depdir
21014      if test "x$theroot" != x; then
21015        BOOT_JDK="$theroot"
21016      fi
21017      if test "x$thecflags" != x; then
21018        BOOT_JDK_CFLAGS="$thecflags"
21019      fi
21020      if test "x$thelibs" != x; then
21021        BOOT_JDK_LIBS="$thelibs"
21022      fi
21023      BOOT_JDK_FOUND=maybe
21024      else BOOT_JDK_FOUND=no
21025
21026    fi
21027    else BOOT_JDK_FOUND=no
21028
21029  fi
21030
21031
21032
21033    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21034    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21035      # Do we have a bin/java?
21036      if test ! -x "$BOOT_JDK/bin/java"; then
21037        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21039        BOOT_JDK_FOUND=no
21040      else
21041        # Do we have a bin/javac?
21042        if test ! -x "$BOOT_JDK/bin/javac"; then
21043          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21045          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21046$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21047          BOOT_JDK_FOUND=no
21048        else
21049          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21050          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21051
21052          # Extra M4 quote needed to protect [] in grep expression.
21053          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21054          if test "x$FOUND_CORRECT_VERSION" = x; then
21055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21057            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21058$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21059            BOOT_JDK_FOUND=no
21060          else
21061            # We're done! :-)
21062            BOOT_JDK_FOUND=yes
21063
21064  # Only process if variable expands to non-empty
21065
21066  if test "x$BOOT_JDK" != x; then
21067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21068
21069  # Input might be given as Windows format, start by converting to
21070  # unix format.
21071  path="$BOOT_JDK"
21072  new_path=`$CYGPATH -u "$path"`
21073
21074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21077  # "foo.exe" is OK but "foo" is an error.
21078  #
21079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21080  # It is also a way to make sure we got the proper file name for the real test later on.
21081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21082  if test "x$test_shortpath" = x; then
21083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21085    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21086  fi
21087
21088  # Call helper function which possibly converts this using DOS-style short mode.
21089  # If so, the updated path is stored in $new_path.
21090
21091  input_path="$new_path"
21092  # Check if we need to convert this using DOS-style short mode. If the path
21093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21094  # take no chances and rewrite it.
21095  # Note: m4 eats our [], so we need to use [ and ] instead.
21096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21097  if test "x$has_forbidden_chars" != x; then
21098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21102      # Going to short mode and back again did indeed matter. Since short mode is
21103      # case insensitive, let's make it lowercase to improve readability.
21104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21105      # Now convert it back to Unix-style (cygpath)
21106      input_path=`$CYGPATH -u "$shortmode_path"`
21107      new_path="$input_path"
21108    fi
21109  fi
21110
21111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21112  if test "x$test_cygdrive_prefix" = x; then
21113    # As a simple fix, exclude /usr/bin since it's not a real path.
21114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21116      # a path prefixed by /cygdrive for fixpath to work.
21117      new_path="$CYGWIN_ROOT_PATH$input_path"
21118    fi
21119  fi
21120
21121
21122  if test "x$path" != "x$new_path"; then
21123    BOOT_JDK="$new_path"
21124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21126  fi
21127
21128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21129
21130  path="$BOOT_JDK"
21131  has_colon=`$ECHO $path | $GREP ^.:`
21132  new_path="$path"
21133  if test "x$has_colon" = x; then
21134    # Not in mixed or Windows style, start by that.
21135    new_path=`cmd //c echo $path`
21136  fi
21137
21138
21139  input_path="$new_path"
21140  # Check if we need to convert this using DOS-style short mode. If the path
21141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21142  # take no chances and rewrite it.
21143  # Note: m4 eats our [], so we need to use [ and ] instead.
21144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21145  if test "x$has_forbidden_chars" != x; then
21146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21148  fi
21149
21150
21151  windows_path="$new_path"
21152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21153    unix_path=`$CYGPATH -u "$windows_path"`
21154    new_path="$unix_path"
21155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21157    new_path="$unix_path"
21158  fi
21159
21160  if test "x$path" != "x$new_path"; then
21161    BOOT_JDK="$new_path"
21162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21163$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21164  fi
21165
21166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21168
21169    else
21170      # We're on a unix platform. Hooray! :)
21171      path="$BOOT_JDK"
21172      has_space=`$ECHO "$path" | $GREP " "`
21173      if test "x$has_space" != x; then
21174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21177      fi
21178
21179      # Use eval to expand a potential ~
21180      eval path="$path"
21181      if test ! -f "$path" && test ! -d "$path"; then
21182        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21183      fi
21184
21185      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21186    fi
21187  fi
21188
21189            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21190$as_echo_n "checking for Boot JDK... " >&6; }
21191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21192$as_echo "$BOOT_JDK" >&6; }
21193            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21194$as_echo_n "checking Boot JDK version... " >&6; }
21195            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21197$as_echo "$BOOT_JDK_VERSION" >&6; }
21198          fi # end check jdk version
21199        fi # end check javac
21200      fi # end check java
21201    fi # end check boot jdk found
21202  fi
21203
21204
21205  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21206
21207  if test "x$BOOT_JDK_FOUND" = xno; then
21208    # Now execute the test
21209
21210  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21211    # First check at user selected default
21212
21213  if test "x$BOOT_JDK_FOUND" = xno; then
21214    # Now execute the test
21215
21216  if test -x /usr/libexec/java_home; then
21217    BOOT_JDK=`/usr/libexec/java_home `
21218    BOOT_JDK_FOUND=maybe
21219    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21220$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21221  fi
21222
21223
21224    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21225    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21226      # Do we have a bin/java?
21227      if test ! -x "$BOOT_JDK/bin/java"; then
21228        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21230        BOOT_JDK_FOUND=no
21231      else
21232        # Do we have a bin/javac?
21233        if test ! -x "$BOOT_JDK/bin/javac"; then
21234          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21236          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21237$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21238          BOOT_JDK_FOUND=no
21239        else
21240          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21241          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21242
21243          # Extra M4 quote needed to protect [] in grep expression.
21244          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21245          if test "x$FOUND_CORRECT_VERSION" = x; then
21246            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21248            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21249$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21250            BOOT_JDK_FOUND=no
21251          else
21252            # We're done! :-)
21253            BOOT_JDK_FOUND=yes
21254
21255  # Only process if variable expands to non-empty
21256
21257  if test "x$BOOT_JDK" != x; then
21258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21259
21260  # Input might be given as Windows format, start by converting to
21261  # unix format.
21262  path="$BOOT_JDK"
21263  new_path=`$CYGPATH -u "$path"`
21264
21265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21268  # "foo.exe" is OK but "foo" is an error.
21269  #
21270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21271  # It is also a way to make sure we got the proper file name for the real test later on.
21272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21273  if test "x$test_shortpath" = x; then
21274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21276    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21277  fi
21278
21279  # Call helper function which possibly converts this using DOS-style short mode.
21280  # If so, the updated path is stored in $new_path.
21281
21282  input_path="$new_path"
21283  # Check if we need to convert this using DOS-style short mode. If the path
21284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21285  # take no chances and rewrite it.
21286  # Note: m4 eats our [], so we need to use [ and ] instead.
21287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21288  if test "x$has_forbidden_chars" != x; then
21289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21293      # Going to short mode and back again did indeed matter. Since short mode is
21294      # case insensitive, let's make it lowercase to improve readability.
21295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21296      # Now convert it back to Unix-style (cygpath)
21297      input_path=`$CYGPATH -u "$shortmode_path"`
21298      new_path="$input_path"
21299    fi
21300  fi
21301
21302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21303  if test "x$test_cygdrive_prefix" = x; then
21304    # As a simple fix, exclude /usr/bin since it's not a real path.
21305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21307      # a path prefixed by /cygdrive for fixpath to work.
21308      new_path="$CYGWIN_ROOT_PATH$input_path"
21309    fi
21310  fi
21311
21312
21313  if test "x$path" != "x$new_path"; then
21314    BOOT_JDK="$new_path"
21315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21317  fi
21318
21319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21320
21321  path="$BOOT_JDK"
21322  has_colon=`$ECHO $path | $GREP ^.:`
21323  new_path="$path"
21324  if test "x$has_colon" = x; then
21325    # Not in mixed or Windows style, start by that.
21326    new_path=`cmd //c echo $path`
21327  fi
21328
21329
21330  input_path="$new_path"
21331  # Check if we need to convert this using DOS-style short mode. If the path
21332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21333  # take no chances and rewrite it.
21334  # Note: m4 eats our [], so we need to use [ and ] instead.
21335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21336  if test "x$has_forbidden_chars" != x; then
21337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21339  fi
21340
21341
21342  windows_path="$new_path"
21343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21344    unix_path=`$CYGPATH -u "$windows_path"`
21345    new_path="$unix_path"
21346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21348    new_path="$unix_path"
21349  fi
21350
21351  if test "x$path" != "x$new_path"; then
21352    BOOT_JDK="$new_path"
21353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21355  fi
21356
21357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21359
21360    else
21361      # We're on a unix platform. Hooray! :)
21362      path="$BOOT_JDK"
21363      has_space=`$ECHO "$path" | $GREP " "`
21364      if test "x$has_space" != x; then
21365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21368      fi
21369
21370      # Use eval to expand a potential ~
21371      eval path="$path"
21372      if test ! -f "$path" && test ! -d "$path"; then
21373        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21374      fi
21375
21376      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21377    fi
21378  fi
21379
21380            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21381$as_echo_n "checking for Boot JDK... " >&6; }
21382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21383$as_echo "$BOOT_JDK" >&6; }
21384            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21385$as_echo_n "checking Boot JDK version... " >&6; }
21386            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21388$as_echo "$BOOT_JDK_VERSION" >&6; }
21389          fi # end check jdk version
21390        fi # end check javac
21391      fi # end check java
21392    fi # end check boot jdk found
21393  fi
21394
21395    # If that did not work out (e.g. too old), try explicit versions instead
21396
21397  if test "x$BOOT_JDK_FOUND" = xno; then
21398    # Now execute the test
21399
21400  if test -x /usr/libexec/java_home; then
21401    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21402    BOOT_JDK_FOUND=maybe
21403    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21404$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21405  fi
21406
21407
21408    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21409    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21410      # Do we have a bin/java?
21411      if test ! -x "$BOOT_JDK/bin/java"; then
21412        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21414        BOOT_JDK_FOUND=no
21415      else
21416        # Do we have a bin/javac?
21417        if test ! -x "$BOOT_JDK/bin/javac"; then
21418          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21420          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21421$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21422          BOOT_JDK_FOUND=no
21423        else
21424          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21425          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21426
21427          # Extra M4 quote needed to protect [] in grep expression.
21428          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21429          if test "x$FOUND_CORRECT_VERSION" = x; then
21430            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21432            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21433$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21434            BOOT_JDK_FOUND=no
21435          else
21436            # We're done! :-)
21437            BOOT_JDK_FOUND=yes
21438
21439  # Only process if variable expands to non-empty
21440
21441  if test "x$BOOT_JDK" != x; then
21442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21443
21444  # Input might be given as Windows format, start by converting to
21445  # unix format.
21446  path="$BOOT_JDK"
21447  new_path=`$CYGPATH -u "$path"`
21448
21449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21452  # "foo.exe" is OK but "foo" is an error.
21453  #
21454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21455  # It is also a way to make sure we got the proper file name for the real test later on.
21456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21457  if test "x$test_shortpath" = x; then
21458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21460    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21461  fi
21462
21463  # Call helper function which possibly converts this using DOS-style short mode.
21464  # If so, the updated path is stored in $new_path.
21465
21466  input_path="$new_path"
21467  # Check if we need to convert this using DOS-style short mode. If the path
21468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21469  # take no chances and rewrite it.
21470  # Note: m4 eats our [], so we need to use [ and ] instead.
21471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21472  if test "x$has_forbidden_chars" != x; then
21473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21477      # Going to short mode and back again did indeed matter. Since short mode is
21478      # case insensitive, let's make it lowercase to improve readability.
21479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21480      # Now convert it back to Unix-style (cygpath)
21481      input_path=`$CYGPATH -u "$shortmode_path"`
21482      new_path="$input_path"
21483    fi
21484  fi
21485
21486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21487  if test "x$test_cygdrive_prefix" = x; then
21488    # As a simple fix, exclude /usr/bin since it's not a real path.
21489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21491      # a path prefixed by /cygdrive for fixpath to work.
21492      new_path="$CYGWIN_ROOT_PATH$input_path"
21493    fi
21494  fi
21495
21496
21497  if test "x$path" != "x$new_path"; then
21498    BOOT_JDK="$new_path"
21499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21500$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21501  fi
21502
21503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21504
21505  path="$BOOT_JDK"
21506  has_colon=`$ECHO $path | $GREP ^.:`
21507  new_path="$path"
21508  if test "x$has_colon" = x; then
21509    # Not in mixed or Windows style, start by that.
21510    new_path=`cmd //c echo $path`
21511  fi
21512
21513
21514  input_path="$new_path"
21515  # Check if we need to convert this using DOS-style short mode. If the path
21516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21517  # take no chances and rewrite it.
21518  # Note: m4 eats our [], so we need to use [ and ] instead.
21519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21520  if test "x$has_forbidden_chars" != x; then
21521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21523  fi
21524
21525
21526  windows_path="$new_path"
21527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21528    unix_path=`$CYGPATH -u "$windows_path"`
21529    new_path="$unix_path"
21530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21532    new_path="$unix_path"
21533  fi
21534
21535  if test "x$path" != "x$new_path"; then
21536    BOOT_JDK="$new_path"
21537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21539  fi
21540
21541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21543
21544    else
21545      # We're on a unix platform. Hooray! :)
21546      path="$BOOT_JDK"
21547      has_space=`$ECHO "$path" | $GREP " "`
21548      if test "x$has_space" != x; then
21549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21551        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21552      fi
21553
21554      # Use eval to expand a potential ~
21555      eval path="$path"
21556      if test ! -f "$path" && test ! -d "$path"; then
21557        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21558      fi
21559
21560      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21561    fi
21562  fi
21563
21564            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21565$as_echo_n "checking for Boot JDK... " >&6; }
21566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21567$as_echo "$BOOT_JDK" >&6; }
21568            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21569$as_echo_n "checking Boot JDK version... " >&6; }
21570            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21572$as_echo "$BOOT_JDK_VERSION" >&6; }
21573          fi # end check jdk version
21574        fi # end check javac
21575      fi # end check java
21576    fi # end check boot jdk found
21577  fi
21578
21579
21580  if test "x$BOOT_JDK_FOUND" = xno; then
21581    # Now execute the test
21582
21583  if test -x /usr/libexec/java_home; then
21584    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21585    BOOT_JDK_FOUND=maybe
21586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21587$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21588  fi
21589
21590
21591    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21592    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21593      # Do we have a bin/java?
21594      if test ! -x "$BOOT_JDK/bin/java"; then
21595        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21597        BOOT_JDK_FOUND=no
21598      else
21599        # Do we have a bin/javac?
21600        if test ! -x "$BOOT_JDK/bin/javac"; then
21601          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21603          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21604$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21605          BOOT_JDK_FOUND=no
21606        else
21607          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21608          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21609
21610          # Extra M4 quote needed to protect [] in grep expression.
21611          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21612          if test "x$FOUND_CORRECT_VERSION" = x; then
21613            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21615            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21616$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21617            BOOT_JDK_FOUND=no
21618          else
21619            # We're done! :-)
21620            BOOT_JDK_FOUND=yes
21621
21622  # Only process if variable expands to non-empty
21623
21624  if test "x$BOOT_JDK" != x; then
21625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21626
21627  # Input might be given as Windows format, start by converting to
21628  # unix format.
21629  path="$BOOT_JDK"
21630  new_path=`$CYGPATH -u "$path"`
21631
21632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21635  # "foo.exe" is OK but "foo" is an error.
21636  #
21637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21638  # It is also a way to make sure we got the proper file name for the real test later on.
21639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21640  if test "x$test_shortpath" = x; then
21641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21643    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21644  fi
21645
21646  # Call helper function which possibly converts this using DOS-style short mode.
21647  # If so, the updated path is stored in $new_path.
21648
21649  input_path="$new_path"
21650  # Check if we need to convert this using DOS-style short mode. If the path
21651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21652  # take no chances and rewrite it.
21653  # Note: m4 eats our [], so we need to use [ and ] instead.
21654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21655  if test "x$has_forbidden_chars" != x; then
21656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21660      # Going to short mode and back again did indeed matter. Since short mode is
21661      # case insensitive, let's make it lowercase to improve readability.
21662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21663      # Now convert it back to Unix-style (cygpath)
21664      input_path=`$CYGPATH -u "$shortmode_path"`
21665      new_path="$input_path"
21666    fi
21667  fi
21668
21669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21670  if test "x$test_cygdrive_prefix" = x; then
21671    # As a simple fix, exclude /usr/bin since it's not a real path.
21672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21674      # a path prefixed by /cygdrive for fixpath to work.
21675      new_path="$CYGWIN_ROOT_PATH$input_path"
21676    fi
21677  fi
21678
21679
21680  if test "x$path" != "x$new_path"; then
21681    BOOT_JDK="$new_path"
21682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21684  fi
21685
21686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21687
21688  path="$BOOT_JDK"
21689  has_colon=`$ECHO $path | $GREP ^.:`
21690  new_path="$path"
21691  if test "x$has_colon" = x; then
21692    # Not in mixed or Windows style, start by that.
21693    new_path=`cmd //c echo $path`
21694  fi
21695
21696
21697  input_path="$new_path"
21698  # Check if we need to convert this using DOS-style short mode. If the path
21699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21700  # take no chances and rewrite it.
21701  # Note: m4 eats our [], so we need to use [ and ] instead.
21702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21703  if test "x$has_forbidden_chars" != x; then
21704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21706  fi
21707
21708
21709  windows_path="$new_path"
21710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21711    unix_path=`$CYGPATH -u "$windows_path"`
21712    new_path="$unix_path"
21713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21715    new_path="$unix_path"
21716  fi
21717
21718  if test "x$path" != "x$new_path"; then
21719    BOOT_JDK="$new_path"
21720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21722  fi
21723
21724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21726
21727    else
21728      # We're on a unix platform. Hooray! :)
21729      path="$BOOT_JDK"
21730      has_space=`$ECHO "$path" | $GREP " "`
21731      if test "x$has_space" != x; then
21732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21735      fi
21736
21737      # Use eval to expand a potential ~
21738      eval path="$path"
21739      if test ! -f "$path" && test ! -d "$path"; then
21740        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21741      fi
21742
21743      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21744    fi
21745  fi
21746
21747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21748$as_echo_n "checking for Boot JDK... " >&6; }
21749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21750$as_echo "$BOOT_JDK" >&6; }
21751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21752$as_echo_n "checking Boot JDK version... " >&6; }
21753            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21755$as_echo "$BOOT_JDK_VERSION" >&6; }
21756          fi # end check jdk version
21757        fi # end check javac
21758      fi # end check java
21759    fi # end check boot jdk found
21760  fi
21761
21762
21763  if test "x$BOOT_JDK_FOUND" = xno; then
21764    # Now execute the test
21765
21766  if test -x /usr/libexec/java_home; then
21767    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21768    BOOT_JDK_FOUND=maybe
21769    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21770$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21771  fi
21772
21773
21774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21776      # Do we have a bin/java?
21777      if test ! -x "$BOOT_JDK/bin/java"; then
21778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21780        BOOT_JDK_FOUND=no
21781      else
21782        # Do we have a bin/javac?
21783        if test ! -x "$BOOT_JDK/bin/javac"; then
21784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21788          BOOT_JDK_FOUND=no
21789        else
21790          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21791          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21792
21793          # Extra M4 quote needed to protect [] in grep expression.
21794          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21795          if test "x$FOUND_CORRECT_VERSION" = x; then
21796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21798            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21799$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21800            BOOT_JDK_FOUND=no
21801          else
21802            # We're done! :-)
21803            BOOT_JDK_FOUND=yes
21804
21805  # Only process if variable expands to non-empty
21806
21807  if test "x$BOOT_JDK" != x; then
21808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21809
21810  # Input might be given as Windows format, start by converting to
21811  # unix format.
21812  path="$BOOT_JDK"
21813  new_path=`$CYGPATH -u "$path"`
21814
21815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21818  # "foo.exe" is OK but "foo" is an error.
21819  #
21820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21821  # It is also a way to make sure we got the proper file name for the real test later on.
21822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21823  if test "x$test_shortpath" = x; then
21824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21827  fi
21828
21829  # Call helper function which possibly converts this using DOS-style short mode.
21830  # If so, the updated path is stored in $new_path.
21831
21832  input_path="$new_path"
21833  # Check if we need to convert this using DOS-style short mode. If the path
21834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21835  # take no chances and rewrite it.
21836  # Note: m4 eats our [], so we need to use [ and ] instead.
21837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21838  if test "x$has_forbidden_chars" != x; then
21839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21843      # Going to short mode and back again did indeed matter. Since short mode is
21844      # case insensitive, let's make it lowercase to improve readability.
21845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21846      # Now convert it back to Unix-style (cygpath)
21847      input_path=`$CYGPATH -u "$shortmode_path"`
21848      new_path="$input_path"
21849    fi
21850  fi
21851
21852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21853  if test "x$test_cygdrive_prefix" = x; then
21854    # As a simple fix, exclude /usr/bin since it's not a real path.
21855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21857      # a path prefixed by /cygdrive for fixpath to work.
21858      new_path="$CYGWIN_ROOT_PATH$input_path"
21859    fi
21860  fi
21861
21862
21863  if test "x$path" != "x$new_path"; then
21864    BOOT_JDK="$new_path"
21865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21867  fi
21868
21869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21870
21871  path="$BOOT_JDK"
21872  has_colon=`$ECHO $path | $GREP ^.:`
21873  new_path="$path"
21874  if test "x$has_colon" = x; then
21875    # Not in mixed or Windows style, start by that.
21876    new_path=`cmd //c echo $path`
21877  fi
21878
21879
21880  input_path="$new_path"
21881  # Check if we need to convert this using DOS-style short mode. If the path
21882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21883  # take no chances and rewrite it.
21884  # Note: m4 eats our [], so we need to use [ and ] instead.
21885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21886  if test "x$has_forbidden_chars" != x; then
21887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21889  fi
21890
21891
21892  windows_path="$new_path"
21893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21894    unix_path=`$CYGPATH -u "$windows_path"`
21895    new_path="$unix_path"
21896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21898    new_path="$unix_path"
21899  fi
21900
21901  if test "x$path" != "x$new_path"; then
21902    BOOT_JDK="$new_path"
21903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21905  fi
21906
21907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21909
21910    else
21911      # We're on a unix platform. Hooray! :)
21912      path="$BOOT_JDK"
21913      has_space=`$ECHO "$path" | $GREP " "`
21914      if test "x$has_space" != x; then
21915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21918      fi
21919
21920      # Use eval to expand a potential ~
21921      eval path="$path"
21922      if test ! -f "$path" && test ! -d "$path"; then
21923        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21924      fi
21925
21926      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21927    fi
21928  fi
21929
21930            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21931$as_echo_n "checking for Boot JDK... " >&6; }
21932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21933$as_echo "$BOOT_JDK" >&6; }
21934            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21935$as_echo_n "checking Boot JDK version... " >&6; }
21936            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21938$as_echo "$BOOT_JDK_VERSION" >&6; }
21939          fi # end check jdk version
21940        fi # end check javac
21941      fi # end check java
21942    fi # end check boot jdk found
21943  fi
21944
21945  fi
21946
21947
21948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21950      # Do we have a bin/java?
21951      if test ! -x "$BOOT_JDK/bin/java"; then
21952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21954        BOOT_JDK_FOUND=no
21955      else
21956        # Do we have a bin/javac?
21957        if test ! -x "$BOOT_JDK/bin/javac"; then
21958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21962          BOOT_JDK_FOUND=no
21963        else
21964          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21965          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21966
21967          # Extra M4 quote needed to protect [] in grep expression.
21968          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21969          if test "x$FOUND_CORRECT_VERSION" = x; then
21970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21972            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21973$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21974            BOOT_JDK_FOUND=no
21975          else
21976            # We're done! :-)
21977            BOOT_JDK_FOUND=yes
21978
21979  # Only process if variable expands to non-empty
21980
21981  if test "x$BOOT_JDK" != x; then
21982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21983
21984  # Input might be given as Windows format, start by converting to
21985  # unix format.
21986  path="$BOOT_JDK"
21987  new_path=`$CYGPATH -u "$path"`
21988
21989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21992  # "foo.exe" is OK but "foo" is an error.
21993  #
21994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21995  # It is also a way to make sure we got the proper file name for the real test later on.
21996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21997  if test "x$test_shortpath" = x; then
21998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22000    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22001  fi
22002
22003  # Call helper function which possibly converts this using DOS-style short mode.
22004  # If so, the updated path is stored in $new_path.
22005
22006  input_path="$new_path"
22007  # Check if we need to convert this using DOS-style short mode. If the path
22008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22009  # take no chances and rewrite it.
22010  # Note: m4 eats our [], so we need to use [ and ] instead.
22011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22012  if test "x$has_forbidden_chars" != x; then
22013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22017      # Going to short mode and back again did indeed matter. Since short mode is
22018      # case insensitive, let's make it lowercase to improve readability.
22019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22020      # Now convert it back to Unix-style (cygpath)
22021      input_path=`$CYGPATH -u "$shortmode_path"`
22022      new_path="$input_path"
22023    fi
22024  fi
22025
22026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22027  if test "x$test_cygdrive_prefix" = x; then
22028    # As a simple fix, exclude /usr/bin since it's not a real path.
22029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22031      # a path prefixed by /cygdrive for fixpath to work.
22032      new_path="$CYGWIN_ROOT_PATH$input_path"
22033    fi
22034  fi
22035
22036
22037  if test "x$path" != "x$new_path"; then
22038    BOOT_JDK="$new_path"
22039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22041  fi
22042
22043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22044
22045  path="$BOOT_JDK"
22046  has_colon=`$ECHO $path | $GREP ^.:`
22047  new_path="$path"
22048  if test "x$has_colon" = x; then
22049    # Not in mixed or Windows style, start by that.
22050    new_path=`cmd //c echo $path`
22051  fi
22052
22053
22054  input_path="$new_path"
22055  # Check if we need to convert this using DOS-style short mode. If the path
22056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22057  # take no chances and rewrite it.
22058  # Note: m4 eats our [], so we need to use [ and ] instead.
22059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22060  if test "x$has_forbidden_chars" != x; then
22061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22063  fi
22064
22065
22066  windows_path="$new_path"
22067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22068    unix_path=`$CYGPATH -u "$windows_path"`
22069    new_path="$unix_path"
22070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22072    new_path="$unix_path"
22073  fi
22074
22075  if test "x$path" != "x$new_path"; then
22076    BOOT_JDK="$new_path"
22077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22079  fi
22080
22081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22083
22084    else
22085      # We're on a unix platform. Hooray! :)
22086      path="$BOOT_JDK"
22087      has_space=`$ECHO "$path" | $GREP " "`
22088      if test "x$has_space" != x; then
22089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22092      fi
22093
22094      # Use eval to expand a potential ~
22095      eval path="$path"
22096      if test ! -f "$path" && test ! -d "$path"; then
22097        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22098      fi
22099
22100      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22101    fi
22102  fi
22103
22104            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22105$as_echo_n "checking for Boot JDK... " >&6; }
22106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22107$as_echo "$BOOT_JDK" >&6; }
22108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22109$as_echo_n "checking Boot JDK version... " >&6; }
22110            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22111            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22112$as_echo "$BOOT_JDK_VERSION" >&6; }
22113          fi # end check jdk version
22114        fi # end check javac
22115      fi # end check java
22116    fi # end check boot jdk found
22117  fi
22118
22119
22120  # Test: Is $JAVA_HOME set?
22121
22122  if test "x$BOOT_JDK_FOUND" = xno; then
22123    # Now execute the test
22124
22125  if test "x$JAVA_HOME" != x; then
22126    JAVA_HOME_PROCESSED="$JAVA_HOME"
22127
22128  # Only process if variable expands to non-empty
22129
22130  if test "x$JAVA_HOME_PROCESSED" != x; then
22131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22132
22133  # Input might be given as Windows format, start by converting to
22134  # unix format.
22135  path="$JAVA_HOME_PROCESSED"
22136  new_path=`$CYGPATH -u "$path"`
22137
22138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22141  # "foo.exe" is OK but "foo" is an error.
22142  #
22143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22144  # It is also a way to make sure we got the proper file name for the real test later on.
22145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22146  if test "x$test_shortpath" = x; then
22147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22148$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22149    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22150  fi
22151
22152  # Call helper function which possibly converts this using DOS-style short mode.
22153  # If so, the updated path is stored in $new_path.
22154
22155  input_path="$new_path"
22156  # Check if we need to convert this using DOS-style short mode. If the path
22157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22158  # take no chances and rewrite it.
22159  # Note: m4 eats our [], so we need to use [ and ] instead.
22160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22161  if test "x$has_forbidden_chars" != x; then
22162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22166      # Going to short mode and back again did indeed matter. Since short mode is
22167      # case insensitive, let's make it lowercase to improve readability.
22168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22169      # Now convert it back to Unix-style (cygpath)
22170      input_path=`$CYGPATH -u "$shortmode_path"`
22171      new_path="$input_path"
22172    fi
22173  fi
22174
22175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22176  if test "x$test_cygdrive_prefix" = x; then
22177    # As a simple fix, exclude /usr/bin since it's not a real path.
22178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22180      # a path prefixed by /cygdrive for fixpath to work.
22181      new_path="$CYGWIN_ROOT_PATH$input_path"
22182    fi
22183  fi
22184
22185
22186  if test "x$path" != "x$new_path"; then
22187    JAVA_HOME_PROCESSED="$new_path"
22188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22189$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22190  fi
22191
22192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22193
22194  path="$JAVA_HOME_PROCESSED"
22195  has_colon=`$ECHO $path | $GREP ^.:`
22196  new_path="$path"
22197  if test "x$has_colon" = x; then
22198    # Not in mixed or Windows style, start by that.
22199    new_path=`cmd //c echo $path`
22200  fi
22201
22202
22203  input_path="$new_path"
22204  # Check if we need to convert this using DOS-style short mode. If the path
22205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22206  # take no chances and rewrite it.
22207  # Note: m4 eats our [], so we need to use [ and ] instead.
22208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22209  if test "x$has_forbidden_chars" != x; then
22210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22212  fi
22213
22214
22215  windows_path="$new_path"
22216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22217    unix_path=`$CYGPATH -u "$windows_path"`
22218    new_path="$unix_path"
22219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22221    new_path="$unix_path"
22222  fi
22223
22224  if test "x$path" != "x$new_path"; then
22225    JAVA_HOME_PROCESSED="$new_path"
22226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22227$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22228  fi
22229
22230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22232
22233    else
22234      # We're on a unix platform. Hooray! :)
22235      path="$JAVA_HOME_PROCESSED"
22236      has_space=`$ECHO "$path" | $GREP " "`
22237      if test "x$has_space" != x; then
22238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22239$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22241      fi
22242
22243      # Use eval to expand a potential ~
22244      eval path="$path"
22245      if test ! -f "$path" && test ! -d "$path"; then
22246        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22247      fi
22248
22249      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22250    fi
22251  fi
22252
22253    if test ! -d "$JAVA_HOME_PROCESSED"; then
22254      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22255$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22256    else
22257      # Aha, the user has set a JAVA_HOME
22258      # let us use that as the Boot JDK.
22259      BOOT_JDK="$JAVA_HOME_PROCESSED"
22260      BOOT_JDK_FOUND=maybe
22261      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22262$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22263    fi
22264  fi
22265
22266
22267    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22268    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22269      # Do we have a bin/java?
22270      if test ! -x "$BOOT_JDK/bin/java"; then
22271        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22273        BOOT_JDK_FOUND=no
22274      else
22275        # Do we have a bin/javac?
22276        if test ! -x "$BOOT_JDK/bin/javac"; then
22277          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22279          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22280$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22281          BOOT_JDK_FOUND=no
22282        else
22283          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22284          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22285
22286          # Extra M4 quote needed to protect [] in grep expression.
22287          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22288          if test "x$FOUND_CORRECT_VERSION" = x; then
22289            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22291            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22292$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22293            BOOT_JDK_FOUND=no
22294          else
22295            # We're done! :-)
22296            BOOT_JDK_FOUND=yes
22297
22298  # Only process if variable expands to non-empty
22299
22300  if test "x$BOOT_JDK" != x; then
22301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22302
22303  # Input might be given as Windows format, start by converting to
22304  # unix format.
22305  path="$BOOT_JDK"
22306  new_path=`$CYGPATH -u "$path"`
22307
22308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22311  # "foo.exe" is OK but "foo" is an error.
22312  #
22313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22314  # It is also a way to make sure we got the proper file name for the real test later on.
22315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22316  if test "x$test_shortpath" = x; then
22317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22319    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22320  fi
22321
22322  # Call helper function which possibly converts this using DOS-style short mode.
22323  # If so, the updated path is stored in $new_path.
22324
22325  input_path="$new_path"
22326  # Check if we need to convert this using DOS-style short mode. If the path
22327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22328  # take no chances and rewrite it.
22329  # Note: m4 eats our [], so we need to use [ and ] instead.
22330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22331  if test "x$has_forbidden_chars" != x; then
22332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22336      # Going to short mode and back again did indeed matter. Since short mode is
22337      # case insensitive, let's make it lowercase to improve readability.
22338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22339      # Now convert it back to Unix-style (cygpath)
22340      input_path=`$CYGPATH -u "$shortmode_path"`
22341      new_path="$input_path"
22342    fi
22343  fi
22344
22345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22346  if test "x$test_cygdrive_prefix" = x; then
22347    # As a simple fix, exclude /usr/bin since it's not a real path.
22348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22350      # a path prefixed by /cygdrive for fixpath to work.
22351      new_path="$CYGWIN_ROOT_PATH$input_path"
22352    fi
22353  fi
22354
22355
22356  if test "x$path" != "x$new_path"; then
22357    BOOT_JDK="$new_path"
22358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22360  fi
22361
22362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22363
22364  path="$BOOT_JDK"
22365  has_colon=`$ECHO $path | $GREP ^.:`
22366  new_path="$path"
22367  if test "x$has_colon" = x; then
22368    # Not in mixed or Windows style, start by that.
22369    new_path=`cmd //c echo $path`
22370  fi
22371
22372
22373  input_path="$new_path"
22374  # Check if we need to convert this using DOS-style short mode. If the path
22375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22376  # take no chances and rewrite it.
22377  # Note: m4 eats our [], so we need to use [ and ] instead.
22378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22379  if test "x$has_forbidden_chars" != x; then
22380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22382  fi
22383
22384
22385  windows_path="$new_path"
22386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22387    unix_path=`$CYGPATH -u "$windows_path"`
22388    new_path="$unix_path"
22389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22391    new_path="$unix_path"
22392  fi
22393
22394  if test "x$path" != "x$new_path"; then
22395    BOOT_JDK="$new_path"
22396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22398  fi
22399
22400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22402
22403    else
22404      # We're on a unix platform. Hooray! :)
22405      path="$BOOT_JDK"
22406      has_space=`$ECHO "$path" | $GREP " "`
22407      if test "x$has_space" != x; then
22408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22409$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22410        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22411      fi
22412
22413      # Use eval to expand a potential ~
22414      eval path="$path"
22415      if test ! -f "$path" && test ! -d "$path"; then
22416        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22417      fi
22418
22419      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22420    fi
22421  fi
22422
22423            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22424$as_echo_n "checking for Boot JDK... " >&6; }
22425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22426$as_echo "$BOOT_JDK" >&6; }
22427            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22428$as_echo_n "checking Boot JDK version... " >&6; }
22429            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22431$as_echo "$BOOT_JDK_VERSION" >&6; }
22432          fi # end check jdk version
22433        fi # end check javac
22434      fi # end check java
22435    fi # end check boot jdk found
22436  fi
22437
22438
22439  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22440
22441  if test "x$BOOT_JDK_FOUND" = xno; then
22442    # Now execute the test
22443
22444  # Extract the first word of "javac", so it can be a program name with args.
22445set dummy javac; ac_word=$2
22446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22447$as_echo_n "checking for $ac_word... " >&6; }
22448if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22449  $as_echo_n "(cached) " >&6
22450else
22451  case $JAVAC_CHECK in
22452  [\\/]* | ?:[\\/]*)
22453  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22454  ;;
22455  *)
22456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22457for as_dir in $PATH
22458do
22459  IFS=$as_save_IFS
22460  test -z "$as_dir" && as_dir=.
22461    for ac_exec_ext in '' $ac_executable_extensions; do
22462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22463    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22465    break 2
22466  fi
22467done
22468  done
22469IFS=$as_save_IFS
22470
22471  ;;
22472esac
22473fi
22474JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22475if test -n "$JAVAC_CHECK"; then
22476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22477$as_echo "$JAVAC_CHECK" >&6; }
22478else
22479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22480$as_echo "no" >&6; }
22481fi
22482
22483
22484  # Extract the first word of "java", so it can be a program name with args.
22485set dummy java; ac_word=$2
22486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22487$as_echo_n "checking for $ac_word... " >&6; }
22488if ${ac_cv_path_JAVA_CHECK+:} false; then :
22489  $as_echo_n "(cached) " >&6
22490else
22491  case $JAVA_CHECK in
22492  [\\/]* | ?:[\\/]*)
22493  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22494  ;;
22495  *)
22496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22497for as_dir in $PATH
22498do
22499  IFS=$as_save_IFS
22500  test -z "$as_dir" && as_dir=.
22501    for ac_exec_ext in '' $ac_executable_extensions; do
22502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22503    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22505    break 2
22506  fi
22507done
22508  done
22509IFS=$as_save_IFS
22510
22511  ;;
22512esac
22513fi
22514JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22515if test -n "$JAVA_CHECK"; then
22516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22517$as_echo "$JAVA_CHECK" >&6; }
22518else
22519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22520$as_echo "no" >&6; }
22521fi
22522
22523
22524  BINARY="$JAVAC_CHECK"
22525  if test "x$JAVAC_CHECK" = x; then
22526    BINARY="$JAVA_CHECK"
22527  fi
22528  if test "x$BINARY" != x; then
22529    # So there is a java(c) binary, it might be part of a JDK.
22530    # Lets find the JDK/JRE directory by following symbolic links.
22531    # Linux/GNU systems often have links from /usr/bin/java to
22532    # /etc/alternatives/java to the real JDK binary.
22533
22534  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22535    # Follow a chain of symbolic links. Use readlink
22536    # where it exists, else fall back to horribly
22537    # complicated shell code.
22538    if test "x$READLINK_TESTED" != yes; then
22539      # On MacOSX there is a readlink tool with a different
22540      # purpose than the GNU readlink tool. Check the found readlink.
22541      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22542      if test "x$ISGNU" = x; then
22543        # A readlink that we do not know how to use.
22544        # Are there other non-GNU readlinks out there?
22545        READLINK_TESTED=yes
22546        READLINK=
22547      fi
22548    fi
22549
22550    if test "x$READLINK" != x; then
22551      BINARY=`$READLINK -f $BINARY`
22552    else
22553      # Save the current directory for restoring afterwards
22554      STARTDIR=$PWD
22555      COUNTER=0
22556      sym_link_dir=`$DIRNAME $BINARY`
22557      sym_link_file=`$BASENAME $BINARY`
22558      cd $sym_link_dir
22559      # Use -P flag to resolve symlinks in directories.
22560      cd `$THEPWDCMD -P`
22561      sym_link_dir=`$THEPWDCMD -P`
22562      # Resolve file symlinks
22563      while test $COUNTER -lt 20; do
22564        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22565        if test "x$ISLINK" == x; then
22566          # This is not a symbolic link! We are done!
22567          break
22568        fi
22569        # Again resolve directory symlinks since the target of the just found
22570        # link could be in a different directory
22571        cd `$DIRNAME $ISLINK`
22572        sym_link_dir=`$THEPWDCMD -P`
22573        sym_link_file=`$BASENAME $ISLINK`
22574        let COUNTER=COUNTER+1
22575      done
22576      cd $STARTDIR
22577      BINARY=$sym_link_dir/$sym_link_file
22578    fi
22579  fi
22580
22581    BOOT_JDK=`dirname "$BINARY"`
22582    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22583    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22584      # Looks like we found ourselves an JDK
22585      BOOT_JDK_FOUND=maybe
22586      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22587$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22588    fi
22589  fi
22590
22591
22592    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22593    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22594      # Do we have a bin/java?
22595      if test ! -x "$BOOT_JDK/bin/java"; then
22596        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22598        BOOT_JDK_FOUND=no
22599      else
22600        # Do we have a bin/javac?
22601        if test ! -x "$BOOT_JDK/bin/javac"; then
22602          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22604          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22605$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22606          BOOT_JDK_FOUND=no
22607        else
22608          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22609          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22610
22611          # Extra M4 quote needed to protect [] in grep expression.
22612          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22613          if test "x$FOUND_CORRECT_VERSION" = x; then
22614            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22616            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22617$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22618            BOOT_JDK_FOUND=no
22619          else
22620            # We're done! :-)
22621            BOOT_JDK_FOUND=yes
22622
22623  # Only process if variable expands to non-empty
22624
22625  if test "x$BOOT_JDK" != x; then
22626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22627
22628  # Input might be given as Windows format, start by converting to
22629  # unix format.
22630  path="$BOOT_JDK"
22631  new_path=`$CYGPATH -u "$path"`
22632
22633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22636  # "foo.exe" is OK but "foo" is an error.
22637  #
22638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22639  # It is also a way to make sure we got the proper file name for the real test later on.
22640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22641  if test "x$test_shortpath" = x; then
22642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22644    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22645  fi
22646
22647  # Call helper function which possibly converts this using DOS-style short mode.
22648  # If so, the updated path is stored in $new_path.
22649
22650  input_path="$new_path"
22651  # Check if we need to convert this using DOS-style short mode. If the path
22652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22653  # take no chances and rewrite it.
22654  # Note: m4 eats our [], so we need to use [ and ] instead.
22655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22656  if test "x$has_forbidden_chars" != x; then
22657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22661      # Going to short mode and back again did indeed matter. Since short mode is
22662      # case insensitive, let's make it lowercase to improve readability.
22663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22664      # Now convert it back to Unix-style (cygpath)
22665      input_path=`$CYGPATH -u "$shortmode_path"`
22666      new_path="$input_path"
22667    fi
22668  fi
22669
22670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22671  if test "x$test_cygdrive_prefix" = x; then
22672    # As a simple fix, exclude /usr/bin since it's not a real path.
22673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22675      # a path prefixed by /cygdrive for fixpath to work.
22676      new_path="$CYGWIN_ROOT_PATH$input_path"
22677    fi
22678  fi
22679
22680
22681  if test "x$path" != "x$new_path"; then
22682    BOOT_JDK="$new_path"
22683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22684$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22685  fi
22686
22687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22688
22689  path="$BOOT_JDK"
22690  has_colon=`$ECHO $path | $GREP ^.:`
22691  new_path="$path"
22692  if test "x$has_colon" = x; then
22693    # Not in mixed or Windows style, start by that.
22694    new_path=`cmd //c echo $path`
22695  fi
22696
22697
22698  input_path="$new_path"
22699  # Check if we need to convert this using DOS-style short mode. If the path
22700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22701  # take no chances and rewrite it.
22702  # Note: m4 eats our [], so we need to use [ and ] instead.
22703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22704  if test "x$has_forbidden_chars" != x; then
22705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22707  fi
22708
22709
22710  windows_path="$new_path"
22711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22712    unix_path=`$CYGPATH -u "$windows_path"`
22713    new_path="$unix_path"
22714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22716    new_path="$unix_path"
22717  fi
22718
22719  if test "x$path" != "x$new_path"; then
22720    BOOT_JDK="$new_path"
22721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22722$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22723  fi
22724
22725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22727
22728    else
22729      # We're on a unix platform. Hooray! :)
22730      path="$BOOT_JDK"
22731      has_space=`$ECHO "$path" | $GREP " "`
22732      if test "x$has_space" != x; then
22733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22734$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22736      fi
22737
22738      # Use eval to expand a potential ~
22739      eval path="$path"
22740      if test ! -f "$path" && test ! -d "$path"; then
22741        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22742      fi
22743
22744      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22745    fi
22746  fi
22747
22748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22749$as_echo_n "checking for Boot JDK... " >&6; }
22750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22751$as_echo "$BOOT_JDK" >&6; }
22752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22753$as_echo_n "checking Boot JDK version... " >&6; }
22754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22756$as_echo "$BOOT_JDK_VERSION" >&6; }
22757          fi # end check jdk version
22758        fi # end check javac
22759      fi # end check java
22760    fi # end check boot jdk found
22761  fi
22762
22763
22764  # Test: Is there a JDK installed in default, well-known locations?
22765
22766  if test "x$BOOT_JDK_FOUND" = xno; then
22767    # Now execute the test
22768
22769  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22770
22771  if test "x$BOOT_JDK_FOUND" = xno; then
22772    # Now execute the test
22773
22774  if test "x$ProgramW6432" != x; then
22775    VIRTUAL_DIR="$ProgramW6432/Java"
22776
22777  windows_path="$VIRTUAL_DIR"
22778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22779    unix_path=`$CYGPATH -u "$windows_path"`
22780    VIRTUAL_DIR="$unix_path"
22781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22783    VIRTUAL_DIR="$unix_path"
22784  fi
22785
22786
22787  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22788  BOOT_JDK_SUFFIX=""
22789  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22790  if test "x$ALL_JDKS_FOUND" != x; then
22791    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22792
22793  if test "x$BOOT_JDK_FOUND" = xno; then
22794    # Now execute the test
22795
22796        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22797        if test -d "$BOOT_JDK"; then
22798          BOOT_JDK_FOUND=maybe
22799          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22800$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22801        fi
22802
22803
22804    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22805    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22806      # Do we have a bin/java?
22807      if test ! -x "$BOOT_JDK/bin/java"; then
22808        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22810        BOOT_JDK_FOUND=no
22811      else
22812        # Do we have a bin/javac?
22813        if test ! -x "$BOOT_JDK/bin/javac"; then
22814          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22816          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22817$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22818          BOOT_JDK_FOUND=no
22819        else
22820          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22821          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22822
22823          # Extra M4 quote needed to protect [] in grep expression.
22824          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22825          if test "x$FOUND_CORRECT_VERSION" = x; then
22826            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22828            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22829$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22830            BOOT_JDK_FOUND=no
22831          else
22832            # We're done! :-)
22833            BOOT_JDK_FOUND=yes
22834
22835  # Only process if variable expands to non-empty
22836
22837  if test "x$BOOT_JDK" != x; then
22838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22839
22840  # Input might be given as Windows format, start by converting to
22841  # unix format.
22842  path="$BOOT_JDK"
22843  new_path=`$CYGPATH -u "$path"`
22844
22845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22848  # "foo.exe" is OK but "foo" is an error.
22849  #
22850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22851  # It is also a way to make sure we got the proper file name for the real test later on.
22852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22853  if test "x$test_shortpath" = x; then
22854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22856    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22857  fi
22858
22859  # Call helper function which possibly converts this using DOS-style short mode.
22860  # If so, the updated path is stored in $new_path.
22861
22862  input_path="$new_path"
22863  # Check if we need to convert this using DOS-style short mode. If the path
22864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22865  # take no chances and rewrite it.
22866  # Note: m4 eats our [], so we need to use [ and ] instead.
22867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22868  if test "x$has_forbidden_chars" != x; then
22869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22873      # Going to short mode and back again did indeed matter. Since short mode is
22874      # case insensitive, let's make it lowercase to improve readability.
22875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22876      # Now convert it back to Unix-style (cygpath)
22877      input_path=`$CYGPATH -u "$shortmode_path"`
22878      new_path="$input_path"
22879    fi
22880  fi
22881
22882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22883  if test "x$test_cygdrive_prefix" = x; then
22884    # As a simple fix, exclude /usr/bin since it's not a real path.
22885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22887      # a path prefixed by /cygdrive for fixpath to work.
22888      new_path="$CYGWIN_ROOT_PATH$input_path"
22889    fi
22890  fi
22891
22892
22893  if test "x$path" != "x$new_path"; then
22894    BOOT_JDK="$new_path"
22895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22897  fi
22898
22899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22900
22901  path="$BOOT_JDK"
22902  has_colon=`$ECHO $path | $GREP ^.:`
22903  new_path="$path"
22904  if test "x$has_colon" = x; then
22905    # Not in mixed or Windows style, start by that.
22906    new_path=`cmd //c echo $path`
22907  fi
22908
22909
22910  input_path="$new_path"
22911  # Check if we need to convert this using DOS-style short mode. If the path
22912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22913  # take no chances and rewrite it.
22914  # Note: m4 eats our [], so we need to use [ and ] instead.
22915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22916  if test "x$has_forbidden_chars" != x; then
22917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22919  fi
22920
22921
22922  windows_path="$new_path"
22923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22924    unix_path=`$CYGPATH -u "$windows_path"`
22925    new_path="$unix_path"
22926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22928    new_path="$unix_path"
22929  fi
22930
22931  if test "x$path" != "x$new_path"; then
22932    BOOT_JDK="$new_path"
22933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22935  fi
22936
22937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22939
22940    else
22941      # We're on a unix platform. Hooray! :)
22942      path="$BOOT_JDK"
22943      has_space=`$ECHO "$path" | $GREP " "`
22944      if test "x$has_space" != x; then
22945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22948      fi
22949
22950      # Use eval to expand a potential ~
22951      eval path="$path"
22952      if test ! -f "$path" && test ! -d "$path"; then
22953        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22954      fi
22955
22956      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22957    fi
22958  fi
22959
22960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22961$as_echo_n "checking for Boot JDK... " >&6; }
22962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22963$as_echo "$BOOT_JDK" >&6; }
22964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22965$as_echo_n "checking Boot JDK version... " >&6; }
22966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22968$as_echo "$BOOT_JDK_VERSION" >&6; }
22969          fi # end check jdk version
22970        fi # end check javac
22971      fi # end check java
22972    fi # end check boot jdk found
22973  fi
22974
22975    done
22976  fi
22977
22978  fi
22979
22980
22981    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22982    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22983      # Do we have a bin/java?
22984      if test ! -x "$BOOT_JDK/bin/java"; then
22985        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22987        BOOT_JDK_FOUND=no
22988      else
22989        # Do we have a bin/javac?
22990        if test ! -x "$BOOT_JDK/bin/javac"; then
22991          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22993          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22994$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22995          BOOT_JDK_FOUND=no
22996        else
22997          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22998          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22999
23000          # Extra M4 quote needed to protect [] in grep expression.
23001          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23002          if test "x$FOUND_CORRECT_VERSION" = x; then
23003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23005            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23006$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23007            BOOT_JDK_FOUND=no
23008          else
23009            # We're done! :-)
23010            BOOT_JDK_FOUND=yes
23011
23012  # Only process if variable expands to non-empty
23013
23014  if test "x$BOOT_JDK" != x; then
23015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23016
23017  # Input might be given as Windows format, start by converting to
23018  # unix format.
23019  path="$BOOT_JDK"
23020  new_path=`$CYGPATH -u "$path"`
23021
23022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23025  # "foo.exe" is OK but "foo" is an error.
23026  #
23027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23028  # It is also a way to make sure we got the proper file name for the real test later on.
23029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23030  if test "x$test_shortpath" = x; then
23031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23032$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23033    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23034  fi
23035
23036  # Call helper function which possibly converts this using DOS-style short mode.
23037  # If so, the updated path is stored in $new_path.
23038
23039  input_path="$new_path"
23040  # Check if we need to convert this using DOS-style short mode. If the path
23041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23042  # take no chances and rewrite it.
23043  # Note: m4 eats our [], so we need to use [ and ] instead.
23044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23045  if test "x$has_forbidden_chars" != x; then
23046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23050      # Going to short mode and back again did indeed matter. Since short mode is
23051      # case insensitive, let's make it lowercase to improve readability.
23052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23053      # Now convert it back to Unix-style (cygpath)
23054      input_path=`$CYGPATH -u "$shortmode_path"`
23055      new_path="$input_path"
23056    fi
23057  fi
23058
23059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23060  if test "x$test_cygdrive_prefix" = x; then
23061    # As a simple fix, exclude /usr/bin since it's not a real path.
23062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23064      # a path prefixed by /cygdrive for fixpath to work.
23065      new_path="$CYGWIN_ROOT_PATH$input_path"
23066    fi
23067  fi
23068
23069
23070  if test "x$path" != "x$new_path"; then
23071    BOOT_JDK="$new_path"
23072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23074  fi
23075
23076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23077
23078  path="$BOOT_JDK"
23079  has_colon=`$ECHO $path | $GREP ^.:`
23080  new_path="$path"
23081  if test "x$has_colon" = x; then
23082    # Not in mixed or Windows style, start by that.
23083    new_path=`cmd //c echo $path`
23084  fi
23085
23086
23087  input_path="$new_path"
23088  # Check if we need to convert this using DOS-style short mode. If the path
23089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23090  # take no chances and rewrite it.
23091  # Note: m4 eats our [], so we need to use [ and ] instead.
23092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23093  if test "x$has_forbidden_chars" != x; then
23094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23096  fi
23097
23098
23099  windows_path="$new_path"
23100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23101    unix_path=`$CYGPATH -u "$windows_path"`
23102    new_path="$unix_path"
23103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23105    new_path="$unix_path"
23106  fi
23107
23108  if test "x$path" != "x$new_path"; then
23109    BOOT_JDK="$new_path"
23110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23112  fi
23113
23114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23116
23117    else
23118      # We're on a unix platform. Hooray! :)
23119      path="$BOOT_JDK"
23120      has_space=`$ECHO "$path" | $GREP " "`
23121      if test "x$has_space" != x; then
23122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23123$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23124        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23125      fi
23126
23127      # Use eval to expand a potential ~
23128      eval path="$path"
23129      if test ! -f "$path" && test ! -d "$path"; then
23130        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23131      fi
23132
23133      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23134    fi
23135  fi
23136
23137            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23138$as_echo_n "checking for Boot JDK... " >&6; }
23139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23140$as_echo "$BOOT_JDK" >&6; }
23141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23142$as_echo_n "checking Boot JDK version... " >&6; }
23143            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23145$as_echo "$BOOT_JDK_VERSION" >&6; }
23146          fi # end check jdk version
23147        fi # end check javac
23148      fi # end check java
23149    fi # end check boot jdk found
23150  fi
23151
23152
23153  if test "x$BOOT_JDK_FOUND" = xno; then
23154    # Now execute the test
23155
23156  if test "x$PROGRAMW6432" != x; then
23157    VIRTUAL_DIR="$PROGRAMW6432/Java"
23158
23159  windows_path="$VIRTUAL_DIR"
23160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23161    unix_path=`$CYGPATH -u "$windows_path"`
23162    VIRTUAL_DIR="$unix_path"
23163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23165    VIRTUAL_DIR="$unix_path"
23166  fi
23167
23168
23169  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23170  BOOT_JDK_SUFFIX=""
23171  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23172  if test "x$ALL_JDKS_FOUND" != x; then
23173    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23174
23175  if test "x$BOOT_JDK_FOUND" = xno; then
23176    # Now execute the test
23177
23178        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23179        if test -d "$BOOT_JDK"; then
23180          BOOT_JDK_FOUND=maybe
23181          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23182$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23183        fi
23184
23185
23186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23188      # Do we have a bin/java?
23189      if test ! -x "$BOOT_JDK/bin/java"; then
23190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23192        BOOT_JDK_FOUND=no
23193      else
23194        # Do we have a bin/javac?
23195        if test ! -x "$BOOT_JDK/bin/javac"; then
23196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23200          BOOT_JDK_FOUND=no
23201        else
23202          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23203          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23204
23205          # Extra M4 quote needed to protect [] in grep expression.
23206          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23207          if test "x$FOUND_CORRECT_VERSION" = x; then
23208            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23210            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23211$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23212            BOOT_JDK_FOUND=no
23213          else
23214            # We're done! :-)
23215            BOOT_JDK_FOUND=yes
23216
23217  # Only process if variable expands to non-empty
23218
23219  if test "x$BOOT_JDK" != x; then
23220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23221
23222  # Input might be given as Windows format, start by converting to
23223  # unix format.
23224  path="$BOOT_JDK"
23225  new_path=`$CYGPATH -u "$path"`
23226
23227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23230  # "foo.exe" is OK but "foo" is an error.
23231  #
23232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23233  # It is also a way to make sure we got the proper file name for the real test later on.
23234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23235  if test "x$test_shortpath" = x; then
23236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23237$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23238    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23239  fi
23240
23241  # Call helper function which possibly converts this using DOS-style short mode.
23242  # If so, the updated path is stored in $new_path.
23243
23244  input_path="$new_path"
23245  # Check if we need to convert this using DOS-style short mode. If the path
23246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23247  # take no chances and rewrite it.
23248  # Note: m4 eats our [], so we need to use [ and ] instead.
23249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23250  if test "x$has_forbidden_chars" != x; then
23251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23255      # Going to short mode and back again did indeed matter. Since short mode is
23256      # case insensitive, let's make it lowercase to improve readability.
23257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23258      # Now convert it back to Unix-style (cygpath)
23259      input_path=`$CYGPATH -u "$shortmode_path"`
23260      new_path="$input_path"
23261    fi
23262  fi
23263
23264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23265  if test "x$test_cygdrive_prefix" = x; then
23266    # As a simple fix, exclude /usr/bin since it's not a real path.
23267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23269      # a path prefixed by /cygdrive for fixpath to work.
23270      new_path="$CYGWIN_ROOT_PATH$input_path"
23271    fi
23272  fi
23273
23274
23275  if test "x$path" != "x$new_path"; then
23276    BOOT_JDK="$new_path"
23277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23279  fi
23280
23281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23282
23283  path="$BOOT_JDK"
23284  has_colon=`$ECHO $path | $GREP ^.:`
23285  new_path="$path"
23286  if test "x$has_colon" = x; then
23287    # Not in mixed or Windows style, start by that.
23288    new_path=`cmd //c echo $path`
23289  fi
23290
23291
23292  input_path="$new_path"
23293  # Check if we need to convert this using DOS-style short mode. If the path
23294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23295  # take no chances and rewrite it.
23296  # Note: m4 eats our [], so we need to use [ and ] instead.
23297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23298  if test "x$has_forbidden_chars" != x; then
23299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23301  fi
23302
23303
23304  windows_path="$new_path"
23305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23306    unix_path=`$CYGPATH -u "$windows_path"`
23307    new_path="$unix_path"
23308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23310    new_path="$unix_path"
23311  fi
23312
23313  if test "x$path" != "x$new_path"; then
23314    BOOT_JDK="$new_path"
23315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23317  fi
23318
23319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23321
23322    else
23323      # We're on a unix platform. Hooray! :)
23324      path="$BOOT_JDK"
23325      has_space=`$ECHO "$path" | $GREP " "`
23326      if test "x$has_space" != x; then
23327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23328$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23329        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23330      fi
23331
23332      # Use eval to expand a potential ~
23333      eval path="$path"
23334      if test ! -f "$path" && test ! -d "$path"; then
23335        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23336      fi
23337
23338      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23339    fi
23340  fi
23341
23342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23343$as_echo_n "checking for Boot JDK... " >&6; }
23344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23345$as_echo "$BOOT_JDK" >&6; }
23346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23347$as_echo_n "checking Boot JDK version... " >&6; }
23348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23350$as_echo "$BOOT_JDK_VERSION" >&6; }
23351          fi # end check jdk version
23352        fi # end check javac
23353      fi # end check java
23354    fi # end check boot jdk found
23355  fi
23356
23357    done
23358  fi
23359
23360  fi
23361
23362
23363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23365      # Do we have a bin/java?
23366      if test ! -x "$BOOT_JDK/bin/java"; then
23367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23369        BOOT_JDK_FOUND=no
23370      else
23371        # Do we have a bin/javac?
23372        if test ! -x "$BOOT_JDK/bin/javac"; then
23373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23377          BOOT_JDK_FOUND=no
23378        else
23379          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23380          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23381
23382          # Extra M4 quote needed to protect [] in grep expression.
23383          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23384          if test "x$FOUND_CORRECT_VERSION" = x; then
23385            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23387            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23388$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23389            BOOT_JDK_FOUND=no
23390          else
23391            # We're done! :-)
23392            BOOT_JDK_FOUND=yes
23393
23394  # Only process if variable expands to non-empty
23395
23396  if test "x$BOOT_JDK" != x; then
23397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23398
23399  # Input might be given as Windows format, start by converting to
23400  # unix format.
23401  path="$BOOT_JDK"
23402  new_path=`$CYGPATH -u "$path"`
23403
23404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23407  # "foo.exe" is OK but "foo" is an error.
23408  #
23409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23410  # It is also a way to make sure we got the proper file name for the real test later on.
23411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23412  if test "x$test_shortpath" = x; then
23413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23415    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23416  fi
23417
23418  # Call helper function which possibly converts this using DOS-style short mode.
23419  # If so, the updated path is stored in $new_path.
23420
23421  input_path="$new_path"
23422  # Check if we need to convert this using DOS-style short mode. If the path
23423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23424  # take no chances and rewrite it.
23425  # Note: m4 eats our [], so we need to use [ and ] instead.
23426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23427  if test "x$has_forbidden_chars" != x; then
23428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23432      # Going to short mode and back again did indeed matter. Since short mode is
23433      # case insensitive, let's make it lowercase to improve readability.
23434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23435      # Now convert it back to Unix-style (cygpath)
23436      input_path=`$CYGPATH -u "$shortmode_path"`
23437      new_path="$input_path"
23438    fi
23439  fi
23440
23441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23442  if test "x$test_cygdrive_prefix" = x; then
23443    # As a simple fix, exclude /usr/bin since it's not a real path.
23444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23446      # a path prefixed by /cygdrive for fixpath to work.
23447      new_path="$CYGWIN_ROOT_PATH$input_path"
23448    fi
23449  fi
23450
23451
23452  if test "x$path" != "x$new_path"; then
23453    BOOT_JDK="$new_path"
23454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23455$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23456  fi
23457
23458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23459
23460  path="$BOOT_JDK"
23461  has_colon=`$ECHO $path | $GREP ^.:`
23462  new_path="$path"
23463  if test "x$has_colon" = x; then
23464    # Not in mixed or Windows style, start by that.
23465    new_path=`cmd //c echo $path`
23466  fi
23467
23468
23469  input_path="$new_path"
23470  # Check if we need to convert this using DOS-style short mode. If the path
23471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23472  # take no chances and rewrite it.
23473  # Note: m4 eats our [], so we need to use [ and ] instead.
23474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23475  if test "x$has_forbidden_chars" != x; then
23476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23478  fi
23479
23480
23481  windows_path="$new_path"
23482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23483    unix_path=`$CYGPATH -u "$windows_path"`
23484    new_path="$unix_path"
23485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23487    new_path="$unix_path"
23488  fi
23489
23490  if test "x$path" != "x$new_path"; then
23491    BOOT_JDK="$new_path"
23492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23494  fi
23495
23496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23498
23499    else
23500      # We're on a unix platform. Hooray! :)
23501      path="$BOOT_JDK"
23502      has_space=`$ECHO "$path" | $GREP " "`
23503      if test "x$has_space" != x; then
23504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23505$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23507      fi
23508
23509      # Use eval to expand a potential ~
23510      eval path="$path"
23511      if test ! -f "$path" && test ! -d "$path"; then
23512        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23513      fi
23514
23515      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23516    fi
23517  fi
23518
23519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23520$as_echo_n "checking for Boot JDK... " >&6; }
23521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23522$as_echo "$BOOT_JDK" >&6; }
23523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23524$as_echo_n "checking Boot JDK version... " >&6; }
23525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23527$as_echo "$BOOT_JDK_VERSION" >&6; }
23528          fi # end check jdk version
23529        fi # end check javac
23530      fi # end check java
23531    fi # end check boot jdk found
23532  fi
23533
23534
23535  if test "x$BOOT_JDK_FOUND" = xno; then
23536    # Now execute the test
23537
23538  if test "x$PROGRAMFILES" != x; then
23539    VIRTUAL_DIR="$PROGRAMFILES/Java"
23540
23541  windows_path="$VIRTUAL_DIR"
23542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23543    unix_path=`$CYGPATH -u "$windows_path"`
23544    VIRTUAL_DIR="$unix_path"
23545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23547    VIRTUAL_DIR="$unix_path"
23548  fi
23549
23550
23551  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23552  BOOT_JDK_SUFFIX=""
23553  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23554  if test "x$ALL_JDKS_FOUND" != x; then
23555    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23556
23557  if test "x$BOOT_JDK_FOUND" = xno; then
23558    # Now execute the test
23559
23560        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23561        if test -d "$BOOT_JDK"; then
23562          BOOT_JDK_FOUND=maybe
23563          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23564$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23565        fi
23566
23567
23568    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23569    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23570      # Do we have a bin/java?
23571      if test ! -x "$BOOT_JDK/bin/java"; then
23572        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23574        BOOT_JDK_FOUND=no
23575      else
23576        # Do we have a bin/javac?
23577        if test ! -x "$BOOT_JDK/bin/javac"; then
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23580          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23581$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23582          BOOT_JDK_FOUND=no
23583        else
23584          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23585          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23586
23587          # Extra M4 quote needed to protect [] in grep expression.
23588          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23589          if test "x$FOUND_CORRECT_VERSION" = x; then
23590            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23592            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23593$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23594            BOOT_JDK_FOUND=no
23595          else
23596            # We're done! :-)
23597            BOOT_JDK_FOUND=yes
23598
23599  # Only process if variable expands to non-empty
23600
23601  if test "x$BOOT_JDK" != x; then
23602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23603
23604  # Input might be given as Windows format, start by converting to
23605  # unix format.
23606  path="$BOOT_JDK"
23607  new_path=`$CYGPATH -u "$path"`
23608
23609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23612  # "foo.exe" is OK but "foo" is an error.
23613  #
23614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23615  # It is also a way to make sure we got the proper file name for the real test later on.
23616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23617  if test "x$test_shortpath" = x; then
23618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23619$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23620    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23621  fi
23622
23623  # Call helper function which possibly converts this using DOS-style short mode.
23624  # If so, the updated path is stored in $new_path.
23625
23626  input_path="$new_path"
23627  # Check if we need to convert this using DOS-style short mode. If the path
23628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23629  # take no chances and rewrite it.
23630  # Note: m4 eats our [], so we need to use [ and ] instead.
23631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23632  if test "x$has_forbidden_chars" != x; then
23633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23637      # Going to short mode and back again did indeed matter. Since short mode is
23638      # case insensitive, let's make it lowercase to improve readability.
23639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23640      # Now convert it back to Unix-style (cygpath)
23641      input_path=`$CYGPATH -u "$shortmode_path"`
23642      new_path="$input_path"
23643    fi
23644  fi
23645
23646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23647  if test "x$test_cygdrive_prefix" = x; then
23648    # As a simple fix, exclude /usr/bin since it's not a real path.
23649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23651      # a path prefixed by /cygdrive for fixpath to work.
23652      new_path="$CYGWIN_ROOT_PATH$input_path"
23653    fi
23654  fi
23655
23656
23657  if test "x$path" != "x$new_path"; then
23658    BOOT_JDK="$new_path"
23659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23660$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23661  fi
23662
23663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23664
23665  path="$BOOT_JDK"
23666  has_colon=`$ECHO $path | $GREP ^.:`
23667  new_path="$path"
23668  if test "x$has_colon" = x; then
23669    # Not in mixed or Windows style, start by that.
23670    new_path=`cmd //c echo $path`
23671  fi
23672
23673
23674  input_path="$new_path"
23675  # Check if we need to convert this using DOS-style short mode. If the path
23676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23677  # take no chances and rewrite it.
23678  # Note: m4 eats our [], so we need to use [ and ] instead.
23679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23680  if test "x$has_forbidden_chars" != x; then
23681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23683  fi
23684
23685
23686  windows_path="$new_path"
23687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23688    unix_path=`$CYGPATH -u "$windows_path"`
23689    new_path="$unix_path"
23690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23692    new_path="$unix_path"
23693  fi
23694
23695  if test "x$path" != "x$new_path"; then
23696    BOOT_JDK="$new_path"
23697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23699  fi
23700
23701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23703
23704    else
23705      # We're on a unix platform. Hooray! :)
23706      path="$BOOT_JDK"
23707      has_space=`$ECHO "$path" | $GREP " "`
23708      if test "x$has_space" != x; then
23709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23712      fi
23713
23714      # Use eval to expand a potential ~
23715      eval path="$path"
23716      if test ! -f "$path" && test ! -d "$path"; then
23717        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23718      fi
23719
23720      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23721    fi
23722  fi
23723
23724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23725$as_echo_n "checking for Boot JDK... " >&6; }
23726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23727$as_echo "$BOOT_JDK" >&6; }
23728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23729$as_echo_n "checking Boot JDK version... " >&6; }
23730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23732$as_echo "$BOOT_JDK_VERSION" >&6; }
23733          fi # end check jdk version
23734        fi # end check javac
23735      fi # end check java
23736    fi # end check boot jdk found
23737  fi
23738
23739    done
23740  fi
23741
23742  fi
23743
23744
23745    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23746    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23747      # Do we have a bin/java?
23748      if test ! -x "$BOOT_JDK/bin/java"; then
23749        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23751        BOOT_JDK_FOUND=no
23752      else
23753        # Do we have a bin/javac?
23754        if test ! -x "$BOOT_JDK/bin/javac"; then
23755          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23757          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23758$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23759          BOOT_JDK_FOUND=no
23760        else
23761          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23762          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23763
23764          # Extra M4 quote needed to protect [] in grep expression.
23765          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23766          if test "x$FOUND_CORRECT_VERSION" = x; then
23767            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23769            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23770$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23771            BOOT_JDK_FOUND=no
23772          else
23773            # We're done! :-)
23774            BOOT_JDK_FOUND=yes
23775
23776  # Only process if variable expands to non-empty
23777
23778  if test "x$BOOT_JDK" != x; then
23779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23780
23781  # Input might be given as Windows format, start by converting to
23782  # unix format.
23783  path="$BOOT_JDK"
23784  new_path=`$CYGPATH -u "$path"`
23785
23786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23789  # "foo.exe" is OK but "foo" is an error.
23790  #
23791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23792  # It is also a way to make sure we got the proper file name for the real test later on.
23793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23794  if test "x$test_shortpath" = x; then
23795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23797    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23798  fi
23799
23800  # Call helper function which possibly converts this using DOS-style short mode.
23801  # If so, the updated path is stored in $new_path.
23802
23803  input_path="$new_path"
23804  # Check if we need to convert this using DOS-style short mode. If the path
23805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23806  # take no chances and rewrite it.
23807  # Note: m4 eats our [], so we need to use [ and ] instead.
23808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23809  if test "x$has_forbidden_chars" != x; then
23810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23814      # Going to short mode and back again did indeed matter. Since short mode is
23815      # case insensitive, let's make it lowercase to improve readability.
23816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23817      # Now convert it back to Unix-style (cygpath)
23818      input_path=`$CYGPATH -u "$shortmode_path"`
23819      new_path="$input_path"
23820    fi
23821  fi
23822
23823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23824  if test "x$test_cygdrive_prefix" = x; then
23825    # As a simple fix, exclude /usr/bin since it's not a real path.
23826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23828      # a path prefixed by /cygdrive for fixpath to work.
23829      new_path="$CYGWIN_ROOT_PATH$input_path"
23830    fi
23831  fi
23832
23833
23834  if test "x$path" != "x$new_path"; then
23835    BOOT_JDK="$new_path"
23836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23838  fi
23839
23840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23841
23842  path="$BOOT_JDK"
23843  has_colon=`$ECHO $path | $GREP ^.:`
23844  new_path="$path"
23845  if test "x$has_colon" = x; then
23846    # Not in mixed or Windows style, start by that.
23847    new_path=`cmd //c echo $path`
23848  fi
23849
23850
23851  input_path="$new_path"
23852  # Check if we need to convert this using DOS-style short mode. If the path
23853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23854  # take no chances and rewrite it.
23855  # Note: m4 eats our [], so we need to use [ and ] instead.
23856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23857  if test "x$has_forbidden_chars" != x; then
23858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23860  fi
23861
23862
23863  windows_path="$new_path"
23864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23865    unix_path=`$CYGPATH -u "$windows_path"`
23866    new_path="$unix_path"
23867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23869    new_path="$unix_path"
23870  fi
23871
23872  if test "x$path" != "x$new_path"; then
23873    BOOT_JDK="$new_path"
23874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23876  fi
23877
23878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23880
23881    else
23882      # We're on a unix platform. Hooray! :)
23883      path="$BOOT_JDK"
23884      has_space=`$ECHO "$path" | $GREP " "`
23885      if test "x$has_space" != x; then
23886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23887$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23889      fi
23890
23891      # Use eval to expand a potential ~
23892      eval path="$path"
23893      if test ! -f "$path" && test ! -d "$path"; then
23894        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23895      fi
23896
23897      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23898    fi
23899  fi
23900
23901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23902$as_echo_n "checking for Boot JDK... " >&6; }
23903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23904$as_echo "$BOOT_JDK" >&6; }
23905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23906$as_echo_n "checking Boot JDK version... " >&6; }
23907            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23909$as_echo "$BOOT_JDK_VERSION" >&6; }
23910          fi # end check jdk version
23911        fi # end check javac
23912      fi # end check java
23913    fi # end check boot jdk found
23914  fi
23915
23916
23917  if test "x$BOOT_JDK_FOUND" = xno; then
23918    # Now execute the test
23919
23920  if test "x$ProgramFiles" != x; then
23921    VIRTUAL_DIR="$ProgramFiles/Java"
23922
23923  windows_path="$VIRTUAL_DIR"
23924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23925    unix_path=`$CYGPATH -u "$windows_path"`
23926    VIRTUAL_DIR="$unix_path"
23927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23929    VIRTUAL_DIR="$unix_path"
23930  fi
23931
23932
23933  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23934  BOOT_JDK_SUFFIX=""
23935  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23936  if test "x$ALL_JDKS_FOUND" != x; then
23937    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23938
23939  if test "x$BOOT_JDK_FOUND" = xno; then
23940    # Now execute the test
23941
23942        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23943        if test -d "$BOOT_JDK"; then
23944          BOOT_JDK_FOUND=maybe
23945          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23946$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23947        fi
23948
23949
23950    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23951    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23952      # Do we have a bin/java?
23953      if test ! -x "$BOOT_JDK/bin/java"; then
23954        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23956        BOOT_JDK_FOUND=no
23957      else
23958        # Do we have a bin/javac?
23959        if test ! -x "$BOOT_JDK/bin/javac"; then
23960          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23962          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23963$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23964          BOOT_JDK_FOUND=no
23965        else
23966          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23967          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23968
23969          # Extra M4 quote needed to protect [] in grep expression.
23970          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23971          if test "x$FOUND_CORRECT_VERSION" = x; then
23972            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23974            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23975$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23976            BOOT_JDK_FOUND=no
23977          else
23978            # We're done! :-)
23979            BOOT_JDK_FOUND=yes
23980
23981  # Only process if variable expands to non-empty
23982
23983  if test "x$BOOT_JDK" != x; then
23984    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23985
23986  # Input might be given as Windows format, start by converting to
23987  # unix format.
23988  path="$BOOT_JDK"
23989  new_path=`$CYGPATH -u "$path"`
23990
23991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23994  # "foo.exe" is OK but "foo" is an error.
23995  #
23996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23997  # It is also a way to make sure we got the proper file name for the real test later on.
23998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23999  if test "x$test_shortpath" = x; then
24000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24001$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24002    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24003  fi
24004
24005  # Call helper function which possibly converts this using DOS-style short mode.
24006  # If so, the updated path is stored in $new_path.
24007
24008  input_path="$new_path"
24009  # Check if we need to convert this using DOS-style short mode. If the path
24010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24011  # take no chances and rewrite it.
24012  # Note: m4 eats our [], so we need to use [ and ] instead.
24013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24014  if test "x$has_forbidden_chars" != x; then
24015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24019      # Going to short mode and back again did indeed matter. Since short mode is
24020      # case insensitive, let's make it lowercase to improve readability.
24021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24022      # Now convert it back to Unix-style (cygpath)
24023      input_path=`$CYGPATH -u "$shortmode_path"`
24024      new_path="$input_path"
24025    fi
24026  fi
24027
24028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24029  if test "x$test_cygdrive_prefix" = x; then
24030    # As a simple fix, exclude /usr/bin since it's not a real path.
24031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24033      # a path prefixed by /cygdrive for fixpath to work.
24034      new_path="$CYGWIN_ROOT_PATH$input_path"
24035    fi
24036  fi
24037
24038
24039  if test "x$path" != "x$new_path"; then
24040    BOOT_JDK="$new_path"
24041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24043  fi
24044
24045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24046
24047  path="$BOOT_JDK"
24048  has_colon=`$ECHO $path | $GREP ^.:`
24049  new_path="$path"
24050  if test "x$has_colon" = x; then
24051    # Not in mixed or Windows style, start by that.
24052    new_path=`cmd //c echo $path`
24053  fi
24054
24055
24056  input_path="$new_path"
24057  # Check if we need to convert this using DOS-style short mode. If the path
24058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24059  # take no chances and rewrite it.
24060  # Note: m4 eats our [], so we need to use [ and ] instead.
24061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24062  if test "x$has_forbidden_chars" != x; then
24063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24065  fi
24066
24067
24068  windows_path="$new_path"
24069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24070    unix_path=`$CYGPATH -u "$windows_path"`
24071    new_path="$unix_path"
24072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24074    new_path="$unix_path"
24075  fi
24076
24077  if test "x$path" != "x$new_path"; then
24078    BOOT_JDK="$new_path"
24079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24081  fi
24082
24083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24085
24086    else
24087      # We're on a unix platform. Hooray! :)
24088      path="$BOOT_JDK"
24089      has_space=`$ECHO "$path" | $GREP " "`
24090      if test "x$has_space" != x; then
24091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24093        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24094      fi
24095
24096      # Use eval to expand a potential ~
24097      eval path="$path"
24098      if test ! -f "$path" && test ! -d "$path"; then
24099        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24100      fi
24101
24102      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24103    fi
24104  fi
24105
24106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24107$as_echo_n "checking for Boot JDK... " >&6; }
24108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24109$as_echo "$BOOT_JDK" >&6; }
24110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24111$as_echo_n "checking Boot JDK version... " >&6; }
24112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24114$as_echo "$BOOT_JDK_VERSION" >&6; }
24115          fi # end check jdk version
24116        fi # end check javac
24117      fi # end check java
24118    fi # end check boot jdk found
24119  fi
24120
24121    done
24122  fi
24123
24124  fi
24125
24126
24127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24129      # Do we have a bin/java?
24130      if test ! -x "$BOOT_JDK/bin/java"; then
24131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24133        BOOT_JDK_FOUND=no
24134      else
24135        # Do we have a bin/javac?
24136        if test ! -x "$BOOT_JDK/bin/javac"; then
24137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24141          BOOT_JDK_FOUND=no
24142        else
24143          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24144          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24145
24146          # Extra M4 quote needed to protect [] in grep expression.
24147          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24148          if test "x$FOUND_CORRECT_VERSION" = x; then
24149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24151            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24152$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24153            BOOT_JDK_FOUND=no
24154          else
24155            # We're done! :-)
24156            BOOT_JDK_FOUND=yes
24157
24158  # Only process if variable expands to non-empty
24159
24160  if test "x$BOOT_JDK" != x; then
24161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24162
24163  # Input might be given as Windows format, start by converting to
24164  # unix format.
24165  path="$BOOT_JDK"
24166  new_path=`$CYGPATH -u "$path"`
24167
24168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24171  # "foo.exe" is OK but "foo" is an error.
24172  #
24173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24174  # It is also a way to make sure we got the proper file name for the real test later on.
24175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24176  if test "x$test_shortpath" = x; then
24177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24180  fi
24181
24182  # Call helper function which possibly converts this using DOS-style short mode.
24183  # If so, the updated path is stored in $new_path.
24184
24185  input_path="$new_path"
24186  # Check if we need to convert this using DOS-style short mode. If the path
24187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24188  # take no chances and rewrite it.
24189  # Note: m4 eats our [], so we need to use [ and ] instead.
24190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24191  if test "x$has_forbidden_chars" != x; then
24192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24196      # Going to short mode and back again did indeed matter. Since short mode is
24197      # case insensitive, let's make it lowercase to improve readability.
24198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24199      # Now convert it back to Unix-style (cygpath)
24200      input_path=`$CYGPATH -u "$shortmode_path"`
24201      new_path="$input_path"
24202    fi
24203  fi
24204
24205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24206  if test "x$test_cygdrive_prefix" = x; then
24207    # As a simple fix, exclude /usr/bin since it's not a real path.
24208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24210      # a path prefixed by /cygdrive for fixpath to work.
24211      new_path="$CYGWIN_ROOT_PATH$input_path"
24212    fi
24213  fi
24214
24215
24216  if test "x$path" != "x$new_path"; then
24217    BOOT_JDK="$new_path"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24220  fi
24221
24222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223
24224  path="$BOOT_JDK"
24225  has_colon=`$ECHO $path | $GREP ^.:`
24226  new_path="$path"
24227  if test "x$has_colon" = x; then
24228    # Not in mixed or Windows style, start by that.
24229    new_path=`cmd //c echo $path`
24230  fi
24231
24232
24233  input_path="$new_path"
24234  # Check if we need to convert this using DOS-style short mode. If the path
24235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24236  # take no chances and rewrite it.
24237  # Note: m4 eats our [], so we need to use [ and ] instead.
24238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24239  if test "x$has_forbidden_chars" != x; then
24240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24242  fi
24243
24244
24245  windows_path="$new_path"
24246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24247    unix_path=`$CYGPATH -u "$windows_path"`
24248    new_path="$unix_path"
24249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24251    new_path="$unix_path"
24252  fi
24253
24254  if test "x$path" != "x$new_path"; then
24255    BOOT_JDK="$new_path"
24256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24258  fi
24259
24260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24262
24263    else
24264      # We're on a unix platform. Hooray! :)
24265      path="$BOOT_JDK"
24266      has_space=`$ECHO "$path" | $GREP " "`
24267      if test "x$has_space" != x; then
24268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24271      fi
24272
24273      # Use eval to expand a potential ~
24274      eval path="$path"
24275      if test ! -f "$path" && test ! -d "$path"; then
24276        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24277      fi
24278
24279      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24280    fi
24281  fi
24282
24283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24284$as_echo_n "checking for Boot JDK... " >&6; }
24285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24286$as_echo "$BOOT_JDK" >&6; }
24287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24288$as_echo_n "checking Boot JDK version... " >&6; }
24289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24291$as_echo "$BOOT_JDK_VERSION" >&6; }
24292          fi # end check jdk version
24293        fi # end check javac
24294      fi # end check java
24295    fi # end check boot jdk found
24296  fi
24297
24298
24299  if test "x$BOOT_JDK_FOUND" = xno; then
24300    # Now execute the test
24301
24302  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24303  BOOT_JDK_SUFFIX=""
24304  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24305  if test "x$ALL_JDKS_FOUND" != x; then
24306    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24307
24308  if test "x$BOOT_JDK_FOUND" = xno; then
24309    # Now execute the test
24310
24311        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24312        if test -d "$BOOT_JDK"; then
24313          BOOT_JDK_FOUND=maybe
24314          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24315$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24316        fi
24317
24318
24319    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24320    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24321      # Do we have a bin/java?
24322      if test ! -x "$BOOT_JDK/bin/java"; then
24323        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24325        BOOT_JDK_FOUND=no
24326      else
24327        # Do we have a bin/javac?
24328        if test ! -x "$BOOT_JDK/bin/javac"; then
24329          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24331          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24332$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24333          BOOT_JDK_FOUND=no
24334        else
24335          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24336          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24337
24338          # Extra M4 quote needed to protect [] in grep expression.
24339          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24340          if test "x$FOUND_CORRECT_VERSION" = x; then
24341            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24343            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24344$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24345            BOOT_JDK_FOUND=no
24346          else
24347            # We're done! :-)
24348            BOOT_JDK_FOUND=yes
24349
24350  # Only process if variable expands to non-empty
24351
24352  if test "x$BOOT_JDK" != x; then
24353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24354
24355  # Input might be given as Windows format, start by converting to
24356  # unix format.
24357  path="$BOOT_JDK"
24358  new_path=`$CYGPATH -u "$path"`
24359
24360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24363  # "foo.exe" is OK but "foo" is an error.
24364  #
24365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24366  # It is also a way to make sure we got the proper file name for the real test later on.
24367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24368  if test "x$test_shortpath" = x; then
24369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24372  fi
24373
24374  # Call helper function which possibly converts this using DOS-style short mode.
24375  # If so, the updated path is stored in $new_path.
24376
24377  input_path="$new_path"
24378  # Check if we need to convert this using DOS-style short mode. If the path
24379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24380  # take no chances and rewrite it.
24381  # Note: m4 eats our [], so we need to use [ and ] instead.
24382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24383  if test "x$has_forbidden_chars" != x; then
24384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24388      # Going to short mode and back again did indeed matter. Since short mode is
24389      # case insensitive, let's make it lowercase to improve readability.
24390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24391      # Now convert it back to Unix-style (cygpath)
24392      input_path=`$CYGPATH -u "$shortmode_path"`
24393      new_path="$input_path"
24394    fi
24395  fi
24396
24397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24398  if test "x$test_cygdrive_prefix" = x; then
24399    # As a simple fix, exclude /usr/bin since it's not a real path.
24400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24402      # a path prefixed by /cygdrive for fixpath to work.
24403      new_path="$CYGWIN_ROOT_PATH$input_path"
24404    fi
24405  fi
24406
24407
24408  if test "x$path" != "x$new_path"; then
24409    BOOT_JDK="$new_path"
24410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24412  fi
24413
24414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24415
24416  path="$BOOT_JDK"
24417  has_colon=`$ECHO $path | $GREP ^.:`
24418  new_path="$path"
24419  if test "x$has_colon" = x; then
24420    # Not in mixed or Windows style, start by that.
24421    new_path=`cmd //c echo $path`
24422  fi
24423
24424
24425  input_path="$new_path"
24426  # Check if we need to convert this using DOS-style short mode. If the path
24427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24428  # take no chances and rewrite it.
24429  # Note: m4 eats our [], so we need to use [ and ] instead.
24430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24431  if test "x$has_forbidden_chars" != x; then
24432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24434  fi
24435
24436
24437  windows_path="$new_path"
24438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24439    unix_path=`$CYGPATH -u "$windows_path"`
24440    new_path="$unix_path"
24441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24443    new_path="$unix_path"
24444  fi
24445
24446  if test "x$path" != "x$new_path"; then
24447    BOOT_JDK="$new_path"
24448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24450  fi
24451
24452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24454
24455    else
24456      # We're on a unix platform. Hooray! :)
24457      path="$BOOT_JDK"
24458      has_space=`$ECHO "$path" | $GREP " "`
24459      if test "x$has_space" != x; then
24460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24463      fi
24464
24465      # Use eval to expand a potential ~
24466      eval path="$path"
24467      if test ! -f "$path" && test ! -d "$path"; then
24468        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24469      fi
24470
24471      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24472    fi
24473  fi
24474
24475            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24476$as_echo_n "checking for Boot JDK... " >&6; }
24477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24478$as_echo "$BOOT_JDK" >&6; }
24479            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24480$as_echo_n "checking Boot JDK version... " >&6; }
24481            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24483$as_echo "$BOOT_JDK_VERSION" >&6; }
24484          fi # end check jdk version
24485        fi # end check javac
24486      fi # end check java
24487    fi # end check boot jdk found
24488  fi
24489
24490    done
24491  fi
24492
24493
24494    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24495    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24496      # Do we have a bin/java?
24497      if test ! -x "$BOOT_JDK/bin/java"; then
24498        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24500        BOOT_JDK_FOUND=no
24501      else
24502        # Do we have a bin/javac?
24503        if test ! -x "$BOOT_JDK/bin/javac"; then
24504          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24506          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24507$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24508          BOOT_JDK_FOUND=no
24509        else
24510          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24511          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24512
24513          # Extra M4 quote needed to protect [] in grep expression.
24514          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24515          if test "x$FOUND_CORRECT_VERSION" = x; then
24516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24518            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24519$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24520            BOOT_JDK_FOUND=no
24521          else
24522            # We're done! :-)
24523            BOOT_JDK_FOUND=yes
24524
24525  # Only process if variable expands to non-empty
24526
24527  if test "x$BOOT_JDK" != x; then
24528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24529
24530  # Input might be given as Windows format, start by converting to
24531  # unix format.
24532  path="$BOOT_JDK"
24533  new_path=`$CYGPATH -u "$path"`
24534
24535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24538  # "foo.exe" is OK but "foo" is an error.
24539  #
24540  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24541  # It is also a way to make sure we got the proper file name for the real test later on.
24542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24543  if test "x$test_shortpath" = x; then
24544    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24546    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24547  fi
24548
24549  # Call helper function which possibly converts this using DOS-style short mode.
24550  # If so, the updated path is stored in $new_path.
24551
24552  input_path="$new_path"
24553  # Check if we need to convert this using DOS-style short mode. If the path
24554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24555  # take no chances and rewrite it.
24556  # Note: m4 eats our [], so we need to use [ and ] instead.
24557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24558  if test "x$has_forbidden_chars" != x; then
24559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24563      # Going to short mode and back again did indeed matter. Since short mode is
24564      # case insensitive, let's make it lowercase to improve readability.
24565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24566      # Now convert it back to Unix-style (cygpath)
24567      input_path=`$CYGPATH -u "$shortmode_path"`
24568      new_path="$input_path"
24569    fi
24570  fi
24571
24572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24573  if test "x$test_cygdrive_prefix" = x; then
24574    # As a simple fix, exclude /usr/bin since it's not a real path.
24575    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24577      # a path prefixed by /cygdrive for fixpath to work.
24578      new_path="$CYGWIN_ROOT_PATH$input_path"
24579    fi
24580  fi
24581
24582
24583  if test "x$path" != "x$new_path"; then
24584    BOOT_JDK="$new_path"
24585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24586$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24587  fi
24588
24589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24590
24591  path="$BOOT_JDK"
24592  has_colon=`$ECHO $path | $GREP ^.:`
24593  new_path="$path"
24594  if test "x$has_colon" = x; then
24595    # Not in mixed or Windows style, start by that.
24596    new_path=`cmd //c echo $path`
24597  fi
24598
24599
24600  input_path="$new_path"
24601  # Check if we need to convert this using DOS-style short mode. If the path
24602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24603  # take no chances and rewrite it.
24604  # Note: m4 eats our [], so we need to use [ and ] instead.
24605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24606  if test "x$has_forbidden_chars" != x; then
24607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24609  fi
24610
24611
24612  windows_path="$new_path"
24613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24614    unix_path=`$CYGPATH -u "$windows_path"`
24615    new_path="$unix_path"
24616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24618    new_path="$unix_path"
24619  fi
24620
24621  if test "x$path" != "x$new_path"; then
24622    BOOT_JDK="$new_path"
24623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24625  fi
24626
24627  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24628  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24629
24630    else
24631      # We're on a unix platform. Hooray! :)
24632      path="$BOOT_JDK"
24633      has_space=`$ECHO "$path" | $GREP " "`
24634      if test "x$has_space" != x; then
24635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24637        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24638      fi
24639
24640      # Use eval to expand a potential ~
24641      eval path="$path"
24642      if test ! -f "$path" && test ! -d "$path"; then
24643        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24644      fi
24645
24646      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24647    fi
24648  fi
24649
24650            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24651$as_echo_n "checking for Boot JDK... " >&6; }
24652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24653$as_echo "$BOOT_JDK" >&6; }
24654            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24655$as_echo_n "checking Boot JDK version... " >&6; }
24656            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24658$as_echo "$BOOT_JDK_VERSION" >&6; }
24659          fi # end check jdk version
24660        fi # end check javac
24661      fi # end check java
24662    fi # end check boot jdk found
24663  fi
24664
24665  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24666
24667  if test "x$BOOT_JDK_FOUND" = xno; then
24668    # Now execute the test
24669
24670  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24671  BOOT_JDK_SUFFIX="/Contents/Home"
24672  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24673  if test "x$ALL_JDKS_FOUND" != x; then
24674    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24675
24676  if test "x$BOOT_JDK_FOUND" = xno; then
24677    # Now execute the test
24678
24679        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24680        if test -d "$BOOT_JDK"; then
24681          BOOT_JDK_FOUND=maybe
24682          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24683$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24684        fi
24685
24686
24687    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24688    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24689      # Do we have a bin/java?
24690      if test ! -x "$BOOT_JDK/bin/java"; then
24691        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24693        BOOT_JDK_FOUND=no
24694      else
24695        # Do we have a bin/javac?
24696        if test ! -x "$BOOT_JDK/bin/javac"; then
24697          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24699          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24700$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24701          BOOT_JDK_FOUND=no
24702        else
24703          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24704          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24705
24706          # Extra M4 quote needed to protect [] in grep expression.
24707          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24708          if test "x$FOUND_CORRECT_VERSION" = x; then
24709            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24711            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24712$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24713            BOOT_JDK_FOUND=no
24714          else
24715            # We're done! :-)
24716            BOOT_JDK_FOUND=yes
24717
24718  # Only process if variable expands to non-empty
24719
24720  if test "x$BOOT_JDK" != x; then
24721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24722
24723  # Input might be given as Windows format, start by converting to
24724  # unix format.
24725  path="$BOOT_JDK"
24726  new_path=`$CYGPATH -u "$path"`
24727
24728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24731  # "foo.exe" is OK but "foo" is an error.
24732  #
24733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24734  # It is also a way to make sure we got the proper file name for the real test later on.
24735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24736  if test "x$test_shortpath" = x; then
24737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24739    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24740  fi
24741
24742  # Call helper function which possibly converts this using DOS-style short mode.
24743  # If so, the updated path is stored in $new_path.
24744
24745  input_path="$new_path"
24746  # Check if we need to convert this using DOS-style short mode. If the path
24747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24748  # take no chances and rewrite it.
24749  # Note: m4 eats our [], so we need to use [ and ] instead.
24750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24751  if test "x$has_forbidden_chars" != x; then
24752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24756      # Going to short mode and back again did indeed matter. Since short mode is
24757      # case insensitive, let's make it lowercase to improve readability.
24758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24759      # Now convert it back to Unix-style (cygpath)
24760      input_path=`$CYGPATH -u "$shortmode_path"`
24761      new_path="$input_path"
24762    fi
24763  fi
24764
24765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24766  if test "x$test_cygdrive_prefix" = x; then
24767    # As a simple fix, exclude /usr/bin since it's not a real path.
24768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24770      # a path prefixed by /cygdrive for fixpath to work.
24771      new_path="$CYGWIN_ROOT_PATH$input_path"
24772    fi
24773  fi
24774
24775
24776  if test "x$path" != "x$new_path"; then
24777    BOOT_JDK="$new_path"
24778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24780  fi
24781
24782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24783
24784  path="$BOOT_JDK"
24785  has_colon=`$ECHO $path | $GREP ^.:`
24786  new_path="$path"
24787  if test "x$has_colon" = x; then
24788    # Not in mixed or Windows style, start by that.
24789    new_path=`cmd //c echo $path`
24790  fi
24791
24792
24793  input_path="$new_path"
24794  # Check if we need to convert this using DOS-style short mode. If the path
24795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24796  # take no chances and rewrite it.
24797  # Note: m4 eats our [], so we need to use [ and ] instead.
24798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24799  if test "x$has_forbidden_chars" != x; then
24800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24802  fi
24803
24804
24805  windows_path="$new_path"
24806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24807    unix_path=`$CYGPATH -u "$windows_path"`
24808    new_path="$unix_path"
24809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24811    new_path="$unix_path"
24812  fi
24813
24814  if test "x$path" != "x$new_path"; then
24815    BOOT_JDK="$new_path"
24816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24818  fi
24819
24820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24822
24823    else
24824      # We're on a unix platform. Hooray! :)
24825      path="$BOOT_JDK"
24826      has_space=`$ECHO "$path" | $GREP " "`
24827      if test "x$has_space" != x; then
24828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24831      fi
24832
24833      # Use eval to expand a potential ~
24834      eval path="$path"
24835      if test ! -f "$path" && test ! -d "$path"; then
24836        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24837      fi
24838
24839      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24840    fi
24841  fi
24842
24843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24844$as_echo_n "checking for Boot JDK... " >&6; }
24845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24846$as_echo "$BOOT_JDK" >&6; }
24847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24848$as_echo_n "checking Boot JDK version... " >&6; }
24849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24851$as_echo "$BOOT_JDK_VERSION" >&6; }
24852          fi # end check jdk version
24853        fi # end check javac
24854      fi # end check java
24855    fi # end check boot jdk found
24856  fi
24857
24858    done
24859  fi
24860
24861
24862    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24863    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24864      # Do we have a bin/java?
24865      if test ! -x "$BOOT_JDK/bin/java"; then
24866        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24868        BOOT_JDK_FOUND=no
24869      else
24870        # Do we have a bin/javac?
24871        if test ! -x "$BOOT_JDK/bin/javac"; then
24872          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24874          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24875$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24876          BOOT_JDK_FOUND=no
24877        else
24878          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24879          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24880
24881          # Extra M4 quote needed to protect [] in grep expression.
24882          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24883          if test "x$FOUND_CORRECT_VERSION" = x; then
24884            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24886            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24887$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24888            BOOT_JDK_FOUND=no
24889          else
24890            # We're done! :-)
24891            BOOT_JDK_FOUND=yes
24892
24893  # Only process if variable expands to non-empty
24894
24895  if test "x$BOOT_JDK" != x; then
24896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24897
24898  # Input might be given as Windows format, start by converting to
24899  # unix format.
24900  path="$BOOT_JDK"
24901  new_path=`$CYGPATH -u "$path"`
24902
24903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24906  # "foo.exe" is OK but "foo" is an error.
24907  #
24908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24909  # It is also a way to make sure we got the proper file name for the real test later on.
24910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24911  if test "x$test_shortpath" = x; then
24912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24914    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24915  fi
24916
24917  # Call helper function which possibly converts this using DOS-style short mode.
24918  # If so, the updated path is stored in $new_path.
24919
24920  input_path="$new_path"
24921  # Check if we need to convert this using DOS-style short mode. If the path
24922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24923  # take no chances and rewrite it.
24924  # Note: m4 eats our [], so we need to use [ and ] instead.
24925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24926  if test "x$has_forbidden_chars" != x; then
24927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24931      # Going to short mode and back again did indeed matter. Since short mode is
24932      # case insensitive, let's make it lowercase to improve readability.
24933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24934      # Now convert it back to Unix-style (cygpath)
24935      input_path=`$CYGPATH -u "$shortmode_path"`
24936      new_path="$input_path"
24937    fi
24938  fi
24939
24940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24941  if test "x$test_cygdrive_prefix" = x; then
24942    # As a simple fix, exclude /usr/bin since it's not a real path.
24943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24945      # a path prefixed by /cygdrive for fixpath to work.
24946      new_path="$CYGWIN_ROOT_PATH$input_path"
24947    fi
24948  fi
24949
24950
24951  if test "x$path" != "x$new_path"; then
24952    BOOT_JDK="$new_path"
24953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24955  fi
24956
24957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24958
24959  path="$BOOT_JDK"
24960  has_colon=`$ECHO $path | $GREP ^.:`
24961  new_path="$path"
24962  if test "x$has_colon" = x; then
24963    # Not in mixed or Windows style, start by that.
24964    new_path=`cmd //c echo $path`
24965  fi
24966
24967
24968  input_path="$new_path"
24969  # Check if we need to convert this using DOS-style short mode. If the path
24970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24971  # take no chances and rewrite it.
24972  # Note: m4 eats our [], so we need to use [ and ] instead.
24973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24974  if test "x$has_forbidden_chars" != x; then
24975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24977  fi
24978
24979
24980  windows_path="$new_path"
24981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24982    unix_path=`$CYGPATH -u "$windows_path"`
24983    new_path="$unix_path"
24984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24986    new_path="$unix_path"
24987  fi
24988
24989  if test "x$path" != "x$new_path"; then
24990    BOOT_JDK="$new_path"
24991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24993  fi
24994
24995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24997
24998    else
24999      # We're on a unix platform. Hooray! :)
25000      path="$BOOT_JDK"
25001      has_space=`$ECHO "$path" | $GREP " "`
25002      if test "x$has_space" != x; then
25003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25006      fi
25007
25008      # Use eval to expand a potential ~
25009      eval path="$path"
25010      if test ! -f "$path" && test ! -d "$path"; then
25011        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25012      fi
25013
25014      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25015    fi
25016  fi
25017
25018            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25019$as_echo_n "checking for Boot JDK... " >&6; }
25020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25021$as_echo "$BOOT_JDK" >&6; }
25022            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25023$as_echo_n "checking Boot JDK version... " >&6; }
25024            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25026$as_echo "$BOOT_JDK_VERSION" >&6; }
25027          fi # end check jdk version
25028        fi # end check javac
25029      fi # end check java
25030    fi # end check boot jdk found
25031  fi
25032
25033
25034  if test "x$BOOT_JDK_FOUND" = xno; then
25035    # Now execute the test
25036
25037  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25038  BOOT_JDK_SUFFIX="/Contents/Home"
25039  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25040  if test "x$ALL_JDKS_FOUND" != x; then
25041    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25042
25043  if test "x$BOOT_JDK_FOUND" = xno; then
25044    # Now execute the test
25045
25046        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25047        if test -d "$BOOT_JDK"; then
25048          BOOT_JDK_FOUND=maybe
25049          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25050$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25051        fi
25052
25053
25054    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25055    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25056      # Do we have a bin/java?
25057      if test ! -x "$BOOT_JDK/bin/java"; then
25058        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25060        BOOT_JDK_FOUND=no
25061      else
25062        # Do we have a bin/javac?
25063        if test ! -x "$BOOT_JDK/bin/javac"; then
25064          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25066          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25067$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25068          BOOT_JDK_FOUND=no
25069        else
25070          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25071          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25072
25073          # Extra M4 quote needed to protect [] in grep expression.
25074          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25075          if test "x$FOUND_CORRECT_VERSION" = x; then
25076            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25078            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25079$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25080            BOOT_JDK_FOUND=no
25081          else
25082            # We're done! :-)
25083            BOOT_JDK_FOUND=yes
25084
25085  # Only process if variable expands to non-empty
25086
25087  if test "x$BOOT_JDK" != x; then
25088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25089
25090  # Input might be given as Windows format, start by converting to
25091  # unix format.
25092  path="$BOOT_JDK"
25093  new_path=`$CYGPATH -u "$path"`
25094
25095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25098  # "foo.exe" is OK but "foo" is an error.
25099  #
25100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25101  # It is also a way to make sure we got the proper file name for the real test later on.
25102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25103  if test "x$test_shortpath" = x; then
25104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25106    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25107  fi
25108
25109  # Call helper function which possibly converts this using DOS-style short mode.
25110  # If so, the updated path is stored in $new_path.
25111
25112  input_path="$new_path"
25113  # Check if we need to convert this using DOS-style short mode. If the path
25114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25115  # take no chances and rewrite it.
25116  # Note: m4 eats our [], so we need to use [ and ] instead.
25117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25118  if test "x$has_forbidden_chars" != x; then
25119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25123      # Going to short mode and back again did indeed matter. Since short mode is
25124      # case insensitive, let's make it lowercase to improve readability.
25125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25126      # Now convert it back to Unix-style (cygpath)
25127      input_path=`$CYGPATH -u "$shortmode_path"`
25128      new_path="$input_path"
25129    fi
25130  fi
25131
25132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25133  if test "x$test_cygdrive_prefix" = x; then
25134    # As a simple fix, exclude /usr/bin since it's not a real path.
25135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25137      # a path prefixed by /cygdrive for fixpath to work.
25138      new_path="$CYGWIN_ROOT_PATH$input_path"
25139    fi
25140  fi
25141
25142
25143  if test "x$path" != "x$new_path"; then
25144    BOOT_JDK="$new_path"
25145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25147  fi
25148
25149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25150
25151  path="$BOOT_JDK"
25152  has_colon=`$ECHO $path | $GREP ^.:`
25153  new_path="$path"
25154  if test "x$has_colon" = x; then
25155    # Not in mixed or Windows style, start by that.
25156    new_path=`cmd //c echo $path`
25157  fi
25158
25159
25160  input_path="$new_path"
25161  # Check if we need to convert this using DOS-style short mode. If the path
25162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25163  # take no chances and rewrite it.
25164  # Note: m4 eats our [], so we need to use [ and ] instead.
25165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25166  if test "x$has_forbidden_chars" != x; then
25167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25169  fi
25170
25171
25172  windows_path="$new_path"
25173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25174    unix_path=`$CYGPATH -u "$windows_path"`
25175    new_path="$unix_path"
25176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25178    new_path="$unix_path"
25179  fi
25180
25181  if test "x$path" != "x$new_path"; then
25182    BOOT_JDK="$new_path"
25183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25185  fi
25186
25187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25189
25190    else
25191      # We're on a unix platform. Hooray! :)
25192      path="$BOOT_JDK"
25193      has_space=`$ECHO "$path" | $GREP " "`
25194      if test "x$has_space" != x; then
25195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25198      fi
25199
25200      # Use eval to expand a potential ~
25201      eval path="$path"
25202      if test ! -f "$path" && test ! -d "$path"; then
25203        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25204      fi
25205
25206      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25207    fi
25208  fi
25209
25210            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25211$as_echo_n "checking for Boot JDK... " >&6; }
25212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25213$as_echo "$BOOT_JDK" >&6; }
25214            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25215$as_echo_n "checking Boot JDK version... " >&6; }
25216            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25218$as_echo "$BOOT_JDK_VERSION" >&6; }
25219          fi # end check jdk version
25220        fi # end check javac
25221      fi # end check java
25222    fi # end check boot jdk found
25223  fi
25224
25225    done
25226  fi
25227
25228
25229    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25230    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25231      # Do we have a bin/java?
25232      if test ! -x "$BOOT_JDK/bin/java"; then
25233        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25235        BOOT_JDK_FOUND=no
25236      else
25237        # Do we have a bin/javac?
25238        if test ! -x "$BOOT_JDK/bin/javac"; then
25239          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25241          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25242$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25243          BOOT_JDK_FOUND=no
25244        else
25245          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25246          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25247
25248          # Extra M4 quote needed to protect [] in grep expression.
25249          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25250          if test "x$FOUND_CORRECT_VERSION" = x; then
25251            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25253            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25254$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25255            BOOT_JDK_FOUND=no
25256          else
25257            # We're done! :-)
25258            BOOT_JDK_FOUND=yes
25259
25260  # Only process if variable expands to non-empty
25261
25262  if test "x$BOOT_JDK" != x; then
25263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25264
25265  # Input might be given as Windows format, start by converting to
25266  # unix format.
25267  path="$BOOT_JDK"
25268  new_path=`$CYGPATH -u "$path"`
25269
25270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25273  # "foo.exe" is OK but "foo" is an error.
25274  #
25275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25276  # It is also a way to make sure we got the proper file name for the real test later on.
25277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25278  if test "x$test_shortpath" = x; then
25279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25280$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25281    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25282  fi
25283
25284  # Call helper function which possibly converts this using DOS-style short mode.
25285  # If so, the updated path is stored in $new_path.
25286
25287  input_path="$new_path"
25288  # Check if we need to convert this using DOS-style short mode. If the path
25289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25290  # take no chances and rewrite it.
25291  # Note: m4 eats our [], so we need to use [ and ] instead.
25292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25293  if test "x$has_forbidden_chars" != x; then
25294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25298      # Going to short mode and back again did indeed matter. Since short mode is
25299      # case insensitive, let's make it lowercase to improve readability.
25300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25301      # Now convert it back to Unix-style (cygpath)
25302      input_path=`$CYGPATH -u "$shortmode_path"`
25303      new_path="$input_path"
25304    fi
25305  fi
25306
25307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25308  if test "x$test_cygdrive_prefix" = x; then
25309    # As a simple fix, exclude /usr/bin since it's not a real path.
25310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25312      # a path prefixed by /cygdrive for fixpath to work.
25313      new_path="$CYGWIN_ROOT_PATH$input_path"
25314    fi
25315  fi
25316
25317
25318  if test "x$path" != "x$new_path"; then
25319    BOOT_JDK="$new_path"
25320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25322  fi
25323
25324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25325
25326  path="$BOOT_JDK"
25327  has_colon=`$ECHO $path | $GREP ^.:`
25328  new_path="$path"
25329  if test "x$has_colon" = x; then
25330    # Not in mixed or Windows style, start by that.
25331    new_path=`cmd //c echo $path`
25332  fi
25333
25334
25335  input_path="$new_path"
25336  # Check if we need to convert this using DOS-style short mode. If the path
25337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25338  # take no chances and rewrite it.
25339  # Note: m4 eats our [], so we need to use [ and ] instead.
25340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25341  if test "x$has_forbidden_chars" != x; then
25342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25344  fi
25345
25346
25347  windows_path="$new_path"
25348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25349    unix_path=`$CYGPATH -u "$windows_path"`
25350    new_path="$unix_path"
25351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25353    new_path="$unix_path"
25354  fi
25355
25356  if test "x$path" != "x$new_path"; then
25357    BOOT_JDK="$new_path"
25358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25360  fi
25361
25362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25364
25365    else
25366      # We're on a unix platform. Hooray! :)
25367      path="$BOOT_JDK"
25368      has_space=`$ECHO "$path" | $GREP " "`
25369      if test "x$has_space" != x; then
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25373      fi
25374
25375      # Use eval to expand a potential ~
25376      eval path="$path"
25377      if test ! -f "$path" && test ! -d "$path"; then
25378        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25379      fi
25380
25381      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25382    fi
25383  fi
25384
25385            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25386$as_echo_n "checking for Boot JDK... " >&6; }
25387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25388$as_echo "$BOOT_JDK" >&6; }
25389            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25390$as_echo_n "checking Boot JDK version... " >&6; }
25391            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25393$as_echo "$BOOT_JDK_VERSION" >&6; }
25394          fi # end check jdk version
25395        fi # end check javac
25396      fi # end check java
25397    fi # end check boot jdk found
25398  fi
25399
25400  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25401
25402  if test "x$BOOT_JDK_FOUND" = xno; then
25403    # Now execute the test
25404
25405  BOOT_JDK_PREFIX="/usr/lib/jvm"
25406  BOOT_JDK_SUFFIX=""
25407  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25408  if test "x$ALL_JDKS_FOUND" != x; then
25409    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25410
25411  if test "x$BOOT_JDK_FOUND" = xno; then
25412    # Now execute the test
25413
25414        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25415        if test -d "$BOOT_JDK"; then
25416          BOOT_JDK_FOUND=maybe
25417          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25418$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25419        fi
25420
25421
25422    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25423    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25424      # Do we have a bin/java?
25425      if test ! -x "$BOOT_JDK/bin/java"; then
25426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25428        BOOT_JDK_FOUND=no
25429      else
25430        # Do we have a bin/javac?
25431        if test ! -x "$BOOT_JDK/bin/javac"; then
25432          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25434          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25435$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25436          BOOT_JDK_FOUND=no
25437        else
25438          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25439          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25440
25441          # Extra M4 quote needed to protect [] in grep expression.
25442          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25443          if test "x$FOUND_CORRECT_VERSION" = x; then
25444            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25446            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25447$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25448            BOOT_JDK_FOUND=no
25449          else
25450            # We're done! :-)
25451            BOOT_JDK_FOUND=yes
25452
25453  # Only process if variable expands to non-empty
25454
25455  if test "x$BOOT_JDK" != x; then
25456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25457
25458  # Input might be given as Windows format, start by converting to
25459  # unix format.
25460  path="$BOOT_JDK"
25461  new_path=`$CYGPATH -u "$path"`
25462
25463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25466  # "foo.exe" is OK but "foo" is an error.
25467  #
25468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25469  # It is also a way to make sure we got the proper file name for the real test later on.
25470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25471  if test "x$test_shortpath" = x; then
25472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25474    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25475  fi
25476
25477  # Call helper function which possibly converts this using DOS-style short mode.
25478  # If so, the updated path is stored in $new_path.
25479
25480  input_path="$new_path"
25481  # Check if we need to convert this using DOS-style short mode. If the path
25482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25483  # take no chances and rewrite it.
25484  # Note: m4 eats our [], so we need to use [ and ] instead.
25485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25486  if test "x$has_forbidden_chars" != x; then
25487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25491      # Going to short mode and back again did indeed matter. Since short mode is
25492      # case insensitive, let's make it lowercase to improve readability.
25493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25494      # Now convert it back to Unix-style (cygpath)
25495      input_path=`$CYGPATH -u "$shortmode_path"`
25496      new_path="$input_path"
25497    fi
25498  fi
25499
25500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25501  if test "x$test_cygdrive_prefix" = x; then
25502    # As a simple fix, exclude /usr/bin since it's not a real path.
25503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25505      # a path prefixed by /cygdrive for fixpath to work.
25506      new_path="$CYGWIN_ROOT_PATH$input_path"
25507    fi
25508  fi
25509
25510
25511  if test "x$path" != "x$new_path"; then
25512    BOOT_JDK="$new_path"
25513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25515  fi
25516
25517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25518
25519  path="$BOOT_JDK"
25520  has_colon=`$ECHO $path | $GREP ^.:`
25521  new_path="$path"
25522  if test "x$has_colon" = x; then
25523    # Not in mixed or Windows style, start by that.
25524    new_path=`cmd //c echo $path`
25525  fi
25526
25527
25528  input_path="$new_path"
25529  # Check if we need to convert this using DOS-style short mode. If the path
25530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25531  # take no chances and rewrite it.
25532  # Note: m4 eats our [], so we need to use [ and ] instead.
25533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25534  if test "x$has_forbidden_chars" != x; then
25535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25537  fi
25538
25539
25540  windows_path="$new_path"
25541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25542    unix_path=`$CYGPATH -u "$windows_path"`
25543    new_path="$unix_path"
25544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25546    new_path="$unix_path"
25547  fi
25548
25549  if test "x$path" != "x$new_path"; then
25550    BOOT_JDK="$new_path"
25551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25553  fi
25554
25555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25557
25558    else
25559      # We're on a unix platform. Hooray! :)
25560      path="$BOOT_JDK"
25561      has_space=`$ECHO "$path" | $GREP " "`
25562      if test "x$has_space" != x; then
25563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25566      fi
25567
25568      # Use eval to expand a potential ~
25569      eval path="$path"
25570      if test ! -f "$path" && test ! -d "$path"; then
25571        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25572      fi
25573
25574      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25575    fi
25576  fi
25577
25578            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25579$as_echo_n "checking for Boot JDK... " >&6; }
25580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25581$as_echo "$BOOT_JDK" >&6; }
25582            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25583$as_echo_n "checking Boot JDK version... " >&6; }
25584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25586$as_echo "$BOOT_JDK_VERSION" >&6; }
25587          fi # end check jdk version
25588        fi # end check javac
25589      fi # end check java
25590    fi # end check boot jdk found
25591  fi
25592
25593    done
25594  fi
25595
25596
25597    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25598    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25599      # Do we have a bin/java?
25600      if test ! -x "$BOOT_JDK/bin/java"; then
25601        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25603        BOOT_JDK_FOUND=no
25604      else
25605        # Do we have a bin/javac?
25606        if test ! -x "$BOOT_JDK/bin/javac"; then
25607          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25609          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25610$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25611          BOOT_JDK_FOUND=no
25612        else
25613          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25614          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25615
25616          # Extra M4 quote needed to protect [] in grep expression.
25617          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25618          if test "x$FOUND_CORRECT_VERSION" = x; then
25619            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25621            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25622$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25623            BOOT_JDK_FOUND=no
25624          else
25625            # We're done! :-)
25626            BOOT_JDK_FOUND=yes
25627
25628  # Only process if variable expands to non-empty
25629
25630  if test "x$BOOT_JDK" != x; then
25631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25632
25633  # Input might be given as Windows format, start by converting to
25634  # unix format.
25635  path="$BOOT_JDK"
25636  new_path=`$CYGPATH -u "$path"`
25637
25638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25641  # "foo.exe" is OK but "foo" is an error.
25642  #
25643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25644  # It is also a way to make sure we got the proper file name for the real test later on.
25645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25646  if test "x$test_shortpath" = x; then
25647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25648$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25649    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25650  fi
25651
25652  # Call helper function which possibly converts this using DOS-style short mode.
25653  # If so, the updated path is stored in $new_path.
25654
25655  input_path="$new_path"
25656  # Check if we need to convert this using DOS-style short mode. If the path
25657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25658  # take no chances and rewrite it.
25659  # Note: m4 eats our [], so we need to use [ and ] instead.
25660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25661  if test "x$has_forbidden_chars" != x; then
25662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25666      # Going to short mode and back again did indeed matter. Since short mode is
25667      # case insensitive, let's make it lowercase to improve readability.
25668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25669      # Now convert it back to Unix-style (cygpath)
25670      input_path=`$CYGPATH -u "$shortmode_path"`
25671      new_path="$input_path"
25672    fi
25673  fi
25674
25675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25676  if test "x$test_cygdrive_prefix" = x; then
25677    # As a simple fix, exclude /usr/bin since it's not a real path.
25678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25680      # a path prefixed by /cygdrive for fixpath to work.
25681      new_path="$CYGWIN_ROOT_PATH$input_path"
25682    fi
25683  fi
25684
25685
25686  if test "x$path" != "x$new_path"; then
25687    BOOT_JDK="$new_path"
25688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25689$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25690  fi
25691
25692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25693
25694  path="$BOOT_JDK"
25695  has_colon=`$ECHO $path | $GREP ^.:`
25696  new_path="$path"
25697  if test "x$has_colon" = x; then
25698    # Not in mixed or Windows style, start by that.
25699    new_path=`cmd //c echo $path`
25700  fi
25701
25702
25703  input_path="$new_path"
25704  # Check if we need to convert this using DOS-style short mode. If the path
25705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25706  # take no chances and rewrite it.
25707  # Note: m4 eats our [], so we need to use [ and ] instead.
25708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25709  if test "x$has_forbidden_chars" != x; then
25710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25712  fi
25713
25714
25715  windows_path="$new_path"
25716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25717    unix_path=`$CYGPATH -u "$windows_path"`
25718    new_path="$unix_path"
25719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25721    new_path="$unix_path"
25722  fi
25723
25724  if test "x$path" != "x$new_path"; then
25725    BOOT_JDK="$new_path"
25726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25728  fi
25729
25730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25732
25733    else
25734      # We're on a unix platform. Hooray! :)
25735      path="$BOOT_JDK"
25736      has_space=`$ECHO "$path" | $GREP " "`
25737      if test "x$has_space" != x; then
25738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25739$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25740        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25741      fi
25742
25743      # Use eval to expand a potential ~
25744      eval path="$path"
25745      if test ! -f "$path" && test ! -d "$path"; then
25746        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25747      fi
25748
25749      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25750    fi
25751  fi
25752
25753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25754$as_echo_n "checking for Boot JDK... " >&6; }
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25756$as_echo "$BOOT_JDK" >&6; }
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25758$as_echo_n "checking Boot JDK version... " >&6; }
25759            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25761$as_echo "$BOOT_JDK_VERSION" >&6; }
25762          fi # end check jdk version
25763        fi # end check javac
25764      fi # end check java
25765    fi # end check boot jdk found
25766  fi
25767
25768  fi
25769
25770
25771    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25772    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25773      # Do we have a bin/java?
25774      if test ! -x "$BOOT_JDK/bin/java"; then
25775        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25777        BOOT_JDK_FOUND=no
25778      else
25779        # Do we have a bin/javac?
25780        if test ! -x "$BOOT_JDK/bin/javac"; then
25781          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25783          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25784$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25785          BOOT_JDK_FOUND=no
25786        else
25787          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25788          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25789
25790          # Extra M4 quote needed to protect [] in grep expression.
25791          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25792          if test "x$FOUND_CORRECT_VERSION" = x; then
25793            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25795            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25796$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25797            BOOT_JDK_FOUND=no
25798          else
25799            # We're done! :-)
25800            BOOT_JDK_FOUND=yes
25801
25802  # Only process if variable expands to non-empty
25803
25804  if test "x$BOOT_JDK" != x; then
25805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25806
25807  # Input might be given as Windows format, start by converting to
25808  # unix format.
25809  path="$BOOT_JDK"
25810  new_path=`$CYGPATH -u "$path"`
25811
25812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25815  # "foo.exe" is OK but "foo" is an error.
25816  #
25817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25818  # It is also a way to make sure we got the proper file name for the real test later on.
25819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25820  if test "x$test_shortpath" = x; then
25821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25823    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25824  fi
25825
25826  # Call helper function which possibly converts this using DOS-style short mode.
25827  # If so, the updated path is stored in $new_path.
25828
25829  input_path="$new_path"
25830  # Check if we need to convert this using DOS-style short mode. If the path
25831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25832  # take no chances and rewrite it.
25833  # Note: m4 eats our [], so we need to use [ and ] instead.
25834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25835  if test "x$has_forbidden_chars" != x; then
25836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25840      # Going to short mode and back again did indeed matter. Since short mode is
25841      # case insensitive, let's make it lowercase to improve readability.
25842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25843      # Now convert it back to Unix-style (cygpath)
25844      input_path=`$CYGPATH -u "$shortmode_path"`
25845      new_path="$input_path"
25846    fi
25847  fi
25848
25849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25850  if test "x$test_cygdrive_prefix" = x; then
25851    # As a simple fix, exclude /usr/bin since it's not a real path.
25852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25854      # a path prefixed by /cygdrive for fixpath to work.
25855      new_path="$CYGWIN_ROOT_PATH$input_path"
25856    fi
25857  fi
25858
25859
25860  if test "x$path" != "x$new_path"; then
25861    BOOT_JDK="$new_path"
25862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25864  fi
25865
25866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25867
25868  path="$BOOT_JDK"
25869  has_colon=`$ECHO $path | $GREP ^.:`
25870  new_path="$path"
25871  if test "x$has_colon" = x; then
25872    # Not in mixed or Windows style, start by that.
25873    new_path=`cmd //c echo $path`
25874  fi
25875
25876
25877  input_path="$new_path"
25878  # Check if we need to convert this using DOS-style short mode. If the path
25879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25880  # take no chances and rewrite it.
25881  # Note: m4 eats our [], so we need to use [ and ] instead.
25882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25883  if test "x$has_forbidden_chars" != x; then
25884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25886  fi
25887
25888
25889  windows_path="$new_path"
25890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25891    unix_path=`$CYGPATH -u "$windows_path"`
25892    new_path="$unix_path"
25893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25895    new_path="$unix_path"
25896  fi
25897
25898  if test "x$path" != "x$new_path"; then
25899    BOOT_JDK="$new_path"
25900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25902  fi
25903
25904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25906
25907    else
25908      # We're on a unix platform. Hooray! :)
25909      path="$BOOT_JDK"
25910      has_space=`$ECHO "$path" | $GREP " "`
25911      if test "x$has_space" != x; then
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25915      fi
25916
25917      # Use eval to expand a potential ~
25918      eval path="$path"
25919      if test ! -f "$path" && test ! -d "$path"; then
25920        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25921      fi
25922
25923      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25924    fi
25925  fi
25926
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25928$as_echo_n "checking for Boot JDK... " >&6; }
25929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25930$as_echo "$BOOT_JDK" >&6; }
25931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25932$as_echo_n "checking Boot JDK version... " >&6; }
25933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25935$as_echo "$BOOT_JDK_VERSION" >&6; }
25936          fi # end check jdk version
25937        fi # end check javac
25938      fi # end check java
25939    fi # end check boot jdk found
25940  fi
25941
25942
25943  # If we haven't found anything yet, we've truly lost. Give up.
25944  if test "x$BOOT_JDK_FOUND" = xno; then
25945
25946  # Print a helpful message on how to acquire the necessary build dependency.
25947  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25948  MISSING_DEPENDENCY=openjdk
25949
25950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25951    cygwin_help $MISSING_DEPENDENCY
25952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25953    msys_help $MISSING_DEPENDENCY
25954  else
25955    PKGHANDLER_COMMAND=
25956
25957    case $PKGHANDLER in
25958      apt-get)
25959        apt_help     $MISSING_DEPENDENCY ;;
25960      yum)
25961        yum_help     $MISSING_DEPENDENCY ;;
25962      port)
25963        port_help    $MISSING_DEPENDENCY ;;
25964      pkgutil)
25965        pkgutil_help $MISSING_DEPENDENCY ;;
25966      pkgadd)
25967        pkgadd_help  $MISSING_DEPENDENCY ;;
25968    esac
25969
25970    if test "x$PKGHANDLER_COMMAND" != x; then
25971      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25972    fi
25973  fi
25974
25975    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25976$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25977    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25978$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25979    as_fn_error $? "Cannot continue" "$LINENO" 5
25980  fi
25981
25982
25983
25984  # Setup tools from the Boot JDK.
25985
25986  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25987
25988  # Publish this variable in the help.
25989
25990
25991  if test "x$JAVA" = x; then
25992    # The variable is not set by user, try to locate tool using the code snippet
25993
25994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25995$as_echo_n "checking for java in Boot JDK... " >&6; }
25996      JAVA=$BOOT_JDK/bin/java
25997      if test ! -x $JAVA; then
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25999$as_echo "not found" >&6; }
26000        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26001$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26002        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26003      fi
26004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26005$as_echo "ok" >&6; }
26006
26007
26008  else
26009    # The variable is set, but is it from the command line or the environment?
26010
26011    # Try to remove the string !JAVA! from our list.
26012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26014      # If it failed, the variable was not from the command line. Ignore it,
26015      # but warn the user (except for BASH, which is always set by the calling BASH).
26016      if test "xJAVA" != xBASH; then
26017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26018$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26019      fi
26020      # Try to locate tool using the code snippet
26021
26022      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26023$as_echo_n "checking for java in Boot JDK... " >&6; }
26024      JAVA=$BOOT_JDK/bin/java
26025      if test ! -x $JAVA; then
26026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26027$as_echo "not found" >&6; }
26028        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26029$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26030        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26031      fi
26032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26033$as_echo "ok" >&6; }
26034
26035
26036    else
26037      # If it succeeded, then it was overridden by the user. We will use it
26038      # for the tool.
26039
26040      # First remove it from the list of overridden variables, so we can test
26041      # for unknown variables in the end.
26042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26043
26044      # Check if the provided tool contains a complete path.
26045      tool_specified="$JAVA"
26046      tool_basename="${tool_specified##*/}"
26047      if test "x$tool_basename" = "x$tool_specified"; then
26048        # A command without a complete path is provided, search $PATH.
26049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26050$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26051        # Extract the first word of "$tool_basename", so it can be a program name with args.
26052set dummy $tool_basename; ac_word=$2
26053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26054$as_echo_n "checking for $ac_word... " >&6; }
26055if ${ac_cv_path_JAVA+:} false; then :
26056  $as_echo_n "(cached) " >&6
26057else
26058  case $JAVA in
26059  [\\/]* | ?:[\\/]*)
26060  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26061  ;;
26062  *)
26063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26064for as_dir in $PATH
26065do
26066  IFS=$as_save_IFS
26067  test -z "$as_dir" && as_dir=.
26068    for ac_exec_ext in '' $ac_executable_extensions; do
26069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26070    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26072    break 2
26073  fi
26074done
26075  done
26076IFS=$as_save_IFS
26077
26078  ;;
26079esac
26080fi
26081JAVA=$ac_cv_path_JAVA
26082if test -n "$JAVA"; then
26083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26084$as_echo "$JAVA" >&6; }
26085else
26086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26087$as_echo "no" >&6; }
26088fi
26089
26090
26091        if test "x$JAVA" = x; then
26092          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26093        fi
26094      else
26095        # Otherwise we believe it is a complete path. Use it as it is.
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26097$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26099$as_echo_n "checking for JAVA... " >&6; }
26100        if test ! -x "$tool_specified"; then
26101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26102$as_echo "not found" >&6; }
26103          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26104        fi
26105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26106$as_echo "$tool_specified" >&6; }
26107      fi
26108    fi
26109  fi
26110
26111
26112
26113  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26114
26115  # Publish this variable in the help.
26116
26117
26118  if test "x$JAVAC" = x; then
26119    # The variable is not set by user, try to locate tool using the code snippet
26120
26121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26122$as_echo_n "checking for javac in Boot JDK... " >&6; }
26123      JAVAC=$BOOT_JDK/bin/javac
26124      if test ! -x $JAVAC; then
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26126$as_echo "not found" >&6; }
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26128$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26129        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26130      fi
26131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26132$as_echo "ok" >&6; }
26133
26134
26135  else
26136    # The variable is set, but is it from the command line or the environment?
26137
26138    # Try to remove the string !JAVAC! from our list.
26139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26141      # If it failed, the variable was not from the command line. Ignore it,
26142      # but warn the user (except for BASH, which is always set by the calling BASH).
26143      if test "xJAVAC" != xBASH; then
26144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26145$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26146      fi
26147      # Try to locate tool using the code snippet
26148
26149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26150$as_echo_n "checking for javac in Boot JDK... " >&6; }
26151      JAVAC=$BOOT_JDK/bin/javac
26152      if test ! -x $JAVAC; then
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26154$as_echo "not found" >&6; }
26155        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26156$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26157        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26158      fi
26159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26160$as_echo "ok" >&6; }
26161
26162
26163    else
26164      # If it succeeded, then it was overridden by the user. We will use it
26165      # for the tool.
26166
26167      # First remove it from the list of overridden variables, so we can test
26168      # for unknown variables in the end.
26169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26170
26171      # Check if the provided tool contains a complete path.
26172      tool_specified="$JAVAC"
26173      tool_basename="${tool_specified##*/}"
26174      if test "x$tool_basename" = "x$tool_specified"; then
26175        # A command without a complete path is provided, search $PATH.
26176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26177$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26178        # Extract the first word of "$tool_basename", so it can be a program name with args.
26179set dummy $tool_basename; ac_word=$2
26180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26181$as_echo_n "checking for $ac_word... " >&6; }
26182if ${ac_cv_path_JAVAC+:} false; then :
26183  $as_echo_n "(cached) " >&6
26184else
26185  case $JAVAC in
26186  [\\/]* | ?:[\\/]*)
26187  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26188  ;;
26189  *)
26190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26191for as_dir in $PATH
26192do
26193  IFS=$as_save_IFS
26194  test -z "$as_dir" && as_dir=.
26195    for ac_exec_ext in '' $ac_executable_extensions; do
26196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26197    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26199    break 2
26200  fi
26201done
26202  done
26203IFS=$as_save_IFS
26204
26205  ;;
26206esac
26207fi
26208JAVAC=$ac_cv_path_JAVAC
26209if test -n "$JAVAC"; then
26210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26211$as_echo "$JAVAC" >&6; }
26212else
26213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26214$as_echo "no" >&6; }
26215fi
26216
26217
26218        if test "x$JAVAC" = x; then
26219          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26220        fi
26221      else
26222        # Otherwise we believe it is a complete path. Use it as it is.
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26224$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26226$as_echo_n "checking for JAVAC... " >&6; }
26227        if test ! -x "$tool_specified"; then
26228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26229$as_echo "not found" >&6; }
26230          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26231        fi
26232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26233$as_echo "$tool_specified" >&6; }
26234      fi
26235    fi
26236  fi
26237
26238
26239
26240  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26241
26242  # Publish this variable in the help.
26243
26244
26245  if test "x$JAVAH" = x; then
26246    # The variable is not set by user, try to locate tool using the code snippet
26247
26248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26249$as_echo_n "checking for javah in Boot JDK... " >&6; }
26250      JAVAH=$BOOT_JDK/bin/javah
26251      if test ! -x $JAVAH; then
26252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26253$as_echo "not found" >&6; }
26254        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26255$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26256        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26257      fi
26258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26259$as_echo "ok" >&6; }
26260
26261
26262  else
26263    # The variable is set, but is it from the command line or the environment?
26264
26265    # Try to remove the string !JAVAH! from our list.
26266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26268      # If it failed, the variable was not from the command line. Ignore it,
26269      # but warn the user (except for BASH, which is always set by the calling BASH).
26270      if test "xJAVAH" != xBASH; then
26271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26272$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26273      fi
26274      # Try to locate tool using the code snippet
26275
26276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26277$as_echo_n "checking for javah in Boot JDK... " >&6; }
26278      JAVAH=$BOOT_JDK/bin/javah
26279      if test ! -x $JAVAH; then
26280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26281$as_echo "not found" >&6; }
26282        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26283$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26284        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26285      fi
26286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26287$as_echo "ok" >&6; }
26288
26289
26290    else
26291      # If it succeeded, then it was overridden by the user. We will use it
26292      # for the tool.
26293
26294      # First remove it from the list of overridden variables, so we can test
26295      # for unknown variables in the end.
26296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26297
26298      # Check if the provided tool contains a complete path.
26299      tool_specified="$JAVAH"
26300      tool_basename="${tool_specified##*/}"
26301      if test "x$tool_basename" = "x$tool_specified"; then
26302        # A command without a complete path is provided, search $PATH.
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26304$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26305        # Extract the first word of "$tool_basename", so it can be a program name with args.
26306set dummy $tool_basename; ac_word=$2
26307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26308$as_echo_n "checking for $ac_word... " >&6; }
26309if ${ac_cv_path_JAVAH+:} false; then :
26310  $as_echo_n "(cached) " >&6
26311else
26312  case $JAVAH in
26313  [\\/]* | ?:[\\/]*)
26314  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26315  ;;
26316  *)
26317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26318for as_dir in $PATH
26319do
26320  IFS=$as_save_IFS
26321  test -z "$as_dir" && as_dir=.
26322    for ac_exec_ext in '' $ac_executable_extensions; do
26323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26324    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26326    break 2
26327  fi
26328done
26329  done
26330IFS=$as_save_IFS
26331
26332  ;;
26333esac
26334fi
26335JAVAH=$ac_cv_path_JAVAH
26336if test -n "$JAVAH"; then
26337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26338$as_echo "$JAVAH" >&6; }
26339else
26340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26341$as_echo "no" >&6; }
26342fi
26343
26344
26345        if test "x$JAVAH" = x; then
26346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26347        fi
26348      else
26349        # Otherwise we believe it is a complete path. Use it as it is.
26350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26351$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26353$as_echo_n "checking for JAVAH... " >&6; }
26354        if test ! -x "$tool_specified"; then
26355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26356$as_echo "not found" >&6; }
26357          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26358        fi
26359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26360$as_echo "$tool_specified" >&6; }
26361      fi
26362    fi
26363  fi
26364
26365
26366
26367  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26368
26369  # Publish this variable in the help.
26370
26371
26372  if test "x$JAR" = x; then
26373    # The variable is not set by user, try to locate tool using the code snippet
26374
26375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26376$as_echo_n "checking for jar in Boot JDK... " >&6; }
26377      JAR=$BOOT_JDK/bin/jar
26378      if test ! -x $JAR; then
26379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26380$as_echo "not found" >&6; }
26381        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26382$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26383        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26384      fi
26385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26386$as_echo "ok" >&6; }
26387
26388
26389  else
26390    # The variable is set, but is it from the command line or the environment?
26391
26392    # Try to remove the string !JAR! from our list.
26393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26395      # If it failed, the variable was not from the command line. Ignore it,
26396      # but warn the user (except for BASH, which is always set by the calling BASH).
26397      if test "xJAR" != xBASH; then
26398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26399$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26400      fi
26401      # Try to locate tool using the code snippet
26402
26403      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26404$as_echo_n "checking for jar in Boot JDK... " >&6; }
26405      JAR=$BOOT_JDK/bin/jar
26406      if test ! -x $JAR; then
26407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26408$as_echo "not found" >&6; }
26409        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26410$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26411        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26412      fi
26413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26414$as_echo "ok" >&6; }
26415
26416
26417    else
26418      # If it succeeded, then it was overridden by the user. We will use it
26419      # for the tool.
26420
26421      # First remove it from the list of overridden variables, so we can test
26422      # for unknown variables in the end.
26423      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26424
26425      # Check if the provided tool contains a complete path.
26426      tool_specified="$JAR"
26427      tool_basename="${tool_specified##*/}"
26428      if test "x$tool_basename" = "x$tool_specified"; then
26429        # A command without a complete path is provided, search $PATH.
26430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26431$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26432        # Extract the first word of "$tool_basename", so it can be a program name with args.
26433set dummy $tool_basename; ac_word=$2
26434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26435$as_echo_n "checking for $ac_word... " >&6; }
26436if ${ac_cv_path_JAR+:} false; then :
26437  $as_echo_n "(cached) " >&6
26438else
26439  case $JAR in
26440  [\\/]* | ?:[\\/]*)
26441  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26442  ;;
26443  *)
26444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26445for as_dir in $PATH
26446do
26447  IFS=$as_save_IFS
26448  test -z "$as_dir" && as_dir=.
26449    for ac_exec_ext in '' $ac_executable_extensions; do
26450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26451    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26453    break 2
26454  fi
26455done
26456  done
26457IFS=$as_save_IFS
26458
26459  ;;
26460esac
26461fi
26462JAR=$ac_cv_path_JAR
26463if test -n "$JAR"; then
26464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26465$as_echo "$JAR" >&6; }
26466else
26467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26468$as_echo "no" >&6; }
26469fi
26470
26471
26472        if test "x$JAR" = x; then
26473          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26474        fi
26475      else
26476        # Otherwise we believe it is a complete path. Use it as it is.
26477        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26478$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26480$as_echo_n "checking for JAR... " >&6; }
26481        if test ! -x "$tool_specified"; then
26482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26483$as_echo "not found" >&6; }
26484          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26485        fi
26486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26487$as_echo "$tool_specified" >&6; }
26488      fi
26489    fi
26490  fi
26491
26492
26493
26494  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26495
26496  # Publish this variable in the help.
26497
26498
26499  if test "x$JARSIGNER" = x; then
26500    # The variable is not set by user, try to locate tool using the code snippet
26501
26502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26503$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26504      JARSIGNER=$BOOT_JDK/bin/jarsigner
26505      if test ! -x $JARSIGNER; then
26506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26507$as_echo "not found" >&6; }
26508        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26509$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26510        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26511      fi
26512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26513$as_echo "ok" >&6; }
26514
26515
26516  else
26517    # The variable is set, but is it from the command line or the environment?
26518
26519    # Try to remove the string !JARSIGNER! from our list.
26520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26522      # If it failed, the variable was not from the command line. Ignore it,
26523      # but warn the user (except for BASH, which is always set by the calling BASH).
26524      if test "xJARSIGNER" != xBASH; then
26525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26526$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26527      fi
26528      # Try to locate tool using the code snippet
26529
26530      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26531$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26532      JARSIGNER=$BOOT_JDK/bin/jarsigner
26533      if test ! -x $JARSIGNER; then
26534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26535$as_echo "not found" >&6; }
26536        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26537$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26538        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26539      fi
26540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26541$as_echo "ok" >&6; }
26542
26543
26544    else
26545      # If it succeeded, then it was overridden by the user. We will use it
26546      # for the tool.
26547
26548      # First remove it from the list of overridden variables, so we can test
26549      # for unknown variables in the end.
26550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26551
26552      # Check if the provided tool contains a complete path.
26553      tool_specified="$JARSIGNER"
26554      tool_basename="${tool_specified##*/}"
26555      if test "x$tool_basename" = "x$tool_specified"; then
26556        # A command without a complete path is provided, search $PATH.
26557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26558$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26559        # Extract the first word of "$tool_basename", so it can be a program name with args.
26560set dummy $tool_basename; ac_word=$2
26561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26562$as_echo_n "checking for $ac_word... " >&6; }
26563if ${ac_cv_path_JARSIGNER+:} false; then :
26564  $as_echo_n "(cached) " >&6
26565else
26566  case $JARSIGNER in
26567  [\\/]* | ?:[\\/]*)
26568  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26569  ;;
26570  *)
26571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26572for as_dir in $PATH
26573do
26574  IFS=$as_save_IFS
26575  test -z "$as_dir" && as_dir=.
26576    for ac_exec_ext in '' $ac_executable_extensions; do
26577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26578    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26580    break 2
26581  fi
26582done
26583  done
26584IFS=$as_save_IFS
26585
26586  ;;
26587esac
26588fi
26589JARSIGNER=$ac_cv_path_JARSIGNER
26590if test -n "$JARSIGNER"; then
26591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26592$as_echo "$JARSIGNER" >&6; }
26593else
26594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26595$as_echo "no" >&6; }
26596fi
26597
26598
26599        if test "x$JARSIGNER" = x; then
26600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26601        fi
26602      else
26603        # Otherwise we believe it is a complete path. Use it as it is.
26604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26605$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26607$as_echo_n "checking for JARSIGNER... " >&6; }
26608        if test ! -x "$tool_specified"; then
26609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26610$as_echo "not found" >&6; }
26611          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26612        fi
26613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26614$as_echo "$tool_specified" >&6; }
26615      fi
26616    fi
26617  fi
26618
26619
26620
26621  # Finally, set some other options...
26622
26623  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26624  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26625
26626
26627
26628
26629###############################################################################
26630#
26631# Configure the sources to use. We can add or override individual directories.
26632#
26633###############################################################################
26634
26635
26636  # Where are the sources. Any of these can be overridden
26637  # using --with-override-corba and the likes.
26638  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26639  CORBA_TOPDIR="$SRC_ROOT/corba"
26640  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26641  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26642  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26643  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26644  JDK_TOPDIR="$SRC_ROOT/jdk"
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655  ###############################################################################
26656  #
26657  # Pickup additional source for a component from outside of the source root
26658  # or override source for a component.
26659  #
26660
26661# Check whether --with-add-source-root was given.
26662if test "${with_add_source_root+set}" = set; then :
26663  withval=$with_add_source_root;
26664fi
26665
26666
26667
26668# Check whether --with-override-source-root was given.
26669if test "${with_override_source_root+set}" = set; then :
26670  withval=$with_override_source_root;
26671fi
26672
26673
26674
26675# Check whether --with-adds-and-overrides was given.
26676if test "${with_adds_and_overrides+set}" = set; then :
26677  withval=$with_adds_and_overrides;
26678fi
26679
26680
26681  if test "x$with_adds_and_overrides" != x; then
26682    with_add_source_root="$with_adds_and_overrides/adds"
26683    with_override_source_root="$with_adds_and_overrides/overrides"
26684  fi
26685
26686  if test "x$with_add_source_root" != x; then
26687    if ! test -d $with_add_source_root; then
26688      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26689    fi
26690    CURDIR="$PWD"
26691    cd "$with_add_source_root"
26692    ADD_SRC_ROOT="`pwd`"
26693    cd "$CURDIR"
26694    # Verify that the addon source root does not have any root makefiles.
26695    # If it does, then it is usually an error, prevent this.
26696    if test -f $with_add_source_root/langtools/make/Makefile; then
26697      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
26698    fi
26699    if test -f $with_add_source_root/corba/make/Makefile; then
26700      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
26701    fi
26702    if test -f $with_add_source_root/jaxp/make/Makefile; then
26703      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
26704    fi
26705    if test -f $with_add_source_root/jaxws/make/Makefile; then
26706      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
26707    fi
26708    if test -f $with_add_source_root/hotspot/make/Makefile; then
26709      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
26710    fi
26711    if test -f $with_add_source_root/nashorn/make/Makefile; then
26712      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
26713    fi
26714    if test -f $with_add_source_root/jdk/make/Makefile; then
26715      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
26716    fi
26717  fi
26718
26719
26720  if test "x$with_override_source_root" != x; then
26721    if ! test -d $with_override_source_root; then
26722      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26723    fi
26724    CURDIR="$PWD"
26725    cd "$with_override_source_root"
26726    OVERRIDE_SRC_ROOT="`pwd`"
26727    cd "$CURDIR"
26728    if test -f $with_override_source_root/langtools/make/Makefile; then
26729      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
26730    fi
26731    if test -f $with_override_source_root/corba/make/Makefile; then
26732      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
26733    fi
26734    if test -f $with_override_source_root/jaxp/make/Makefile; then
26735      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
26736    fi
26737    if test -f $with_override_source_root/jaxws/make/Makefile; then
26738      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
26739    fi
26740    if test -f $with_override_source_root/hotspot/make/Makefile; then
26741      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
26742    fi
26743    if test -f $with_override_source_root/nashorn/make/Makefile; then
26744      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
26745    fi
26746    if test -f $with_override_source_root/jdk/make/Makefile; then
26747      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
26748    fi
26749  fi
26750
26751
26752  ###############################################################################
26753  #
26754  # Override a repo completely, this is used for example when you have 3 small
26755  # development sandboxes of the langtools sources and want to avoid having 3 full
26756  # OpenJDK sources checked out on disk.
26757  #
26758  # Assuming that the 3 langtools sandboxes are located here:
26759  # /home/fredrik/sandbox1/langtools
26760  # /home/fredrik/sandbox2/langtools
26761  # /home/fredrik/sandbox3/langtools
26762  #
26763  # From the source root you create build subdirs manually:
26764  #     mkdir -p build1 build2 build3
26765  # in each build directory run:
26766  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26767  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26768  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26769  #
26770
26771
26772# Check whether --with-override-langtools was given.
26773if test "${with_override_langtools+set}" = set; then :
26774  withval=$with_override_langtools;
26775fi
26776
26777
26778
26779# Check whether --with-override-corba was given.
26780if test "${with_override_corba+set}" = set; then :
26781  withval=$with_override_corba;
26782fi
26783
26784
26785
26786# Check whether --with-override-jaxp was given.
26787if test "${with_override_jaxp+set}" = set; then :
26788  withval=$with_override_jaxp;
26789fi
26790
26791
26792
26793# Check whether --with-override-jaxws was given.
26794if test "${with_override_jaxws+set}" = set; then :
26795  withval=$with_override_jaxws;
26796fi
26797
26798
26799
26800# Check whether --with-override-hotspot was given.
26801if test "${with_override_hotspot+set}" = set; then :
26802  withval=$with_override_hotspot;
26803fi
26804
26805
26806
26807# Check whether --with-override-nashorn was given.
26808if test "${with_override_nashorn+set}" = set; then :
26809  withval=$with_override_nashorn;
26810fi
26811
26812
26813
26814# Check whether --with-override-jdk was given.
26815if test "${with_override_jdk+set}" = set; then :
26816  withval=$with_override_jdk;
26817fi
26818
26819
26820  if test "x$with_override_langtools" != x; then
26821    CURDIR="$PWD"
26822    cd "$with_override_langtools"
26823    LANGTOOLS_TOPDIR="`pwd`"
26824    cd "$CURDIR"
26825    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26826      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26827    fi
26828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26829$as_echo_n "checking if langtools should be overridden... " >&6; }
26830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26831$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26832  fi
26833  if test "x$with_override_corba" != x; then
26834    CURDIR="$PWD"
26835    cd "$with_override_corba"
26836    CORBA_TOPDIR="`pwd`"
26837    cd "$CURDIR"
26838    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26839      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26840    fi
26841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26842$as_echo_n "checking if corba should be overridden... " >&6; }
26843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26844$as_echo "yes with $CORBA_TOPDIR" >&6; }
26845  fi
26846  if test "x$with_override_jaxp" != x; then
26847    CURDIR="$PWD"
26848    cd "$with_override_jaxp"
26849    JAXP_TOPDIR="`pwd`"
26850    cd "$CURDIR"
26851    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26852      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26853    fi
26854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26855$as_echo_n "checking if jaxp should be overridden... " >&6; }
26856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26857$as_echo "yes with $JAXP_TOPDIR" >&6; }
26858  fi
26859  if test "x$with_override_jaxws" != x; then
26860    CURDIR="$PWD"
26861    cd "$with_override_jaxws"
26862    JAXWS_TOPDIR="`pwd`"
26863    cd "$CURDIR"
26864    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26865      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26866    fi
26867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26868$as_echo_n "checking if jaxws should be overridden... " >&6; }
26869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26870$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26871  fi
26872  if test "x$with_override_hotspot" != x; then
26873    CURDIR="$PWD"
26874    cd "$with_override_hotspot"
26875    HOTSPOT_TOPDIR="`pwd`"
26876    cd "$CURDIR"
26877    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26878      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26879    fi
26880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26881$as_echo_n "checking if hotspot should be overridden... " >&6; }
26882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26883$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26884  fi
26885  if test "x$with_override_nashorn" != x; then
26886    CURDIR="$PWD"
26887    cd "$with_override_nashorn"
26888    NASHORN_TOPDIR="`pwd`"
26889    cd "$CURDIR"
26890    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26891      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26892    fi
26893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26894$as_echo_n "checking if nashorn should be overridden... " >&6; }
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26896$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26897  fi
26898  if test "x$with_override_jdk" != x; then
26899    CURDIR="$PWD"
26900    cd "$with_override_jdk"
26901    JDK_TOPDIR="`pwd`"
26902    cd "$CURDIR"
26903    if ! test -f $JDK_TOPDIR/make/Makefile; then
26904      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26905    fi
26906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26907$as_echo_n "checking if JDK should be overridden... " >&6; }
26908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26909$as_echo "yes with $JDK_TOPDIR" >&6; }
26910  fi
26911
26912
26913  BUILD_OUTPUT="$OUTPUT_ROOT"
26914
26915
26916  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26917  BUILD_HOTSPOT=true
26918
26919
26920
26921# Check whether --with-import-hotspot was given.
26922if test "${with_import_hotspot+set}" = set; then :
26923  withval=$with_import_hotspot;
26924fi
26925
26926  if test "x$with_import_hotspot" != x; then
26927    CURDIR="$PWD"
26928    cd "$with_import_hotspot"
26929    HOTSPOT_DIST="`pwd`"
26930    cd "$CURDIR"
26931    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26932      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26933    fi
26934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26935$as_echo_n "checking if hotspot should be imported... " >&6; }
26936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26937$as_echo "yes from $HOTSPOT_DIST" >&6; }
26938    BUILD_HOTSPOT=false
26939  fi
26940
26941  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26942
26943
26944###############################################################################
26945#
26946# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26947# native code.
26948#
26949###############################################################################
26950
26951# First determine the toolchain type (compiler family)
26952
26953
26954# Check whether --with-toolchain-type was given.
26955if test "${with_toolchain_type+set}" = set; then :
26956  withval=$with_toolchain_type;
26957fi
26958
26959
26960  # Use indirect variable referencing
26961  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26962  VALID_TOOLCHAINS=${!toolchain_var_name}
26963
26964  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26965    if test -n "$XCODEBUILD"; then
26966      # On Mac OS X, default toolchain to clang after Xcode 5
26967      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26968      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26969      if test $? -ne 0; then
26970        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26971      fi
26972      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26973          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26974          $CUT -f 1 -d .`
26975      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26976$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26977      if test $XCODE_MAJOR_VERSION -ge 5; then
26978          DEFAULT_TOOLCHAIN="clang"
26979      else
26980          DEFAULT_TOOLCHAIN="gcc"
26981      fi
26982    else
26983      # If Xcode is not installed, but the command line tools are
26984      # then we can't run xcodebuild. On these systems we should
26985      # default to clang
26986      DEFAULT_TOOLCHAIN="clang"
26987    fi
26988  else
26989    # First toolchain type in the list is the default
26990    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26991  fi
26992
26993  if test "x$with_toolchain_type" = xlist; then
26994    # List all toolchains
26995    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26996$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26997    for toolchain in $VALID_TOOLCHAINS; do
26998      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26999      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27000      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27001    done
27002
27003    exit 0
27004  elif test "x$with_toolchain_type" != x; then
27005    # User override; check that it is valid
27006    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27007      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27008$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27009      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27010$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27011      as_fn_error $? "Cannot continue." "$LINENO" 5
27012    fi
27013    TOOLCHAIN_TYPE=$with_toolchain_type
27014  else
27015    # No flag given, use default
27016    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27017  fi
27018
27019
27020  TOOLCHAIN_CC_BINARY_clang="clang"
27021  TOOLCHAIN_CC_BINARY_gcc="gcc"
27022  TOOLCHAIN_CC_BINARY_microsoft="cl"
27023  TOOLCHAIN_CC_BINARY_solstudio="cc"
27024  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27025
27026  TOOLCHAIN_CXX_BINARY_clang="clang++"
27027  TOOLCHAIN_CXX_BINARY_gcc="g++"
27028  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27029  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27030  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27031
27032  # Use indirect variable referencing
27033  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27034  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27035  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27036  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27037  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27038  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27039
27040
27041  # Define filename patterns
27042  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27043    LIBRARY_PREFIX=
27044    SHARED_LIBRARY_SUFFIX='.dll'
27045    STATIC_LIBRARY_SUFFIX='.lib'
27046    SHARED_LIBRARY='$1.dll'
27047    STATIC_LIBRARY='$1.lib'
27048    OBJ_SUFFIX='.obj'
27049    EXE_SUFFIX='.exe'
27050  else
27051    LIBRARY_PREFIX=lib
27052    SHARED_LIBRARY_SUFFIX='.so'
27053    STATIC_LIBRARY_SUFFIX='.a'
27054    SHARED_LIBRARY='lib$1.so'
27055    STATIC_LIBRARY='lib$1.a'
27056    OBJ_SUFFIX='.o'
27057    EXE_SUFFIX=''
27058    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27059      SHARED_LIBRARY='lib$1.dylib'
27060      SHARED_LIBRARY_SUFFIX='.dylib'
27061    fi
27062  fi
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27074    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27075$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27076  else
27077    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27078$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27079  fi
27080
27081
27082# Then detect the actual binaries needed
27083
27084  # FIXME: Is this needed?
27085  ac_ext=cpp
27086ac_cpp='$CXXCPP $CPPFLAGS'
27087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27090
27091
27092  # Store the CFLAGS etc passed to the configure script.
27093  ORG_CFLAGS="$CFLAGS"
27094  ORG_CXXFLAGS="$CXXFLAGS"
27095
27096  # autoconf magic only relies on PATH, so update it if tools dir is specified
27097  OLD_PATH="$PATH"
27098
27099  # On Windows, we need to detect the visual studio installation first.
27100  # This will change the PATH, but we need to keep that new PATH even
27101  # after toolchain detection is done, since the compiler (on x86) uses
27102  # it for DLL resolution in runtime.
27103  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27104      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27105
27106  # Store path to cygwin link.exe to help excluding it when searching for
27107  # VS linker. This must be done before changing the PATH when looking for VS.
27108  # Extract the first word of "link", so it can be a program name with args.
27109set dummy link; ac_word=$2
27110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27111$as_echo_n "checking for $ac_word... " >&6; }
27112if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27113  $as_echo_n "(cached) " >&6
27114else
27115  case $CYGWIN_LINK in
27116  [\\/]* | ?:[\\/]*)
27117  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27118  ;;
27119  *)
27120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27121for as_dir in $PATH
27122do
27123  IFS=$as_save_IFS
27124  test -z "$as_dir" && as_dir=.
27125    for ac_exec_ext in '' $ac_executable_extensions; do
27126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27127    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27129    break 2
27130  fi
27131done
27132  done
27133IFS=$as_save_IFS
27134
27135  ;;
27136esac
27137fi
27138CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27139if test -n "$CYGWIN_LINK"; then
27140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27141$as_echo "$CYGWIN_LINK" >&6; }
27142else
27143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27144$as_echo "no" >&6; }
27145fi
27146
27147
27148  if test "x$CYGWIN_LINK" != x; then
27149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27150$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27151    "$CYGWIN_LINK" --version > /dev/null
27152    if test $? -eq 0 ; then
27153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27154$as_echo "yes" >&6; }
27155    else
27156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27157$as_echo "no" >&6; }
27158      # This might be the VS linker. Don't exclude it later on.
27159      CYGWIN_LINK=""
27160    fi
27161  fi
27162
27163  # First-hand choice is to locate and run the vsvars bat file.
27164
27165
27166# Check whether --with-toolchain-version was given.
27167if test "${with_toolchain_version+set}" = set; then :
27168  withval=$with_toolchain_version;
27169fi
27170
27171
27172  if test "x$with_toolchain_version" = xlist; then
27173    # List all toolchains
27174    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27175$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27176    for version in $VALID_VS_VERSIONS; do
27177      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27178      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27179    done
27180
27181    exit 0
27182  elif test "x$DEVKIT_VS_VERSION" != x; then
27183    VS_VERSION=$DEVKIT_VS_VERSION
27184    TOOLCHAIN_VERSION=$VS_VERSION
27185    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27186    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27187    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27188    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27189    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27190    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27191
27192    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27193    # can still be exported as INCLUDE for compiler invocations without
27194    # SYSROOT_CFLAGS
27195    OLDIFS="$IFS"
27196    IFS=";"
27197    for i in $DEVKIT_VS_INCLUDE; do
27198      ipath=$i
27199
27200  unix_path="$ipath"
27201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27202    windows_path=`$CYGPATH -m "$unix_path"`
27203    ipath="$windows_path"
27204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27205    windows_path=`cmd //c echo $unix_path`
27206    ipath="$windows_path"
27207  fi
27208
27209      VS_INCLUDE="$VS_INCLUDE;$ipath"
27210    done
27211    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27212    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27213    for i in $DEVKIT_VS_LIB; do
27214      libpath=$i
27215
27216  unix_path="$libpath"
27217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27218    windows_path=`$CYGPATH -m "$unix_path"`
27219    libpath="$windows_path"
27220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27221    windows_path=`cmd //c echo $unix_path`
27222    libpath="$windows_path"
27223  fi
27224
27225      VS_LIB="$VS_LIB;$libpath"
27226    done
27227    IFS="$OLDIFS"
27228
27229    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27230$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27231
27232  elif test "x$with_toolchain_version" != x; then
27233    # User override; check that it is valid
27234    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27235      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27236$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27237      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27238$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27239      as_fn_error $? "Cannot continue." "$LINENO" 5
27240    fi
27241    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27242  else
27243    # No flag given, use default
27244    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27245  fi
27246
27247  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27248
27249  VS_VERSION="$VS_VERSION"
27250  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27251  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27252  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27253  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27254
27255  # When using --with-tools-dir, assume it points to the correct and default
27256  # version of Visual Studio or that --with-toolchain-version was also set.
27257  if test "x$with_tools_dir" != x; then
27258
27259  if test "x$VS_ENV_CMD" = x; then
27260    VS_VERSION="${VS_VERSION}"
27261    VS_BASE="$with_tools_dir/../.."
27262    METHOD="--with-tools-dir"
27263
27264    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27265      VCVARSFILE="vc/bin/vcvars32.bat"
27266    else
27267      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27268    fi
27269
27270
27271  windows_path="$VS_BASE"
27272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27273    unix_path=`$CYGPATH -u "$windows_path"`
27274    VS_BASE="$unix_path"
27275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27277    VS_BASE="$unix_path"
27278  fi
27279
27280    if test -d "$VS_BASE"; then
27281      if test -f "$VS_BASE/$VCVARSFILE"; then
27282        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27283$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27284        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27285        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27286        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27287        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27288      else
27289        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27290$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27291        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27292$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27293      fi
27294    fi
27295  fi
27296
27297
27298  if test "x$VS_ENV_CMD" = x; then
27299    VS_VERSION="${VS_VERSION}"
27300    VS_BASE="$with_tools_dir/../../.."
27301    METHOD="--with-tools-dir"
27302
27303    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27304      VCVARSFILE="vc/bin/vcvars32.bat"
27305    else
27306      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27307    fi
27308
27309
27310  windows_path="$VS_BASE"
27311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27312    unix_path=`$CYGPATH -u "$windows_path"`
27313    VS_BASE="$unix_path"
27314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27316    VS_BASE="$unix_path"
27317  fi
27318
27319    if test -d "$VS_BASE"; then
27320      if test -f "$VS_BASE/$VCVARSFILE"; then
27321        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27322$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27323        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27324        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27325        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27326        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27327      else
27328        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27329$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27330        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27331$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27332      fi
27333    fi
27334  fi
27335
27336    if test "x$VS_ENV_CMD" = x; then
27337      # Having specified an argument which is incorrect will produce an instant failure;
27338      # we should not go on looking
27339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27340$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27341      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27342$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27343      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27344$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27345      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27346    fi
27347  fi
27348
27349  VS_ENV_CMD=""
27350  VS_ENV_ARGS=""
27351
27352  if test "x$VS_COMNTOOLS" != x; then
27353
27354  if test "x$VS_ENV_CMD" = x; then
27355    VS_VERSION="${VS_VERSION}"
27356    VS_BASE="$VS_COMNTOOLS/../.."
27357    METHOD="$VS_COMNTOOLS_VAR variable"
27358
27359    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27360      VCVARSFILE="vc/bin/vcvars32.bat"
27361    else
27362      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27363    fi
27364
27365
27366  windows_path="$VS_BASE"
27367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27368    unix_path=`$CYGPATH -u "$windows_path"`
27369    VS_BASE="$unix_path"
27370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27372    VS_BASE="$unix_path"
27373  fi
27374
27375    if test -d "$VS_BASE"; then
27376      if test -f "$VS_BASE/$VCVARSFILE"; then
27377        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27378$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27379        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27380        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27381        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27382        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27383      else
27384        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27385$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27386        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27387$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27388      fi
27389    fi
27390  fi
27391
27392  fi
27393  if test "x$PROGRAMFILES" != x; then
27394
27395  if test "x$VS_ENV_CMD" = x; then
27396    VS_VERSION="${VS_VERSION}"
27397    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27398    METHOD="well-known name"
27399
27400    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27401      VCVARSFILE="vc/bin/vcvars32.bat"
27402    else
27403      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27404    fi
27405
27406
27407  windows_path="$VS_BASE"
27408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27409    unix_path=`$CYGPATH -u "$windows_path"`
27410    VS_BASE="$unix_path"
27411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27413    VS_BASE="$unix_path"
27414  fi
27415
27416    if test -d "$VS_BASE"; then
27417      if test -f "$VS_BASE/$VCVARSFILE"; then
27418        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27419$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27420        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27421        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27422        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27423        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27424      else
27425        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27426$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27427        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27428$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27429      fi
27430    fi
27431  fi
27432
27433  fi
27434  # Work around the insanely named ProgramFiles(x86) env variable
27435  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27436  if test "x$PROGRAMFILES_X86" != x; then
27437
27438  if test "x$VS_ENV_CMD" = x; then
27439    VS_VERSION="${VS_VERSION}"
27440    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27441    METHOD="well-known name"
27442
27443    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27444      VCVARSFILE="vc/bin/vcvars32.bat"
27445    else
27446      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27447    fi
27448
27449
27450  windows_path="$VS_BASE"
27451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27452    unix_path=`$CYGPATH -u "$windows_path"`
27453    VS_BASE="$unix_path"
27454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27456    VS_BASE="$unix_path"
27457  fi
27458
27459    if test -d "$VS_BASE"; then
27460      if test -f "$VS_BASE/$VCVARSFILE"; then
27461        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27462$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27463        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27464        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27465        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27466        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27467      else
27468        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27469$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27470        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27471$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27472      fi
27473    fi
27474  fi
27475
27476  fi
27477
27478  if test "x$VS_ENV_CMD" = x; then
27479    VS_VERSION="${VS_VERSION}"
27480    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27481    METHOD="well-known name"
27482
27483    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27484      VCVARSFILE="vc/bin/vcvars32.bat"
27485    else
27486      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27487    fi
27488
27489
27490  windows_path="$VS_BASE"
27491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27492    unix_path=`$CYGPATH -u "$windows_path"`
27493    VS_BASE="$unix_path"
27494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27496    VS_BASE="$unix_path"
27497  fi
27498
27499    if test -d "$VS_BASE"; then
27500      if test -f "$VS_BASE/$VCVARSFILE"; then
27501        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27502$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27503        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27504        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27505        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27506        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27507      else
27508        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27509$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27510        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27511$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27512      fi
27513    fi
27514  fi
27515
27516
27517  if test "x$VS_ENV_CMD" = x; then
27518    VS_VERSION="${VS_VERSION}"
27519    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27520    METHOD="well-known name"
27521
27522    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27523      VCVARSFILE="vc/bin/vcvars32.bat"
27524    else
27525      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27526    fi
27527
27528
27529  windows_path="$VS_BASE"
27530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27531    unix_path=`$CYGPATH -u "$windows_path"`
27532    VS_BASE="$unix_path"
27533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27535    VS_BASE="$unix_path"
27536  fi
27537
27538    if test -d "$VS_BASE"; then
27539      if test -f "$VS_BASE/$VCVARSFILE"; then
27540        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27541$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27542        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27543        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27544        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27545        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27546      else
27547        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27548$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27549        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27550$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27551      fi
27552    fi
27553  fi
27554
27555
27556  if test "x$SDK_INSTALL_DIR" != x; then
27557    if test "x$ProgramW6432" != x; then
27558
27559  if test "x$VS_ENV_CMD" = x; then
27560    VS_VERSION="${VS_VERSION}"
27561    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27562    METHOD="well-known name"
27563
27564  windows_path="$WIN_SDK_BASE"
27565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27566    unix_path=`$CYGPATH -u "$windows_path"`
27567    WIN_SDK_BASE="$unix_path"
27568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27570    WIN_SDK_BASE="$unix_path"
27571  fi
27572
27573    if test -d "$WIN_SDK_BASE"; then
27574      # There have been cases of partial or broken SDK installations. A missing
27575      # lib dir is not going to work.
27576      if test ! -d "$WIN_SDK_BASE/lib"; then
27577        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27578$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27579        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27580$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27581      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27583$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27584        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27585        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27586          VS_ENV_ARGS="/x86"
27587        else
27588          VS_ENV_ARGS="/x64"
27589        fi
27590        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27591        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27592        # TODO: improve detection for other versions of SDK
27593        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27594      else
27595        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27596$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27598$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27599      fi
27600    fi
27601  fi
27602
27603    fi
27604    if test "x$PROGRAMW6432" != x; then
27605
27606  if test "x$VS_ENV_CMD" = x; then
27607    VS_VERSION="${VS_VERSION}"
27608    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27609    METHOD="well-known name"
27610
27611  windows_path="$WIN_SDK_BASE"
27612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27613    unix_path=`$CYGPATH -u "$windows_path"`
27614    WIN_SDK_BASE="$unix_path"
27615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27617    WIN_SDK_BASE="$unix_path"
27618  fi
27619
27620    if test -d "$WIN_SDK_BASE"; then
27621      # There have been cases of partial or broken SDK installations. A missing
27622      # lib dir is not going to work.
27623      if test ! -d "$WIN_SDK_BASE/lib"; then
27624        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27625$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27626        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27627$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27628      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27629        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27630$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27631        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27632        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27633          VS_ENV_ARGS="/x86"
27634        else
27635          VS_ENV_ARGS="/x64"
27636        fi
27637        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27638        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27639        # TODO: improve detection for other versions of SDK
27640        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27641      else
27642        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27643$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27644        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27645$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27646      fi
27647    fi
27648  fi
27649
27650    fi
27651    if test "x$PROGRAMFILES" != x; then
27652
27653  if test "x$VS_ENV_CMD" = x; then
27654    VS_VERSION="${VS_VERSION}"
27655    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27656    METHOD="well-known name"
27657
27658  windows_path="$WIN_SDK_BASE"
27659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27660    unix_path=`$CYGPATH -u "$windows_path"`
27661    WIN_SDK_BASE="$unix_path"
27662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27664    WIN_SDK_BASE="$unix_path"
27665  fi
27666
27667    if test -d "$WIN_SDK_BASE"; then
27668      # There have been cases of partial or broken SDK installations. A missing
27669      # lib dir is not going to work.
27670      if test ! -d "$WIN_SDK_BASE/lib"; then
27671        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27672$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27673        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27674$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27675      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27676        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27677$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27678        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27679        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27680          VS_ENV_ARGS="/x86"
27681        else
27682          VS_ENV_ARGS="/x64"
27683        fi
27684        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27685        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27686        # TODO: improve detection for other versions of SDK
27687        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27688      else
27689        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27690$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27691        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27692$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27693      fi
27694    fi
27695  fi
27696
27697    fi
27698
27699  if test "x$VS_ENV_CMD" = x; then
27700    VS_VERSION="${VS_VERSION}"
27701    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27702    METHOD="well-known name"
27703
27704  windows_path="$WIN_SDK_BASE"
27705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27706    unix_path=`$CYGPATH -u "$windows_path"`
27707    WIN_SDK_BASE="$unix_path"
27708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27710    WIN_SDK_BASE="$unix_path"
27711  fi
27712
27713    if test -d "$WIN_SDK_BASE"; then
27714      # There have been cases of partial or broken SDK installations. A missing
27715      # lib dir is not going to work.
27716      if test ! -d "$WIN_SDK_BASE/lib"; then
27717        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27718$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27719        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27720$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27721      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27722        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27723$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27724        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27725        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27726          VS_ENV_ARGS="/x86"
27727        else
27728          VS_ENV_ARGS="/x64"
27729        fi
27730        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27731        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27732        # TODO: improve detection for other versions of SDK
27733        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27734      else
27735        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27736$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27737        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27738$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27739      fi
27740    fi
27741  fi
27742
27743
27744  if test "x$VS_ENV_CMD" = x; then
27745    VS_VERSION="${VS_VERSION}"
27746    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27747    METHOD="well-known name"
27748
27749  windows_path="$WIN_SDK_BASE"
27750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27751    unix_path=`$CYGPATH -u "$windows_path"`
27752    WIN_SDK_BASE="$unix_path"
27753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27755    WIN_SDK_BASE="$unix_path"
27756  fi
27757
27758    if test -d "$WIN_SDK_BASE"; then
27759      # There have been cases of partial or broken SDK installations. A missing
27760      # lib dir is not going to work.
27761      if test ! -d "$WIN_SDK_BASE/lib"; then
27762        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27763$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27764        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27765$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27766      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27767        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27768$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27769        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27770        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27771          VS_ENV_ARGS="/x86"
27772        else
27773          VS_ENV_ARGS="/x64"
27774        fi
27775        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27776        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27777        # TODO: improve detection for other versions of SDK
27778        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27779      else
27780        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27781$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27782        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27783$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27784      fi
27785    fi
27786  fi
27787
27788  fi
27789
27790    if test "x$VS_ENV_CMD" != x; then
27791      TOOLCHAIN_VERSION=$VS_VERSION
27792      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27793      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27794      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27795      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27796      # The rest of the variables are already evaled while probing
27797      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27798$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27799      break
27800    fi
27801  done
27802
27803
27804  # If we have a devkit, skip all of the below.
27805  if test "x$DEVKIT_VS_VERSION" = x; then
27806    if test "x$VS_ENV_CMD" != x; then
27807      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27808
27809  # Only process if variable expands to non-empty
27810
27811  if test "x$VS_ENV_CMD" != x; then
27812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27813
27814  # First separate the path from the arguments. This will split at the first
27815  # space.
27816  complete="$VS_ENV_CMD"
27817  path="${complete%% *}"
27818  tmp="$complete EOL"
27819  arguments="${tmp#* }"
27820
27821  # Input might be given as Windows format, start by converting to
27822  # unix format.
27823  new_path=`$CYGPATH -u "$path"`
27824
27825  # Now try to locate executable using which
27826  new_path=`$WHICH "$new_path" 2> /dev/null`
27827  # bat and cmd files are not always considered executable in cygwin causing which
27828  # to not find them
27829  if test "x$new_path" = x \
27830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27832    new_path=`$CYGPATH -u "$path"`
27833  fi
27834  if test "x$new_path" = x; then
27835    # Oops. Which didn't find the executable.
27836    # The splitting of arguments from the executable at a space might have been incorrect,
27837    # since paths with space are more likely in Windows. Give it another try with the whole
27838    # argument.
27839    path="$complete"
27840    arguments="EOL"
27841    new_path=`$CYGPATH -u "$path"`
27842    new_path=`$WHICH "$new_path" 2> /dev/null`
27843    # bat and cmd files are not always considered executable in cygwin causing which
27844    # to not find them
27845    if test "x$new_path" = x \
27846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27848      new_path=`$CYGPATH -u "$path"`
27849    fi
27850    if test "x$new_path" = x; then
27851      # It's still not found. Now this is an unrecoverable error.
27852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27853$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27854      has_space=`$ECHO "$complete" | $GREP " "`
27855      if test "x$has_space" != x; then
27856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27858      fi
27859      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27860    fi
27861  fi
27862
27863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27866  # "foo.exe" is OK but "foo" is an error.
27867  #
27868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27869  # It is also a way to make sure we got the proper file name for the real test later on.
27870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27871  if test "x$test_shortpath" = x; then
27872    # Short path failed, file does not exist as specified.
27873    # Try adding .exe or .cmd
27874    if test -f "${new_path}.exe"; then
27875      input_to_shortpath="${new_path}.exe"
27876    elif test -f "${new_path}.cmd"; then
27877      input_to_shortpath="${new_path}.cmd"
27878    else
27879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27880$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27883      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27884    fi
27885  else
27886    input_to_shortpath="$new_path"
27887  fi
27888
27889  # Call helper function which possibly converts this using DOS-style short mode.
27890  # If so, the updated path is stored in $new_path.
27891  new_path="$input_to_shortpath"
27892
27893  input_path="$input_to_shortpath"
27894  # Check if we need to convert this using DOS-style short mode. If the path
27895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27896  # take no chances and rewrite it.
27897  # Note: m4 eats our [], so we need to use [ and ] instead.
27898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27899  if test "x$has_forbidden_chars" != x; then
27900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27904      # Going to short mode and back again did indeed matter. Since short mode is
27905      # case insensitive, let's make it lowercase to improve readability.
27906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27907      # Now convert it back to Unix-style (cygpath)
27908      input_path=`$CYGPATH -u "$shortmode_path"`
27909      new_path="$input_path"
27910    fi
27911  fi
27912
27913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27914  if test "x$test_cygdrive_prefix" = x; then
27915    # As a simple fix, exclude /usr/bin since it's not a real path.
27916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27918      # a path prefixed by /cygdrive for fixpath to work.
27919      new_path="$CYGWIN_ROOT_PATH$input_path"
27920    fi
27921  fi
27922
27923  # remove trailing .exe if any
27924  new_path="${new_path/%.exe/}"
27925
27926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27927
27928  # First separate the path from the arguments. This will split at the first
27929  # space.
27930  complete="$VS_ENV_CMD"
27931  path="${complete%% *}"
27932  tmp="$complete EOL"
27933  arguments="${tmp#* }"
27934
27935  # Input might be given as Windows format, start by converting to
27936  # unix format.
27937  new_path="$path"
27938
27939  windows_path="$new_path"
27940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941    unix_path=`$CYGPATH -u "$windows_path"`
27942    new_path="$unix_path"
27943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945    new_path="$unix_path"
27946  fi
27947
27948
27949  # Now try to locate executable using which
27950  new_path=`$WHICH "$new_path" 2> /dev/null`
27951
27952  if test "x$new_path" = x; then
27953    # Oops. Which didn't find the executable.
27954    # The splitting of arguments from the executable at a space might have been incorrect,
27955    # since paths with space are more likely in Windows. Give it another try with the whole
27956    # argument.
27957    path="$complete"
27958    arguments="EOL"
27959    new_path="$path"
27960
27961  windows_path="$new_path"
27962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27963    unix_path=`$CYGPATH -u "$windows_path"`
27964    new_path="$unix_path"
27965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27967    new_path="$unix_path"
27968  fi
27969
27970
27971    new_path=`$WHICH "$new_path" 2> /dev/null`
27972    # bat and cmd files are not always considered executable in MSYS causing which
27973    # to not find them
27974    if test "x$new_path" = x \
27975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27977      new_path="$path"
27978
27979  windows_path="$new_path"
27980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27981    unix_path=`$CYGPATH -u "$windows_path"`
27982    new_path="$unix_path"
27983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27985    new_path="$unix_path"
27986  fi
27987
27988    fi
27989
27990    if test "x$new_path" = x; then
27991      # It's still not found. Now this is an unrecoverable error.
27992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27993$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27994      has_space=`$ECHO "$complete" | $GREP " "`
27995      if test "x$has_space" != x; then
27996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27998      fi
27999      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28000    fi
28001  fi
28002
28003  # Now new_path has a complete unix path to the binary
28004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28005    # Keep paths in /bin as-is, but remove trailing .exe if any
28006    new_path="${new_path/%.exe/}"
28007    # Do not save /bin paths to all_fixpath_prefixes!
28008  else
28009    # Not in mixed or Windows style, start by that.
28010    new_path=`cmd //c echo $new_path`
28011
28012  input_path="$new_path"
28013  # Check if we need to convert this using DOS-style short mode. If the path
28014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28015  # take no chances and rewrite it.
28016  # Note: m4 eats our [], so we need to use [ and ] instead.
28017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28018  if test "x$has_forbidden_chars" != x; then
28019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28021  fi
28022
28023    # Output is in $new_path
28024
28025  windows_path="$new_path"
28026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28027    unix_path=`$CYGPATH -u "$windows_path"`
28028    new_path="$unix_path"
28029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28031    new_path="$unix_path"
28032  fi
28033
28034    # remove trailing .exe if any
28035    new_path="${new_path/%.exe/}"
28036
28037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28039  fi
28040
28041    else
28042      # We're on a unix platform. Hooray! :)
28043      # First separate the path from the arguments. This will split at the first
28044      # space.
28045      complete="$VS_ENV_CMD"
28046      path="${complete%% *}"
28047      tmp="$complete EOL"
28048      arguments="${tmp#* }"
28049
28050      # Cannot rely on the command "which" here since it doesn't always work.
28051      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28052      if test -z "$is_absolute_path"; then
28053        # Path to executable is not absolute. Find it.
28054        IFS_save="$IFS"
28055        IFS=:
28056        for p in $PATH; do
28057          if test -f "$p/$path" && test -x "$p/$path"; then
28058            new_path="$p/$path"
28059            break
28060          fi
28061        done
28062        IFS="$IFS_save"
28063      else
28064        # This is an absolute path, we can use it without further modifications.
28065        new_path="$path"
28066      fi
28067
28068      if test "x$new_path" = x; then
28069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28070$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28071        has_space=`$ECHO "$complete" | $GREP " "`
28072        if test "x$has_space" != x; then
28073          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28075        fi
28076        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28077      fi
28078    fi
28079
28080    # Now join together the path and the arguments once again
28081    if test "x$arguments" != xEOL; then
28082      new_complete="$new_path ${arguments% *}"
28083    else
28084      new_complete="$new_path"
28085    fi
28086
28087    if test "x$complete" != "x$new_complete"; then
28088      VS_ENV_CMD="$new_complete"
28089      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28090$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28091    fi
28092  fi
28093
28094
28095      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28096      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28097$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28098
28099      # We need to create a couple of temporary files.
28100      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28101      $MKDIR -p $VS_ENV_TMP_DIR
28102
28103      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28104      # Instead create a shell script which will set the relevant variables when run.
28105      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28106
28107  unix_path="$WINPATH_VS_ENV_CMD"
28108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28109    windows_path=`$CYGPATH -m "$unix_path"`
28110    WINPATH_VS_ENV_CMD="$windows_path"
28111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28112    windows_path=`cmd //c echo $unix_path`
28113    WINPATH_VS_ENV_CMD="$windows_path"
28114  fi
28115
28116      WINPATH_BASH="$BASH"
28117
28118  unix_path="$WINPATH_BASH"
28119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28120    windows_path=`$CYGPATH -m "$unix_path"`
28121    WINPATH_BASH="$windows_path"
28122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28123    windows_path=`cmd //c echo $unix_path`
28124    WINPATH_BASH="$windows_path"
28125  fi
28126
28127
28128      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28129      # script (executable by bash) that will setup the important variables.
28130      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28131      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28132      # This will end up something like:
28133      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28134      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28135      # These will end up something like:
28136      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28137      # The trailing space for everyone except PATH is no typo, but is needed due
28138      # to trailing \ in the Windows paths. These will be stripped later.
28139      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28140          >> $EXTRACT_VC_ENV_BAT_FILE
28141      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28142          >> $EXTRACT_VC_ENV_BAT_FILE
28143      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28144          >> $EXTRACT_VC_ENV_BAT_FILE
28145      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> 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      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28150          >> $EXTRACT_VC_ENV_BAT_FILE
28151
28152      # Now execute the newly created bat file.
28153      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28154      # Change directory so we don't need to mess with Windows paths in redirects.
28155      cd $VS_ENV_TMP_DIR
28156      cmd /c extract-vs-env.bat | $CAT
28157      cd $CURDIR
28158
28159      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28160        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28161$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28162        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28163$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28164        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28165$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28166        as_fn_error $? "Cannot continue" "$LINENO" 5
28167      fi
28168
28169      # Now set all paths and other env variables. This will allow the rest of
28170      # the configure script to find and run the compiler in the proper way.
28171      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28172$as_echo "$as_me: Setting extracted environment variables" >&6;}
28173      . $VS_ENV_TMP_DIR/set-vs-env.sh
28174      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28175      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28176    else
28177      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28178      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28179$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28180    fi
28181  fi
28182
28183  # At this point, we should have correct variables in the environment, or we can't continue.
28184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28185$as_echo_n "checking for Visual Studio variables... " >&6; }
28186
28187  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28188      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28189    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28191$as_echo "present but broken" >&6; }
28192      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28193    else
28194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28195$as_echo "ok" >&6; }
28196      # Remove any trailing "\" ";" and " " from the variables.
28197      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28198      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28199      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28200      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28201      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28202      # Remove any paths containing # (typically F#) as that messes up make. This
28203      # is needed if visual studio was installed with F# support.
28204      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28205
28206
28207
28208
28209
28210      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28211      OLDIFS="$IFS"
28212      IFS=";"
28213      for i in $VS_INCLUDE; do
28214        ipath=$i
28215        # Only process non-empty elements
28216        if test "x$ipath" != x; then
28217          IFS="$OLDIFS"
28218          # Check that directory exists before calling fixup_path
28219          testpath=$ipath
28220
28221  windows_path="$testpath"
28222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28223    unix_path=`$CYGPATH -u "$windows_path"`
28224    testpath="$unix_path"
28225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28227    testpath="$unix_path"
28228  fi
28229
28230          if test -d "$testpath"; then
28231
28232  # Only process if variable expands to non-empty
28233
28234  if test "x$ipath" != x; then
28235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28236
28237  # Input might be given as Windows format, start by converting to
28238  # unix format.
28239  path="$ipath"
28240  new_path=`$CYGPATH -u "$path"`
28241
28242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28245  # "foo.exe" is OK but "foo" is an error.
28246  #
28247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28248  # It is also a way to make sure we got the proper file name for the real test later on.
28249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28250  if test "x$test_shortpath" = x; then
28251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28252$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28253    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28254  fi
28255
28256  # Call helper function which possibly converts this using DOS-style short mode.
28257  # If so, the updated path is stored in $new_path.
28258
28259  input_path="$new_path"
28260  # Check if we need to convert this using DOS-style short mode. If the path
28261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28262  # take no chances and rewrite it.
28263  # Note: m4 eats our [], so we need to use [ and ] instead.
28264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28265  if test "x$has_forbidden_chars" != x; then
28266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28270      # Going to short mode and back again did indeed matter. Since short mode is
28271      # case insensitive, let's make it lowercase to improve readability.
28272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28273      # Now convert it back to Unix-style (cygpath)
28274      input_path=`$CYGPATH -u "$shortmode_path"`
28275      new_path="$input_path"
28276    fi
28277  fi
28278
28279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28280  if test "x$test_cygdrive_prefix" = x; then
28281    # As a simple fix, exclude /usr/bin since it's not a real path.
28282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28284      # a path prefixed by /cygdrive for fixpath to work.
28285      new_path="$CYGWIN_ROOT_PATH$input_path"
28286    fi
28287  fi
28288
28289
28290  if test "x$path" != "x$new_path"; then
28291    ipath="$new_path"
28292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28293$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28294  fi
28295
28296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28297
28298  path="$ipath"
28299  has_colon=`$ECHO $path | $GREP ^.:`
28300  new_path="$path"
28301  if test "x$has_colon" = x; then
28302    # Not in mixed or Windows style, start by that.
28303    new_path=`cmd //c echo $path`
28304  fi
28305
28306
28307  input_path="$new_path"
28308  # Check if we need to convert this using DOS-style short mode. If the path
28309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28310  # take no chances and rewrite it.
28311  # Note: m4 eats our [], so we need to use [ and ] instead.
28312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28313  if test "x$has_forbidden_chars" != x; then
28314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28316  fi
28317
28318
28319  windows_path="$new_path"
28320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28321    unix_path=`$CYGPATH -u "$windows_path"`
28322    new_path="$unix_path"
28323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28325    new_path="$unix_path"
28326  fi
28327
28328  if test "x$path" != "x$new_path"; then
28329    ipath="$new_path"
28330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28331$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28332  fi
28333
28334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28336
28337    else
28338      # We're on a unix platform. Hooray! :)
28339      path="$ipath"
28340      has_space=`$ECHO "$path" | $GREP " "`
28341      if test "x$has_space" != x; then
28342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28343$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28345      fi
28346
28347      # Use eval to expand a potential ~
28348      eval path="$path"
28349      if test ! -f "$path" && test ! -d "$path"; then
28350        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28351      fi
28352
28353      ipath="`cd "$path"; $THEPWDCMD -L`"
28354    fi
28355  fi
28356
28357            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28358          fi
28359          IFS=";"
28360        fi
28361      done
28362      # Convert VS_LIB into SYSROOT_LDFLAGS
28363      for i in $VS_LIB; do
28364        libpath=$i
28365        # Only process non-empty elements
28366        if test "x$libpath" != x; then
28367          IFS="$OLDIFS"
28368          # Check that directory exists before calling fixup_path
28369          testpath=$libpath
28370
28371  windows_path="$testpath"
28372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28373    unix_path=`$CYGPATH -u "$windows_path"`
28374    testpath="$unix_path"
28375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28377    testpath="$unix_path"
28378  fi
28379
28380          if test -d "$testpath"; then
28381
28382  # Only process if variable expands to non-empty
28383
28384  if test "x$libpath" != x; then
28385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28386
28387  # Input might be given as Windows format, start by converting to
28388  # unix format.
28389  path="$libpath"
28390  new_path=`$CYGPATH -u "$path"`
28391
28392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28395  # "foo.exe" is OK but "foo" is an error.
28396  #
28397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28398  # It is also a way to make sure we got the proper file name for the real test later on.
28399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28400  if test "x$test_shortpath" = x; then
28401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28402$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28403    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28404  fi
28405
28406  # Call helper function which possibly converts this using DOS-style short mode.
28407  # If so, the updated path is stored in $new_path.
28408
28409  input_path="$new_path"
28410  # Check if we need to convert this using DOS-style short mode. If the path
28411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28412  # take no chances and rewrite it.
28413  # Note: m4 eats our [], so we need to use [ and ] instead.
28414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28415  if test "x$has_forbidden_chars" != x; then
28416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28420      # Going to short mode and back again did indeed matter. Since short mode is
28421      # case insensitive, let's make it lowercase to improve readability.
28422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28423      # Now convert it back to Unix-style (cygpath)
28424      input_path=`$CYGPATH -u "$shortmode_path"`
28425      new_path="$input_path"
28426    fi
28427  fi
28428
28429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28430  if test "x$test_cygdrive_prefix" = x; then
28431    # As a simple fix, exclude /usr/bin since it's not a real path.
28432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28434      # a path prefixed by /cygdrive for fixpath to work.
28435      new_path="$CYGWIN_ROOT_PATH$input_path"
28436    fi
28437  fi
28438
28439
28440  if test "x$path" != "x$new_path"; then
28441    libpath="$new_path"
28442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28443$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28444  fi
28445
28446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28447
28448  path="$libpath"
28449  has_colon=`$ECHO $path | $GREP ^.:`
28450  new_path="$path"
28451  if test "x$has_colon" = x; then
28452    # Not in mixed or Windows style, start by that.
28453    new_path=`cmd //c echo $path`
28454  fi
28455
28456
28457  input_path="$new_path"
28458  # Check if we need to convert this using DOS-style short mode. If the path
28459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28460  # take no chances and rewrite it.
28461  # Note: m4 eats our [], so we need to use [ and ] instead.
28462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28463  if test "x$has_forbidden_chars" != x; then
28464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28466  fi
28467
28468
28469  windows_path="$new_path"
28470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28471    unix_path=`$CYGPATH -u "$windows_path"`
28472    new_path="$unix_path"
28473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28475    new_path="$unix_path"
28476  fi
28477
28478  if test "x$path" != "x$new_path"; then
28479    libpath="$new_path"
28480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28481$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28482  fi
28483
28484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28486
28487    else
28488      # We're on a unix platform. Hooray! :)
28489      path="$libpath"
28490      has_space=`$ECHO "$path" | $GREP " "`
28491      if test "x$has_space" != x; then
28492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28493$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28495      fi
28496
28497      # Use eval to expand a potential ~
28498      eval path="$path"
28499      if test ! -f "$path" && test ! -d "$path"; then
28500        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28501      fi
28502
28503      libpath="`cd "$path"; $THEPWDCMD -L`"
28504    fi
28505  fi
28506
28507            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28508          fi
28509          IFS=";"
28510        fi
28511      done
28512      IFS="$OLDIFS"
28513    fi
28514  else
28515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28516$as_echo "not found" >&6; }
28517
28518    if test "x$VS_ENV_CMD" = x; then
28519      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28520$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28521      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28522$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28523    else
28524      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28525$as_echo "$as_me: Running the extraction script failed." >&6;}
28526    fi
28527    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28528$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28529    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28530$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28531    as_fn_error $? "Cannot continue" "$LINENO" 5
28532  fi
28533
28534    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28535    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28536    PATH="$VS_PATH"
28537    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28538    export INCLUDE="$VS_INCLUDE"
28539    export LIB="$VS_LIB"
28540  fi
28541
28542  # For solaris we really need solaris tools, and not the GNU equivalent.
28543  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28544  # so add that to path before starting to probe.
28545  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28546  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28547    PATH="/usr/ccs/bin:$PATH"
28548  fi
28549
28550  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28551  # override all other locations.
28552  if test "x$TOOLCHAIN_PATH" != x; then
28553    PATH=$TOOLCHAIN_PATH:$PATH
28554  fi
28555
28556
28557  #
28558  # Setup the compilers (CC and CXX)
28559  #
28560
28561  COMPILER_NAME=C
28562  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28563
28564  if test "x$CC" != x; then
28565    # User has supplied compiler name already, always let that override.
28566    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28567$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28568    if test "x`basename $CC`" = "x$CC"; then
28569      # A command without a complete path is provided, search $PATH.
28570
28571      for ac_prog in $CC
28572do
28573  # Extract the first word of "$ac_prog", so it can be a program name with args.
28574set dummy $ac_prog; ac_word=$2
28575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28576$as_echo_n "checking for $ac_word... " >&6; }
28577if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28578  $as_echo_n "(cached) " >&6
28579else
28580  case $POTENTIAL_CC in
28581  [\\/]* | ?:[\\/]*)
28582  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28583  ;;
28584  *)
28585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28586for as_dir in $PATH
28587do
28588  IFS=$as_save_IFS
28589  test -z "$as_dir" && as_dir=.
28590    for ac_exec_ext in '' $ac_executable_extensions; do
28591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28592    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28594    break 2
28595  fi
28596done
28597  done
28598IFS=$as_save_IFS
28599
28600  ;;
28601esac
28602fi
28603POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28604if test -n "$POTENTIAL_CC"; then
28605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28606$as_echo "$POTENTIAL_CC" >&6; }
28607else
28608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28609$as_echo "no" >&6; }
28610fi
28611
28612
28613  test -n "$POTENTIAL_CC" && break
28614done
28615
28616      if test "x$POTENTIAL_CC" != x; then
28617        CC=$POTENTIAL_CC
28618      else
28619        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28620      fi
28621    else
28622      # Otherwise it might already be a complete path
28623      if test ! -x "$CC"; then
28624        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28625      fi
28626    fi
28627  else
28628    # No user supplied value. Locate compiler ourselves.
28629
28630    # If we are cross compiling, assume cross compilation tools follows the
28631    # cross compilation standard where they are prefixed with the autoconf
28632    # standard name for the target. For example the binary
28633    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28634    # If we are not cross compiling, then the default compiler name will be
28635    # used.
28636
28637    CC=
28638    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28639    # before checking the rest of the PATH.
28640    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28641    # step, this should not be necessary.
28642    if test -n "$TOOLCHAIN_PATH"; then
28643      PATH_save="$PATH"
28644      PATH="$TOOLCHAIN_PATH"
28645      for ac_prog in $SEARCH_LIST
28646do
28647  # Extract the first word of "$ac_prog", so it can be a program name with args.
28648set dummy $ac_prog; ac_word=$2
28649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28650$as_echo_n "checking for $ac_word... " >&6; }
28651if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28652  $as_echo_n "(cached) " >&6
28653else
28654  case $TOOLCHAIN_PATH_CC in
28655  [\\/]* | ?:[\\/]*)
28656  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28657  ;;
28658  *)
28659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28660for as_dir in $PATH
28661do
28662  IFS=$as_save_IFS
28663  test -z "$as_dir" && as_dir=.
28664    for ac_exec_ext in '' $ac_executable_extensions; do
28665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28666    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28668    break 2
28669  fi
28670done
28671  done
28672IFS=$as_save_IFS
28673
28674  ;;
28675esac
28676fi
28677TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28678if test -n "$TOOLCHAIN_PATH_CC"; then
28679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28680$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28681else
28682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28683$as_echo "no" >&6; }
28684fi
28685
28686
28687  test -n "$TOOLCHAIN_PATH_CC" && break
28688done
28689
28690      CC=$TOOLCHAIN_PATH_CC
28691      PATH="$PATH_save"
28692    fi
28693
28694    # AC_PATH_PROGS can't be run multiple times with the same variable,
28695    # so create a new name for this run.
28696    if test "x$CC" = x; then
28697      for ac_prog in $SEARCH_LIST
28698do
28699  # Extract the first word of "$ac_prog", so it can be a program name with args.
28700set dummy $ac_prog; ac_word=$2
28701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28702$as_echo_n "checking for $ac_word... " >&6; }
28703if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28704  $as_echo_n "(cached) " >&6
28705else
28706  case $POTENTIAL_CC in
28707  [\\/]* | ?:[\\/]*)
28708  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28709  ;;
28710  *)
28711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28712for as_dir in $PATH
28713do
28714  IFS=$as_save_IFS
28715  test -z "$as_dir" && as_dir=.
28716    for ac_exec_ext in '' $ac_executable_extensions; do
28717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28718    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28720    break 2
28721  fi
28722done
28723  done
28724IFS=$as_save_IFS
28725
28726  ;;
28727esac
28728fi
28729POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28730if test -n "$POTENTIAL_CC"; then
28731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28732$as_echo "$POTENTIAL_CC" >&6; }
28733else
28734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28735$as_echo "no" >&6; }
28736fi
28737
28738
28739  test -n "$POTENTIAL_CC" && break
28740done
28741
28742      CC=$POTENTIAL_CC
28743    fi
28744
28745    if test "x$CC" = x; then
28746
28747  # Print a helpful message on how to acquire the necessary build dependency.
28748  # devkit is the help tag: freetype, cups, pulse, alsa etc
28749  MISSING_DEPENDENCY=devkit
28750
28751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28752    cygwin_help $MISSING_DEPENDENCY
28753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28754    msys_help $MISSING_DEPENDENCY
28755  else
28756    PKGHANDLER_COMMAND=
28757
28758    case $PKGHANDLER in
28759      apt-get)
28760        apt_help     $MISSING_DEPENDENCY ;;
28761      yum)
28762        yum_help     $MISSING_DEPENDENCY ;;
28763      port)
28764        port_help    $MISSING_DEPENDENCY ;;
28765      pkgutil)
28766        pkgutil_help $MISSING_DEPENDENCY ;;
28767      pkgadd)
28768        pkgadd_help  $MISSING_DEPENDENCY ;;
28769    esac
28770
28771    if test "x$PKGHANDLER_COMMAND" != x; then
28772      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28773    fi
28774  fi
28775
28776      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28777    fi
28778  fi
28779
28780  # Now we have a compiler binary in CC. Make sure it's okay.
28781
28782  # Only process if variable expands to non-empty
28783
28784  if test "x$CC" != x; then
28785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28786
28787  # First separate the path from the arguments. This will split at the first
28788  # space.
28789  complete="$CC"
28790  path="${complete%% *}"
28791  tmp="$complete EOL"
28792  arguments="${tmp#* }"
28793
28794  # Input might be given as Windows format, start by converting to
28795  # unix format.
28796  new_path=`$CYGPATH -u "$path"`
28797
28798  # Now try to locate executable using which
28799  new_path=`$WHICH "$new_path" 2> /dev/null`
28800  # bat and cmd files are not always considered executable in cygwin causing which
28801  # to not find them
28802  if test "x$new_path" = x \
28803      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28804      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28805    new_path=`$CYGPATH -u "$path"`
28806  fi
28807  if test "x$new_path" = x; then
28808    # Oops. Which didn't find the executable.
28809    # The splitting of arguments from the executable at a space might have been incorrect,
28810    # since paths with space are more likely in Windows. Give it another try with the whole
28811    # argument.
28812    path="$complete"
28813    arguments="EOL"
28814    new_path=`$CYGPATH -u "$path"`
28815    new_path=`$WHICH "$new_path" 2> /dev/null`
28816    # bat and cmd files are not always considered executable in cygwin causing which
28817    # to not find them
28818    if test "x$new_path" = x \
28819        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28820        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28821      new_path=`$CYGPATH -u "$path"`
28822    fi
28823    if test "x$new_path" = x; then
28824      # It's still not found. Now this is an unrecoverable error.
28825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28826$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28827      has_space=`$ECHO "$complete" | $GREP " "`
28828      if test "x$has_space" != x; then
28829        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28830$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28831      fi
28832      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28833    fi
28834  fi
28835
28836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28839  # "foo.exe" is OK but "foo" is an error.
28840  #
28841  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28842  # It is also a way to make sure we got the proper file name for the real test later on.
28843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28844  if test "x$test_shortpath" = x; then
28845    # Short path failed, file does not exist as specified.
28846    # Try adding .exe or .cmd
28847    if test -f "${new_path}.exe"; then
28848      input_to_shortpath="${new_path}.exe"
28849    elif test -f "${new_path}.cmd"; then
28850      input_to_shortpath="${new_path}.cmd"
28851    else
28852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28853$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28854      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28855$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28856      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28857    fi
28858  else
28859    input_to_shortpath="$new_path"
28860  fi
28861
28862  # Call helper function which possibly converts this using DOS-style short mode.
28863  # If so, the updated path is stored in $new_path.
28864  new_path="$input_to_shortpath"
28865
28866  input_path="$input_to_shortpath"
28867  # Check if we need to convert this using DOS-style short mode. If the path
28868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28869  # take no chances and rewrite it.
28870  # Note: m4 eats our [], so we need to use [ and ] instead.
28871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28872  if test "x$has_forbidden_chars" != x; then
28873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28877      # Going to short mode and back again did indeed matter. Since short mode is
28878      # case insensitive, let's make it lowercase to improve readability.
28879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28880      # Now convert it back to Unix-style (cygpath)
28881      input_path=`$CYGPATH -u "$shortmode_path"`
28882      new_path="$input_path"
28883    fi
28884  fi
28885
28886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28887  if test "x$test_cygdrive_prefix" = x; then
28888    # As a simple fix, exclude /usr/bin since it's not a real path.
28889    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28891      # a path prefixed by /cygdrive for fixpath to work.
28892      new_path="$CYGWIN_ROOT_PATH$input_path"
28893    fi
28894  fi
28895
28896  # remove trailing .exe if any
28897  new_path="${new_path/%.exe/}"
28898
28899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28900
28901  # First separate the path from the arguments. This will split at the first
28902  # space.
28903  complete="$CC"
28904  path="${complete%% *}"
28905  tmp="$complete EOL"
28906  arguments="${tmp#* }"
28907
28908  # Input might be given as Windows format, start by converting to
28909  # unix format.
28910  new_path="$path"
28911
28912  windows_path="$new_path"
28913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28914    unix_path=`$CYGPATH -u "$windows_path"`
28915    new_path="$unix_path"
28916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28918    new_path="$unix_path"
28919  fi
28920
28921
28922  # Now try to locate executable using which
28923  new_path=`$WHICH "$new_path" 2> /dev/null`
28924
28925  if test "x$new_path" = x; then
28926    # Oops. Which didn't find the executable.
28927    # The splitting of arguments from the executable at a space might have been incorrect,
28928    # since paths with space are more likely in Windows. Give it another try with the whole
28929    # argument.
28930    path="$complete"
28931    arguments="EOL"
28932    new_path="$path"
28933
28934  windows_path="$new_path"
28935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28936    unix_path=`$CYGPATH -u "$windows_path"`
28937    new_path="$unix_path"
28938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28940    new_path="$unix_path"
28941  fi
28942
28943
28944    new_path=`$WHICH "$new_path" 2> /dev/null`
28945    # bat and cmd files are not always considered executable in MSYS causing which
28946    # to not find them
28947    if test "x$new_path" = x \
28948        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28949        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28950      new_path="$path"
28951
28952  windows_path="$new_path"
28953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28954    unix_path=`$CYGPATH -u "$windows_path"`
28955    new_path="$unix_path"
28956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28958    new_path="$unix_path"
28959  fi
28960
28961    fi
28962
28963    if test "x$new_path" = x; then
28964      # It's still not found. Now this is an unrecoverable error.
28965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28966$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28967      has_space=`$ECHO "$complete" | $GREP " "`
28968      if test "x$has_space" != x; then
28969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28971      fi
28972      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28973    fi
28974  fi
28975
28976  # Now new_path has a complete unix path to the binary
28977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28978    # Keep paths in /bin as-is, but remove trailing .exe if any
28979    new_path="${new_path/%.exe/}"
28980    # Do not save /bin paths to all_fixpath_prefixes!
28981  else
28982    # Not in mixed or Windows style, start by that.
28983    new_path=`cmd //c echo $new_path`
28984
28985  input_path="$new_path"
28986  # Check if we need to convert this using DOS-style short mode. If the path
28987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28988  # take no chances and rewrite it.
28989  # Note: m4 eats our [], so we need to use [ and ] instead.
28990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28991  if test "x$has_forbidden_chars" != x; then
28992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28994  fi
28995
28996    # Output is in $new_path
28997
28998  windows_path="$new_path"
28999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29000    unix_path=`$CYGPATH -u "$windows_path"`
29001    new_path="$unix_path"
29002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29004    new_path="$unix_path"
29005  fi
29006
29007    # remove trailing .exe if any
29008    new_path="${new_path/%.exe/}"
29009
29010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29012  fi
29013
29014    else
29015      # We're on a unix platform. Hooray! :)
29016      # First separate the path from the arguments. This will split at the first
29017      # space.
29018      complete="$CC"
29019      path="${complete%% *}"
29020      tmp="$complete EOL"
29021      arguments="${tmp#* }"
29022
29023      # Cannot rely on the command "which" here since it doesn't always work.
29024      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29025      if test -z "$is_absolute_path"; then
29026        # Path to executable is not absolute. Find it.
29027        IFS_save="$IFS"
29028        IFS=:
29029        for p in $PATH; do
29030          if test -f "$p/$path" && test -x "$p/$path"; then
29031            new_path="$p/$path"
29032            break
29033          fi
29034        done
29035        IFS="$IFS_save"
29036      else
29037        # This is an absolute path, we can use it without further modifications.
29038        new_path="$path"
29039      fi
29040
29041      if test "x$new_path" = x; then
29042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29043$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29044        has_space=`$ECHO "$complete" | $GREP " "`
29045        if test "x$has_space" != x; then
29046          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29047$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29048        fi
29049        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29050      fi
29051    fi
29052
29053    # Now join together the path and the arguments once again
29054    if test "x$arguments" != xEOL; then
29055      new_complete="$new_path ${arguments% *}"
29056    else
29057      new_complete="$new_path"
29058    fi
29059
29060    if test "x$complete" != "x$new_complete"; then
29061      CC="$new_complete"
29062      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29063$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29064    fi
29065  fi
29066
29067  TEST_COMPILER="$CC"
29068  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29069  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29070  if test "x$OPENJDK_BUILD_OS" != xaix; then
29071    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29073$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29074
29075  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29076    # Follow a chain of symbolic links. Use readlink
29077    # where it exists, else fall back to horribly
29078    # complicated shell code.
29079    if test "x$READLINK_TESTED" != yes; then
29080      # On MacOSX there is a readlink tool with a different
29081      # purpose than the GNU readlink tool. Check the found readlink.
29082      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29083      if test "x$ISGNU" = x; then
29084        # A readlink that we do not know how to use.
29085        # Are there other non-GNU readlinks out there?
29086        READLINK_TESTED=yes
29087        READLINK=
29088      fi
29089    fi
29090
29091    if test "x$READLINK" != x; then
29092      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29093    else
29094      # Save the current directory for restoring afterwards
29095      STARTDIR=$PWD
29096      COUNTER=0
29097      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29098      sym_link_file=`$BASENAME $TEST_COMPILER`
29099      cd $sym_link_dir
29100      # Use -P flag to resolve symlinks in directories.
29101      cd `$THEPWDCMD -P`
29102      sym_link_dir=`$THEPWDCMD -P`
29103      # Resolve file symlinks
29104      while test $COUNTER -lt 20; do
29105        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29106        if test "x$ISLINK" == x; then
29107          # This is not a symbolic link! We are done!
29108          break
29109        fi
29110        # Again resolve directory symlinks since the target of the just found
29111        # link could be in a different directory
29112        cd `$DIRNAME $ISLINK`
29113        sym_link_dir=`$THEPWDCMD -P`
29114        sym_link_file=`$BASENAME $ISLINK`
29115        let COUNTER=COUNTER+1
29116      done
29117      cd $STARTDIR
29118      TEST_COMPILER=$sym_link_dir/$sym_link_file
29119    fi
29120  fi
29121
29122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29123$as_echo "$TEST_COMPILER" >&6; }
29124  fi
29125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29126$as_echo_n "checking if CC is disguised ccache... " >&6; }
29127
29128  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29129  if test "x$COMPILER_BASENAME" = "xccache"; then
29130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29131$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29132    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29133    # We want to control ccache invocation ourselves, so ignore this cc and try
29134    # searching again.
29135
29136    # Remove the path to the fake ccache cc from the PATH
29137    RETRY_COMPILER_SAVED_PATH="$PATH"
29138    COMPILER_DIRNAME=`$DIRNAME $CC`
29139    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29140
29141    # Try again looking for our compiler
29142    if test -n "$ac_tool_prefix"; then
29143  for ac_prog in $TOOLCHAIN_CC_BINARY
29144  do
29145    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29146set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29148$as_echo_n "checking for $ac_word... " >&6; }
29149if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29150  $as_echo_n "(cached) " >&6
29151else
29152  if test -n "$PROPER_COMPILER_CC"; then
29153  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29154else
29155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29156for as_dir in $PATH
29157do
29158  IFS=$as_save_IFS
29159  test -z "$as_dir" && as_dir=.
29160    for ac_exec_ext in '' $ac_executable_extensions; do
29161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29162    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29164    break 2
29165  fi
29166done
29167  done
29168IFS=$as_save_IFS
29169
29170fi
29171fi
29172PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29173if test -n "$PROPER_COMPILER_CC"; then
29174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29175$as_echo "$PROPER_COMPILER_CC" >&6; }
29176else
29177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29178$as_echo "no" >&6; }
29179fi
29180
29181
29182    test -n "$PROPER_COMPILER_CC" && break
29183  done
29184fi
29185if test -z "$PROPER_COMPILER_CC"; then
29186  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29187  for ac_prog in $TOOLCHAIN_CC_BINARY
29188do
29189  # Extract the first word of "$ac_prog", so it can be a program name with args.
29190set dummy $ac_prog; ac_word=$2
29191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29192$as_echo_n "checking for $ac_word... " >&6; }
29193if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29194  $as_echo_n "(cached) " >&6
29195else
29196  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29197  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29198else
29199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29200for as_dir in $PATH
29201do
29202  IFS=$as_save_IFS
29203  test -z "$as_dir" && as_dir=.
29204    for ac_exec_ext in '' $ac_executable_extensions; do
29205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29206    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29208    break 2
29209  fi
29210done
29211  done
29212IFS=$as_save_IFS
29213
29214fi
29215fi
29216ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29217if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29219$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29220else
29221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29222$as_echo "no" >&6; }
29223fi
29224
29225
29226  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29227done
29228
29229  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29230    PROPER_COMPILER_CC=""
29231  else
29232    case $cross_compiling:$ac_tool_warned in
29233yes:)
29234{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29235$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29236ac_tool_warned=yes ;;
29237esac
29238    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29239  fi
29240fi
29241
29242
29243  # Only process if variable expands to non-empty
29244
29245  if test "x$PROPER_COMPILER_CC" != x; then
29246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29247
29248  # First separate the path from the arguments. This will split at the first
29249  # space.
29250  complete="$PROPER_COMPILER_CC"
29251  path="${complete%% *}"
29252  tmp="$complete EOL"
29253  arguments="${tmp#* }"
29254
29255  # Input might be given as Windows format, start by converting to
29256  # unix format.
29257  new_path=`$CYGPATH -u "$path"`
29258
29259  # Now try to locate executable using which
29260  new_path=`$WHICH "$new_path" 2> /dev/null`
29261  # bat and cmd files are not always considered executable in cygwin causing which
29262  # to not find them
29263  if test "x$new_path" = x \
29264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29266    new_path=`$CYGPATH -u "$path"`
29267  fi
29268  if test "x$new_path" = x; then
29269    # Oops. Which didn't find the executable.
29270    # The splitting of arguments from the executable at a space might have been incorrect,
29271    # since paths with space are more likely in Windows. Give it another try with the whole
29272    # argument.
29273    path="$complete"
29274    arguments="EOL"
29275    new_path=`$CYGPATH -u "$path"`
29276    new_path=`$WHICH "$new_path" 2> /dev/null`
29277    # bat and cmd files are not always considered executable in cygwin causing which
29278    # to not find them
29279    if test "x$new_path" = x \
29280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29282      new_path=`$CYGPATH -u "$path"`
29283    fi
29284    if test "x$new_path" = x; then
29285      # It's still not found. Now this is an unrecoverable error.
29286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29287$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29288      has_space=`$ECHO "$complete" | $GREP " "`
29289      if test "x$has_space" != x; then
29290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29292      fi
29293      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29294    fi
29295  fi
29296
29297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29300  # "foo.exe" is OK but "foo" is an error.
29301  #
29302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29303  # It is also a way to make sure we got the proper file name for the real test later on.
29304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29305  if test "x$test_shortpath" = x; then
29306    # Short path failed, file does not exist as specified.
29307    # Try adding .exe or .cmd
29308    if test -f "${new_path}.exe"; then
29309      input_to_shortpath="${new_path}.exe"
29310    elif test -f "${new_path}.cmd"; then
29311      input_to_shortpath="${new_path}.cmd"
29312    else
29313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29314$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29317      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29318    fi
29319  else
29320    input_to_shortpath="$new_path"
29321  fi
29322
29323  # Call helper function which possibly converts this using DOS-style short mode.
29324  # If so, the updated path is stored in $new_path.
29325  new_path="$input_to_shortpath"
29326
29327  input_path="$input_to_shortpath"
29328  # Check if we need to convert this using DOS-style short mode. If the path
29329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29330  # take no chances and rewrite it.
29331  # Note: m4 eats our [], so we need to use [ and ] instead.
29332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29333  if test "x$has_forbidden_chars" != x; then
29334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29338      # Going to short mode and back again did indeed matter. Since short mode is
29339      # case insensitive, let's make it lowercase to improve readability.
29340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29341      # Now convert it back to Unix-style (cygpath)
29342      input_path=`$CYGPATH -u "$shortmode_path"`
29343      new_path="$input_path"
29344    fi
29345  fi
29346
29347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29348  if test "x$test_cygdrive_prefix" = x; then
29349    # As a simple fix, exclude /usr/bin since it's not a real path.
29350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29352      # a path prefixed by /cygdrive for fixpath to work.
29353      new_path="$CYGWIN_ROOT_PATH$input_path"
29354    fi
29355  fi
29356
29357  # remove trailing .exe if any
29358  new_path="${new_path/%.exe/}"
29359
29360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29361
29362  # First separate the path from the arguments. This will split at the first
29363  # space.
29364  complete="$PROPER_COMPILER_CC"
29365  path="${complete%% *}"
29366  tmp="$complete EOL"
29367  arguments="${tmp#* }"
29368
29369  # Input might be given as Windows format, start by converting to
29370  # unix format.
29371  new_path="$path"
29372
29373  windows_path="$new_path"
29374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29375    unix_path=`$CYGPATH -u "$windows_path"`
29376    new_path="$unix_path"
29377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29379    new_path="$unix_path"
29380  fi
29381
29382
29383  # Now try to locate executable using which
29384  new_path=`$WHICH "$new_path" 2> /dev/null`
29385
29386  if test "x$new_path" = x; then
29387    # Oops. Which didn't find the executable.
29388    # The splitting of arguments from the executable at a space might have been incorrect,
29389    # since paths with space are more likely in Windows. Give it another try with the whole
29390    # argument.
29391    path="$complete"
29392    arguments="EOL"
29393    new_path="$path"
29394
29395  windows_path="$new_path"
29396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29397    unix_path=`$CYGPATH -u "$windows_path"`
29398    new_path="$unix_path"
29399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29401    new_path="$unix_path"
29402  fi
29403
29404
29405    new_path=`$WHICH "$new_path" 2> /dev/null`
29406    # bat and cmd files are not always considered executable in MSYS causing which
29407    # to not find them
29408    if test "x$new_path" = x \
29409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29411      new_path="$path"
29412
29413  windows_path="$new_path"
29414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29415    unix_path=`$CYGPATH -u "$windows_path"`
29416    new_path="$unix_path"
29417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29419    new_path="$unix_path"
29420  fi
29421
29422    fi
29423
29424    if test "x$new_path" = x; then
29425      # It's still not found. Now this is an unrecoverable error.
29426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29427$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29428      has_space=`$ECHO "$complete" | $GREP " "`
29429      if test "x$has_space" != x; then
29430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29432      fi
29433      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29434    fi
29435  fi
29436
29437  # Now new_path has a complete unix path to the binary
29438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29439    # Keep paths in /bin as-is, but remove trailing .exe if any
29440    new_path="${new_path/%.exe/}"
29441    # Do not save /bin paths to all_fixpath_prefixes!
29442  else
29443    # Not in mixed or Windows style, start by that.
29444    new_path=`cmd //c echo $new_path`
29445
29446  input_path="$new_path"
29447  # Check if we need to convert this using DOS-style short mode. If the path
29448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29449  # take no chances and rewrite it.
29450  # Note: m4 eats our [], so we need to use [ and ] instead.
29451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29452  if test "x$has_forbidden_chars" != x; then
29453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29455  fi
29456
29457    # Output is in $new_path
29458
29459  windows_path="$new_path"
29460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29461    unix_path=`$CYGPATH -u "$windows_path"`
29462    new_path="$unix_path"
29463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29465    new_path="$unix_path"
29466  fi
29467
29468    # remove trailing .exe if any
29469    new_path="${new_path/%.exe/}"
29470
29471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29473  fi
29474
29475    else
29476      # We're on a unix platform. Hooray! :)
29477      # First separate the path from the arguments. This will split at the first
29478      # space.
29479      complete="$PROPER_COMPILER_CC"
29480      path="${complete%% *}"
29481      tmp="$complete EOL"
29482      arguments="${tmp#* }"
29483
29484      # Cannot rely on the command "which" here since it doesn't always work.
29485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29486      if test -z "$is_absolute_path"; then
29487        # Path to executable is not absolute. Find it.
29488        IFS_save="$IFS"
29489        IFS=:
29490        for p in $PATH; do
29491          if test -f "$p/$path" && test -x "$p/$path"; then
29492            new_path="$p/$path"
29493            break
29494          fi
29495        done
29496        IFS="$IFS_save"
29497      else
29498        # This is an absolute path, we can use it without further modifications.
29499        new_path="$path"
29500      fi
29501
29502      if test "x$new_path" = x; then
29503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29504$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29505        has_space=`$ECHO "$complete" | $GREP " "`
29506        if test "x$has_space" != x; then
29507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29509        fi
29510        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29511      fi
29512    fi
29513
29514    # Now join together the path and the arguments once again
29515    if test "x$arguments" != xEOL; then
29516      new_complete="$new_path ${arguments% *}"
29517    else
29518      new_complete="$new_path"
29519    fi
29520
29521    if test "x$complete" != "x$new_complete"; then
29522      PROPER_COMPILER_CC="$new_complete"
29523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29524$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29525    fi
29526  fi
29527
29528    PATH="$RETRY_COMPILER_SAVED_PATH"
29529
29530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29531$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29532
29533  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29534    # Follow a chain of symbolic links. Use readlink
29535    # where it exists, else fall back to horribly
29536    # complicated shell code.
29537    if test "x$READLINK_TESTED" != yes; then
29538      # On MacOSX there is a readlink tool with a different
29539      # purpose than the GNU readlink tool. Check the found readlink.
29540      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29541      if test "x$ISGNU" = x; then
29542        # A readlink that we do not know how to use.
29543        # Are there other non-GNU readlinks out there?
29544        READLINK_TESTED=yes
29545        READLINK=
29546      fi
29547    fi
29548
29549    if test "x$READLINK" != x; then
29550      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29551    else
29552      # Save the current directory for restoring afterwards
29553      STARTDIR=$PWD
29554      COUNTER=0
29555      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29556      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29557      cd $sym_link_dir
29558      # Use -P flag to resolve symlinks in directories.
29559      cd `$THEPWDCMD -P`
29560      sym_link_dir=`$THEPWDCMD -P`
29561      # Resolve file symlinks
29562      while test $COUNTER -lt 20; do
29563        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29564        if test "x$ISLINK" == x; then
29565          # This is not a symbolic link! We are done!
29566          break
29567        fi
29568        # Again resolve directory symlinks since the target of the just found
29569        # link could be in a different directory
29570        cd `$DIRNAME $ISLINK`
29571        sym_link_dir=`$THEPWDCMD -P`
29572        sym_link_file=`$BASENAME $ISLINK`
29573        let COUNTER=COUNTER+1
29574      done
29575      cd $STARTDIR
29576      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29577    fi
29578  fi
29579
29580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29581$as_echo "$PROPER_COMPILER_CC" >&6; }
29582    CC="$PROPER_COMPILER_CC"
29583  else
29584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29585$as_echo "no, keeping CC" >&6; }
29586  fi
29587
29588
29589  COMPILER=$CC
29590  COMPILER_NAME=$COMPILER_NAME
29591
29592  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29593    # cc -V output typically looks like
29594    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29595    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29596    # Check that this is likely to be the Solaris Studio cc.
29597    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29598    if test $? -ne 0; then
29599      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29600      { $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
29601$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29602      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29603$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29605$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29606      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29607    fi
29608    # Remove usage instructions (if present), and
29609    # collapse compiler output into a single line
29610    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29611        $SED -e 's/ *[Uu]sage:.*//'`
29612    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29613        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29614  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29615    # xlc -qversion output typically looks like
29616    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29617    #     Version: 11.01.0000.0015
29618    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29619    # Check that this is likely to be the IBM XL C compiler.
29620    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29621    if test $? -ne 0; then
29622      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29623      { $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
29624$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29625      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29626$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29627      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29628$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29629      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29630    fi
29631    # Collapse compiler output into a single line
29632    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29633    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29634        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29635  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29636    # There is no specific version flag, but all output starts with a version string.
29637    # First line typically looks something like:
29638    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29639    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29640    # Check that this is likely to be Microsoft CL.EXE.
29641    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29642    if test $? -ne 0; then
29643      { $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
29644$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29645      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29646$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29647      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29648    fi
29649    # Collapse compiler output into a single line
29650    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29651    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29652        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29653  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29654    # gcc --version output typically looks like
29655    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29656    #     Copyright (C) 2013 Free Software Foundation, Inc.
29657    #     This is free software; see the source for copying conditions.  There is NO
29658    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29659    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29660    # Check that this is likely to be GCC.
29661    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29662    if test $? -ne 0; then
29663      { $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
29664$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29665      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29666$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29667      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29668    fi
29669    # Remove Copyright and legalese from version string, and
29670    # collapse into a single line
29671    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29672        $SED -e 's/ *Copyright .*//'`
29673    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29674        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29675  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29676    # clang --version output typically looks like
29677    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29678    #    clang version 3.3 (tags/RELEASE_33/final)
29679    # or
29680    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29681    #    Target: x86_64-pc-linux-gnu
29682    #    Thread model: posix
29683    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29684    # Check that this is likely to be clang
29685    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29686    if test $? -ne 0; then
29687      { $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
29688$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29689      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29690$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29691      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29692    fi
29693    # Collapse compiler output into a single line
29694    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29695    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29696        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29697  else
29698      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29699  fi
29700  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29701  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29702  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29703  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29704
29705  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29706$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29707
29708
29709  # Now that we have resolved CC ourself, let autoconf have its go at it
29710  ac_ext=c
29711ac_cpp='$CPP $CPPFLAGS'
29712ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29713ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29714ac_compiler_gnu=$ac_cv_c_compiler_gnu
29715if test -n "$ac_tool_prefix"; then
29716  for ac_prog in $CC
29717  do
29718    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29719set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29721$as_echo_n "checking for $ac_word... " >&6; }
29722if ${ac_cv_prog_CC+:} false; then :
29723  $as_echo_n "(cached) " >&6
29724else
29725  if test -n "$CC"; then
29726  ac_cv_prog_CC="$CC" # Let the user override the test.
29727else
29728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29729for as_dir in $PATH
29730do
29731  IFS=$as_save_IFS
29732  test -z "$as_dir" && as_dir=.
29733    for ac_exec_ext in '' $ac_executable_extensions; do
29734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29735    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29737    break 2
29738  fi
29739done
29740  done
29741IFS=$as_save_IFS
29742
29743fi
29744fi
29745CC=$ac_cv_prog_CC
29746if test -n "$CC"; then
29747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29748$as_echo "$CC" >&6; }
29749else
29750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29751$as_echo "no" >&6; }
29752fi
29753
29754
29755    test -n "$CC" && break
29756  done
29757fi
29758if test -z "$CC"; then
29759  ac_ct_CC=$CC
29760  for ac_prog in $CC
29761do
29762  # Extract the first word of "$ac_prog", so it can be a program name with args.
29763set dummy $ac_prog; ac_word=$2
29764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29765$as_echo_n "checking for $ac_word... " >&6; }
29766if ${ac_cv_prog_ac_ct_CC+:} false; then :
29767  $as_echo_n "(cached) " >&6
29768else
29769  if test -n "$ac_ct_CC"; then
29770  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29771else
29772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29773for as_dir in $PATH
29774do
29775  IFS=$as_save_IFS
29776  test -z "$as_dir" && as_dir=.
29777    for ac_exec_ext in '' $ac_executable_extensions; do
29778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29779    ac_cv_prog_ac_ct_CC="$ac_prog"
29780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29781    break 2
29782  fi
29783done
29784  done
29785IFS=$as_save_IFS
29786
29787fi
29788fi
29789ac_ct_CC=$ac_cv_prog_ac_ct_CC
29790if test -n "$ac_ct_CC"; then
29791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29792$as_echo "$ac_ct_CC" >&6; }
29793else
29794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29795$as_echo "no" >&6; }
29796fi
29797
29798
29799  test -n "$ac_ct_CC" && break
29800done
29801
29802  if test "x$ac_ct_CC" = x; then
29803    CC=""
29804  else
29805    case $cross_compiling:$ac_tool_warned in
29806yes:)
29807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29809ac_tool_warned=yes ;;
29810esac
29811    CC=$ac_ct_CC
29812  fi
29813fi
29814
29815
29816test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29818as_fn_error $? "no acceptable C compiler found in \$PATH
29819See \`config.log' for more details" "$LINENO" 5; }
29820
29821# Provide some information about the compiler.
29822$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29823set X $ac_compile
29824ac_compiler=$2
29825for ac_option in --version -v -V -qversion; do
29826  { { ac_try="$ac_compiler $ac_option >&5"
29827case "(($ac_try" in
29828  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29829  *) ac_try_echo=$ac_try;;
29830esac
29831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29832$as_echo "$ac_try_echo"; } >&5
29833  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29834  ac_status=$?
29835  if test -s conftest.err; then
29836    sed '10a\
29837... rest of stderr output deleted ...
29838         10q' conftest.err >conftest.er1
29839    cat conftest.er1 >&5
29840  fi
29841  rm -f conftest.er1 conftest.err
29842  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29843  test $ac_status = 0; }
29844done
29845
29846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29847/* end confdefs.h.  */
29848
29849int
29850main ()
29851{
29852
29853  ;
29854  return 0;
29855}
29856_ACEOF
29857ac_clean_files_save=$ac_clean_files
29858ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29859# Try to create an executable without -o first, disregard a.out.
29860# It will help us diagnose broken compilers, and finding out an intuition
29861# of exeext.
29862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29863$as_echo_n "checking whether the C compiler works... " >&6; }
29864ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29865
29866# The possible output files:
29867ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29868
29869ac_rmfiles=
29870for ac_file in $ac_files
29871do
29872  case $ac_file in
29873    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29874    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29875  esac
29876done
29877rm -f $ac_rmfiles
29878
29879if { { ac_try="$ac_link_default"
29880case "(($ac_try" in
29881  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29882  *) ac_try_echo=$ac_try;;
29883esac
29884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29885$as_echo "$ac_try_echo"; } >&5
29886  (eval "$ac_link_default") 2>&5
29887  ac_status=$?
29888  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29889  test $ac_status = 0; }; then :
29890  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29891# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29892# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29893# so that the user can short-circuit this test for compilers unknown to
29894# Autoconf.
29895for ac_file in $ac_files ''
29896do
29897  test -f "$ac_file" || continue
29898  case $ac_file in
29899    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29900	;;
29901    [ab].out )
29902	# We found the default executable, but exeext='' is most
29903	# certainly right.
29904	break;;
29905    *.* )
29906	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29907	then :; else
29908	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29909	fi
29910	# We set ac_cv_exeext here because the later test for it is not
29911	# safe: cross compilers may not add the suffix if given an `-o'
29912	# argument, so we may need to know it at that point already.
29913	# Even if this section looks crufty: it has the advantage of
29914	# actually working.
29915	break;;
29916    * )
29917	break;;
29918  esac
29919done
29920test "$ac_cv_exeext" = no && ac_cv_exeext=
29921
29922else
29923  ac_file=''
29924fi
29925if test -z "$ac_file"; then :
29926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29927$as_echo "no" >&6; }
29928$as_echo "$as_me: failed program was:" >&5
29929sed 's/^/| /' conftest.$ac_ext >&5
29930
29931{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29933as_fn_error 77 "C compiler cannot create executables
29934See \`config.log' for more details" "$LINENO" 5; }
29935else
29936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29937$as_echo "yes" >&6; }
29938fi
29939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29940$as_echo_n "checking for C compiler default output file name... " >&6; }
29941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29942$as_echo "$ac_file" >&6; }
29943ac_exeext=$ac_cv_exeext
29944
29945rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29946ac_clean_files=$ac_clean_files_save
29947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29948$as_echo_n "checking for suffix of executables... " >&6; }
29949if { { ac_try="$ac_link"
29950case "(($ac_try" in
29951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29952  *) ac_try_echo=$ac_try;;
29953esac
29954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29955$as_echo "$ac_try_echo"; } >&5
29956  (eval "$ac_link") 2>&5
29957  ac_status=$?
29958  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29959  test $ac_status = 0; }; then :
29960  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29961# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29962# work properly (i.e., refer to `conftest.exe'), while it won't with
29963# `rm'.
29964for ac_file in conftest.exe conftest conftest.*; do
29965  test -f "$ac_file" || continue
29966  case $ac_file in
29967    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29968    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29969	  break;;
29970    * ) break;;
29971  esac
29972done
29973else
29974  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29976as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29977See \`config.log' for more details" "$LINENO" 5; }
29978fi
29979rm -f conftest conftest$ac_cv_exeext
29980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29981$as_echo "$ac_cv_exeext" >&6; }
29982
29983rm -f conftest.$ac_ext
29984EXEEXT=$ac_cv_exeext
29985ac_exeext=$EXEEXT
29986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29987/* end confdefs.h.  */
29988#include <stdio.h>
29989int
29990main ()
29991{
29992FILE *f = fopen ("conftest.out", "w");
29993 return ferror (f) || fclose (f) != 0;
29994
29995  ;
29996  return 0;
29997}
29998_ACEOF
29999ac_clean_files="$ac_clean_files conftest.out"
30000# Check that the compiler produces executables we can run.  If not, either
30001# the compiler is broken, or we cross compile.
30002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30003$as_echo_n "checking whether we are cross compiling... " >&6; }
30004if test "$cross_compiling" != yes; then
30005  { { ac_try="$ac_link"
30006case "(($ac_try" in
30007  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30008  *) ac_try_echo=$ac_try;;
30009esac
30010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30011$as_echo "$ac_try_echo"; } >&5
30012  (eval "$ac_link") 2>&5
30013  ac_status=$?
30014  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30015  test $ac_status = 0; }
30016  if { ac_try='./conftest$ac_cv_exeext'
30017  { { case "(($ac_try" in
30018  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30019  *) ac_try_echo=$ac_try;;
30020esac
30021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30022$as_echo "$ac_try_echo"; } >&5
30023  (eval "$ac_try") 2>&5
30024  ac_status=$?
30025  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30026  test $ac_status = 0; }; }; then
30027    cross_compiling=no
30028  else
30029    if test "$cross_compiling" = maybe; then
30030	cross_compiling=yes
30031    else
30032	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30034as_fn_error $? "cannot run C compiled programs.
30035If you meant to cross compile, use \`--host'.
30036See \`config.log' for more details" "$LINENO" 5; }
30037    fi
30038  fi
30039fi
30040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30041$as_echo "$cross_compiling" >&6; }
30042
30043rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30044ac_clean_files=$ac_clean_files_save
30045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30046$as_echo_n "checking for suffix of object files... " >&6; }
30047if ${ac_cv_objext+:} false; then :
30048  $as_echo_n "(cached) " >&6
30049else
30050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30051/* end confdefs.h.  */
30052
30053int
30054main ()
30055{
30056
30057  ;
30058  return 0;
30059}
30060_ACEOF
30061rm -f conftest.o conftest.obj
30062if { { ac_try="$ac_compile"
30063case "(($ac_try" in
30064  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30065  *) ac_try_echo=$ac_try;;
30066esac
30067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30068$as_echo "$ac_try_echo"; } >&5
30069  (eval "$ac_compile") 2>&5
30070  ac_status=$?
30071  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30072  test $ac_status = 0; }; then :
30073  for ac_file in conftest.o conftest.obj conftest.*; do
30074  test -f "$ac_file" || continue;
30075  case $ac_file in
30076    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30077    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30078       break;;
30079  esac
30080done
30081else
30082  $as_echo "$as_me: failed program was:" >&5
30083sed 's/^/| /' conftest.$ac_ext >&5
30084
30085{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30087as_fn_error $? "cannot compute suffix of object files: cannot compile
30088See \`config.log' for more details" "$LINENO" 5; }
30089fi
30090rm -f conftest.$ac_cv_objext conftest.$ac_ext
30091fi
30092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30093$as_echo "$ac_cv_objext" >&6; }
30094OBJEXT=$ac_cv_objext
30095ac_objext=$OBJEXT
30096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30097$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30098if ${ac_cv_c_compiler_gnu+:} false; then :
30099  $as_echo_n "(cached) " >&6
30100else
30101  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30102/* end confdefs.h.  */
30103
30104int
30105main ()
30106{
30107#ifndef __GNUC__
30108       choke me
30109#endif
30110
30111  ;
30112  return 0;
30113}
30114_ACEOF
30115if ac_fn_c_try_compile "$LINENO"; then :
30116  ac_compiler_gnu=yes
30117else
30118  ac_compiler_gnu=no
30119fi
30120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30121ac_cv_c_compiler_gnu=$ac_compiler_gnu
30122
30123fi
30124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30125$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30126if test $ac_compiler_gnu = yes; then
30127  GCC=yes
30128else
30129  GCC=
30130fi
30131ac_test_CFLAGS=${CFLAGS+set}
30132ac_save_CFLAGS=$CFLAGS
30133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30134$as_echo_n "checking whether $CC accepts -g... " >&6; }
30135if ${ac_cv_prog_cc_g+:} false; then :
30136  $as_echo_n "(cached) " >&6
30137else
30138  ac_save_c_werror_flag=$ac_c_werror_flag
30139   ac_c_werror_flag=yes
30140   ac_cv_prog_cc_g=no
30141   CFLAGS="-g"
30142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30143/* end confdefs.h.  */
30144
30145int
30146main ()
30147{
30148
30149  ;
30150  return 0;
30151}
30152_ACEOF
30153if ac_fn_c_try_compile "$LINENO"; then :
30154  ac_cv_prog_cc_g=yes
30155else
30156  CFLAGS=""
30157      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30158/* end confdefs.h.  */
30159
30160int
30161main ()
30162{
30163
30164  ;
30165  return 0;
30166}
30167_ACEOF
30168if ac_fn_c_try_compile "$LINENO"; then :
30169
30170else
30171  ac_c_werror_flag=$ac_save_c_werror_flag
30172	 CFLAGS="-g"
30173	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30174/* end confdefs.h.  */
30175
30176int
30177main ()
30178{
30179
30180  ;
30181  return 0;
30182}
30183_ACEOF
30184if ac_fn_c_try_compile "$LINENO"; then :
30185  ac_cv_prog_cc_g=yes
30186fi
30187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30188fi
30189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30190fi
30191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30192   ac_c_werror_flag=$ac_save_c_werror_flag
30193fi
30194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30195$as_echo "$ac_cv_prog_cc_g" >&6; }
30196if test "$ac_test_CFLAGS" = set; then
30197  CFLAGS=$ac_save_CFLAGS
30198elif test $ac_cv_prog_cc_g = yes; then
30199  if test "$GCC" = yes; then
30200    CFLAGS="-g -O2"
30201  else
30202    CFLAGS="-g"
30203  fi
30204else
30205  if test "$GCC" = yes; then
30206    CFLAGS="-O2"
30207  else
30208    CFLAGS=
30209  fi
30210fi
30211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30212$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30213if ${ac_cv_prog_cc_c89+:} false; then :
30214  $as_echo_n "(cached) " >&6
30215else
30216  ac_cv_prog_cc_c89=no
30217ac_save_CC=$CC
30218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30219/* end confdefs.h.  */
30220#include <stdarg.h>
30221#include <stdio.h>
30222struct stat;
30223/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30224struct buf { int x; };
30225FILE * (*rcsopen) (struct buf *, struct stat *, int);
30226static char *e (p, i)
30227     char **p;
30228     int i;
30229{
30230  return p[i];
30231}
30232static char *f (char * (*g) (char **, int), char **p, ...)
30233{
30234  char *s;
30235  va_list v;
30236  va_start (v,p);
30237  s = g (p, va_arg (v,int));
30238  va_end (v);
30239  return s;
30240}
30241
30242/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30243   function prototypes and stuff, but not '\xHH' hex character constants.
30244   These don't provoke an error unfortunately, instead are silently treated
30245   as 'x'.  The following induces an error, until -std is added to get
30246   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30247   array size at least.  It's necessary to write '\x00'==0 to get something
30248   that's true only with -std.  */
30249int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30250
30251/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30252   inside strings and character constants.  */
30253#define FOO(x) 'x'
30254int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30255
30256int test (int i, double x);
30257struct s1 {int (*f) (int a);};
30258struct s2 {int (*f) (double a);};
30259int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30260int argc;
30261char **argv;
30262int
30263main ()
30264{
30265return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30266  ;
30267  return 0;
30268}
30269_ACEOF
30270for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30271	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30272do
30273  CC="$ac_save_CC $ac_arg"
30274  if ac_fn_c_try_compile "$LINENO"; then :
30275  ac_cv_prog_cc_c89=$ac_arg
30276fi
30277rm -f core conftest.err conftest.$ac_objext
30278  test "x$ac_cv_prog_cc_c89" != "xno" && break
30279done
30280rm -f conftest.$ac_ext
30281CC=$ac_save_CC
30282
30283fi
30284# AC_CACHE_VAL
30285case "x$ac_cv_prog_cc_c89" in
30286  x)
30287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30288$as_echo "none needed" >&6; } ;;
30289  xno)
30290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30291$as_echo "unsupported" >&6; } ;;
30292  *)
30293    CC="$CC $ac_cv_prog_cc_c89"
30294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30295$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30296esac
30297if test "x$ac_cv_prog_cc_c89" != xno; then :
30298
30299fi
30300
30301ac_ext=cpp
30302ac_cpp='$CXXCPP $CPPFLAGS'
30303ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30304ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30305ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30306
30307
30308
30309  COMPILER_NAME=C++
30310  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30311
30312  if test "x$CXX" != x; then
30313    # User has supplied compiler name already, always let that override.
30314    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30315$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30316    if test "x`basename $CXX`" = "x$CXX"; then
30317      # A command without a complete path is provided, search $PATH.
30318
30319      for ac_prog in $CXX
30320do
30321  # Extract the first word of "$ac_prog", so it can be a program name with args.
30322set dummy $ac_prog; ac_word=$2
30323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30324$as_echo_n "checking for $ac_word... " >&6; }
30325if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30326  $as_echo_n "(cached) " >&6
30327else
30328  case $POTENTIAL_CXX in
30329  [\\/]* | ?:[\\/]*)
30330  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30331  ;;
30332  *)
30333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30334for as_dir in $PATH
30335do
30336  IFS=$as_save_IFS
30337  test -z "$as_dir" && as_dir=.
30338    for ac_exec_ext in '' $ac_executable_extensions; do
30339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30340    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30342    break 2
30343  fi
30344done
30345  done
30346IFS=$as_save_IFS
30347
30348  ;;
30349esac
30350fi
30351POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30352if test -n "$POTENTIAL_CXX"; then
30353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30354$as_echo "$POTENTIAL_CXX" >&6; }
30355else
30356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30357$as_echo "no" >&6; }
30358fi
30359
30360
30361  test -n "$POTENTIAL_CXX" && break
30362done
30363
30364      if test "x$POTENTIAL_CXX" != x; then
30365        CXX=$POTENTIAL_CXX
30366      else
30367        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30368      fi
30369    else
30370      # Otherwise it might already be a complete path
30371      if test ! -x "$CXX"; then
30372        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30373      fi
30374    fi
30375  else
30376    # No user supplied value. Locate compiler ourselves.
30377
30378    # If we are cross compiling, assume cross compilation tools follows the
30379    # cross compilation standard where they are prefixed with the autoconf
30380    # standard name for the target. For example the binary
30381    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30382    # If we are not cross compiling, then the default compiler name will be
30383    # used.
30384
30385    CXX=
30386    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30387    # before checking the rest of the PATH.
30388    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30389    # step, this should not be necessary.
30390    if test -n "$TOOLCHAIN_PATH"; then
30391      PATH_save="$PATH"
30392      PATH="$TOOLCHAIN_PATH"
30393      for ac_prog in $SEARCH_LIST
30394do
30395  # Extract the first word of "$ac_prog", so it can be a program name with args.
30396set dummy $ac_prog; ac_word=$2
30397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30398$as_echo_n "checking for $ac_word... " >&6; }
30399if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30400  $as_echo_n "(cached) " >&6
30401else
30402  case $TOOLCHAIN_PATH_CXX in
30403  [\\/]* | ?:[\\/]*)
30404  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30405  ;;
30406  *)
30407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30408for as_dir in $PATH
30409do
30410  IFS=$as_save_IFS
30411  test -z "$as_dir" && as_dir=.
30412    for ac_exec_ext in '' $ac_executable_extensions; do
30413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30414    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30416    break 2
30417  fi
30418done
30419  done
30420IFS=$as_save_IFS
30421
30422  ;;
30423esac
30424fi
30425TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30426if test -n "$TOOLCHAIN_PATH_CXX"; then
30427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30428$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30429else
30430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30431$as_echo "no" >&6; }
30432fi
30433
30434
30435  test -n "$TOOLCHAIN_PATH_CXX" && break
30436done
30437
30438      CXX=$TOOLCHAIN_PATH_CXX
30439      PATH="$PATH_save"
30440    fi
30441
30442    # AC_PATH_PROGS can't be run multiple times with the same variable,
30443    # so create a new name for this run.
30444    if test "x$CXX" = x; then
30445      for ac_prog in $SEARCH_LIST
30446do
30447  # Extract the first word of "$ac_prog", so it can be a program name with args.
30448set dummy $ac_prog; ac_word=$2
30449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30450$as_echo_n "checking for $ac_word... " >&6; }
30451if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30452  $as_echo_n "(cached) " >&6
30453else
30454  case $POTENTIAL_CXX in
30455  [\\/]* | ?:[\\/]*)
30456  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30457  ;;
30458  *)
30459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30460for as_dir in $PATH
30461do
30462  IFS=$as_save_IFS
30463  test -z "$as_dir" && as_dir=.
30464    for ac_exec_ext in '' $ac_executable_extensions; do
30465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30466    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30468    break 2
30469  fi
30470done
30471  done
30472IFS=$as_save_IFS
30473
30474  ;;
30475esac
30476fi
30477POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30478if test -n "$POTENTIAL_CXX"; then
30479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30480$as_echo "$POTENTIAL_CXX" >&6; }
30481else
30482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30483$as_echo "no" >&6; }
30484fi
30485
30486
30487  test -n "$POTENTIAL_CXX" && break
30488done
30489
30490      CXX=$POTENTIAL_CXX
30491    fi
30492
30493    if test "x$CXX" = x; then
30494
30495  # Print a helpful message on how to acquire the necessary build dependency.
30496  # devkit is the help tag: freetype, cups, pulse, alsa etc
30497  MISSING_DEPENDENCY=devkit
30498
30499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30500    cygwin_help $MISSING_DEPENDENCY
30501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30502    msys_help $MISSING_DEPENDENCY
30503  else
30504    PKGHANDLER_COMMAND=
30505
30506    case $PKGHANDLER in
30507      apt-get)
30508        apt_help     $MISSING_DEPENDENCY ;;
30509      yum)
30510        yum_help     $MISSING_DEPENDENCY ;;
30511      port)
30512        port_help    $MISSING_DEPENDENCY ;;
30513      pkgutil)
30514        pkgutil_help $MISSING_DEPENDENCY ;;
30515      pkgadd)
30516        pkgadd_help  $MISSING_DEPENDENCY ;;
30517    esac
30518
30519    if test "x$PKGHANDLER_COMMAND" != x; then
30520      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30521    fi
30522  fi
30523
30524      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30525    fi
30526  fi
30527
30528  # Now we have a compiler binary in CXX. Make sure it's okay.
30529
30530  # Only process if variable expands to non-empty
30531
30532  if test "x$CXX" != x; then
30533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30534
30535  # First separate the path from the arguments. This will split at the first
30536  # space.
30537  complete="$CXX"
30538  path="${complete%% *}"
30539  tmp="$complete EOL"
30540  arguments="${tmp#* }"
30541
30542  # Input might be given as Windows format, start by converting to
30543  # unix format.
30544  new_path=`$CYGPATH -u "$path"`
30545
30546  # Now try to locate executable using which
30547  new_path=`$WHICH "$new_path" 2> /dev/null`
30548  # bat and cmd files are not always considered executable in cygwin causing which
30549  # to not find them
30550  if test "x$new_path" = x \
30551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30553    new_path=`$CYGPATH -u "$path"`
30554  fi
30555  if test "x$new_path" = x; then
30556    # Oops. Which didn't find the executable.
30557    # The splitting of arguments from the executable at a space might have been incorrect,
30558    # since paths with space are more likely in Windows. Give it another try with the whole
30559    # argument.
30560    path="$complete"
30561    arguments="EOL"
30562    new_path=`$CYGPATH -u "$path"`
30563    new_path=`$WHICH "$new_path" 2> /dev/null`
30564    # bat and cmd files are not always considered executable in cygwin causing which
30565    # to not find them
30566    if test "x$new_path" = x \
30567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30569      new_path=`$CYGPATH -u "$path"`
30570    fi
30571    if test "x$new_path" = x; then
30572      # It's still not found. Now this is an unrecoverable error.
30573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30574$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30575      has_space=`$ECHO "$complete" | $GREP " "`
30576      if test "x$has_space" != x; then
30577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30579      fi
30580      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30581    fi
30582  fi
30583
30584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30587  # "foo.exe" is OK but "foo" is an error.
30588  #
30589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30590  # It is also a way to make sure we got the proper file name for the real test later on.
30591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30592  if test "x$test_shortpath" = x; then
30593    # Short path failed, file does not exist as specified.
30594    # Try adding .exe or .cmd
30595    if test -f "${new_path}.exe"; then
30596      input_to_shortpath="${new_path}.exe"
30597    elif test -f "${new_path}.cmd"; then
30598      input_to_shortpath="${new_path}.cmd"
30599    else
30600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30601$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30604      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30605    fi
30606  else
30607    input_to_shortpath="$new_path"
30608  fi
30609
30610  # Call helper function which possibly converts this using DOS-style short mode.
30611  # If so, the updated path is stored in $new_path.
30612  new_path="$input_to_shortpath"
30613
30614  input_path="$input_to_shortpath"
30615  # Check if we need to convert this using DOS-style short mode. If the path
30616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30617  # take no chances and rewrite it.
30618  # Note: m4 eats our [], so we need to use [ and ] instead.
30619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30620  if test "x$has_forbidden_chars" != x; then
30621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30625      # Going to short mode and back again did indeed matter. Since short mode is
30626      # case insensitive, let's make it lowercase to improve readability.
30627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30628      # Now convert it back to Unix-style (cygpath)
30629      input_path=`$CYGPATH -u "$shortmode_path"`
30630      new_path="$input_path"
30631    fi
30632  fi
30633
30634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30635  if test "x$test_cygdrive_prefix" = x; then
30636    # As a simple fix, exclude /usr/bin since it's not a real path.
30637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30639      # a path prefixed by /cygdrive for fixpath to work.
30640      new_path="$CYGWIN_ROOT_PATH$input_path"
30641    fi
30642  fi
30643
30644  # remove trailing .exe if any
30645  new_path="${new_path/%.exe/}"
30646
30647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30648
30649  # First separate the path from the arguments. This will split at the first
30650  # space.
30651  complete="$CXX"
30652  path="${complete%% *}"
30653  tmp="$complete EOL"
30654  arguments="${tmp#* }"
30655
30656  # Input might be given as Windows format, start by converting to
30657  # unix format.
30658  new_path="$path"
30659
30660  windows_path="$new_path"
30661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30662    unix_path=`$CYGPATH -u "$windows_path"`
30663    new_path="$unix_path"
30664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30666    new_path="$unix_path"
30667  fi
30668
30669
30670  # Now try to locate executable using which
30671  new_path=`$WHICH "$new_path" 2> /dev/null`
30672
30673  if test "x$new_path" = x; then
30674    # Oops. Which didn't find the executable.
30675    # The splitting of arguments from the executable at a space might have been incorrect,
30676    # since paths with space are more likely in Windows. Give it another try with the whole
30677    # argument.
30678    path="$complete"
30679    arguments="EOL"
30680    new_path="$path"
30681
30682  windows_path="$new_path"
30683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30684    unix_path=`$CYGPATH -u "$windows_path"`
30685    new_path="$unix_path"
30686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30688    new_path="$unix_path"
30689  fi
30690
30691
30692    new_path=`$WHICH "$new_path" 2> /dev/null`
30693    # bat and cmd files are not always considered executable in MSYS causing which
30694    # to not find them
30695    if test "x$new_path" = x \
30696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30698      new_path="$path"
30699
30700  windows_path="$new_path"
30701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30702    unix_path=`$CYGPATH -u "$windows_path"`
30703    new_path="$unix_path"
30704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30706    new_path="$unix_path"
30707  fi
30708
30709    fi
30710
30711    if test "x$new_path" = x; then
30712      # It's still not found. Now this is an unrecoverable error.
30713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30714$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30715      has_space=`$ECHO "$complete" | $GREP " "`
30716      if test "x$has_space" != x; then
30717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30719      fi
30720      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30721    fi
30722  fi
30723
30724  # Now new_path has a complete unix path to the binary
30725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30726    # Keep paths in /bin as-is, but remove trailing .exe if any
30727    new_path="${new_path/%.exe/}"
30728    # Do not save /bin paths to all_fixpath_prefixes!
30729  else
30730    # Not in mixed or Windows style, start by that.
30731    new_path=`cmd //c echo $new_path`
30732
30733  input_path="$new_path"
30734  # Check if we need to convert this using DOS-style short mode. If the path
30735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30736  # take no chances and rewrite it.
30737  # Note: m4 eats our [], so we need to use [ and ] instead.
30738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30739  if test "x$has_forbidden_chars" != x; then
30740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30742  fi
30743
30744    # Output is in $new_path
30745
30746  windows_path="$new_path"
30747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30748    unix_path=`$CYGPATH -u "$windows_path"`
30749    new_path="$unix_path"
30750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30752    new_path="$unix_path"
30753  fi
30754
30755    # remove trailing .exe if any
30756    new_path="${new_path/%.exe/}"
30757
30758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30760  fi
30761
30762    else
30763      # We're on a unix platform. Hooray! :)
30764      # First separate the path from the arguments. This will split at the first
30765      # space.
30766      complete="$CXX"
30767      path="${complete%% *}"
30768      tmp="$complete EOL"
30769      arguments="${tmp#* }"
30770
30771      # Cannot rely on the command "which" here since it doesn't always work.
30772      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30773      if test -z "$is_absolute_path"; then
30774        # Path to executable is not absolute. Find it.
30775        IFS_save="$IFS"
30776        IFS=:
30777        for p in $PATH; do
30778          if test -f "$p/$path" && test -x "$p/$path"; then
30779            new_path="$p/$path"
30780            break
30781          fi
30782        done
30783        IFS="$IFS_save"
30784      else
30785        # This is an absolute path, we can use it without further modifications.
30786        new_path="$path"
30787      fi
30788
30789      if test "x$new_path" = x; then
30790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30791$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30792        has_space=`$ECHO "$complete" | $GREP " "`
30793        if test "x$has_space" != x; then
30794          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30795$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30796        fi
30797        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30798      fi
30799    fi
30800
30801    # Now join together the path and the arguments once again
30802    if test "x$arguments" != xEOL; then
30803      new_complete="$new_path ${arguments% *}"
30804    else
30805      new_complete="$new_path"
30806    fi
30807
30808    if test "x$complete" != "x$new_complete"; then
30809      CXX="$new_complete"
30810      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30811$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30812    fi
30813  fi
30814
30815  TEST_COMPILER="$CXX"
30816  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30817  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30818  if test "x$OPENJDK_BUILD_OS" != xaix; then
30819    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30821$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30822
30823  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30824    # Follow a chain of symbolic links. Use readlink
30825    # where it exists, else fall back to horribly
30826    # complicated shell code.
30827    if test "x$READLINK_TESTED" != yes; then
30828      # On MacOSX there is a readlink tool with a different
30829      # purpose than the GNU readlink tool. Check the found readlink.
30830      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30831      if test "x$ISGNU" = x; then
30832        # A readlink that we do not know how to use.
30833        # Are there other non-GNU readlinks out there?
30834        READLINK_TESTED=yes
30835        READLINK=
30836      fi
30837    fi
30838
30839    if test "x$READLINK" != x; then
30840      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30841    else
30842      # Save the current directory for restoring afterwards
30843      STARTDIR=$PWD
30844      COUNTER=0
30845      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30846      sym_link_file=`$BASENAME $TEST_COMPILER`
30847      cd $sym_link_dir
30848      # Use -P flag to resolve symlinks in directories.
30849      cd `$THEPWDCMD -P`
30850      sym_link_dir=`$THEPWDCMD -P`
30851      # Resolve file symlinks
30852      while test $COUNTER -lt 20; do
30853        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30854        if test "x$ISLINK" == x; then
30855          # This is not a symbolic link! We are done!
30856          break
30857        fi
30858        # Again resolve directory symlinks since the target of the just found
30859        # link could be in a different directory
30860        cd `$DIRNAME $ISLINK`
30861        sym_link_dir=`$THEPWDCMD -P`
30862        sym_link_file=`$BASENAME $ISLINK`
30863        let COUNTER=COUNTER+1
30864      done
30865      cd $STARTDIR
30866      TEST_COMPILER=$sym_link_dir/$sym_link_file
30867    fi
30868  fi
30869
30870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30871$as_echo "$TEST_COMPILER" >&6; }
30872  fi
30873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30874$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30875
30876  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30877  if test "x$COMPILER_BASENAME" = "xccache"; then
30878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30879$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30880    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30881    # We want to control ccache invocation ourselves, so ignore this cc and try
30882    # searching again.
30883
30884    # Remove the path to the fake ccache cc from the PATH
30885    RETRY_COMPILER_SAVED_PATH="$PATH"
30886    COMPILER_DIRNAME=`$DIRNAME $CXX`
30887    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30888
30889    # Try again looking for our compiler
30890    if test -n "$ac_tool_prefix"; then
30891  for ac_prog in $TOOLCHAIN_CXX_BINARY
30892  do
30893    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30894set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30896$as_echo_n "checking for $ac_word... " >&6; }
30897if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30898  $as_echo_n "(cached) " >&6
30899else
30900  if test -n "$PROPER_COMPILER_CXX"; then
30901  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30902else
30903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30904for as_dir in $PATH
30905do
30906  IFS=$as_save_IFS
30907  test -z "$as_dir" && as_dir=.
30908    for ac_exec_ext in '' $ac_executable_extensions; do
30909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30910    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30912    break 2
30913  fi
30914done
30915  done
30916IFS=$as_save_IFS
30917
30918fi
30919fi
30920PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30921if test -n "$PROPER_COMPILER_CXX"; then
30922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30923$as_echo "$PROPER_COMPILER_CXX" >&6; }
30924else
30925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30926$as_echo "no" >&6; }
30927fi
30928
30929
30930    test -n "$PROPER_COMPILER_CXX" && break
30931  done
30932fi
30933if test -z "$PROPER_COMPILER_CXX"; then
30934  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30935  for ac_prog in $TOOLCHAIN_CXX_BINARY
30936do
30937  # Extract the first word of "$ac_prog", so it can be a program name with args.
30938set dummy $ac_prog; ac_word=$2
30939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30940$as_echo_n "checking for $ac_word... " >&6; }
30941if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30942  $as_echo_n "(cached) " >&6
30943else
30944  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30945  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30946else
30947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30948for as_dir in $PATH
30949do
30950  IFS=$as_save_IFS
30951  test -z "$as_dir" && as_dir=.
30952    for ac_exec_ext in '' $ac_executable_extensions; do
30953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30954    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30956    break 2
30957  fi
30958done
30959  done
30960IFS=$as_save_IFS
30961
30962fi
30963fi
30964ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30965if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30967$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30968else
30969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30970$as_echo "no" >&6; }
30971fi
30972
30973
30974  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30975done
30976
30977  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30978    PROPER_COMPILER_CXX=""
30979  else
30980    case $cross_compiling:$ac_tool_warned in
30981yes:)
30982{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30983$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30984ac_tool_warned=yes ;;
30985esac
30986    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30987  fi
30988fi
30989
30990
30991  # Only process if variable expands to non-empty
30992
30993  if test "x$PROPER_COMPILER_CXX" != x; then
30994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30995
30996  # First separate the path from the arguments. This will split at the first
30997  # space.
30998  complete="$PROPER_COMPILER_CXX"
30999  path="${complete%% *}"
31000  tmp="$complete EOL"
31001  arguments="${tmp#* }"
31002
31003  # Input might be given as Windows format, start by converting to
31004  # unix format.
31005  new_path=`$CYGPATH -u "$path"`
31006
31007  # Now try to locate executable using which
31008  new_path=`$WHICH "$new_path" 2> /dev/null`
31009  # bat and cmd files are not always considered executable in cygwin causing which
31010  # to not find them
31011  if test "x$new_path" = x \
31012      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31013      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31014    new_path=`$CYGPATH -u "$path"`
31015  fi
31016  if test "x$new_path" = x; then
31017    # Oops. Which didn't find the executable.
31018    # The splitting of arguments from the executable at a space might have been incorrect,
31019    # since paths with space are more likely in Windows. Give it another try with the whole
31020    # argument.
31021    path="$complete"
31022    arguments="EOL"
31023    new_path=`$CYGPATH -u "$path"`
31024    new_path=`$WHICH "$new_path" 2> /dev/null`
31025    # bat and cmd files are not always considered executable in cygwin causing which
31026    # to not find them
31027    if test "x$new_path" = x \
31028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31030      new_path=`$CYGPATH -u "$path"`
31031    fi
31032    if test "x$new_path" = x; then
31033      # It's still not found. Now this is an unrecoverable error.
31034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31035$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31036      has_space=`$ECHO "$complete" | $GREP " "`
31037      if test "x$has_space" != x; then
31038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31040      fi
31041      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31042    fi
31043  fi
31044
31045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31048  # "foo.exe" is OK but "foo" is an error.
31049  #
31050  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31051  # It is also a way to make sure we got the proper file name for the real test later on.
31052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31053  if test "x$test_shortpath" = x; then
31054    # Short path failed, file does not exist as specified.
31055    # Try adding .exe or .cmd
31056    if test -f "${new_path}.exe"; then
31057      input_to_shortpath="${new_path}.exe"
31058    elif test -f "${new_path}.cmd"; then
31059      input_to_shortpath="${new_path}.cmd"
31060    else
31061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31062$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31063      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31064$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31065      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31066    fi
31067  else
31068    input_to_shortpath="$new_path"
31069  fi
31070
31071  # Call helper function which possibly converts this using DOS-style short mode.
31072  # If so, the updated path is stored in $new_path.
31073  new_path="$input_to_shortpath"
31074
31075  input_path="$input_to_shortpath"
31076  # Check if we need to convert this using DOS-style short mode. If the path
31077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31078  # take no chances and rewrite it.
31079  # Note: m4 eats our [], so we need to use [ and ] instead.
31080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31081  if test "x$has_forbidden_chars" != x; then
31082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31086      # Going to short mode and back again did indeed matter. Since short mode is
31087      # case insensitive, let's make it lowercase to improve readability.
31088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31089      # Now convert it back to Unix-style (cygpath)
31090      input_path=`$CYGPATH -u "$shortmode_path"`
31091      new_path="$input_path"
31092    fi
31093  fi
31094
31095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31096  if test "x$test_cygdrive_prefix" = x; then
31097    # As a simple fix, exclude /usr/bin since it's not a real path.
31098    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31100      # a path prefixed by /cygdrive for fixpath to work.
31101      new_path="$CYGWIN_ROOT_PATH$input_path"
31102    fi
31103  fi
31104
31105  # remove trailing .exe if any
31106  new_path="${new_path/%.exe/}"
31107
31108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31109
31110  # First separate the path from the arguments. This will split at the first
31111  # space.
31112  complete="$PROPER_COMPILER_CXX"
31113  path="${complete%% *}"
31114  tmp="$complete EOL"
31115  arguments="${tmp#* }"
31116
31117  # Input might be given as Windows format, start by converting to
31118  # unix format.
31119  new_path="$path"
31120
31121  windows_path="$new_path"
31122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31123    unix_path=`$CYGPATH -u "$windows_path"`
31124    new_path="$unix_path"
31125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31127    new_path="$unix_path"
31128  fi
31129
31130
31131  # Now try to locate executable using which
31132  new_path=`$WHICH "$new_path" 2> /dev/null`
31133
31134  if test "x$new_path" = x; then
31135    # Oops. Which didn't find the executable.
31136    # The splitting of arguments from the executable at a space might have been incorrect,
31137    # since paths with space are more likely in Windows. Give it another try with the whole
31138    # argument.
31139    path="$complete"
31140    arguments="EOL"
31141    new_path="$path"
31142
31143  windows_path="$new_path"
31144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31145    unix_path=`$CYGPATH -u "$windows_path"`
31146    new_path="$unix_path"
31147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31149    new_path="$unix_path"
31150  fi
31151
31152
31153    new_path=`$WHICH "$new_path" 2> /dev/null`
31154    # bat and cmd files are not always considered executable in MSYS causing which
31155    # to not find them
31156    if test "x$new_path" = x \
31157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31159      new_path="$path"
31160
31161  windows_path="$new_path"
31162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31163    unix_path=`$CYGPATH -u "$windows_path"`
31164    new_path="$unix_path"
31165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31167    new_path="$unix_path"
31168  fi
31169
31170    fi
31171
31172    if test "x$new_path" = x; then
31173      # It's still not found. Now this is an unrecoverable error.
31174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31175$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31176      has_space=`$ECHO "$complete" | $GREP " "`
31177      if test "x$has_space" != x; then
31178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31180      fi
31181      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31182    fi
31183  fi
31184
31185  # Now new_path has a complete unix path to the binary
31186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31187    # Keep paths in /bin as-is, but remove trailing .exe if any
31188    new_path="${new_path/%.exe/}"
31189    # Do not save /bin paths to all_fixpath_prefixes!
31190  else
31191    # Not in mixed or Windows style, start by that.
31192    new_path=`cmd //c echo $new_path`
31193
31194  input_path="$new_path"
31195  # Check if we need to convert this using DOS-style short mode. If the path
31196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31197  # take no chances and rewrite it.
31198  # Note: m4 eats our [], so we need to use [ and ] instead.
31199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31200  if test "x$has_forbidden_chars" != x; then
31201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31203  fi
31204
31205    # Output is in $new_path
31206
31207  windows_path="$new_path"
31208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31209    unix_path=`$CYGPATH -u "$windows_path"`
31210    new_path="$unix_path"
31211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31213    new_path="$unix_path"
31214  fi
31215
31216    # remove trailing .exe if any
31217    new_path="${new_path/%.exe/}"
31218
31219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31221  fi
31222
31223    else
31224      # We're on a unix platform. Hooray! :)
31225      # First separate the path from the arguments. This will split at the first
31226      # space.
31227      complete="$PROPER_COMPILER_CXX"
31228      path="${complete%% *}"
31229      tmp="$complete EOL"
31230      arguments="${tmp#* }"
31231
31232      # Cannot rely on the command "which" here since it doesn't always work.
31233      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31234      if test -z "$is_absolute_path"; then
31235        # Path to executable is not absolute. Find it.
31236        IFS_save="$IFS"
31237        IFS=:
31238        for p in $PATH; do
31239          if test -f "$p/$path" && test -x "$p/$path"; then
31240            new_path="$p/$path"
31241            break
31242          fi
31243        done
31244        IFS="$IFS_save"
31245      else
31246        # This is an absolute path, we can use it without further modifications.
31247        new_path="$path"
31248      fi
31249
31250      if test "x$new_path" = x; then
31251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31252$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31253        has_space=`$ECHO "$complete" | $GREP " "`
31254        if test "x$has_space" != x; then
31255          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31257        fi
31258        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31259      fi
31260    fi
31261
31262    # Now join together the path and the arguments once again
31263    if test "x$arguments" != xEOL; then
31264      new_complete="$new_path ${arguments% *}"
31265    else
31266      new_complete="$new_path"
31267    fi
31268
31269    if test "x$complete" != "x$new_complete"; then
31270      PROPER_COMPILER_CXX="$new_complete"
31271      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31272$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31273    fi
31274  fi
31275
31276    PATH="$RETRY_COMPILER_SAVED_PATH"
31277
31278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31279$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31280
31281  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31282    # Follow a chain of symbolic links. Use readlink
31283    # where it exists, else fall back to horribly
31284    # complicated shell code.
31285    if test "x$READLINK_TESTED" != yes; then
31286      # On MacOSX there is a readlink tool with a different
31287      # purpose than the GNU readlink tool. Check the found readlink.
31288      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31289      if test "x$ISGNU" = x; then
31290        # A readlink that we do not know how to use.
31291        # Are there other non-GNU readlinks out there?
31292        READLINK_TESTED=yes
31293        READLINK=
31294      fi
31295    fi
31296
31297    if test "x$READLINK" != x; then
31298      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31299    else
31300      # Save the current directory for restoring afterwards
31301      STARTDIR=$PWD
31302      COUNTER=0
31303      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31304      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31305      cd $sym_link_dir
31306      # Use -P flag to resolve symlinks in directories.
31307      cd `$THEPWDCMD -P`
31308      sym_link_dir=`$THEPWDCMD -P`
31309      # Resolve file symlinks
31310      while test $COUNTER -lt 20; do
31311        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31312        if test "x$ISLINK" == x; then
31313          # This is not a symbolic link! We are done!
31314          break
31315        fi
31316        # Again resolve directory symlinks since the target of the just found
31317        # link could be in a different directory
31318        cd `$DIRNAME $ISLINK`
31319        sym_link_dir=`$THEPWDCMD -P`
31320        sym_link_file=`$BASENAME $ISLINK`
31321        let COUNTER=COUNTER+1
31322      done
31323      cd $STARTDIR
31324      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31325    fi
31326  fi
31327
31328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31329$as_echo "$PROPER_COMPILER_CXX" >&6; }
31330    CXX="$PROPER_COMPILER_CXX"
31331  else
31332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31333$as_echo "no, keeping CXX" >&6; }
31334  fi
31335
31336
31337  COMPILER=$CXX
31338  COMPILER_NAME=$COMPILER_NAME
31339
31340  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31341    # cc -V output typically looks like
31342    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31343    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31344    # Check that this is likely to be the Solaris Studio cc.
31345    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31346    if test $? -ne 0; then
31347      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31348      { $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
31349$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31350      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31351$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31352      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31353$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31354      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31355    fi
31356    # Remove usage instructions (if present), and
31357    # collapse compiler output into a single line
31358    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31359        $SED -e 's/ *[Uu]sage:.*//'`
31360    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31361        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31362  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31363    # xlc -qversion output typically looks like
31364    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31365    #     Version: 11.01.0000.0015
31366    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31367    # Check that this is likely to be the IBM XL C compiler.
31368    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31369    if test $? -ne 0; then
31370      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31371      { $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
31372$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31373      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31374$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31375      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31376$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31377      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31378    fi
31379    # Collapse compiler output into a single line
31380    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31381    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31382        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31383  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31384    # There is no specific version flag, but all output starts with a version string.
31385    # First line typically looks something like:
31386    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31387    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31388    # Check that this is likely to be Microsoft CL.EXE.
31389    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31390    if test $? -ne 0; then
31391      { $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
31392$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31393      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31394$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31395      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31396    fi
31397    # Collapse compiler output into a single line
31398    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31399    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31400        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31401  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31402    # gcc --version output typically looks like
31403    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31404    #     Copyright (C) 2013 Free Software Foundation, Inc.
31405    #     This is free software; see the source for copying conditions.  There is NO
31406    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31407    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31408    # Check that this is likely to be GCC.
31409    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31410    if test $? -ne 0; then
31411      { $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
31412$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31413      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31414$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31415      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31416    fi
31417    # Remove Copyright and legalese from version string, and
31418    # collapse into a single line
31419    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31420        $SED -e 's/ *Copyright .*//'`
31421    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31422        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31423  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31424    # clang --version output typically looks like
31425    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31426    #    clang version 3.3 (tags/RELEASE_33/final)
31427    # or
31428    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31429    #    Target: x86_64-pc-linux-gnu
31430    #    Thread model: posix
31431    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31432    # Check that this is likely to be clang
31433    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31434    if test $? -ne 0; then
31435      { $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
31436$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31437      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31438$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31439      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31440    fi
31441    # Collapse compiler output into a single line
31442    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31443    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31444        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31445  else
31446      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31447  fi
31448  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31449  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31450  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31451  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31452
31453  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31454$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31455
31456
31457  # Now that we have resolved CXX ourself, let autoconf have its go at it
31458  ac_ext=cpp
31459ac_cpp='$CXXCPP $CPPFLAGS'
31460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31463if test -z "$CXX"; then
31464  if test -n "$CCC"; then
31465    CXX=$CCC
31466  else
31467    if test -n "$ac_tool_prefix"; then
31468  for ac_prog in $CXX
31469  do
31470    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31471set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31473$as_echo_n "checking for $ac_word... " >&6; }
31474if ${ac_cv_prog_CXX+:} false; then :
31475  $as_echo_n "(cached) " >&6
31476else
31477  if test -n "$CXX"; then
31478  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31479else
31480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31481for as_dir in $PATH
31482do
31483  IFS=$as_save_IFS
31484  test -z "$as_dir" && as_dir=.
31485    for ac_exec_ext in '' $ac_executable_extensions; do
31486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31487    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31489    break 2
31490  fi
31491done
31492  done
31493IFS=$as_save_IFS
31494
31495fi
31496fi
31497CXX=$ac_cv_prog_CXX
31498if test -n "$CXX"; then
31499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31500$as_echo "$CXX" >&6; }
31501else
31502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31503$as_echo "no" >&6; }
31504fi
31505
31506
31507    test -n "$CXX" && break
31508  done
31509fi
31510if test -z "$CXX"; then
31511  ac_ct_CXX=$CXX
31512  for ac_prog in $CXX
31513do
31514  # Extract the first word of "$ac_prog", so it can be a program name with args.
31515set dummy $ac_prog; ac_word=$2
31516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31517$as_echo_n "checking for $ac_word... " >&6; }
31518if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31519  $as_echo_n "(cached) " >&6
31520else
31521  if test -n "$ac_ct_CXX"; then
31522  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31523else
31524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31525for as_dir in $PATH
31526do
31527  IFS=$as_save_IFS
31528  test -z "$as_dir" && as_dir=.
31529    for ac_exec_ext in '' $ac_executable_extensions; do
31530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31531    ac_cv_prog_ac_ct_CXX="$ac_prog"
31532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31533    break 2
31534  fi
31535done
31536  done
31537IFS=$as_save_IFS
31538
31539fi
31540fi
31541ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31542if test -n "$ac_ct_CXX"; then
31543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31544$as_echo "$ac_ct_CXX" >&6; }
31545else
31546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31547$as_echo "no" >&6; }
31548fi
31549
31550
31551  test -n "$ac_ct_CXX" && break
31552done
31553
31554  if test "x$ac_ct_CXX" = x; then
31555    CXX="g++"
31556  else
31557    case $cross_compiling:$ac_tool_warned in
31558yes:)
31559{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31560$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31561ac_tool_warned=yes ;;
31562esac
31563    CXX=$ac_ct_CXX
31564  fi
31565fi
31566
31567  fi
31568fi
31569# Provide some information about the compiler.
31570$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31571set X $ac_compile
31572ac_compiler=$2
31573for ac_option in --version -v -V -qversion; do
31574  { { ac_try="$ac_compiler $ac_option >&5"
31575case "(($ac_try" in
31576  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31577  *) ac_try_echo=$ac_try;;
31578esac
31579eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31580$as_echo "$ac_try_echo"; } >&5
31581  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31582  ac_status=$?
31583  if test -s conftest.err; then
31584    sed '10a\
31585... rest of stderr output deleted ...
31586         10q' conftest.err >conftest.er1
31587    cat conftest.er1 >&5
31588  fi
31589  rm -f conftest.er1 conftest.err
31590  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31591  test $ac_status = 0; }
31592done
31593
31594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31595$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31596if ${ac_cv_cxx_compiler_gnu+:} false; then :
31597  $as_echo_n "(cached) " >&6
31598else
31599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31600/* end confdefs.h.  */
31601
31602int
31603main ()
31604{
31605#ifndef __GNUC__
31606       choke me
31607#endif
31608
31609  ;
31610  return 0;
31611}
31612_ACEOF
31613if ac_fn_cxx_try_compile "$LINENO"; then :
31614  ac_compiler_gnu=yes
31615else
31616  ac_compiler_gnu=no
31617fi
31618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31619ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31620
31621fi
31622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31623$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31624if test $ac_compiler_gnu = yes; then
31625  GXX=yes
31626else
31627  GXX=
31628fi
31629ac_test_CXXFLAGS=${CXXFLAGS+set}
31630ac_save_CXXFLAGS=$CXXFLAGS
31631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31632$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31633if ${ac_cv_prog_cxx_g+:} false; then :
31634  $as_echo_n "(cached) " >&6
31635else
31636  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31637   ac_cxx_werror_flag=yes
31638   ac_cv_prog_cxx_g=no
31639   CXXFLAGS="-g"
31640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31641/* end confdefs.h.  */
31642
31643int
31644main ()
31645{
31646
31647  ;
31648  return 0;
31649}
31650_ACEOF
31651if ac_fn_cxx_try_compile "$LINENO"; then :
31652  ac_cv_prog_cxx_g=yes
31653else
31654  CXXFLAGS=""
31655      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31656/* end confdefs.h.  */
31657
31658int
31659main ()
31660{
31661
31662  ;
31663  return 0;
31664}
31665_ACEOF
31666if ac_fn_cxx_try_compile "$LINENO"; then :
31667
31668else
31669  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31670	 CXXFLAGS="-g"
31671	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31672/* end confdefs.h.  */
31673
31674int
31675main ()
31676{
31677
31678  ;
31679  return 0;
31680}
31681_ACEOF
31682if ac_fn_cxx_try_compile "$LINENO"; then :
31683  ac_cv_prog_cxx_g=yes
31684fi
31685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31686fi
31687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31688fi
31689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31690   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31691fi
31692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31693$as_echo "$ac_cv_prog_cxx_g" >&6; }
31694if test "$ac_test_CXXFLAGS" = set; then
31695  CXXFLAGS=$ac_save_CXXFLAGS
31696elif test $ac_cv_prog_cxx_g = yes; then
31697  if test "$GXX" = yes; then
31698    CXXFLAGS="-g -O2"
31699  else
31700    CXXFLAGS="-g"
31701  fi
31702else
31703  if test "$GXX" = yes; then
31704    CXXFLAGS="-O2"
31705  else
31706    CXXFLAGS=
31707  fi
31708fi
31709ac_ext=cpp
31710ac_cpp='$CXXCPP $CPPFLAGS'
31711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31714
31715
31716  #
31717  # Setup the preprocessor (CPP and CXXCPP)
31718  #
31719  ac_ext=c
31720ac_cpp='$CPP $CPPFLAGS'
31721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31723ac_compiler_gnu=$ac_cv_c_compiler_gnu
31724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31725$as_echo_n "checking how to run the C preprocessor... " >&6; }
31726# On Suns, sometimes $CPP names a directory.
31727if test -n "$CPP" && test -d "$CPP"; then
31728  CPP=
31729fi
31730if test -z "$CPP"; then
31731  if ${ac_cv_prog_CPP+:} false; then :
31732  $as_echo_n "(cached) " >&6
31733else
31734      # Double quotes because CPP needs to be expanded
31735    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31736    do
31737      ac_preproc_ok=false
31738for ac_c_preproc_warn_flag in '' yes
31739do
31740  # Use a header file that comes with gcc, so configuring glibc
31741  # with a fresh cross-compiler works.
31742  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31743  # <limits.h> exists even on freestanding compilers.
31744  # On the NeXT, cc -E runs the code through the compiler's parser,
31745  # not just through cpp. "Syntax error" is here to catch this case.
31746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31747/* end confdefs.h.  */
31748#ifdef __STDC__
31749# include <limits.h>
31750#else
31751# include <assert.h>
31752#endif
31753		     Syntax error
31754_ACEOF
31755if ac_fn_c_try_cpp "$LINENO"; then :
31756
31757else
31758  # Broken: fails on valid input.
31759continue
31760fi
31761rm -f conftest.err conftest.i conftest.$ac_ext
31762
31763  # OK, works on sane cases.  Now check whether nonexistent headers
31764  # can be detected and how.
31765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31766/* end confdefs.h.  */
31767#include <ac_nonexistent.h>
31768_ACEOF
31769if ac_fn_c_try_cpp "$LINENO"; then :
31770  # Broken: success on invalid input.
31771continue
31772else
31773  # Passes both tests.
31774ac_preproc_ok=:
31775break
31776fi
31777rm -f conftest.err conftest.i conftest.$ac_ext
31778
31779done
31780# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31781rm -f conftest.i conftest.err conftest.$ac_ext
31782if $ac_preproc_ok; then :
31783  break
31784fi
31785
31786    done
31787    ac_cv_prog_CPP=$CPP
31788
31789fi
31790  CPP=$ac_cv_prog_CPP
31791else
31792  ac_cv_prog_CPP=$CPP
31793fi
31794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31795$as_echo "$CPP" >&6; }
31796ac_preproc_ok=false
31797for ac_c_preproc_warn_flag in '' yes
31798do
31799  # Use a header file that comes with gcc, so configuring glibc
31800  # with a fresh cross-compiler works.
31801  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31802  # <limits.h> exists even on freestanding compilers.
31803  # On the NeXT, cc -E runs the code through the compiler's parser,
31804  # not just through cpp. "Syntax error" is here to catch this case.
31805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31806/* end confdefs.h.  */
31807#ifdef __STDC__
31808# include <limits.h>
31809#else
31810# include <assert.h>
31811#endif
31812		     Syntax error
31813_ACEOF
31814if ac_fn_c_try_cpp "$LINENO"; then :
31815
31816else
31817  # Broken: fails on valid input.
31818continue
31819fi
31820rm -f conftest.err conftest.i conftest.$ac_ext
31821
31822  # OK, works on sane cases.  Now check whether nonexistent headers
31823  # can be detected and how.
31824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31825/* end confdefs.h.  */
31826#include <ac_nonexistent.h>
31827_ACEOF
31828if ac_fn_c_try_cpp "$LINENO"; then :
31829  # Broken: success on invalid input.
31830continue
31831else
31832  # Passes both tests.
31833ac_preproc_ok=:
31834break
31835fi
31836rm -f conftest.err conftest.i conftest.$ac_ext
31837
31838done
31839# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31840rm -f conftest.i conftest.err conftest.$ac_ext
31841if $ac_preproc_ok; then :
31842
31843else
31844  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31846as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31847See \`config.log' for more details" "$LINENO" 5; }
31848fi
31849
31850ac_ext=cpp
31851ac_cpp='$CXXCPP $CPPFLAGS'
31852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31853ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31855
31856
31857  # Only process if variable expands to non-empty
31858
31859  if test "x$CPP" != x; then
31860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31861
31862  # First separate the path from the arguments. This will split at the first
31863  # space.
31864  complete="$CPP"
31865  path="${complete%% *}"
31866  tmp="$complete EOL"
31867  arguments="${tmp#* }"
31868
31869  # Input might be given as Windows format, start by converting to
31870  # unix format.
31871  new_path=`$CYGPATH -u "$path"`
31872
31873  # Now try to locate executable using which
31874  new_path=`$WHICH "$new_path" 2> /dev/null`
31875  # bat and cmd files are not always considered executable in cygwin causing which
31876  # to not find them
31877  if test "x$new_path" = x \
31878      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31879      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31880    new_path=`$CYGPATH -u "$path"`
31881  fi
31882  if test "x$new_path" = x; then
31883    # Oops. Which didn't find the executable.
31884    # The splitting of arguments from the executable at a space might have been incorrect,
31885    # since paths with space are more likely in Windows. Give it another try with the whole
31886    # argument.
31887    path="$complete"
31888    arguments="EOL"
31889    new_path=`$CYGPATH -u "$path"`
31890    new_path=`$WHICH "$new_path" 2> /dev/null`
31891    # bat and cmd files are not always considered executable in cygwin causing which
31892    # to not find them
31893    if test "x$new_path" = x \
31894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31896      new_path=`$CYGPATH -u "$path"`
31897    fi
31898    if test "x$new_path" = x; then
31899      # It's still not found. Now this is an unrecoverable error.
31900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31901$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31902      has_space=`$ECHO "$complete" | $GREP " "`
31903      if test "x$has_space" != x; then
31904        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31905$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31906      fi
31907      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31908    fi
31909  fi
31910
31911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31914  # "foo.exe" is OK but "foo" is an error.
31915  #
31916  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31917  # It is also a way to make sure we got the proper file name for the real test later on.
31918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31919  if test "x$test_shortpath" = x; then
31920    # Short path failed, file does not exist as specified.
31921    # Try adding .exe or .cmd
31922    if test -f "${new_path}.exe"; then
31923      input_to_shortpath="${new_path}.exe"
31924    elif test -f "${new_path}.cmd"; then
31925      input_to_shortpath="${new_path}.cmd"
31926    else
31927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31928$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31929      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31930$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31931      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31932    fi
31933  else
31934    input_to_shortpath="$new_path"
31935  fi
31936
31937  # Call helper function which possibly converts this using DOS-style short mode.
31938  # If so, the updated path is stored in $new_path.
31939  new_path="$input_to_shortpath"
31940
31941  input_path="$input_to_shortpath"
31942  # Check if we need to convert this using DOS-style short mode. If the path
31943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31944  # take no chances and rewrite it.
31945  # Note: m4 eats our [], so we need to use [ and ] instead.
31946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31947  if test "x$has_forbidden_chars" != x; then
31948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31952      # Going to short mode and back again did indeed matter. Since short mode is
31953      # case insensitive, let's make it lowercase to improve readability.
31954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31955      # Now convert it back to Unix-style (cygpath)
31956      input_path=`$CYGPATH -u "$shortmode_path"`
31957      new_path="$input_path"
31958    fi
31959  fi
31960
31961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31962  if test "x$test_cygdrive_prefix" = x; then
31963    # As a simple fix, exclude /usr/bin since it's not a real path.
31964    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31966      # a path prefixed by /cygdrive for fixpath to work.
31967      new_path="$CYGWIN_ROOT_PATH$input_path"
31968    fi
31969  fi
31970
31971  # remove trailing .exe if any
31972  new_path="${new_path/%.exe/}"
31973
31974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31975
31976  # First separate the path from the arguments. This will split at the first
31977  # space.
31978  complete="$CPP"
31979  path="${complete%% *}"
31980  tmp="$complete EOL"
31981  arguments="${tmp#* }"
31982
31983  # Input might be given as Windows format, start by converting to
31984  # unix format.
31985  new_path="$path"
31986
31987  windows_path="$new_path"
31988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31989    unix_path=`$CYGPATH -u "$windows_path"`
31990    new_path="$unix_path"
31991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31993    new_path="$unix_path"
31994  fi
31995
31996
31997  # Now try to locate executable using which
31998  new_path=`$WHICH "$new_path" 2> /dev/null`
31999
32000  if test "x$new_path" = x; then
32001    # Oops. Which didn't find the executable.
32002    # The splitting of arguments from the executable at a space might have been incorrect,
32003    # since paths with space are more likely in Windows. Give it another try with the whole
32004    # argument.
32005    path="$complete"
32006    arguments="EOL"
32007    new_path="$path"
32008
32009  windows_path="$new_path"
32010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32011    unix_path=`$CYGPATH -u "$windows_path"`
32012    new_path="$unix_path"
32013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32015    new_path="$unix_path"
32016  fi
32017
32018
32019    new_path=`$WHICH "$new_path" 2> /dev/null`
32020    # bat and cmd files are not always considered executable in MSYS causing which
32021    # to not find them
32022    if test "x$new_path" = x \
32023        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32024        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32025      new_path="$path"
32026
32027  windows_path="$new_path"
32028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32029    unix_path=`$CYGPATH -u "$windows_path"`
32030    new_path="$unix_path"
32031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32033    new_path="$unix_path"
32034  fi
32035
32036    fi
32037
32038    if test "x$new_path" = x; then
32039      # It's still not found. Now this is an unrecoverable error.
32040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32041$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32042      has_space=`$ECHO "$complete" | $GREP " "`
32043      if test "x$has_space" != x; then
32044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32046      fi
32047      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32048    fi
32049  fi
32050
32051  # Now new_path has a complete unix path to the binary
32052  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32053    # Keep paths in /bin as-is, but remove trailing .exe if any
32054    new_path="${new_path/%.exe/}"
32055    # Do not save /bin paths to all_fixpath_prefixes!
32056  else
32057    # Not in mixed or Windows style, start by that.
32058    new_path=`cmd //c echo $new_path`
32059
32060  input_path="$new_path"
32061  # Check if we need to convert this using DOS-style short mode. If the path
32062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32063  # take no chances and rewrite it.
32064  # Note: m4 eats our [], so we need to use [ and ] instead.
32065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32066  if test "x$has_forbidden_chars" != x; then
32067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32069  fi
32070
32071    # Output is in $new_path
32072
32073  windows_path="$new_path"
32074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32075    unix_path=`$CYGPATH -u "$windows_path"`
32076    new_path="$unix_path"
32077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32079    new_path="$unix_path"
32080  fi
32081
32082    # remove trailing .exe if any
32083    new_path="${new_path/%.exe/}"
32084
32085    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32086    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32087  fi
32088
32089    else
32090      # We're on a unix platform. Hooray! :)
32091      # First separate the path from the arguments. This will split at the first
32092      # space.
32093      complete="$CPP"
32094      path="${complete%% *}"
32095      tmp="$complete EOL"
32096      arguments="${tmp#* }"
32097
32098      # Cannot rely on the command "which" here since it doesn't always work.
32099      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32100      if test -z "$is_absolute_path"; then
32101        # Path to executable is not absolute. Find it.
32102        IFS_save="$IFS"
32103        IFS=:
32104        for p in $PATH; do
32105          if test -f "$p/$path" && test -x "$p/$path"; then
32106            new_path="$p/$path"
32107            break
32108          fi
32109        done
32110        IFS="$IFS_save"
32111      else
32112        # This is an absolute path, we can use it without further modifications.
32113        new_path="$path"
32114      fi
32115
32116      if test "x$new_path" = x; then
32117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32118$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32119        has_space=`$ECHO "$complete" | $GREP " "`
32120        if test "x$has_space" != x; then
32121          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32122$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32123        fi
32124        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32125      fi
32126    fi
32127
32128    # Now join together the path and the arguments once again
32129    if test "x$arguments" != xEOL; then
32130      new_complete="$new_path ${arguments% *}"
32131    else
32132      new_complete="$new_path"
32133    fi
32134
32135    if test "x$complete" != "x$new_complete"; then
32136      CPP="$new_complete"
32137      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32138$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32139    fi
32140  fi
32141
32142  ac_ext=cpp
32143ac_cpp='$CXXCPP $CPPFLAGS'
32144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32148$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32149if test -z "$CXXCPP"; then
32150  if ${ac_cv_prog_CXXCPP+:} false; then :
32151  $as_echo_n "(cached) " >&6
32152else
32153      # Double quotes because CXXCPP needs to be expanded
32154    for CXXCPP in "$CXX -E" "/lib/cpp"
32155    do
32156      ac_preproc_ok=false
32157for ac_cxx_preproc_warn_flag in '' yes
32158do
32159  # Use a header file that comes with gcc, so configuring glibc
32160  # with a fresh cross-compiler works.
32161  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32162  # <limits.h> exists even on freestanding compilers.
32163  # On the NeXT, cc -E runs the code through the compiler's parser,
32164  # not just through cpp. "Syntax error" is here to catch this case.
32165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32166/* end confdefs.h.  */
32167#ifdef __STDC__
32168# include <limits.h>
32169#else
32170# include <assert.h>
32171#endif
32172		     Syntax error
32173_ACEOF
32174if ac_fn_cxx_try_cpp "$LINENO"; then :
32175
32176else
32177  # Broken: fails on valid input.
32178continue
32179fi
32180rm -f conftest.err conftest.i conftest.$ac_ext
32181
32182  # OK, works on sane cases.  Now check whether nonexistent headers
32183  # can be detected and how.
32184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32185/* end confdefs.h.  */
32186#include <ac_nonexistent.h>
32187_ACEOF
32188if ac_fn_cxx_try_cpp "$LINENO"; then :
32189  # Broken: success on invalid input.
32190continue
32191else
32192  # Passes both tests.
32193ac_preproc_ok=:
32194break
32195fi
32196rm -f conftest.err conftest.i conftest.$ac_ext
32197
32198done
32199# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32200rm -f conftest.i conftest.err conftest.$ac_ext
32201if $ac_preproc_ok; then :
32202  break
32203fi
32204
32205    done
32206    ac_cv_prog_CXXCPP=$CXXCPP
32207
32208fi
32209  CXXCPP=$ac_cv_prog_CXXCPP
32210else
32211  ac_cv_prog_CXXCPP=$CXXCPP
32212fi
32213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32214$as_echo "$CXXCPP" >&6; }
32215ac_preproc_ok=false
32216for ac_cxx_preproc_warn_flag in '' yes
32217do
32218  # Use a header file that comes with gcc, so configuring glibc
32219  # with a fresh cross-compiler works.
32220  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32221  # <limits.h> exists even on freestanding compilers.
32222  # On the NeXT, cc -E runs the code through the compiler's parser,
32223  # not just through cpp. "Syntax error" is here to catch this case.
32224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32225/* end confdefs.h.  */
32226#ifdef __STDC__
32227# include <limits.h>
32228#else
32229# include <assert.h>
32230#endif
32231		     Syntax error
32232_ACEOF
32233if ac_fn_cxx_try_cpp "$LINENO"; then :
32234
32235else
32236  # Broken: fails on valid input.
32237continue
32238fi
32239rm -f conftest.err conftest.i conftest.$ac_ext
32240
32241  # OK, works on sane cases.  Now check whether nonexistent headers
32242  # can be detected and how.
32243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32244/* end confdefs.h.  */
32245#include <ac_nonexistent.h>
32246_ACEOF
32247if ac_fn_cxx_try_cpp "$LINENO"; then :
32248  # Broken: success on invalid input.
32249continue
32250else
32251  # Passes both tests.
32252ac_preproc_ok=:
32253break
32254fi
32255rm -f conftest.err conftest.i conftest.$ac_ext
32256
32257done
32258# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32259rm -f conftest.i conftest.err conftest.$ac_ext
32260if $ac_preproc_ok; then :
32261
32262else
32263  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32265as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32266See \`config.log' for more details" "$LINENO" 5; }
32267fi
32268
32269ac_ext=cpp
32270ac_cpp='$CXXCPP $CPPFLAGS'
32271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32274
32275
32276  # Only process if variable expands to non-empty
32277
32278  if test "x$CXXCPP" != x; then
32279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32280
32281  # First separate the path from the arguments. This will split at the first
32282  # space.
32283  complete="$CXXCPP"
32284  path="${complete%% *}"
32285  tmp="$complete EOL"
32286  arguments="${tmp#* }"
32287
32288  # Input might be given as Windows format, start by converting to
32289  # unix format.
32290  new_path=`$CYGPATH -u "$path"`
32291
32292  # Now try to locate executable using which
32293  new_path=`$WHICH "$new_path" 2> /dev/null`
32294  # bat and cmd files are not always considered executable in cygwin causing which
32295  # to not find them
32296  if test "x$new_path" = x \
32297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32299    new_path=`$CYGPATH -u "$path"`
32300  fi
32301  if test "x$new_path" = x; then
32302    # Oops. Which didn't find the executable.
32303    # The splitting of arguments from the executable at a space might have been incorrect,
32304    # since paths with space are more likely in Windows. Give it another try with the whole
32305    # argument.
32306    path="$complete"
32307    arguments="EOL"
32308    new_path=`$CYGPATH -u "$path"`
32309    new_path=`$WHICH "$new_path" 2> /dev/null`
32310    # bat and cmd files are not always considered executable in cygwin causing which
32311    # to not find them
32312    if test "x$new_path" = x \
32313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32315      new_path=`$CYGPATH -u "$path"`
32316    fi
32317    if test "x$new_path" = x; then
32318      # It's still not found. Now this is an unrecoverable error.
32319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32320$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32321      has_space=`$ECHO "$complete" | $GREP " "`
32322      if test "x$has_space" != x; then
32323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32325      fi
32326      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32327    fi
32328  fi
32329
32330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32333  # "foo.exe" is OK but "foo" is an error.
32334  #
32335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32336  # It is also a way to make sure we got the proper file name for the real test later on.
32337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32338  if test "x$test_shortpath" = x; then
32339    # Short path failed, file does not exist as specified.
32340    # Try adding .exe or .cmd
32341    if test -f "${new_path}.exe"; then
32342      input_to_shortpath="${new_path}.exe"
32343    elif test -f "${new_path}.cmd"; then
32344      input_to_shortpath="${new_path}.cmd"
32345    else
32346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32347$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32350      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32351    fi
32352  else
32353    input_to_shortpath="$new_path"
32354  fi
32355
32356  # Call helper function which possibly converts this using DOS-style short mode.
32357  # If so, the updated path is stored in $new_path.
32358  new_path="$input_to_shortpath"
32359
32360  input_path="$input_to_shortpath"
32361  # Check if we need to convert this using DOS-style short mode. If the path
32362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32363  # take no chances and rewrite it.
32364  # Note: m4 eats our [], so we need to use [ and ] instead.
32365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32366  if test "x$has_forbidden_chars" != x; then
32367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32371      # Going to short mode and back again did indeed matter. Since short mode is
32372      # case insensitive, let's make it lowercase to improve readability.
32373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32374      # Now convert it back to Unix-style (cygpath)
32375      input_path=`$CYGPATH -u "$shortmode_path"`
32376      new_path="$input_path"
32377    fi
32378  fi
32379
32380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32381  if test "x$test_cygdrive_prefix" = x; then
32382    # As a simple fix, exclude /usr/bin since it's not a real path.
32383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32385      # a path prefixed by /cygdrive for fixpath to work.
32386      new_path="$CYGWIN_ROOT_PATH$input_path"
32387    fi
32388  fi
32389
32390  # remove trailing .exe if any
32391  new_path="${new_path/%.exe/}"
32392
32393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32394
32395  # First separate the path from the arguments. This will split at the first
32396  # space.
32397  complete="$CXXCPP"
32398  path="${complete%% *}"
32399  tmp="$complete EOL"
32400  arguments="${tmp#* }"
32401
32402  # Input might be given as Windows format, start by converting to
32403  # unix format.
32404  new_path="$path"
32405
32406  windows_path="$new_path"
32407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32408    unix_path=`$CYGPATH -u "$windows_path"`
32409    new_path="$unix_path"
32410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32412    new_path="$unix_path"
32413  fi
32414
32415
32416  # Now try to locate executable using which
32417  new_path=`$WHICH "$new_path" 2> /dev/null`
32418
32419  if test "x$new_path" = x; then
32420    # Oops. Which didn't find the executable.
32421    # The splitting of arguments from the executable at a space might have been incorrect,
32422    # since paths with space are more likely in Windows. Give it another try with the whole
32423    # argument.
32424    path="$complete"
32425    arguments="EOL"
32426    new_path="$path"
32427
32428  windows_path="$new_path"
32429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32430    unix_path=`$CYGPATH -u "$windows_path"`
32431    new_path="$unix_path"
32432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32434    new_path="$unix_path"
32435  fi
32436
32437
32438    new_path=`$WHICH "$new_path" 2> /dev/null`
32439    # bat and cmd files are not always considered executable in MSYS causing which
32440    # to not find them
32441    if test "x$new_path" = x \
32442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32444      new_path="$path"
32445
32446  windows_path="$new_path"
32447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32448    unix_path=`$CYGPATH -u "$windows_path"`
32449    new_path="$unix_path"
32450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32452    new_path="$unix_path"
32453  fi
32454
32455    fi
32456
32457    if test "x$new_path" = x; then
32458      # It's still not found. Now this is an unrecoverable error.
32459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32460$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32461      has_space=`$ECHO "$complete" | $GREP " "`
32462      if test "x$has_space" != x; then
32463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32465      fi
32466      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32467    fi
32468  fi
32469
32470  # Now new_path has a complete unix path to the binary
32471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32472    # Keep paths in /bin as-is, but remove trailing .exe if any
32473    new_path="${new_path/%.exe/}"
32474    # Do not save /bin paths to all_fixpath_prefixes!
32475  else
32476    # Not in mixed or Windows style, start by that.
32477    new_path=`cmd //c echo $new_path`
32478
32479  input_path="$new_path"
32480  # Check if we need to convert this using DOS-style short mode. If the path
32481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32482  # take no chances and rewrite it.
32483  # Note: m4 eats our [], so we need to use [ and ] instead.
32484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32485  if test "x$has_forbidden_chars" != x; then
32486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32488  fi
32489
32490    # Output is in $new_path
32491
32492  windows_path="$new_path"
32493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32494    unix_path=`$CYGPATH -u "$windows_path"`
32495    new_path="$unix_path"
32496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32498    new_path="$unix_path"
32499  fi
32500
32501    # remove trailing .exe if any
32502    new_path="${new_path/%.exe/}"
32503
32504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32506  fi
32507
32508    else
32509      # We're on a unix platform. Hooray! :)
32510      # First separate the path from the arguments. This will split at the first
32511      # space.
32512      complete="$CXXCPP"
32513      path="${complete%% *}"
32514      tmp="$complete EOL"
32515      arguments="${tmp#* }"
32516
32517      # Cannot rely on the command "which" here since it doesn't always work.
32518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32519      if test -z "$is_absolute_path"; then
32520        # Path to executable is not absolute. Find it.
32521        IFS_save="$IFS"
32522        IFS=:
32523        for p in $PATH; do
32524          if test -f "$p/$path" && test -x "$p/$path"; then
32525            new_path="$p/$path"
32526            break
32527          fi
32528        done
32529        IFS="$IFS_save"
32530      else
32531        # This is an absolute path, we can use it without further modifications.
32532        new_path="$path"
32533      fi
32534
32535      if test "x$new_path" = x; then
32536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32537$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32538        has_space=`$ECHO "$complete" | $GREP " "`
32539        if test "x$has_space" != x; then
32540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32542        fi
32543        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32544      fi
32545    fi
32546
32547    # Now join together the path and the arguments once again
32548    if test "x$arguments" != xEOL; then
32549      new_complete="$new_path ${arguments% *}"
32550    else
32551      new_complete="$new_path"
32552    fi
32553
32554    if test "x$complete" != "x$new_complete"; then
32555      CXXCPP="$new_complete"
32556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32557$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32558    fi
32559  fi
32560
32561
32562  #
32563  # Setup the linker (LD)
32564  #
32565  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32566    # In the Microsoft toolchain we have a separate LD command "link".
32567    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32568    # a cygwin program for something completely different.
32569    # Extract the first word of "link", so it can be a program name with args.
32570set dummy link; ac_word=$2
32571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32572$as_echo_n "checking for $ac_word... " >&6; }
32573if ${ac_cv_prog_LD+:} false; then :
32574  $as_echo_n "(cached) " >&6
32575else
32576  if test -n "$LD"; then
32577  ac_cv_prog_LD="$LD" # Let the user override the test.
32578else
32579  ac_prog_rejected=no
32580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32581for as_dir in $PATH
32582do
32583  IFS=$as_save_IFS
32584  test -z "$as_dir" && as_dir=.
32585    for ac_exec_ext in '' $ac_executable_extensions; do
32586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32587    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32588       ac_prog_rejected=yes
32589       continue
32590     fi
32591    ac_cv_prog_LD="link"
32592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32593    break 2
32594  fi
32595done
32596  done
32597IFS=$as_save_IFS
32598
32599if test $ac_prog_rejected = yes; then
32600  # We found a bogon in the path, so make sure we never use it.
32601  set dummy $ac_cv_prog_LD
32602  shift
32603  if test $# != 0; then
32604    # We chose a different compiler from the bogus one.
32605    # However, it has the same basename, so the bogon will be chosen
32606    # first if we set LD to just the basename; use the full file name.
32607    shift
32608    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32609  fi
32610fi
32611fi
32612fi
32613LD=$ac_cv_prog_LD
32614if test -n "$LD"; then
32615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32616$as_echo "$LD" >&6; }
32617else
32618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32619$as_echo "no" >&6; }
32620fi
32621
32622
32623
32624  # Only process if variable expands to non-empty
32625
32626  if test "x$LD" != x; then
32627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32628
32629  # First separate the path from the arguments. This will split at the first
32630  # space.
32631  complete="$LD"
32632  path="${complete%% *}"
32633  tmp="$complete EOL"
32634  arguments="${tmp#* }"
32635
32636  # Input might be given as Windows format, start by converting to
32637  # unix format.
32638  new_path=`$CYGPATH -u "$path"`
32639
32640  # Now try to locate executable using which
32641  new_path=`$WHICH "$new_path" 2> /dev/null`
32642  # bat and cmd files are not always considered executable in cygwin causing which
32643  # to not find them
32644  if test "x$new_path" = x \
32645      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32646      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32647    new_path=`$CYGPATH -u "$path"`
32648  fi
32649  if test "x$new_path" = x; then
32650    # Oops. Which didn't find the executable.
32651    # The splitting of arguments from the executable at a space might have been incorrect,
32652    # since paths with space are more likely in Windows. Give it another try with the whole
32653    # argument.
32654    path="$complete"
32655    arguments="EOL"
32656    new_path=`$CYGPATH -u "$path"`
32657    new_path=`$WHICH "$new_path" 2> /dev/null`
32658    # bat and cmd files are not always considered executable in cygwin causing which
32659    # to not find them
32660    if test "x$new_path" = x \
32661        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32662        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32663      new_path=`$CYGPATH -u "$path"`
32664    fi
32665    if test "x$new_path" = x; then
32666      # It's still not found. Now this is an unrecoverable error.
32667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32668$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32669      has_space=`$ECHO "$complete" | $GREP " "`
32670      if test "x$has_space" != x; then
32671        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32672$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32673      fi
32674      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32675    fi
32676  fi
32677
32678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32681  # "foo.exe" is OK but "foo" is an error.
32682  #
32683  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32684  # It is also a way to make sure we got the proper file name for the real test later on.
32685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32686  if test "x$test_shortpath" = x; then
32687    # Short path failed, file does not exist as specified.
32688    # Try adding .exe or .cmd
32689    if test -f "${new_path}.exe"; then
32690      input_to_shortpath="${new_path}.exe"
32691    elif test -f "${new_path}.cmd"; then
32692      input_to_shortpath="${new_path}.cmd"
32693    else
32694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32695$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32696      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32697$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32698      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32699    fi
32700  else
32701    input_to_shortpath="$new_path"
32702  fi
32703
32704  # Call helper function which possibly converts this using DOS-style short mode.
32705  # If so, the updated path is stored in $new_path.
32706  new_path="$input_to_shortpath"
32707
32708  input_path="$input_to_shortpath"
32709  # Check if we need to convert this using DOS-style short mode. If the path
32710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32711  # take no chances and rewrite it.
32712  # Note: m4 eats our [], so we need to use [ and ] instead.
32713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32714  if test "x$has_forbidden_chars" != x; then
32715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32719      # Going to short mode and back again did indeed matter. Since short mode is
32720      # case insensitive, let's make it lowercase to improve readability.
32721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32722      # Now convert it back to Unix-style (cygpath)
32723      input_path=`$CYGPATH -u "$shortmode_path"`
32724      new_path="$input_path"
32725    fi
32726  fi
32727
32728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32729  if test "x$test_cygdrive_prefix" = x; then
32730    # As a simple fix, exclude /usr/bin since it's not a real path.
32731    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32733      # a path prefixed by /cygdrive for fixpath to work.
32734      new_path="$CYGWIN_ROOT_PATH$input_path"
32735    fi
32736  fi
32737
32738  # remove trailing .exe if any
32739  new_path="${new_path/%.exe/}"
32740
32741    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32742
32743  # First separate the path from the arguments. This will split at the first
32744  # space.
32745  complete="$LD"
32746  path="${complete%% *}"
32747  tmp="$complete EOL"
32748  arguments="${tmp#* }"
32749
32750  # Input might be given as Windows format, start by converting to
32751  # unix format.
32752  new_path="$path"
32753
32754  windows_path="$new_path"
32755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32756    unix_path=`$CYGPATH -u "$windows_path"`
32757    new_path="$unix_path"
32758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32760    new_path="$unix_path"
32761  fi
32762
32763
32764  # Now try to locate executable using which
32765  new_path=`$WHICH "$new_path" 2> /dev/null`
32766
32767  if test "x$new_path" = x; then
32768    # Oops. Which didn't find the executable.
32769    # The splitting of arguments from the executable at a space might have been incorrect,
32770    # since paths with space are more likely in Windows. Give it another try with the whole
32771    # argument.
32772    path="$complete"
32773    arguments="EOL"
32774    new_path="$path"
32775
32776  windows_path="$new_path"
32777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32778    unix_path=`$CYGPATH -u "$windows_path"`
32779    new_path="$unix_path"
32780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32782    new_path="$unix_path"
32783  fi
32784
32785
32786    new_path=`$WHICH "$new_path" 2> /dev/null`
32787    # bat and cmd files are not always considered executable in MSYS causing which
32788    # to not find them
32789    if test "x$new_path" = x \
32790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32792      new_path="$path"
32793
32794  windows_path="$new_path"
32795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32796    unix_path=`$CYGPATH -u "$windows_path"`
32797    new_path="$unix_path"
32798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32800    new_path="$unix_path"
32801  fi
32802
32803    fi
32804
32805    if test "x$new_path" = x; then
32806      # It's still not found. Now this is an unrecoverable error.
32807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32808$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32809      has_space=`$ECHO "$complete" | $GREP " "`
32810      if test "x$has_space" != x; then
32811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32813      fi
32814      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32815    fi
32816  fi
32817
32818  # Now new_path has a complete unix path to the binary
32819  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32820    # Keep paths in /bin as-is, but remove trailing .exe if any
32821    new_path="${new_path/%.exe/}"
32822    # Do not save /bin paths to all_fixpath_prefixes!
32823  else
32824    # Not in mixed or Windows style, start by that.
32825    new_path=`cmd //c echo $new_path`
32826
32827  input_path="$new_path"
32828  # Check if we need to convert this using DOS-style short mode. If the path
32829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32830  # take no chances and rewrite it.
32831  # Note: m4 eats our [], so we need to use [ and ] instead.
32832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32833  if test "x$has_forbidden_chars" != x; then
32834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32836  fi
32837
32838    # Output is in $new_path
32839
32840  windows_path="$new_path"
32841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32842    unix_path=`$CYGPATH -u "$windows_path"`
32843    new_path="$unix_path"
32844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32846    new_path="$unix_path"
32847  fi
32848
32849    # remove trailing .exe if any
32850    new_path="${new_path/%.exe/}"
32851
32852    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32853    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32854  fi
32855
32856    else
32857      # We're on a unix platform. Hooray! :)
32858      # First separate the path from the arguments. This will split at the first
32859      # space.
32860      complete="$LD"
32861      path="${complete%% *}"
32862      tmp="$complete EOL"
32863      arguments="${tmp#* }"
32864
32865      # Cannot rely on the command "which" here since it doesn't always work.
32866      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32867      if test -z "$is_absolute_path"; then
32868        # Path to executable is not absolute. Find it.
32869        IFS_save="$IFS"
32870        IFS=:
32871        for p in $PATH; do
32872          if test -f "$p/$path" && test -x "$p/$path"; then
32873            new_path="$p/$path"
32874            break
32875          fi
32876        done
32877        IFS="$IFS_save"
32878      else
32879        # This is an absolute path, we can use it without further modifications.
32880        new_path="$path"
32881      fi
32882
32883      if test "x$new_path" = x; then
32884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32885$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32886        has_space=`$ECHO "$complete" | $GREP " "`
32887        if test "x$has_space" != x; then
32888          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32889$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32890        fi
32891        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32892      fi
32893    fi
32894
32895    # Now join together the path and the arguments once again
32896    if test "x$arguments" != xEOL; then
32897      new_complete="$new_path ${arguments% *}"
32898    else
32899      new_complete="$new_path"
32900    fi
32901
32902    if test "x$complete" != "x$new_complete"; then
32903      LD="$new_complete"
32904      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32905$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32906    fi
32907  fi
32908
32909    # Verify that we indeed succeeded with this trick.
32910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32911$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32912    "$LD" --version > /dev/null
32913    if test $? -eq 0 ; then
32914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32915$as_echo "no" >&6; }
32916      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32917    else
32918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32919$as_echo "yes" >&6; }
32920    fi
32921    LDCXX="$LD"
32922  else
32923    # All other toolchains use the compiler to link.
32924    LD="$CC"
32925    LDCXX="$CXX"
32926  fi
32927
32928  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32929
32930
32931  #
32932  # Setup the assembler (AS)
32933  #
32934  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32935    # FIXME: should this really be solaris, or solstudio?
32936
32937
32938  # Publish this variable in the help.
32939
32940
32941  if test "x$AS" = x; then
32942    # The variable is not set by user, try to locate tool using the code snippet
32943    for ac_prog in as
32944do
32945  # Extract the first word of "$ac_prog", so it can be a program name with args.
32946set dummy $ac_prog; ac_word=$2
32947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32948$as_echo_n "checking for $ac_word... " >&6; }
32949if ${ac_cv_path_AS+:} false; then :
32950  $as_echo_n "(cached) " >&6
32951else
32952  case $AS in
32953  [\\/]* | ?:[\\/]*)
32954  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32955  ;;
32956  *)
32957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32958for as_dir in $PATH
32959do
32960  IFS=$as_save_IFS
32961  test -z "$as_dir" && as_dir=.
32962    for ac_exec_ext in '' $ac_executable_extensions; do
32963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32964    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32966    break 2
32967  fi
32968done
32969  done
32970IFS=$as_save_IFS
32971
32972  ;;
32973esac
32974fi
32975AS=$ac_cv_path_AS
32976if test -n "$AS"; then
32977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32978$as_echo "$AS" >&6; }
32979else
32980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32981$as_echo "no" >&6; }
32982fi
32983
32984
32985  test -n "$AS" && break
32986done
32987
32988  else
32989    # The variable is set, but is it from the command line or the environment?
32990
32991    # Try to remove the string !AS! from our list.
32992    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32993    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32994      # If it failed, the variable was not from the command line. Ignore it,
32995      # but warn the user (except for BASH, which is always set by the calling BASH).
32996      if test "xAS" != xBASH; then
32997        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32998$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32999      fi
33000      # Try to locate tool using the code snippet
33001      for ac_prog in as
33002do
33003  # Extract the first word of "$ac_prog", so it can be a program name with args.
33004set dummy $ac_prog; ac_word=$2
33005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33006$as_echo_n "checking for $ac_word... " >&6; }
33007if ${ac_cv_path_AS+:} false; then :
33008  $as_echo_n "(cached) " >&6
33009else
33010  case $AS in
33011  [\\/]* | ?:[\\/]*)
33012  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33013  ;;
33014  *)
33015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33016for as_dir in $PATH
33017do
33018  IFS=$as_save_IFS
33019  test -z "$as_dir" && as_dir=.
33020    for ac_exec_ext in '' $ac_executable_extensions; do
33021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33022    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33024    break 2
33025  fi
33026done
33027  done
33028IFS=$as_save_IFS
33029
33030  ;;
33031esac
33032fi
33033AS=$ac_cv_path_AS
33034if test -n "$AS"; then
33035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33036$as_echo "$AS" >&6; }
33037else
33038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33039$as_echo "no" >&6; }
33040fi
33041
33042
33043  test -n "$AS" && break
33044done
33045
33046    else
33047      # If it succeeded, then it was overridden by the user. We will use it
33048      # for the tool.
33049
33050      # First remove it from the list of overridden variables, so we can test
33051      # for unknown variables in the end.
33052      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33053
33054      # Check if the provided tool contains a complete path.
33055      tool_specified="$AS"
33056      tool_basename="${tool_specified##*/}"
33057      if test "x$tool_basename" = "x$tool_specified"; then
33058        # A command without a complete path is provided, search $PATH.
33059        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33060$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33061        # Extract the first word of "$tool_basename", so it can be a program name with args.
33062set dummy $tool_basename; ac_word=$2
33063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33064$as_echo_n "checking for $ac_word... " >&6; }
33065if ${ac_cv_path_AS+:} false; then :
33066  $as_echo_n "(cached) " >&6
33067else
33068  case $AS in
33069  [\\/]* | ?:[\\/]*)
33070  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33071  ;;
33072  *)
33073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33074for as_dir in $PATH
33075do
33076  IFS=$as_save_IFS
33077  test -z "$as_dir" && as_dir=.
33078    for ac_exec_ext in '' $ac_executable_extensions; do
33079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33080    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33082    break 2
33083  fi
33084done
33085  done
33086IFS=$as_save_IFS
33087
33088  ;;
33089esac
33090fi
33091AS=$ac_cv_path_AS
33092if test -n "$AS"; then
33093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33094$as_echo "$AS" >&6; }
33095else
33096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33097$as_echo "no" >&6; }
33098fi
33099
33100
33101        if test "x$AS" = x; then
33102          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33103        fi
33104      else
33105        # Otherwise we believe it is a complete path. Use it as it is.
33106        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33107$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33109$as_echo_n "checking for AS... " >&6; }
33110        if test ! -x "$tool_specified"; then
33111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33112$as_echo "not found" >&6; }
33113          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33114        fi
33115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33116$as_echo "$tool_specified" >&6; }
33117      fi
33118    fi
33119  fi
33120
33121
33122
33123  # Only process if variable expands to non-empty
33124
33125  if test "x$AS" != x; then
33126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33127
33128  # First separate the path from the arguments. This will split at the first
33129  # space.
33130  complete="$AS"
33131  path="${complete%% *}"
33132  tmp="$complete EOL"
33133  arguments="${tmp#* }"
33134
33135  # Input might be given as Windows format, start by converting to
33136  # unix format.
33137  new_path=`$CYGPATH -u "$path"`
33138
33139  # Now try to locate executable using which
33140  new_path=`$WHICH "$new_path" 2> /dev/null`
33141  # bat and cmd files are not always considered executable in cygwin causing which
33142  # to not find them
33143  if test "x$new_path" = x \
33144      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33145      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33146    new_path=`$CYGPATH -u "$path"`
33147  fi
33148  if test "x$new_path" = x; then
33149    # Oops. Which didn't find the executable.
33150    # The splitting of arguments from the executable at a space might have been incorrect,
33151    # since paths with space are more likely in Windows. Give it another try with the whole
33152    # argument.
33153    path="$complete"
33154    arguments="EOL"
33155    new_path=`$CYGPATH -u "$path"`
33156    new_path=`$WHICH "$new_path" 2> /dev/null`
33157    # bat and cmd files are not always considered executable in cygwin causing which
33158    # to not find them
33159    if test "x$new_path" = x \
33160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33162      new_path=`$CYGPATH -u "$path"`
33163    fi
33164    if test "x$new_path" = x; then
33165      # It's still not found. Now this is an unrecoverable error.
33166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33167$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33168      has_space=`$ECHO "$complete" | $GREP " "`
33169      if test "x$has_space" != x; then
33170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33172      fi
33173      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33174    fi
33175  fi
33176
33177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33180  # "foo.exe" is OK but "foo" is an error.
33181  #
33182  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33183  # It is also a way to make sure we got the proper file name for the real test later on.
33184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33185  if test "x$test_shortpath" = x; then
33186    # Short path failed, file does not exist as specified.
33187    # Try adding .exe or .cmd
33188    if test -f "${new_path}.exe"; then
33189      input_to_shortpath="${new_path}.exe"
33190    elif test -f "${new_path}.cmd"; then
33191      input_to_shortpath="${new_path}.cmd"
33192    else
33193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33194$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33195      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33196$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33197      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33198    fi
33199  else
33200    input_to_shortpath="$new_path"
33201  fi
33202
33203  # Call helper function which possibly converts this using DOS-style short mode.
33204  # If so, the updated path is stored in $new_path.
33205  new_path="$input_to_shortpath"
33206
33207  input_path="$input_to_shortpath"
33208  # Check if we need to convert this using DOS-style short mode. If the path
33209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33210  # take no chances and rewrite it.
33211  # Note: m4 eats our [], so we need to use [ and ] instead.
33212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33213  if test "x$has_forbidden_chars" != x; then
33214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33218      # Going to short mode and back again did indeed matter. Since short mode is
33219      # case insensitive, let's make it lowercase to improve readability.
33220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33221      # Now convert it back to Unix-style (cygpath)
33222      input_path=`$CYGPATH -u "$shortmode_path"`
33223      new_path="$input_path"
33224    fi
33225  fi
33226
33227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33228  if test "x$test_cygdrive_prefix" = x; then
33229    # As a simple fix, exclude /usr/bin since it's not a real path.
33230    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33232      # a path prefixed by /cygdrive for fixpath to work.
33233      new_path="$CYGWIN_ROOT_PATH$input_path"
33234    fi
33235  fi
33236
33237  # remove trailing .exe if any
33238  new_path="${new_path/%.exe/}"
33239
33240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33241
33242  # First separate the path from the arguments. This will split at the first
33243  # space.
33244  complete="$AS"
33245  path="${complete%% *}"
33246  tmp="$complete EOL"
33247  arguments="${tmp#* }"
33248
33249  # Input might be given as Windows format, start by converting to
33250  # unix format.
33251  new_path="$path"
33252
33253  windows_path="$new_path"
33254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33255    unix_path=`$CYGPATH -u "$windows_path"`
33256    new_path="$unix_path"
33257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33259    new_path="$unix_path"
33260  fi
33261
33262
33263  # Now try to locate executable using which
33264  new_path=`$WHICH "$new_path" 2> /dev/null`
33265
33266  if test "x$new_path" = x; then
33267    # Oops. Which didn't find the executable.
33268    # The splitting of arguments from the executable at a space might have been incorrect,
33269    # since paths with space are more likely in Windows. Give it another try with the whole
33270    # argument.
33271    path="$complete"
33272    arguments="EOL"
33273    new_path="$path"
33274
33275  windows_path="$new_path"
33276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33277    unix_path=`$CYGPATH -u "$windows_path"`
33278    new_path="$unix_path"
33279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33281    new_path="$unix_path"
33282  fi
33283
33284
33285    new_path=`$WHICH "$new_path" 2> /dev/null`
33286    # bat and cmd files are not always considered executable in MSYS causing which
33287    # to not find them
33288    if test "x$new_path" = x \
33289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33291      new_path="$path"
33292
33293  windows_path="$new_path"
33294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33295    unix_path=`$CYGPATH -u "$windows_path"`
33296    new_path="$unix_path"
33297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33299    new_path="$unix_path"
33300  fi
33301
33302    fi
33303
33304    if test "x$new_path" = x; then
33305      # It's still not found. Now this is an unrecoverable error.
33306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33307$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33308      has_space=`$ECHO "$complete" | $GREP " "`
33309      if test "x$has_space" != x; then
33310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33312      fi
33313      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33314    fi
33315  fi
33316
33317  # Now new_path has a complete unix path to the binary
33318  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33319    # Keep paths in /bin as-is, but remove trailing .exe if any
33320    new_path="${new_path/%.exe/}"
33321    # Do not save /bin paths to all_fixpath_prefixes!
33322  else
33323    # Not in mixed or Windows style, start by that.
33324    new_path=`cmd //c echo $new_path`
33325
33326  input_path="$new_path"
33327  # Check if we need to convert this using DOS-style short mode. If the path
33328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33329  # take no chances and rewrite it.
33330  # Note: m4 eats our [], so we need to use [ and ] instead.
33331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33332  if test "x$has_forbidden_chars" != x; then
33333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33335  fi
33336
33337    # Output is in $new_path
33338
33339  windows_path="$new_path"
33340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33341    unix_path=`$CYGPATH -u "$windows_path"`
33342    new_path="$unix_path"
33343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33345    new_path="$unix_path"
33346  fi
33347
33348    # remove trailing .exe if any
33349    new_path="${new_path/%.exe/}"
33350
33351    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33352    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33353  fi
33354
33355    else
33356      # We're on a unix platform. Hooray! :)
33357      # First separate the path from the arguments. This will split at the first
33358      # space.
33359      complete="$AS"
33360      path="${complete%% *}"
33361      tmp="$complete EOL"
33362      arguments="${tmp#* }"
33363
33364      # Cannot rely on the command "which" here since it doesn't always work.
33365      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33366      if test -z "$is_absolute_path"; then
33367        # Path to executable is not absolute. Find it.
33368        IFS_save="$IFS"
33369        IFS=:
33370        for p in $PATH; do
33371          if test -f "$p/$path" && test -x "$p/$path"; then
33372            new_path="$p/$path"
33373            break
33374          fi
33375        done
33376        IFS="$IFS_save"
33377      else
33378        # This is an absolute path, we can use it without further modifications.
33379        new_path="$path"
33380      fi
33381
33382      if test "x$new_path" = x; then
33383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33384$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33385        has_space=`$ECHO "$complete" | $GREP " "`
33386        if test "x$has_space" != x; then
33387          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33388$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33389        fi
33390        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33391      fi
33392    fi
33393
33394    # Now join together the path and the arguments once again
33395    if test "x$arguments" != xEOL; then
33396      new_complete="$new_path ${arguments% *}"
33397    else
33398      new_complete="$new_path"
33399    fi
33400
33401    if test "x$complete" != "x$new_complete"; then
33402      AS="$new_complete"
33403      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33404$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33405    fi
33406  fi
33407
33408  else
33409    # FIXME: is this correct for microsoft?
33410    AS="$CC -c"
33411  fi
33412
33413
33414  #
33415  # Setup the archiver (AR)
33416  #
33417  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33418    # The corresponding ar tool is lib.exe (used to create static libraries)
33419    # Extract the first word of "lib", so it can be a program name with args.
33420set dummy lib; ac_word=$2
33421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33422$as_echo_n "checking for $ac_word... " >&6; }
33423if ${ac_cv_prog_AR+:} false; then :
33424  $as_echo_n "(cached) " >&6
33425else
33426  if test -n "$AR"; then
33427  ac_cv_prog_AR="$AR" # Let the user override the test.
33428else
33429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33430for as_dir in $PATH
33431do
33432  IFS=$as_save_IFS
33433  test -z "$as_dir" && as_dir=.
33434    for ac_exec_ext in '' $ac_executable_extensions; do
33435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33436    ac_cv_prog_AR="lib"
33437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33438    break 2
33439  fi
33440done
33441  done
33442IFS=$as_save_IFS
33443
33444fi
33445fi
33446AR=$ac_cv_prog_AR
33447if test -n "$AR"; then
33448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33449$as_echo "$AR" >&6; }
33450else
33451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33452$as_echo "no" >&6; }
33453fi
33454
33455
33456  else
33457
33458
33459  # Publish this variable in the help.
33460
33461
33462  if test "x$AR" = x; then
33463    # The variable is not set by user, try to locate tool using the code snippet
33464    if test -n "$ac_tool_prefix"; then
33465  for ac_prog in ar
33466  do
33467    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33468set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33470$as_echo_n "checking for $ac_word... " >&6; }
33471if ${ac_cv_prog_AR+:} false; then :
33472  $as_echo_n "(cached) " >&6
33473else
33474  if test -n "$AR"; then
33475  ac_cv_prog_AR="$AR" # Let the user override the test.
33476else
33477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33478for as_dir in $PATH
33479do
33480  IFS=$as_save_IFS
33481  test -z "$as_dir" && as_dir=.
33482    for ac_exec_ext in '' $ac_executable_extensions; do
33483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33484    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33486    break 2
33487  fi
33488done
33489  done
33490IFS=$as_save_IFS
33491
33492fi
33493fi
33494AR=$ac_cv_prog_AR
33495if test -n "$AR"; then
33496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33497$as_echo "$AR" >&6; }
33498else
33499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33500$as_echo "no" >&6; }
33501fi
33502
33503
33504    test -n "$AR" && break
33505  done
33506fi
33507if test -z "$AR"; then
33508  ac_ct_AR=$AR
33509  for ac_prog in ar
33510do
33511  # Extract the first word of "$ac_prog", so it can be a program name with args.
33512set dummy $ac_prog; ac_word=$2
33513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33514$as_echo_n "checking for $ac_word... " >&6; }
33515if ${ac_cv_prog_ac_ct_AR+:} false; then :
33516  $as_echo_n "(cached) " >&6
33517else
33518  if test -n "$ac_ct_AR"; then
33519  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33520else
33521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33522for as_dir in $PATH
33523do
33524  IFS=$as_save_IFS
33525  test -z "$as_dir" && as_dir=.
33526    for ac_exec_ext in '' $ac_executable_extensions; do
33527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33528    ac_cv_prog_ac_ct_AR="$ac_prog"
33529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33530    break 2
33531  fi
33532done
33533  done
33534IFS=$as_save_IFS
33535
33536fi
33537fi
33538ac_ct_AR=$ac_cv_prog_ac_ct_AR
33539if test -n "$ac_ct_AR"; then
33540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33541$as_echo "$ac_ct_AR" >&6; }
33542else
33543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33544$as_echo "no" >&6; }
33545fi
33546
33547
33548  test -n "$ac_ct_AR" && break
33549done
33550
33551  if test "x$ac_ct_AR" = x; then
33552    AR=""
33553  else
33554    case $cross_compiling:$ac_tool_warned in
33555yes:)
33556{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33557$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33558ac_tool_warned=yes ;;
33559esac
33560    AR=$ac_ct_AR
33561  fi
33562fi
33563
33564  else
33565    # The variable is set, but is it from the command line or the environment?
33566
33567    # Try to remove the string !AR! from our list.
33568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33570      # If it failed, the variable was not from the command line. Ignore it,
33571      # but warn the user (except for BASH, which is always set by the calling BASH).
33572      if test "xAR" != xBASH; then
33573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33574$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33575      fi
33576      # Try to locate tool using the code snippet
33577      if test -n "$ac_tool_prefix"; then
33578  for ac_prog in ar
33579  do
33580    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33581set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33583$as_echo_n "checking for $ac_word... " >&6; }
33584if ${ac_cv_prog_AR+:} false; then :
33585  $as_echo_n "(cached) " >&6
33586else
33587  if test -n "$AR"; then
33588  ac_cv_prog_AR="$AR" # Let the user override the test.
33589else
33590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33591for as_dir in $PATH
33592do
33593  IFS=$as_save_IFS
33594  test -z "$as_dir" && as_dir=.
33595    for ac_exec_ext in '' $ac_executable_extensions; do
33596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33597    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33599    break 2
33600  fi
33601done
33602  done
33603IFS=$as_save_IFS
33604
33605fi
33606fi
33607AR=$ac_cv_prog_AR
33608if test -n "$AR"; then
33609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33610$as_echo "$AR" >&6; }
33611else
33612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33613$as_echo "no" >&6; }
33614fi
33615
33616
33617    test -n "$AR" && break
33618  done
33619fi
33620if test -z "$AR"; then
33621  ac_ct_AR=$AR
33622  for ac_prog in ar
33623do
33624  # Extract the first word of "$ac_prog", so it can be a program name with args.
33625set dummy $ac_prog; ac_word=$2
33626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33627$as_echo_n "checking for $ac_word... " >&6; }
33628if ${ac_cv_prog_ac_ct_AR+:} false; then :
33629  $as_echo_n "(cached) " >&6
33630else
33631  if test -n "$ac_ct_AR"; then
33632  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33633else
33634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33635for as_dir in $PATH
33636do
33637  IFS=$as_save_IFS
33638  test -z "$as_dir" && as_dir=.
33639    for ac_exec_ext in '' $ac_executable_extensions; do
33640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33641    ac_cv_prog_ac_ct_AR="$ac_prog"
33642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33643    break 2
33644  fi
33645done
33646  done
33647IFS=$as_save_IFS
33648
33649fi
33650fi
33651ac_ct_AR=$ac_cv_prog_ac_ct_AR
33652if test -n "$ac_ct_AR"; then
33653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33654$as_echo "$ac_ct_AR" >&6; }
33655else
33656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33657$as_echo "no" >&6; }
33658fi
33659
33660
33661  test -n "$ac_ct_AR" && break
33662done
33663
33664  if test "x$ac_ct_AR" = x; then
33665    AR=""
33666  else
33667    case $cross_compiling:$ac_tool_warned in
33668yes:)
33669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33671ac_tool_warned=yes ;;
33672esac
33673    AR=$ac_ct_AR
33674  fi
33675fi
33676
33677    else
33678      # If it succeeded, then it was overridden by the user. We will use it
33679      # for the tool.
33680
33681      # First remove it from the list of overridden variables, so we can test
33682      # for unknown variables in the end.
33683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33684
33685      # Check if the provided tool contains a complete path.
33686      tool_specified="$AR"
33687      tool_basename="${tool_specified##*/}"
33688      if test "x$tool_basename" = "x$tool_specified"; then
33689        # A command without a complete path is provided, search $PATH.
33690        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33691$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33692        # Extract the first word of "$tool_basename", so it can be a program name with args.
33693set dummy $tool_basename; ac_word=$2
33694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33695$as_echo_n "checking for $ac_word... " >&6; }
33696if ${ac_cv_path_AR+:} false; then :
33697  $as_echo_n "(cached) " >&6
33698else
33699  case $AR in
33700  [\\/]* | ?:[\\/]*)
33701  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33702  ;;
33703  *)
33704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33705for as_dir in $PATH
33706do
33707  IFS=$as_save_IFS
33708  test -z "$as_dir" && as_dir=.
33709    for ac_exec_ext in '' $ac_executable_extensions; do
33710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33711    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33713    break 2
33714  fi
33715done
33716  done
33717IFS=$as_save_IFS
33718
33719  ;;
33720esac
33721fi
33722AR=$ac_cv_path_AR
33723if test -n "$AR"; then
33724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33725$as_echo "$AR" >&6; }
33726else
33727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33728$as_echo "no" >&6; }
33729fi
33730
33731
33732        if test "x$AR" = x; then
33733          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33734        fi
33735      else
33736        # Otherwise we believe it is a complete path. Use it as it is.
33737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33738$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33740$as_echo_n "checking for AR... " >&6; }
33741        if test ! -x "$tool_specified"; then
33742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33743$as_echo "not found" >&6; }
33744          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33745        fi
33746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33747$as_echo "$tool_specified" >&6; }
33748      fi
33749    fi
33750  fi
33751
33752
33753  fi
33754
33755  # Only process if variable expands to non-empty
33756
33757  if test "x$AR" != x; then
33758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33759
33760  # First separate the path from the arguments. This will split at the first
33761  # space.
33762  complete="$AR"
33763  path="${complete%% *}"
33764  tmp="$complete EOL"
33765  arguments="${tmp#* }"
33766
33767  # Input might be given as Windows format, start by converting to
33768  # unix format.
33769  new_path=`$CYGPATH -u "$path"`
33770
33771  # Now try to locate executable using which
33772  new_path=`$WHICH "$new_path" 2> /dev/null`
33773  # bat and cmd files are not always considered executable in cygwin causing which
33774  # to not find them
33775  if test "x$new_path" = x \
33776      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33777      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33778    new_path=`$CYGPATH -u "$path"`
33779  fi
33780  if test "x$new_path" = x; then
33781    # Oops. Which didn't find the executable.
33782    # The splitting of arguments from the executable at a space might have been incorrect,
33783    # since paths with space are more likely in Windows. Give it another try with the whole
33784    # argument.
33785    path="$complete"
33786    arguments="EOL"
33787    new_path=`$CYGPATH -u "$path"`
33788    new_path=`$WHICH "$new_path" 2> /dev/null`
33789    # bat and cmd files are not always considered executable in cygwin causing which
33790    # to not find them
33791    if test "x$new_path" = x \
33792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33794      new_path=`$CYGPATH -u "$path"`
33795    fi
33796    if test "x$new_path" = x; then
33797      # It's still not found. Now this is an unrecoverable error.
33798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33799$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33800      has_space=`$ECHO "$complete" | $GREP " "`
33801      if test "x$has_space" != x; then
33802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33804      fi
33805      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33806    fi
33807  fi
33808
33809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33812  # "foo.exe" is OK but "foo" is an error.
33813  #
33814  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33815  # It is also a way to make sure we got the proper file name for the real test later on.
33816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33817  if test "x$test_shortpath" = x; then
33818    # Short path failed, file does not exist as specified.
33819    # Try adding .exe or .cmd
33820    if test -f "${new_path}.exe"; then
33821      input_to_shortpath="${new_path}.exe"
33822    elif test -f "${new_path}.cmd"; then
33823      input_to_shortpath="${new_path}.cmd"
33824    else
33825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33826$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33829      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33830    fi
33831  else
33832    input_to_shortpath="$new_path"
33833  fi
33834
33835  # Call helper function which possibly converts this using DOS-style short mode.
33836  # If so, the updated path is stored in $new_path.
33837  new_path="$input_to_shortpath"
33838
33839  input_path="$input_to_shortpath"
33840  # Check if we need to convert this using DOS-style short mode. If the path
33841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33842  # take no chances and rewrite it.
33843  # Note: m4 eats our [], so we need to use [ and ] instead.
33844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33845  if test "x$has_forbidden_chars" != x; then
33846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33850      # Going to short mode and back again did indeed matter. Since short mode is
33851      # case insensitive, let's make it lowercase to improve readability.
33852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33853      # Now convert it back to Unix-style (cygpath)
33854      input_path=`$CYGPATH -u "$shortmode_path"`
33855      new_path="$input_path"
33856    fi
33857  fi
33858
33859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33860  if test "x$test_cygdrive_prefix" = x; then
33861    # As a simple fix, exclude /usr/bin since it's not a real path.
33862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33864      # a path prefixed by /cygdrive for fixpath to work.
33865      new_path="$CYGWIN_ROOT_PATH$input_path"
33866    fi
33867  fi
33868
33869  # remove trailing .exe if any
33870  new_path="${new_path/%.exe/}"
33871
33872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33873
33874  # First separate the path from the arguments. This will split at the first
33875  # space.
33876  complete="$AR"
33877  path="${complete%% *}"
33878  tmp="$complete EOL"
33879  arguments="${tmp#* }"
33880
33881  # Input might be given as Windows format, start by converting to
33882  # unix format.
33883  new_path="$path"
33884
33885  windows_path="$new_path"
33886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33887    unix_path=`$CYGPATH -u "$windows_path"`
33888    new_path="$unix_path"
33889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33891    new_path="$unix_path"
33892  fi
33893
33894
33895  # Now try to locate executable using which
33896  new_path=`$WHICH "$new_path" 2> /dev/null`
33897
33898  if test "x$new_path" = x; then
33899    # Oops. Which didn't find the executable.
33900    # The splitting of arguments from the executable at a space might have been incorrect,
33901    # since paths with space are more likely in Windows. Give it another try with the whole
33902    # argument.
33903    path="$complete"
33904    arguments="EOL"
33905    new_path="$path"
33906
33907  windows_path="$new_path"
33908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33909    unix_path=`$CYGPATH -u "$windows_path"`
33910    new_path="$unix_path"
33911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33913    new_path="$unix_path"
33914  fi
33915
33916
33917    new_path=`$WHICH "$new_path" 2> /dev/null`
33918    # bat and cmd files are not always considered executable in MSYS causing which
33919    # to not find them
33920    if test "x$new_path" = x \
33921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33923      new_path="$path"
33924
33925  windows_path="$new_path"
33926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33927    unix_path=`$CYGPATH -u "$windows_path"`
33928    new_path="$unix_path"
33929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33931    new_path="$unix_path"
33932  fi
33933
33934    fi
33935
33936    if test "x$new_path" = x; then
33937      # It's still not found. Now this is an unrecoverable error.
33938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33939$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33940      has_space=`$ECHO "$complete" | $GREP " "`
33941      if test "x$has_space" != x; then
33942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33944      fi
33945      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33946    fi
33947  fi
33948
33949  # Now new_path has a complete unix path to the binary
33950  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33951    # Keep paths in /bin as-is, but remove trailing .exe if any
33952    new_path="${new_path/%.exe/}"
33953    # Do not save /bin paths to all_fixpath_prefixes!
33954  else
33955    # Not in mixed or Windows style, start by that.
33956    new_path=`cmd //c echo $new_path`
33957
33958  input_path="$new_path"
33959  # Check if we need to convert this using DOS-style short mode. If the path
33960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33961  # take no chances and rewrite it.
33962  # Note: m4 eats our [], so we need to use [ and ] instead.
33963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33964  if test "x$has_forbidden_chars" != x; then
33965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33967  fi
33968
33969    # Output is in $new_path
33970
33971  windows_path="$new_path"
33972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33973    unix_path=`$CYGPATH -u "$windows_path"`
33974    new_path="$unix_path"
33975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33977    new_path="$unix_path"
33978  fi
33979
33980    # remove trailing .exe if any
33981    new_path="${new_path/%.exe/}"
33982
33983    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33984    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33985  fi
33986
33987    else
33988      # We're on a unix platform. Hooray! :)
33989      # First separate the path from the arguments. This will split at the first
33990      # space.
33991      complete="$AR"
33992      path="${complete%% *}"
33993      tmp="$complete EOL"
33994      arguments="${tmp#* }"
33995
33996      # Cannot rely on the command "which" here since it doesn't always work.
33997      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33998      if test -z "$is_absolute_path"; then
33999        # Path to executable is not absolute. Find it.
34000        IFS_save="$IFS"
34001        IFS=:
34002        for p in $PATH; do
34003          if test -f "$p/$path" && test -x "$p/$path"; then
34004            new_path="$p/$path"
34005            break
34006          fi
34007        done
34008        IFS="$IFS_save"
34009      else
34010        # This is an absolute path, we can use it without further modifications.
34011        new_path="$path"
34012      fi
34013
34014      if test "x$new_path" = x; then
34015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34016$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34017        has_space=`$ECHO "$complete" | $GREP " "`
34018        if test "x$has_space" != x; then
34019          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34021        fi
34022        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34023      fi
34024    fi
34025
34026    # Now join together the path and the arguments once again
34027    if test "x$arguments" != xEOL; then
34028      new_complete="$new_path ${arguments% *}"
34029    else
34030      new_complete="$new_path"
34031    fi
34032
34033    if test "x$complete" != "x$new_complete"; then
34034      AR="$new_complete"
34035      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34036$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34037    fi
34038  fi
34039
34040
34041
34042  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34043
34044
34045  # Publish this variable in the help.
34046
34047
34048  if test "x$LIPO" = x; then
34049    # The variable is not set by user, try to locate tool using the code snippet
34050    for ac_prog in lipo
34051do
34052  # Extract the first word of "$ac_prog", so it can be a program name with args.
34053set dummy $ac_prog; ac_word=$2
34054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34055$as_echo_n "checking for $ac_word... " >&6; }
34056if ${ac_cv_path_LIPO+:} false; then :
34057  $as_echo_n "(cached) " >&6
34058else
34059  case $LIPO in
34060  [\\/]* | ?:[\\/]*)
34061  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34062  ;;
34063  *)
34064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34065for as_dir in $PATH
34066do
34067  IFS=$as_save_IFS
34068  test -z "$as_dir" && as_dir=.
34069    for ac_exec_ext in '' $ac_executable_extensions; do
34070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34071    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34073    break 2
34074  fi
34075done
34076  done
34077IFS=$as_save_IFS
34078
34079  ;;
34080esac
34081fi
34082LIPO=$ac_cv_path_LIPO
34083if test -n "$LIPO"; then
34084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34085$as_echo "$LIPO" >&6; }
34086else
34087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34088$as_echo "no" >&6; }
34089fi
34090
34091
34092  test -n "$LIPO" && break
34093done
34094
34095  else
34096    # The variable is set, but is it from the command line or the environment?
34097
34098    # Try to remove the string !LIPO! from our list.
34099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34101      # If it failed, the variable was not from the command line. Ignore it,
34102      # but warn the user (except for BASH, which is always set by the calling BASH).
34103      if test "xLIPO" != xBASH; then
34104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34105$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34106      fi
34107      # Try to locate tool using the code snippet
34108      for ac_prog in lipo
34109do
34110  # Extract the first word of "$ac_prog", so it can be a program name with args.
34111set dummy $ac_prog; ac_word=$2
34112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34113$as_echo_n "checking for $ac_word... " >&6; }
34114if ${ac_cv_path_LIPO+:} false; then :
34115  $as_echo_n "(cached) " >&6
34116else
34117  case $LIPO in
34118  [\\/]* | ?:[\\/]*)
34119  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34120  ;;
34121  *)
34122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34123for as_dir in $PATH
34124do
34125  IFS=$as_save_IFS
34126  test -z "$as_dir" && as_dir=.
34127    for ac_exec_ext in '' $ac_executable_extensions; do
34128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34129    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34131    break 2
34132  fi
34133done
34134  done
34135IFS=$as_save_IFS
34136
34137  ;;
34138esac
34139fi
34140LIPO=$ac_cv_path_LIPO
34141if test -n "$LIPO"; then
34142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34143$as_echo "$LIPO" >&6; }
34144else
34145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34146$as_echo "no" >&6; }
34147fi
34148
34149
34150  test -n "$LIPO" && break
34151done
34152
34153    else
34154      # If it succeeded, then it was overridden by the user. We will use it
34155      # for the tool.
34156
34157      # First remove it from the list of overridden variables, so we can test
34158      # for unknown variables in the end.
34159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34160
34161      # Check if the provided tool contains a complete path.
34162      tool_specified="$LIPO"
34163      tool_basename="${tool_specified##*/}"
34164      if test "x$tool_basename" = "x$tool_specified"; then
34165        # A command without a complete path is provided, search $PATH.
34166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34167$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34168        # Extract the first word of "$tool_basename", so it can be a program name with args.
34169set dummy $tool_basename; ac_word=$2
34170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34171$as_echo_n "checking for $ac_word... " >&6; }
34172if ${ac_cv_path_LIPO+:} false; then :
34173  $as_echo_n "(cached) " >&6
34174else
34175  case $LIPO in
34176  [\\/]* | ?:[\\/]*)
34177  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34178  ;;
34179  *)
34180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34181for as_dir in $PATH
34182do
34183  IFS=$as_save_IFS
34184  test -z "$as_dir" && as_dir=.
34185    for ac_exec_ext in '' $ac_executable_extensions; do
34186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34187    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34189    break 2
34190  fi
34191done
34192  done
34193IFS=$as_save_IFS
34194
34195  ;;
34196esac
34197fi
34198LIPO=$ac_cv_path_LIPO
34199if test -n "$LIPO"; then
34200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34201$as_echo "$LIPO" >&6; }
34202else
34203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34204$as_echo "no" >&6; }
34205fi
34206
34207
34208        if test "x$LIPO" = x; then
34209          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34210        fi
34211      else
34212        # Otherwise we believe it is a complete path. Use it as it is.
34213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34214$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34216$as_echo_n "checking for LIPO... " >&6; }
34217        if test ! -x "$tool_specified"; then
34218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34219$as_echo "not found" >&6; }
34220          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34221        fi
34222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34223$as_echo "$tool_specified" >&6; }
34224      fi
34225    fi
34226  fi
34227
34228
34229
34230  # Only process if variable expands to non-empty
34231
34232  if test "x$LIPO" != x; then
34233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34234
34235  # First separate the path from the arguments. This will split at the first
34236  # space.
34237  complete="$LIPO"
34238  path="${complete%% *}"
34239  tmp="$complete EOL"
34240  arguments="${tmp#* }"
34241
34242  # Input might be given as Windows format, start by converting to
34243  # unix format.
34244  new_path=`$CYGPATH -u "$path"`
34245
34246  # Now try to locate executable using which
34247  new_path=`$WHICH "$new_path" 2> /dev/null`
34248  # bat and cmd files are not always considered executable in cygwin causing which
34249  # to not find them
34250  if test "x$new_path" = x \
34251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34253    new_path=`$CYGPATH -u "$path"`
34254  fi
34255  if test "x$new_path" = x; then
34256    # Oops. Which didn't find the executable.
34257    # The splitting of arguments from the executable at a space might have been incorrect,
34258    # since paths with space are more likely in Windows. Give it another try with the whole
34259    # argument.
34260    path="$complete"
34261    arguments="EOL"
34262    new_path=`$CYGPATH -u "$path"`
34263    new_path=`$WHICH "$new_path" 2> /dev/null`
34264    # bat and cmd files are not always considered executable in cygwin causing which
34265    # to not find them
34266    if test "x$new_path" = x \
34267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34269      new_path=`$CYGPATH -u "$path"`
34270    fi
34271    if test "x$new_path" = x; then
34272      # It's still not found. Now this is an unrecoverable error.
34273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34274$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34275      has_space=`$ECHO "$complete" | $GREP " "`
34276      if test "x$has_space" != x; then
34277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34279      fi
34280      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34281    fi
34282  fi
34283
34284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34287  # "foo.exe" is OK but "foo" is an error.
34288  #
34289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34290  # It is also a way to make sure we got the proper file name for the real test later on.
34291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34292  if test "x$test_shortpath" = x; then
34293    # Short path failed, file does not exist as specified.
34294    # Try adding .exe or .cmd
34295    if test -f "${new_path}.exe"; then
34296      input_to_shortpath="${new_path}.exe"
34297    elif test -f "${new_path}.cmd"; then
34298      input_to_shortpath="${new_path}.cmd"
34299    else
34300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34301$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34304      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34305    fi
34306  else
34307    input_to_shortpath="$new_path"
34308  fi
34309
34310  # Call helper function which possibly converts this using DOS-style short mode.
34311  # If so, the updated path is stored in $new_path.
34312  new_path="$input_to_shortpath"
34313
34314  input_path="$input_to_shortpath"
34315  # Check if we need to convert this using DOS-style short mode. If the path
34316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34317  # take no chances and rewrite it.
34318  # Note: m4 eats our [], so we need to use [ and ] instead.
34319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34320  if test "x$has_forbidden_chars" != x; then
34321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34325      # Going to short mode and back again did indeed matter. Since short mode is
34326      # case insensitive, let's make it lowercase to improve readability.
34327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34328      # Now convert it back to Unix-style (cygpath)
34329      input_path=`$CYGPATH -u "$shortmode_path"`
34330      new_path="$input_path"
34331    fi
34332  fi
34333
34334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34335  if test "x$test_cygdrive_prefix" = x; then
34336    # As a simple fix, exclude /usr/bin since it's not a real path.
34337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34339      # a path prefixed by /cygdrive for fixpath to work.
34340      new_path="$CYGWIN_ROOT_PATH$input_path"
34341    fi
34342  fi
34343
34344  # remove trailing .exe if any
34345  new_path="${new_path/%.exe/}"
34346
34347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34348
34349  # First separate the path from the arguments. This will split at the first
34350  # space.
34351  complete="$LIPO"
34352  path="${complete%% *}"
34353  tmp="$complete EOL"
34354  arguments="${tmp#* }"
34355
34356  # Input might be given as Windows format, start by converting to
34357  # unix format.
34358  new_path="$path"
34359
34360  windows_path="$new_path"
34361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34362    unix_path=`$CYGPATH -u "$windows_path"`
34363    new_path="$unix_path"
34364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34366    new_path="$unix_path"
34367  fi
34368
34369
34370  # Now try to locate executable using which
34371  new_path=`$WHICH "$new_path" 2> /dev/null`
34372
34373  if test "x$new_path" = x; then
34374    # Oops. Which didn't find the executable.
34375    # The splitting of arguments from the executable at a space might have been incorrect,
34376    # since paths with space are more likely in Windows. Give it another try with the whole
34377    # argument.
34378    path="$complete"
34379    arguments="EOL"
34380    new_path="$path"
34381
34382  windows_path="$new_path"
34383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34384    unix_path=`$CYGPATH -u "$windows_path"`
34385    new_path="$unix_path"
34386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34388    new_path="$unix_path"
34389  fi
34390
34391
34392    new_path=`$WHICH "$new_path" 2> /dev/null`
34393    # bat and cmd files are not always considered executable in MSYS causing which
34394    # to not find them
34395    if test "x$new_path" = x \
34396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34398      new_path="$path"
34399
34400  windows_path="$new_path"
34401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34402    unix_path=`$CYGPATH -u "$windows_path"`
34403    new_path="$unix_path"
34404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34406    new_path="$unix_path"
34407  fi
34408
34409    fi
34410
34411    if test "x$new_path" = x; then
34412      # It's still not found. Now this is an unrecoverable error.
34413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34414$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34415      has_space=`$ECHO "$complete" | $GREP " "`
34416      if test "x$has_space" != x; then
34417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34419      fi
34420      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34421    fi
34422  fi
34423
34424  # Now new_path has a complete unix path to the binary
34425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34426    # Keep paths in /bin as-is, but remove trailing .exe if any
34427    new_path="${new_path/%.exe/}"
34428    # Do not save /bin paths to all_fixpath_prefixes!
34429  else
34430    # Not in mixed or Windows style, start by that.
34431    new_path=`cmd //c echo $new_path`
34432
34433  input_path="$new_path"
34434  # Check if we need to convert this using DOS-style short mode. If the path
34435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34436  # take no chances and rewrite it.
34437  # Note: m4 eats our [], so we need to use [ and ] instead.
34438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34439  if test "x$has_forbidden_chars" != x; then
34440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34442  fi
34443
34444    # Output is in $new_path
34445
34446  windows_path="$new_path"
34447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34448    unix_path=`$CYGPATH -u "$windows_path"`
34449    new_path="$unix_path"
34450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34452    new_path="$unix_path"
34453  fi
34454
34455    # remove trailing .exe if any
34456    new_path="${new_path/%.exe/}"
34457
34458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34460  fi
34461
34462    else
34463      # We're on a unix platform. Hooray! :)
34464      # First separate the path from the arguments. This will split at the first
34465      # space.
34466      complete="$LIPO"
34467      path="${complete%% *}"
34468      tmp="$complete EOL"
34469      arguments="${tmp#* }"
34470
34471      # Cannot rely on the command "which" here since it doesn't always work.
34472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34473      if test -z "$is_absolute_path"; then
34474        # Path to executable is not absolute. Find it.
34475        IFS_save="$IFS"
34476        IFS=:
34477        for p in $PATH; do
34478          if test -f "$p/$path" && test -x "$p/$path"; then
34479            new_path="$p/$path"
34480            break
34481          fi
34482        done
34483        IFS="$IFS_save"
34484      else
34485        # This is an absolute path, we can use it without further modifications.
34486        new_path="$path"
34487      fi
34488
34489      if test "x$new_path" = x; then
34490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34491$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34492        has_space=`$ECHO "$complete" | $GREP " "`
34493        if test "x$has_space" != x; then
34494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34496        fi
34497        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34498      fi
34499    fi
34500
34501    # Now join together the path and the arguments once again
34502    if test "x$arguments" != xEOL; then
34503      new_complete="$new_path ${arguments% *}"
34504    else
34505      new_complete="$new_path"
34506    fi
34507
34508    if test "x$complete" != "x$new_complete"; then
34509      LIPO="$new_complete"
34510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34511$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34512    fi
34513  fi
34514
34515  fi
34516
34517  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34518    # Extract the first word of "mt", so it can be a program name with args.
34519set dummy mt; ac_word=$2
34520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34521$as_echo_n "checking for $ac_word... " >&6; }
34522if ${ac_cv_prog_MT+:} false; then :
34523  $as_echo_n "(cached) " >&6
34524else
34525  if test -n "$MT"; then
34526  ac_cv_prog_MT="$MT" # Let the user override the test.
34527else
34528  ac_prog_rejected=no
34529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34530for as_dir in $PATH
34531do
34532  IFS=$as_save_IFS
34533  test -z "$as_dir" && as_dir=.
34534    for ac_exec_ext in '' $ac_executable_extensions; do
34535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34536    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34537       ac_prog_rejected=yes
34538       continue
34539     fi
34540    ac_cv_prog_MT="mt"
34541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34542    break 2
34543  fi
34544done
34545  done
34546IFS=$as_save_IFS
34547
34548if test $ac_prog_rejected = yes; then
34549  # We found a bogon in the path, so make sure we never use it.
34550  set dummy $ac_cv_prog_MT
34551  shift
34552  if test $# != 0; then
34553    # We chose a different compiler from the bogus one.
34554    # However, it has the same basename, so the bogon will be chosen
34555    # first if we set MT to just the basename; use the full file name.
34556    shift
34557    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34558  fi
34559fi
34560fi
34561fi
34562MT=$ac_cv_prog_MT
34563if test -n "$MT"; then
34564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34565$as_echo "$MT" >&6; }
34566else
34567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34568$as_echo "no" >&6; }
34569fi
34570
34571
34572
34573  # Only process if variable expands to non-empty
34574
34575  if test "x$MT" != x; then
34576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34577
34578  # First separate the path from the arguments. This will split at the first
34579  # space.
34580  complete="$MT"
34581  path="${complete%% *}"
34582  tmp="$complete EOL"
34583  arguments="${tmp#* }"
34584
34585  # Input might be given as Windows format, start by converting to
34586  # unix format.
34587  new_path=`$CYGPATH -u "$path"`
34588
34589  # Now try to locate executable using which
34590  new_path=`$WHICH "$new_path" 2> /dev/null`
34591  # bat and cmd files are not always considered executable in cygwin causing which
34592  # to not find them
34593  if test "x$new_path" = x \
34594      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34595      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34596    new_path=`$CYGPATH -u "$path"`
34597  fi
34598  if test "x$new_path" = x; then
34599    # Oops. Which didn't find the executable.
34600    # The splitting of arguments from the executable at a space might have been incorrect,
34601    # since paths with space are more likely in Windows. Give it another try with the whole
34602    # argument.
34603    path="$complete"
34604    arguments="EOL"
34605    new_path=`$CYGPATH -u "$path"`
34606    new_path=`$WHICH "$new_path" 2> /dev/null`
34607    # bat and cmd files are not always considered executable in cygwin causing which
34608    # to not find them
34609    if test "x$new_path" = x \
34610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34612      new_path=`$CYGPATH -u "$path"`
34613    fi
34614    if test "x$new_path" = x; then
34615      # It's still not found. Now this is an unrecoverable error.
34616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34617$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34618      has_space=`$ECHO "$complete" | $GREP " "`
34619      if test "x$has_space" != x; then
34620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34622      fi
34623      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34624    fi
34625  fi
34626
34627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34630  # "foo.exe" is OK but "foo" is an error.
34631  #
34632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34633  # It is also a way to make sure we got the proper file name for the real test later on.
34634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34635  if test "x$test_shortpath" = x; then
34636    # Short path failed, file does not exist as specified.
34637    # Try adding .exe or .cmd
34638    if test -f "${new_path}.exe"; then
34639      input_to_shortpath="${new_path}.exe"
34640    elif test -f "${new_path}.cmd"; then
34641      input_to_shortpath="${new_path}.cmd"
34642    else
34643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34644$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34647      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34648    fi
34649  else
34650    input_to_shortpath="$new_path"
34651  fi
34652
34653  # Call helper function which possibly converts this using DOS-style short mode.
34654  # If so, the updated path is stored in $new_path.
34655  new_path="$input_to_shortpath"
34656
34657  input_path="$input_to_shortpath"
34658  # Check if we need to convert this using DOS-style short mode. If the path
34659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34660  # take no chances and rewrite it.
34661  # Note: m4 eats our [], so we need to use [ and ] instead.
34662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34663  if test "x$has_forbidden_chars" != x; then
34664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34668      # Going to short mode and back again did indeed matter. Since short mode is
34669      # case insensitive, let's make it lowercase to improve readability.
34670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34671      # Now convert it back to Unix-style (cygpath)
34672      input_path=`$CYGPATH -u "$shortmode_path"`
34673      new_path="$input_path"
34674    fi
34675  fi
34676
34677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34678  if test "x$test_cygdrive_prefix" = x; then
34679    # As a simple fix, exclude /usr/bin since it's not a real path.
34680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34682      # a path prefixed by /cygdrive for fixpath to work.
34683      new_path="$CYGWIN_ROOT_PATH$input_path"
34684    fi
34685  fi
34686
34687  # remove trailing .exe if any
34688  new_path="${new_path/%.exe/}"
34689
34690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34691
34692  # First separate the path from the arguments. This will split at the first
34693  # space.
34694  complete="$MT"
34695  path="${complete%% *}"
34696  tmp="$complete EOL"
34697  arguments="${tmp#* }"
34698
34699  # Input might be given as Windows format, start by converting to
34700  # unix format.
34701  new_path="$path"
34702
34703  windows_path="$new_path"
34704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34705    unix_path=`$CYGPATH -u "$windows_path"`
34706    new_path="$unix_path"
34707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34709    new_path="$unix_path"
34710  fi
34711
34712
34713  # Now try to locate executable using which
34714  new_path=`$WHICH "$new_path" 2> /dev/null`
34715
34716  if test "x$new_path" = x; then
34717    # Oops. Which didn't find the executable.
34718    # The splitting of arguments from the executable at a space might have been incorrect,
34719    # since paths with space are more likely in Windows. Give it another try with the whole
34720    # argument.
34721    path="$complete"
34722    arguments="EOL"
34723    new_path="$path"
34724
34725  windows_path="$new_path"
34726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34727    unix_path=`$CYGPATH -u "$windows_path"`
34728    new_path="$unix_path"
34729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34731    new_path="$unix_path"
34732  fi
34733
34734
34735    new_path=`$WHICH "$new_path" 2> /dev/null`
34736    # bat and cmd files are not always considered executable in MSYS causing which
34737    # to not find them
34738    if test "x$new_path" = x \
34739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34741      new_path="$path"
34742
34743  windows_path="$new_path"
34744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34745    unix_path=`$CYGPATH -u "$windows_path"`
34746    new_path="$unix_path"
34747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34749    new_path="$unix_path"
34750  fi
34751
34752    fi
34753
34754    if test "x$new_path" = x; then
34755      # It's still not found. Now this is an unrecoverable error.
34756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34757$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34758      has_space=`$ECHO "$complete" | $GREP " "`
34759      if test "x$has_space" != x; then
34760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34762      fi
34763      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34764    fi
34765  fi
34766
34767  # Now new_path has a complete unix path to the binary
34768  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34769    # Keep paths in /bin as-is, but remove trailing .exe if any
34770    new_path="${new_path/%.exe/}"
34771    # Do not save /bin paths to all_fixpath_prefixes!
34772  else
34773    # Not in mixed or Windows style, start by that.
34774    new_path=`cmd //c echo $new_path`
34775
34776  input_path="$new_path"
34777  # Check if we need to convert this using DOS-style short mode. If the path
34778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34779  # take no chances and rewrite it.
34780  # Note: m4 eats our [], so we need to use [ and ] instead.
34781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34782  if test "x$has_forbidden_chars" != x; then
34783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34785  fi
34786
34787    # Output is in $new_path
34788
34789  windows_path="$new_path"
34790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34791    unix_path=`$CYGPATH -u "$windows_path"`
34792    new_path="$unix_path"
34793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34795    new_path="$unix_path"
34796  fi
34797
34798    # remove trailing .exe if any
34799    new_path="${new_path/%.exe/}"
34800
34801    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34802    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34803  fi
34804
34805    else
34806      # We're on a unix platform. Hooray! :)
34807      # First separate the path from the arguments. This will split at the first
34808      # space.
34809      complete="$MT"
34810      path="${complete%% *}"
34811      tmp="$complete EOL"
34812      arguments="${tmp#* }"
34813
34814      # Cannot rely on the command "which" here since it doesn't always work.
34815      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34816      if test -z "$is_absolute_path"; then
34817        # Path to executable is not absolute. Find it.
34818        IFS_save="$IFS"
34819        IFS=:
34820        for p in $PATH; do
34821          if test -f "$p/$path" && test -x "$p/$path"; then
34822            new_path="$p/$path"
34823            break
34824          fi
34825        done
34826        IFS="$IFS_save"
34827      else
34828        # This is an absolute path, we can use it without further modifications.
34829        new_path="$path"
34830      fi
34831
34832      if test "x$new_path" = x; then
34833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34834$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34835        has_space=`$ECHO "$complete" | $GREP " "`
34836        if test "x$has_space" != x; then
34837          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34838$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34839        fi
34840        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34841      fi
34842    fi
34843
34844    # Now join together the path and the arguments once again
34845    if test "x$arguments" != xEOL; then
34846      new_complete="$new_path ${arguments% *}"
34847    else
34848      new_complete="$new_path"
34849    fi
34850
34851    if test "x$complete" != "x$new_complete"; then
34852      MT="$new_complete"
34853      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34854$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34855    fi
34856  fi
34857
34858    # Setup the resource compiler (RC)
34859    # Extract the first word of "rc", so it can be a program name with args.
34860set dummy rc; ac_word=$2
34861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34862$as_echo_n "checking for $ac_word... " >&6; }
34863if ${ac_cv_prog_RC+:} false; then :
34864  $as_echo_n "(cached) " >&6
34865else
34866  if test -n "$RC"; then
34867  ac_cv_prog_RC="$RC" # Let the user override the test.
34868else
34869  ac_prog_rejected=no
34870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34871for as_dir in $PATH
34872do
34873  IFS=$as_save_IFS
34874  test -z "$as_dir" && as_dir=.
34875    for ac_exec_ext in '' $ac_executable_extensions; do
34876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34877    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34878       ac_prog_rejected=yes
34879       continue
34880     fi
34881    ac_cv_prog_RC="rc"
34882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34883    break 2
34884  fi
34885done
34886  done
34887IFS=$as_save_IFS
34888
34889if test $ac_prog_rejected = yes; then
34890  # We found a bogon in the path, so make sure we never use it.
34891  set dummy $ac_cv_prog_RC
34892  shift
34893  if test $# != 0; then
34894    # We chose a different compiler from the bogus one.
34895    # However, it has the same basename, so the bogon will be chosen
34896    # first if we set RC to just the basename; use the full file name.
34897    shift
34898    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34899  fi
34900fi
34901fi
34902fi
34903RC=$ac_cv_prog_RC
34904if test -n "$RC"; then
34905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34906$as_echo "$RC" >&6; }
34907else
34908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34909$as_echo "no" >&6; }
34910fi
34911
34912
34913
34914  # Only process if variable expands to non-empty
34915
34916  if test "x$RC" != x; then
34917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34918
34919  # First separate the path from the arguments. This will split at the first
34920  # space.
34921  complete="$RC"
34922  path="${complete%% *}"
34923  tmp="$complete EOL"
34924  arguments="${tmp#* }"
34925
34926  # Input might be given as Windows format, start by converting to
34927  # unix format.
34928  new_path=`$CYGPATH -u "$path"`
34929
34930  # Now try to locate executable using which
34931  new_path=`$WHICH "$new_path" 2> /dev/null`
34932  # bat and cmd files are not always considered executable in cygwin causing which
34933  # to not find them
34934  if test "x$new_path" = x \
34935      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34936      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34937    new_path=`$CYGPATH -u "$path"`
34938  fi
34939  if test "x$new_path" = x; then
34940    # Oops. Which didn't find the executable.
34941    # The splitting of arguments from the executable at a space might have been incorrect,
34942    # since paths with space are more likely in Windows. Give it another try with the whole
34943    # argument.
34944    path="$complete"
34945    arguments="EOL"
34946    new_path=`$CYGPATH -u "$path"`
34947    new_path=`$WHICH "$new_path" 2> /dev/null`
34948    # bat and cmd files are not always considered executable in cygwin causing which
34949    # to not find them
34950    if test "x$new_path" = x \
34951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34953      new_path=`$CYGPATH -u "$path"`
34954    fi
34955    if test "x$new_path" = x; then
34956      # It's still not found. Now this is an unrecoverable error.
34957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34958$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34959      has_space=`$ECHO "$complete" | $GREP " "`
34960      if test "x$has_space" != x; then
34961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34963      fi
34964      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34965    fi
34966  fi
34967
34968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34971  # "foo.exe" is OK but "foo" is an error.
34972  #
34973  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34974  # It is also a way to make sure we got the proper file name for the real test later on.
34975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34976  if test "x$test_shortpath" = x; then
34977    # Short path failed, file does not exist as specified.
34978    # Try adding .exe or .cmd
34979    if test -f "${new_path}.exe"; then
34980      input_to_shortpath="${new_path}.exe"
34981    elif test -f "${new_path}.cmd"; then
34982      input_to_shortpath="${new_path}.cmd"
34983    else
34984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34985$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34986      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34987$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34988      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34989    fi
34990  else
34991    input_to_shortpath="$new_path"
34992  fi
34993
34994  # Call helper function which possibly converts this using DOS-style short mode.
34995  # If so, the updated path is stored in $new_path.
34996  new_path="$input_to_shortpath"
34997
34998  input_path="$input_to_shortpath"
34999  # Check if we need to convert this using DOS-style short mode. If the path
35000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35001  # take no chances and rewrite it.
35002  # Note: m4 eats our [], so we need to use [ and ] instead.
35003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35004  if test "x$has_forbidden_chars" != x; then
35005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35009      # Going to short mode and back again did indeed matter. Since short mode is
35010      # case insensitive, let's make it lowercase to improve readability.
35011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35012      # Now convert it back to Unix-style (cygpath)
35013      input_path=`$CYGPATH -u "$shortmode_path"`
35014      new_path="$input_path"
35015    fi
35016  fi
35017
35018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35019  if test "x$test_cygdrive_prefix" = x; then
35020    # As a simple fix, exclude /usr/bin since it's not a real path.
35021    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35023      # a path prefixed by /cygdrive for fixpath to work.
35024      new_path="$CYGWIN_ROOT_PATH$input_path"
35025    fi
35026  fi
35027
35028  # remove trailing .exe if any
35029  new_path="${new_path/%.exe/}"
35030
35031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35032
35033  # First separate the path from the arguments. This will split at the first
35034  # space.
35035  complete="$RC"
35036  path="${complete%% *}"
35037  tmp="$complete EOL"
35038  arguments="${tmp#* }"
35039
35040  # Input might be given as Windows format, start by converting to
35041  # unix format.
35042  new_path="$path"
35043
35044  windows_path="$new_path"
35045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35046    unix_path=`$CYGPATH -u "$windows_path"`
35047    new_path="$unix_path"
35048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35050    new_path="$unix_path"
35051  fi
35052
35053
35054  # Now try to locate executable using which
35055  new_path=`$WHICH "$new_path" 2> /dev/null`
35056
35057  if test "x$new_path" = x; then
35058    # Oops. Which didn't find the executable.
35059    # The splitting of arguments from the executable at a space might have been incorrect,
35060    # since paths with space are more likely in Windows. Give it another try with the whole
35061    # argument.
35062    path="$complete"
35063    arguments="EOL"
35064    new_path="$path"
35065
35066  windows_path="$new_path"
35067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35068    unix_path=`$CYGPATH -u "$windows_path"`
35069    new_path="$unix_path"
35070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35072    new_path="$unix_path"
35073  fi
35074
35075
35076    new_path=`$WHICH "$new_path" 2> /dev/null`
35077    # bat and cmd files are not always considered executable in MSYS causing which
35078    # to not find them
35079    if test "x$new_path" = x \
35080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35082      new_path="$path"
35083
35084  windows_path="$new_path"
35085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35086    unix_path=`$CYGPATH -u "$windows_path"`
35087    new_path="$unix_path"
35088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35090    new_path="$unix_path"
35091  fi
35092
35093    fi
35094
35095    if test "x$new_path" = x; then
35096      # It's still not found. Now this is an unrecoverable error.
35097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35098$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35099      has_space=`$ECHO "$complete" | $GREP " "`
35100      if test "x$has_space" != x; then
35101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35103      fi
35104      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35105    fi
35106  fi
35107
35108  # Now new_path has a complete unix path to the binary
35109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35110    # Keep paths in /bin as-is, but remove trailing .exe if any
35111    new_path="${new_path/%.exe/}"
35112    # Do not save /bin paths to all_fixpath_prefixes!
35113  else
35114    # Not in mixed or Windows style, start by that.
35115    new_path=`cmd //c echo $new_path`
35116
35117  input_path="$new_path"
35118  # Check if we need to convert this using DOS-style short mode. If the path
35119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35120  # take no chances and rewrite it.
35121  # Note: m4 eats our [], so we need to use [ and ] instead.
35122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35123  if test "x$has_forbidden_chars" != x; then
35124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35126  fi
35127
35128    # Output is in $new_path
35129
35130  windows_path="$new_path"
35131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35132    unix_path=`$CYGPATH -u "$windows_path"`
35133    new_path="$unix_path"
35134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35136    new_path="$unix_path"
35137  fi
35138
35139    # remove trailing .exe if any
35140    new_path="${new_path/%.exe/}"
35141
35142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35144  fi
35145
35146    else
35147      # We're on a unix platform. Hooray! :)
35148      # First separate the path from the arguments. This will split at the first
35149      # space.
35150      complete="$RC"
35151      path="${complete%% *}"
35152      tmp="$complete EOL"
35153      arguments="${tmp#* }"
35154
35155      # Cannot rely on the command "which" here since it doesn't always work.
35156      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35157      if test -z "$is_absolute_path"; then
35158        # Path to executable is not absolute. Find it.
35159        IFS_save="$IFS"
35160        IFS=:
35161        for p in $PATH; do
35162          if test -f "$p/$path" && test -x "$p/$path"; then
35163            new_path="$p/$path"
35164            break
35165          fi
35166        done
35167        IFS="$IFS_save"
35168      else
35169        # This is an absolute path, we can use it without further modifications.
35170        new_path="$path"
35171      fi
35172
35173      if test "x$new_path" = x; then
35174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35175$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35176        has_space=`$ECHO "$complete" | $GREP " "`
35177        if test "x$has_space" != x; then
35178          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35180        fi
35181        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35182      fi
35183    fi
35184
35185    # Now join together the path and the arguments once again
35186    if test "x$arguments" != xEOL; then
35187      new_complete="$new_path ${arguments% *}"
35188    else
35189      new_complete="$new_path"
35190    fi
35191
35192    if test "x$complete" != "x$new_complete"; then
35193      RC="$new_complete"
35194      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35195$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35196    fi
35197  fi
35198
35199    # Extract the first word of "dumpbin", so it can be a program name with args.
35200set dummy dumpbin; ac_word=$2
35201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35202$as_echo_n "checking for $ac_word... " >&6; }
35203if ${ac_cv_prog_DUMPBIN+:} false; then :
35204  $as_echo_n "(cached) " >&6
35205else
35206  if test -n "$DUMPBIN"; then
35207  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35208else
35209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35210for as_dir in $PATH
35211do
35212  IFS=$as_save_IFS
35213  test -z "$as_dir" && as_dir=.
35214    for ac_exec_ext in '' $ac_executable_extensions; do
35215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35216    ac_cv_prog_DUMPBIN="dumpbin"
35217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35218    break 2
35219  fi
35220done
35221  done
35222IFS=$as_save_IFS
35223
35224fi
35225fi
35226DUMPBIN=$ac_cv_prog_DUMPBIN
35227if test -n "$DUMPBIN"; then
35228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35229$as_echo "$DUMPBIN" >&6; }
35230else
35231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35232$as_echo "no" >&6; }
35233fi
35234
35235
35236
35237  # Only process if variable expands to non-empty
35238
35239  if test "x$DUMPBIN" != x; then
35240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35241
35242  # First separate the path from the arguments. This will split at the first
35243  # space.
35244  complete="$DUMPBIN"
35245  path="${complete%% *}"
35246  tmp="$complete EOL"
35247  arguments="${tmp#* }"
35248
35249  # Input might be given as Windows format, start by converting to
35250  # unix format.
35251  new_path=`$CYGPATH -u "$path"`
35252
35253  # Now try to locate executable using which
35254  new_path=`$WHICH "$new_path" 2> /dev/null`
35255  # bat and cmd files are not always considered executable in cygwin causing which
35256  # to not find them
35257  if test "x$new_path" = x \
35258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35260    new_path=`$CYGPATH -u "$path"`
35261  fi
35262  if test "x$new_path" = x; then
35263    # Oops. Which didn't find the executable.
35264    # The splitting of arguments from the executable at a space might have been incorrect,
35265    # since paths with space are more likely in Windows. Give it another try with the whole
35266    # argument.
35267    path="$complete"
35268    arguments="EOL"
35269    new_path=`$CYGPATH -u "$path"`
35270    new_path=`$WHICH "$new_path" 2> /dev/null`
35271    # bat and cmd files are not always considered executable in cygwin causing which
35272    # to not find them
35273    if test "x$new_path" = x \
35274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35276      new_path=`$CYGPATH -u "$path"`
35277    fi
35278    if test "x$new_path" = x; then
35279      # It's still not found. Now this is an unrecoverable error.
35280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35281$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35282      has_space=`$ECHO "$complete" | $GREP " "`
35283      if test "x$has_space" != x; then
35284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35286      fi
35287      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35288    fi
35289  fi
35290
35291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35294  # "foo.exe" is OK but "foo" is an error.
35295  #
35296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35297  # It is also a way to make sure we got the proper file name for the real test later on.
35298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35299  if test "x$test_shortpath" = x; then
35300    # Short path failed, file does not exist as specified.
35301    # Try adding .exe or .cmd
35302    if test -f "${new_path}.exe"; then
35303      input_to_shortpath="${new_path}.exe"
35304    elif test -f "${new_path}.cmd"; then
35305      input_to_shortpath="${new_path}.cmd"
35306    else
35307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35308$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35311      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35312    fi
35313  else
35314    input_to_shortpath="$new_path"
35315  fi
35316
35317  # Call helper function which possibly converts this using DOS-style short mode.
35318  # If so, the updated path is stored in $new_path.
35319  new_path="$input_to_shortpath"
35320
35321  input_path="$input_to_shortpath"
35322  # Check if we need to convert this using DOS-style short mode. If the path
35323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35324  # take no chances and rewrite it.
35325  # Note: m4 eats our [], so we need to use [ and ] instead.
35326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35327  if test "x$has_forbidden_chars" != x; then
35328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35332      # Going to short mode and back again did indeed matter. Since short mode is
35333      # case insensitive, let's make it lowercase to improve readability.
35334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35335      # Now convert it back to Unix-style (cygpath)
35336      input_path=`$CYGPATH -u "$shortmode_path"`
35337      new_path="$input_path"
35338    fi
35339  fi
35340
35341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35342  if test "x$test_cygdrive_prefix" = x; then
35343    # As a simple fix, exclude /usr/bin since it's not a real path.
35344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35346      # a path prefixed by /cygdrive for fixpath to work.
35347      new_path="$CYGWIN_ROOT_PATH$input_path"
35348    fi
35349  fi
35350
35351  # remove trailing .exe if any
35352  new_path="${new_path/%.exe/}"
35353
35354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35355
35356  # First separate the path from the arguments. This will split at the first
35357  # space.
35358  complete="$DUMPBIN"
35359  path="${complete%% *}"
35360  tmp="$complete EOL"
35361  arguments="${tmp#* }"
35362
35363  # Input might be given as Windows format, start by converting to
35364  # unix format.
35365  new_path="$path"
35366
35367  windows_path="$new_path"
35368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35369    unix_path=`$CYGPATH -u "$windows_path"`
35370    new_path="$unix_path"
35371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35373    new_path="$unix_path"
35374  fi
35375
35376
35377  # Now try to locate executable using which
35378  new_path=`$WHICH "$new_path" 2> /dev/null`
35379
35380  if test "x$new_path" = x; then
35381    # Oops. Which didn't find the executable.
35382    # The splitting of arguments from the executable at a space might have been incorrect,
35383    # since paths with space are more likely in Windows. Give it another try with the whole
35384    # argument.
35385    path="$complete"
35386    arguments="EOL"
35387    new_path="$path"
35388
35389  windows_path="$new_path"
35390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35391    unix_path=`$CYGPATH -u "$windows_path"`
35392    new_path="$unix_path"
35393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35395    new_path="$unix_path"
35396  fi
35397
35398
35399    new_path=`$WHICH "$new_path" 2> /dev/null`
35400    # bat and cmd files are not always considered executable in MSYS causing which
35401    # to not find them
35402    if test "x$new_path" = x \
35403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35405      new_path="$path"
35406
35407  windows_path="$new_path"
35408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35409    unix_path=`$CYGPATH -u "$windows_path"`
35410    new_path="$unix_path"
35411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35413    new_path="$unix_path"
35414  fi
35415
35416    fi
35417
35418    if test "x$new_path" = x; then
35419      # It's still not found. Now this is an unrecoverable error.
35420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35421$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35422      has_space=`$ECHO "$complete" | $GREP " "`
35423      if test "x$has_space" != x; then
35424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35426      fi
35427      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35428    fi
35429  fi
35430
35431  # Now new_path has a complete unix path to the binary
35432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35433    # Keep paths in /bin as-is, but remove trailing .exe if any
35434    new_path="${new_path/%.exe/}"
35435    # Do not save /bin paths to all_fixpath_prefixes!
35436  else
35437    # Not in mixed or Windows style, start by that.
35438    new_path=`cmd //c echo $new_path`
35439
35440  input_path="$new_path"
35441  # Check if we need to convert this using DOS-style short mode. If the path
35442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35443  # take no chances and rewrite it.
35444  # Note: m4 eats our [], so we need to use [ and ] instead.
35445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35446  if test "x$has_forbidden_chars" != x; then
35447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35449  fi
35450
35451    # Output is in $new_path
35452
35453  windows_path="$new_path"
35454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35455    unix_path=`$CYGPATH -u "$windows_path"`
35456    new_path="$unix_path"
35457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35459    new_path="$unix_path"
35460  fi
35461
35462    # remove trailing .exe if any
35463    new_path="${new_path/%.exe/}"
35464
35465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35467  fi
35468
35469    else
35470      # We're on a unix platform. Hooray! :)
35471      # First separate the path from the arguments. This will split at the first
35472      # space.
35473      complete="$DUMPBIN"
35474      path="${complete%% *}"
35475      tmp="$complete EOL"
35476      arguments="${tmp#* }"
35477
35478      # Cannot rely on the command "which" here since it doesn't always work.
35479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35480      if test -z "$is_absolute_path"; then
35481        # Path to executable is not absolute. Find it.
35482        IFS_save="$IFS"
35483        IFS=:
35484        for p in $PATH; do
35485          if test -f "$p/$path" && test -x "$p/$path"; then
35486            new_path="$p/$path"
35487            break
35488          fi
35489        done
35490        IFS="$IFS_save"
35491      else
35492        # This is an absolute path, we can use it without further modifications.
35493        new_path="$path"
35494      fi
35495
35496      if test "x$new_path" = x; then
35497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35498$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35499        has_space=`$ECHO "$complete" | $GREP " "`
35500        if test "x$has_space" != x; then
35501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35503        fi
35504        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35505      fi
35506    fi
35507
35508    # Now join together the path and the arguments once again
35509    if test "x$arguments" != xEOL; then
35510      new_complete="$new_path ${arguments% *}"
35511    else
35512      new_complete="$new_path"
35513    fi
35514
35515    if test "x$complete" != "x$new_complete"; then
35516      DUMPBIN="$new_complete"
35517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35518$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35519    fi
35520  fi
35521
35522    # We need to check for 'msbuild.exe' because at the place where we expect to
35523    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35524    # won't find the 'msbuild.exe' executable in that case (and the
35525    # 'ac_executable_extensions' is unusable due to performance reasons).
35526    # Notice that we intentionally don't fix up the path to MSBUILD because we
35527    # will call it in a DOS shell during freetype detection on Windows (see
35528    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35529    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35530set dummy msbuild.exe; ac_word=$2
35531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35532$as_echo_n "checking for $ac_word... " >&6; }
35533if ${ac_cv_prog_MSBUILD+:} false; then :
35534  $as_echo_n "(cached) " >&6
35535else
35536  if test -n "$MSBUILD"; then
35537  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35538else
35539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35540for as_dir in $PATH
35541do
35542  IFS=$as_save_IFS
35543  test -z "$as_dir" && as_dir=.
35544    for ac_exec_ext in '' $ac_executable_extensions; do
35545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35546    ac_cv_prog_MSBUILD="msbuild.exe"
35547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35548    break 2
35549  fi
35550done
35551  done
35552IFS=$as_save_IFS
35553
35554fi
35555fi
35556MSBUILD=$ac_cv_prog_MSBUILD
35557if test -n "$MSBUILD"; then
35558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35559$as_echo "$MSBUILD" >&6; }
35560else
35561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35562$as_echo "no" >&6; }
35563fi
35564
35565
35566  fi
35567
35568  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35569
35570
35571  # Publish this variable in the help.
35572
35573
35574  if test "x$STRIP" = x; then
35575    # The variable is not set by user, try to locate tool using the code snippet
35576    for ac_prog in strip
35577do
35578  # Extract the first word of "$ac_prog", so it can be a program name with args.
35579set dummy $ac_prog; ac_word=$2
35580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35581$as_echo_n "checking for $ac_word... " >&6; }
35582if ${ac_cv_path_STRIP+:} false; then :
35583  $as_echo_n "(cached) " >&6
35584else
35585  case $STRIP in
35586  [\\/]* | ?:[\\/]*)
35587  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35588  ;;
35589  *)
35590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35591for as_dir in $PATH
35592do
35593  IFS=$as_save_IFS
35594  test -z "$as_dir" && as_dir=.
35595    for ac_exec_ext in '' $ac_executable_extensions; do
35596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35597    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35599    break 2
35600  fi
35601done
35602  done
35603IFS=$as_save_IFS
35604
35605  ;;
35606esac
35607fi
35608STRIP=$ac_cv_path_STRIP
35609if test -n "$STRIP"; then
35610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35611$as_echo "$STRIP" >&6; }
35612else
35613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35614$as_echo "no" >&6; }
35615fi
35616
35617
35618  test -n "$STRIP" && break
35619done
35620
35621  else
35622    # The variable is set, but is it from the command line or the environment?
35623
35624    # Try to remove the string !STRIP! from our list.
35625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35627      # If it failed, the variable was not from the command line. Ignore it,
35628      # but warn the user (except for BASH, which is always set by the calling BASH).
35629      if test "xSTRIP" != xBASH; then
35630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35631$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35632      fi
35633      # Try to locate tool using the code snippet
35634      for ac_prog in strip
35635do
35636  # Extract the first word of "$ac_prog", so it can be a program name with args.
35637set dummy $ac_prog; ac_word=$2
35638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35639$as_echo_n "checking for $ac_word... " >&6; }
35640if ${ac_cv_path_STRIP+:} false; then :
35641  $as_echo_n "(cached) " >&6
35642else
35643  case $STRIP in
35644  [\\/]* | ?:[\\/]*)
35645  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35646  ;;
35647  *)
35648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35649for as_dir in $PATH
35650do
35651  IFS=$as_save_IFS
35652  test -z "$as_dir" && as_dir=.
35653    for ac_exec_ext in '' $ac_executable_extensions; do
35654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35655    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35657    break 2
35658  fi
35659done
35660  done
35661IFS=$as_save_IFS
35662
35663  ;;
35664esac
35665fi
35666STRIP=$ac_cv_path_STRIP
35667if test -n "$STRIP"; then
35668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35669$as_echo "$STRIP" >&6; }
35670else
35671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35672$as_echo "no" >&6; }
35673fi
35674
35675
35676  test -n "$STRIP" && break
35677done
35678
35679    else
35680      # If it succeeded, then it was overridden by the user. We will use it
35681      # for the tool.
35682
35683      # First remove it from the list of overridden variables, so we can test
35684      # for unknown variables in the end.
35685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35686
35687      # Check if the provided tool contains a complete path.
35688      tool_specified="$STRIP"
35689      tool_basename="${tool_specified##*/}"
35690      if test "x$tool_basename" = "x$tool_specified"; then
35691        # A command without a complete path is provided, search $PATH.
35692        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35693$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35694        # Extract the first word of "$tool_basename", so it can be a program name with args.
35695set dummy $tool_basename; ac_word=$2
35696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35697$as_echo_n "checking for $ac_word... " >&6; }
35698if ${ac_cv_path_STRIP+:} false; then :
35699  $as_echo_n "(cached) " >&6
35700else
35701  case $STRIP in
35702  [\\/]* | ?:[\\/]*)
35703  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35704  ;;
35705  *)
35706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35707for as_dir in $PATH
35708do
35709  IFS=$as_save_IFS
35710  test -z "$as_dir" && as_dir=.
35711    for ac_exec_ext in '' $ac_executable_extensions; do
35712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35713    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35715    break 2
35716  fi
35717done
35718  done
35719IFS=$as_save_IFS
35720
35721  ;;
35722esac
35723fi
35724STRIP=$ac_cv_path_STRIP
35725if test -n "$STRIP"; then
35726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35727$as_echo "$STRIP" >&6; }
35728else
35729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35730$as_echo "no" >&6; }
35731fi
35732
35733
35734        if test "x$STRIP" = x; then
35735          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35736        fi
35737      else
35738        # Otherwise we believe it is a complete path. Use it as it is.
35739        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35740$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35741        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35742$as_echo_n "checking for STRIP... " >&6; }
35743        if test ! -x "$tool_specified"; then
35744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35745$as_echo "not found" >&6; }
35746          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35747        fi
35748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35749$as_echo "$tool_specified" >&6; }
35750      fi
35751    fi
35752  fi
35753
35754
35755
35756  # Only process if variable expands to non-empty
35757
35758  if test "x$STRIP" != x; then
35759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35760
35761  # First separate the path from the arguments. This will split at the first
35762  # space.
35763  complete="$STRIP"
35764  path="${complete%% *}"
35765  tmp="$complete EOL"
35766  arguments="${tmp#* }"
35767
35768  # Input might be given as Windows format, start by converting to
35769  # unix format.
35770  new_path=`$CYGPATH -u "$path"`
35771
35772  # Now try to locate executable using which
35773  new_path=`$WHICH "$new_path" 2> /dev/null`
35774  # bat and cmd files are not always considered executable in cygwin causing which
35775  # to not find them
35776  if test "x$new_path" = x \
35777      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35778      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35779    new_path=`$CYGPATH -u "$path"`
35780  fi
35781  if test "x$new_path" = x; then
35782    # Oops. Which didn't find the executable.
35783    # The splitting of arguments from the executable at a space might have been incorrect,
35784    # since paths with space are more likely in Windows. Give it another try with the whole
35785    # argument.
35786    path="$complete"
35787    arguments="EOL"
35788    new_path=`$CYGPATH -u "$path"`
35789    new_path=`$WHICH "$new_path" 2> /dev/null`
35790    # bat and cmd files are not always considered executable in cygwin causing which
35791    # to not find them
35792    if test "x$new_path" = x \
35793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35795      new_path=`$CYGPATH -u "$path"`
35796    fi
35797    if test "x$new_path" = x; then
35798      # It's still not found. Now this is an unrecoverable error.
35799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35800$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35801      has_space=`$ECHO "$complete" | $GREP " "`
35802      if test "x$has_space" != x; then
35803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35805      fi
35806      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35807    fi
35808  fi
35809
35810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35813  # "foo.exe" is OK but "foo" is an error.
35814  #
35815  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35816  # It is also a way to make sure we got the proper file name for the real test later on.
35817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35818  if test "x$test_shortpath" = x; then
35819    # Short path failed, file does not exist as specified.
35820    # Try adding .exe or .cmd
35821    if test -f "${new_path}.exe"; then
35822      input_to_shortpath="${new_path}.exe"
35823    elif test -f "${new_path}.cmd"; then
35824      input_to_shortpath="${new_path}.cmd"
35825    else
35826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35827$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35828      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35829$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35830      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35831    fi
35832  else
35833    input_to_shortpath="$new_path"
35834  fi
35835
35836  # Call helper function which possibly converts this using DOS-style short mode.
35837  # If so, the updated path is stored in $new_path.
35838  new_path="$input_to_shortpath"
35839
35840  input_path="$input_to_shortpath"
35841  # Check if we need to convert this using DOS-style short mode. If the path
35842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35843  # take no chances and rewrite it.
35844  # Note: m4 eats our [], so we need to use [ and ] instead.
35845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35846  if test "x$has_forbidden_chars" != x; then
35847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35851      # Going to short mode and back again did indeed matter. Since short mode is
35852      # case insensitive, let's make it lowercase to improve readability.
35853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35854      # Now convert it back to Unix-style (cygpath)
35855      input_path=`$CYGPATH -u "$shortmode_path"`
35856      new_path="$input_path"
35857    fi
35858  fi
35859
35860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35861  if test "x$test_cygdrive_prefix" = x; then
35862    # As a simple fix, exclude /usr/bin since it's not a real path.
35863    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35865      # a path prefixed by /cygdrive for fixpath to work.
35866      new_path="$CYGWIN_ROOT_PATH$input_path"
35867    fi
35868  fi
35869
35870  # remove trailing .exe if any
35871  new_path="${new_path/%.exe/}"
35872
35873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35874
35875  # First separate the path from the arguments. This will split at the first
35876  # space.
35877  complete="$STRIP"
35878  path="${complete%% *}"
35879  tmp="$complete EOL"
35880  arguments="${tmp#* }"
35881
35882  # Input might be given as Windows format, start by converting to
35883  # unix format.
35884  new_path="$path"
35885
35886  windows_path="$new_path"
35887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35888    unix_path=`$CYGPATH -u "$windows_path"`
35889    new_path="$unix_path"
35890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35892    new_path="$unix_path"
35893  fi
35894
35895
35896  # Now try to locate executable using which
35897  new_path=`$WHICH "$new_path" 2> /dev/null`
35898
35899  if test "x$new_path" = x; then
35900    # Oops. Which didn't find the executable.
35901    # The splitting of arguments from the executable at a space might have been incorrect,
35902    # since paths with space are more likely in Windows. Give it another try with the whole
35903    # argument.
35904    path="$complete"
35905    arguments="EOL"
35906    new_path="$path"
35907
35908  windows_path="$new_path"
35909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35910    unix_path=`$CYGPATH -u "$windows_path"`
35911    new_path="$unix_path"
35912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35914    new_path="$unix_path"
35915  fi
35916
35917
35918    new_path=`$WHICH "$new_path" 2> /dev/null`
35919    # bat and cmd files are not always considered executable in MSYS causing which
35920    # to not find them
35921    if test "x$new_path" = x \
35922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35924      new_path="$path"
35925
35926  windows_path="$new_path"
35927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35928    unix_path=`$CYGPATH -u "$windows_path"`
35929    new_path="$unix_path"
35930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35932    new_path="$unix_path"
35933  fi
35934
35935    fi
35936
35937    if test "x$new_path" = x; then
35938      # It's still not found. Now this is an unrecoverable error.
35939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35940$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35941      has_space=`$ECHO "$complete" | $GREP " "`
35942      if test "x$has_space" != x; then
35943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35945      fi
35946      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35947    fi
35948  fi
35949
35950  # Now new_path has a complete unix path to the binary
35951  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35952    # Keep paths in /bin as-is, but remove trailing .exe if any
35953    new_path="${new_path/%.exe/}"
35954    # Do not save /bin paths to all_fixpath_prefixes!
35955  else
35956    # Not in mixed or Windows style, start by that.
35957    new_path=`cmd //c echo $new_path`
35958
35959  input_path="$new_path"
35960  # Check if we need to convert this using DOS-style short mode. If the path
35961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35962  # take no chances and rewrite it.
35963  # Note: m4 eats our [], so we need to use [ and ] instead.
35964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35965  if test "x$has_forbidden_chars" != x; then
35966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35968  fi
35969
35970    # Output is in $new_path
35971
35972  windows_path="$new_path"
35973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35974    unix_path=`$CYGPATH -u "$windows_path"`
35975    new_path="$unix_path"
35976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35978    new_path="$unix_path"
35979  fi
35980
35981    # remove trailing .exe if any
35982    new_path="${new_path/%.exe/}"
35983
35984    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35985    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35986  fi
35987
35988    else
35989      # We're on a unix platform. Hooray! :)
35990      # First separate the path from the arguments. This will split at the first
35991      # space.
35992      complete="$STRIP"
35993      path="${complete%% *}"
35994      tmp="$complete EOL"
35995      arguments="${tmp#* }"
35996
35997      # Cannot rely on the command "which" here since it doesn't always work.
35998      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35999      if test -z "$is_absolute_path"; then
36000        # Path to executable is not absolute. Find it.
36001        IFS_save="$IFS"
36002        IFS=:
36003        for p in $PATH; do
36004          if test -f "$p/$path" && test -x "$p/$path"; then
36005            new_path="$p/$path"
36006            break
36007          fi
36008        done
36009        IFS="$IFS_save"
36010      else
36011        # This is an absolute path, we can use it without further modifications.
36012        new_path="$path"
36013      fi
36014
36015      if test "x$new_path" = x; then
36016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36017$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36018        has_space=`$ECHO "$complete" | $GREP " "`
36019        if test "x$has_space" != x; then
36020          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36021$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36022        fi
36023        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36024      fi
36025    fi
36026
36027    # Now join together the path and the arguments once again
36028    if test "x$arguments" != xEOL; then
36029      new_complete="$new_path ${arguments% *}"
36030    else
36031      new_complete="$new_path"
36032    fi
36033
36034    if test "x$complete" != "x$new_complete"; then
36035      STRIP="$new_complete"
36036      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36037$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36038    fi
36039  fi
36040
36041
36042
36043  # Publish this variable in the help.
36044
36045
36046  if test "x$NM" = x; then
36047    # The variable is not set by user, try to locate tool using the code snippet
36048    for ac_prog in nm
36049do
36050  # Extract the first word of "$ac_prog", so it can be a program name with args.
36051set dummy $ac_prog; ac_word=$2
36052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36053$as_echo_n "checking for $ac_word... " >&6; }
36054if ${ac_cv_path_NM+:} false; then :
36055  $as_echo_n "(cached) " >&6
36056else
36057  case $NM in
36058  [\\/]* | ?:[\\/]*)
36059  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36060  ;;
36061  *)
36062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36063for as_dir in $PATH
36064do
36065  IFS=$as_save_IFS
36066  test -z "$as_dir" && as_dir=.
36067    for ac_exec_ext in '' $ac_executable_extensions; do
36068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36069    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36071    break 2
36072  fi
36073done
36074  done
36075IFS=$as_save_IFS
36076
36077  ;;
36078esac
36079fi
36080NM=$ac_cv_path_NM
36081if test -n "$NM"; then
36082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36083$as_echo "$NM" >&6; }
36084else
36085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36086$as_echo "no" >&6; }
36087fi
36088
36089
36090  test -n "$NM" && break
36091done
36092
36093  else
36094    # The variable is set, but is it from the command line or the environment?
36095
36096    # Try to remove the string !NM! from our list.
36097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36099      # If it failed, the variable was not from the command line. Ignore it,
36100      # but warn the user (except for BASH, which is always set by the calling BASH).
36101      if test "xNM" != xBASH; then
36102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36103$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36104      fi
36105      # Try to locate tool using the code snippet
36106      for ac_prog in nm
36107do
36108  # Extract the first word of "$ac_prog", so it can be a program name with args.
36109set dummy $ac_prog; ac_word=$2
36110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36111$as_echo_n "checking for $ac_word... " >&6; }
36112if ${ac_cv_path_NM+:} false; then :
36113  $as_echo_n "(cached) " >&6
36114else
36115  case $NM in
36116  [\\/]* | ?:[\\/]*)
36117  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36118  ;;
36119  *)
36120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36121for as_dir in $PATH
36122do
36123  IFS=$as_save_IFS
36124  test -z "$as_dir" && as_dir=.
36125    for ac_exec_ext in '' $ac_executable_extensions; do
36126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36127    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36129    break 2
36130  fi
36131done
36132  done
36133IFS=$as_save_IFS
36134
36135  ;;
36136esac
36137fi
36138NM=$ac_cv_path_NM
36139if test -n "$NM"; then
36140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36141$as_echo "$NM" >&6; }
36142else
36143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36144$as_echo "no" >&6; }
36145fi
36146
36147
36148  test -n "$NM" && break
36149done
36150
36151    else
36152      # If it succeeded, then it was overridden by the user. We will use it
36153      # for the tool.
36154
36155      # First remove it from the list of overridden variables, so we can test
36156      # for unknown variables in the end.
36157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36158
36159      # Check if the provided tool contains a complete path.
36160      tool_specified="$NM"
36161      tool_basename="${tool_specified##*/}"
36162      if test "x$tool_basename" = "x$tool_specified"; then
36163        # A command without a complete path is provided, search $PATH.
36164        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36165$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36166        # Extract the first word of "$tool_basename", so it can be a program name with args.
36167set dummy $tool_basename; ac_word=$2
36168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36169$as_echo_n "checking for $ac_word... " >&6; }
36170if ${ac_cv_path_NM+:} false; then :
36171  $as_echo_n "(cached) " >&6
36172else
36173  case $NM in
36174  [\\/]* | ?:[\\/]*)
36175  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36176  ;;
36177  *)
36178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36179for as_dir in $PATH
36180do
36181  IFS=$as_save_IFS
36182  test -z "$as_dir" && as_dir=.
36183    for ac_exec_ext in '' $ac_executable_extensions; do
36184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36185    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36187    break 2
36188  fi
36189done
36190  done
36191IFS=$as_save_IFS
36192
36193  ;;
36194esac
36195fi
36196NM=$ac_cv_path_NM
36197if test -n "$NM"; then
36198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36199$as_echo "$NM" >&6; }
36200else
36201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36202$as_echo "no" >&6; }
36203fi
36204
36205
36206        if test "x$NM" = x; then
36207          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36208        fi
36209      else
36210        # Otherwise we believe it is a complete path. Use it as it is.
36211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36212$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36214$as_echo_n "checking for NM... " >&6; }
36215        if test ! -x "$tool_specified"; then
36216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36217$as_echo "not found" >&6; }
36218          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36219        fi
36220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36221$as_echo "$tool_specified" >&6; }
36222      fi
36223    fi
36224  fi
36225
36226
36227
36228  # Only process if variable expands to non-empty
36229
36230  if test "x$NM" != x; then
36231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36232
36233  # First separate the path from the arguments. This will split at the first
36234  # space.
36235  complete="$NM"
36236  path="${complete%% *}"
36237  tmp="$complete EOL"
36238  arguments="${tmp#* }"
36239
36240  # Input might be given as Windows format, start by converting to
36241  # unix format.
36242  new_path=`$CYGPATH -u "$path"`
36243
36244  # Now try to locate executable using which
36245  new_path=`$WHICH "$new_path" 2> /dev/null`
36246  # bat and cmd files are not always considered executable in cygwin causing which
36247  # to not find them
36248  if test "x$new_path" = x \
36249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36251    new_path=`$CYGPATH -u "$path"`
36252  fi
36253  if test "x$new_path" = x; then
36254    # Oops. Which didn't find the executable.
36255    # The splitting of arguments from the executable at a space might have been incorrect,
36256    # since paths with space are more likely in Windows. Give it another try with the whole
36257    # argument.
36258    path="$complete"
36259    arguments="EOL"
36260    new_path=`$CYGPATH -u "$path"`
36261    new_path=`$WHICH "$new_path" 2> /dev/null`
36262    # bat and cmd files are not always considered executable in cygwin causing which
36263    # to not find them
36264    if test "x$new_path" = x \
36265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36267      new_path=`$CYGPATH -u "$path"`
36268    fi
36269    if test "x$new_path" = x; then
36270      # It's still not found. Now this is an unrecoverable error.
36271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36272$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36273      has_space=`$ECHO "$complete" | $GREP " "`
36274      if test "x$has_space" != x; then
36275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36277      fi
36278      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36279    fi
36280  fi
36281
36282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36285  # "foo.exe" is OK but "foo" is an error.
36286  #
36287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36288  # It is also a way to make sure we got the proper file name for the real test later on.
36289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36290  if test "x$test_shortpath" = x; then
36291    # Short path failed, file does not exist as specified.
36292    # Try adding .exe or .cmd
36293    if test -f "${new_path}.exe"; then
36294      input_to_shortpath="${new_path}.exe"
36295    elif test -f "${new_path}.cmd"; then
36296      input_to_shortpath="${new_path}.cmd"
36297    else
36298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36299$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36302      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36303    fi
36304  else
36305    input_to_shortpath="$new_path"
36306  fi
36307
36308  # Call helper function which possibly converts this using DOS-style short mode.
36309  # If so, the updated path is stored in $new_path.
36310  new_path="$input_to_shortpath"
36311
36312  input_path="$input_to_shortpath"
36313  # Check if we need to convert this using DOS-style short mode. If the path
36314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36315  # take no chances and rewrite it.
36316  # Note: m4 eats our [], so we need to use [ and ] instead.
36317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36318  if test "x$has_forbidden_chars" != x; then
36319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36323      # Going to short mode and back again did indeed matter. Since short mode is
36324      # case insensitive, let's make it lowercase to improve readability.
36325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36326      # Now convert it back to Unix-style (cygpath)
36327      input_path=`$CYGPATH -u "$shortmode_path"`
36328      new_path="$input_path"
36329    fi
36330  fi
36331
36332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36333  if test "x$test_cygdrive_prefix" = x; then
36334    # As a simple fix, exclude /usr/bin since it's not a real path.
36335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36337      # a path prefixed by /cygdrive for fixpath to work.
36338      new_path="$CYGWIN_ROOT_PATH$input_path"
36339    fi
36340  fi
36341
36342  # remove trailing .exe if any
36343  new_path="${new_path/%.exe/}"
36344
36345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36346
36347  # First separate the path from the arguments. This will split at the first
36348  # space.
36349  complete="$NM"
36350  path="${complete%% *}"
36351  tmp="$complete EOL"
36352  arguments="${tmp#* }"
36353
36354  # Input might be given as Windows format, start by converting to
36355  # unix format.
36356  new_path="$path"
36357
36358  windows_path="$new_path"
36359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36360    unix_path=`$CYGPATH -u "$windows_path"`
36361    new_path="$unix_path"
36362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36364    new_path="$unix_path"
36365  fi
36366
36367
36368  # Now try to locate executable using which
36369  new_path=`$WHICH "$new_path" 2> /dev/null`
36370
36371  if test "x$new_path" = x; then
36372    # Oops. Which didn't find the executable.
36373    # The splitting of arguments from the executable at a space might have been incorrect,
36374    # since paths with space are more likely in Windows. Give it another try with the whole
36375    # argument.
36376    path="$complete"
36377    arguments="EOL"
36378    new_path="$path"
36379
36380  windows_path="$new_path"
36381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36382    unix_path=`$CYGPATH -u "$windows_path"`
36383    new_path="$unix_path"
36384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36386    new_path="$unix_path"
36387  fi
36388
36389
36390    new_path=`$WHICH "$new_path" 2> /dev/null`
36391    # bat and cmd files are not always considered executable in MSYS causing which
36392    # to not find them
36393    if test "x$new_path" = x \
36394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36396      new_path="$path"
36397
36398  windows_path="$new_path"
36399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36400    unix_path=`$CYGPATH -u "$windows_path"`
36401    new_path="$unix_path"
36402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36404    new_path="$unix_path"
36405  fi
36406
36407    fi
36408
36409    if test "x$new_path" = x; then
36410      # It's still not found. Now this is an unrecoverable error.
36411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36412$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36413      has_space=`$ECHO "$complete" | $GREP " "`
36414      if test "x$has_space" != x; then
36415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36417      fi
36418      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36419    fi
36420  fi
36421
36422  # Now new_path has a complete unix path to the binary
36423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36424    # Keep paths in /bin as-is, but remove trailing .exe if any
36425    new_path="${new_path/%.exe/}"
36426    # Do not save /bin paths to all_fixpath_prefixes!
36427  else
36428    # Not in mixed or Windows style, start by that.
36429    new_path=`cmd //c echo $new_path`
36430
36431  input_path="$new_path"
36432  # Check if we need to convert this using DOS-style short mode. If the path
36433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36434  # take no chances and rewrite it.
36435  # Note: m4 eats our [], so we need to use [ and ] instead.
36436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36437  if test "x$has_forbidden_chars" != x; then
36438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36440  fi
36441
36442    # Output is in $new_path
36443
36444  windows_path="$new_path"
36445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36446    unix_path=`$CYGPATH -u "$windows_path"`
36447    new_path="$unix_path"
36448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36450    new_path="$unix_path"
36451  fi
36452
36453    # remove trailing .exe if any
36454    new_path="${new_path/%.exe/}"
36455
36456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36458  fi
36459
36460    else
36461      # We're on a unix platform. Hooray! :)
36462      # First separate the path from the arguments. This will split at the first
36463      # space.
36464      complete="$NM"
36465      path="${complete%% *}"
36466      tmp="$complete EOL"
36467      arguments="${tmp#* }"
36468
36469      # Cannot rely on the command "which" here since it doesn't always work.
36470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36471      if test -z "$is_absolute_path"; then
36472        # Path to executable is not absolute. Find it.
36473        IFS_save="$IFS"
36474        IFS=:
36475        for p in $PATH; do
36476          if test -f "$p/$path" && test -x "$p/$path"; then
36477            new_path="$p/$path"
36478            break
36479          fi
36480        done
36481        IFS="$IFS_save"
36482      else
36483        # This is an absolute path, we can use it without further modifications.
36484        new_path="$path"
36485      fi
36486
36487      if test "x$new_path" = x; then
36488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36489$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36490        has_space=`$ECHO "$complete" | $GREP " "`
36491        if test "x$has_space" != x; then
36492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36494        fi
36495        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36496      fi
36497    fi
36498
36499    # Now join together the path and the arguments once again
36500    if test "x$arguments" != xEOL; then
36501      new_complete="$new_path ${arguments% *}"
36502    else
36503      new_complete="$new_path"
36504    fi
36505
36506    if test "x$complete" != "x$new_complete"; then
36507      NM="$new_complete"
36508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36509$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36510    fi
36511  fi
36512
36513
36514
36515  # Publish this variable in the help.
36516
36517
36518  if test "x$GNM" = x; then
36519    # The variable is not set by user, try to locate tool using the code snippet
36520    for ac_prog in gnm
36521do
36522  # Extract the first word of "$ac_prog", so it can be a program name with args.
36523set dummy $ac_prog; ac_word=$2
36524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36525$as_echo_n "checking for $ac_word... " >&6; }
36526if ${ac_cv_path_GNM+:} false; then :
36527  $as_echo_n "(cached) " >&6
36528else
36529  case $GNM in
36530  [\\/]* | ?:[\\/]*)
36531  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36532  ;;
36533  *)
36534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36535for as_dir in $PATH
36536do
36537  IFS=$as_save_IFS
36538  test -z "$as_dir" && as_dir=.
36539    for ac_exec_ext in '' $ac_executable_extensions; do
36540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36541    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36543    break 2
36544  fi
36545done
36546  done
36547IFS=$as_save_IFS
36548
36549  ;;
36550esac
36551fi
36552GNM=$ac_cv_path_GNM
36553if test -n "$GNM"; then
36554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36555$as_echo "$GNM" >&6; }
36556else
36557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36558$as_echo "no" >&6; }
36559fi
36560
36561
36562  test -n "$GNM" && break
36563done
36564
36565  else
36566    # The variable is set, but is it from the command line or the environment?
36567
36568    # Try to remove the string !GNM! from our list.
36569    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36570    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36571      # If it failed, the variable was not from the command line. Ignore it,
36572      # but warn the user (except for BASH, which is always set by the calling BASH).
36573      if test "xGNM" != xBASH; then
36574        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36575$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36576      fi
36577      # Try to locate tool using the code snippet
36578      for ac_prog in gnm
36579do
36580  # Extract the first word of "$ac_prog", so it can be a program name with args.
36581set dummy $ac_prog; ac_word=$2
36582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36583$as_echo_n "checking for $ac_word... " >&6; }
36584if ${ac_cv_path_GNM+:} false; then :
36585  $as_echo_n "(cached) " >&6
36586else
36587  case $GNM in
36588  [\\/]* | ?:[\\/]*)
36589  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36590  ;;
36591  *)
36592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36593for as_dir in $PATH
36594do
36595  IFS=$as_save_IFS
36596  test -z "$as_dir" && as_dir=.
36597    for ac_exec_ext in '' $ac_executable_extensions; do
36598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36599    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36601    break 2
36602  fi
36603done
36604  done
36605IFS=$as_save_IFS
36606
36607  ;;
36608esac
36609fi
36610GNM=$ac_cv_path_GNM
36611if test -n "$GNM"; then
36612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36613$as_echo "$GNM" >&6; }
36614else
36615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36616$as_echo "no" >&6; }
36617fi
36618
36619
36620  test -n "$GNM" && break
36621done
36622
36623    else
36624      # If it succeeded, then it was overridden by the user. We will use it
36625      # for the tool.
36626
36627      # First remove it from the list of overridden variables, so we can test
36628      # for unknown variables in the end.
36629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36630
36631      # Check if the provided tool contains a complete path.
36632      tool_specified="$GNM"
36633      tool_basename="${tool_specified##*/}"
36634      if test "x$tool_basename" = "x$tool_specified"; then
36635        # A command without a complete path is provided, search $PATH.
36636        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36637$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36638        # Extract the first word of "$tool_basename", so it can be a program name with args.
36639set dummy $tool_basename; ac_word=$2
36640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36641$as_echo_n "checking for $ac_word... " >&6; }
36642if ${ac_cv_path_GNM+:} false; then :
36643  $as_echo_n "(cached) " >&6
36644else
36645  case $GNM in
36646  [\\/]* | ?:[\\/]*)
36647  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36648  ;;
36649  *)
36650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36651for as_dir in $PATH
36652do
36653  IFS=$as_save_IFS
36654  test -z "$as_dir" && as_dir=.
36655    for ac_exec_ext in '' $ac_executable_extensions; do
36656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36657    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36659    break 2
36660  fi
36661done
36662  done
36663IFS=$as_save_IFS
36664
36665  ;;
36666esac
36667fi
36668GNM=$ac_cv_path_GNM
36669if test -n "$GNM"; then
36670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36671$as_echo "$GNM" >&6; }
36672else
36673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36674$as_echo "no" >&6; }
36675fi
36676
36677
36678        if test "x$GNM" = x; then
36679          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36680        fi
36681      else
36682        # Otherwise we believe it is a complete path. Use it as it is.
36683        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36684$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36686$as_echo_n "checking for GNM... " >&6; }
36687        if test ! -x "$tool_specified"; then
36688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36689$as_echo "not found" >&6; }
36690          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36691        fi
36692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36693$as_echo "$tool_specified" >&6; }
36694      fi
36695    fi
36696  fi
36697
36698
36699
36700  # Only process if variable expands to non-empty
36701
36702  if test "x$GNM" != x; then
36703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36704
36705  # First separate the path from the arguments. This will split at the first
36706  # space.
36707  complete="$GNM"
36708  path="${complete%% *}"
36709  tmp="$complete EOL"
36710  arguments="${tmp#* }"
36711
36712  # Input might be given as Windows format, start by converting to
36713  # unix format.
36714  new_path=`$CYGPATH -u "$path"`
36715
36716  # Now try to locate executable using which
36717  new_path=`$WHICH "$new_path" 2> /dev/null`
36718  # bat and cmd files are not always considered executable in cygwin causing which
36719  # to not find them
36720  if test "x$new_path" = x \
36721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36723    new_path=`$CYGPATH -u "$path"`
36724  fi
36725  if test "x$new_path" = x; then
36726    # Oops. Which didn't find the executable.
36727    # The splitting of arguments from the executable at a space might have been incorrect,
36728    # since paths with space are more likely in Windows. Give it another try with the whole
36729    # argument.
36730    path="$complete"
36731    arguments="EOL"
36732    new_path=`$CYGPATH -u "$path"`
36733    new_path=`$WHICH "$new_path" 2> /dev/null`
36734    # bat and cmd files are not always considered executable in cygwin causing which
36735    # to not find them
36736    if test "x$new_path" = x \
36737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36739      new_path=`$CYGPATH -u "$path"`
36740    fi
36741    if test "x$new_path" = x; then
36742      # It's still not found. Now this is an unrecoverable error.
36743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36744$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36745      has_space=`$ECHO "$complete" | $GREP " "`
36746      if test "x$has_space" != x; then
36747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36749      fi
36750      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36751    fi
36752  fi
36753
36754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36757  # "foo.exe" is OK but "foo" is an error.
36758  #
36759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36760  # It is also a way to make sure we got the proper file name for the real test later on.
36761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36762  if test "x$test_shortpath" = x; then
36763    # Short path failed, file does not exist as specified.
36764    # Try adding .exe or .cmd
36765    if test -f "${new_path}.exe"; then
36766      input_to_shortpath="${new_path}.exe"
36767    elif test -f "${new_path}.cmd"; then
36768      input_to_shortpath="${new_path}.cmd"
36769    else
36770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36771$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36774      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36775    fi
36776  else
36777    input_to_shortpath="$new_path"
36778  fi
36779
36780  # Call helper function which possibly converts this using DOS-style short mode.
36781  # If so, the updated path is stored in $new_path.
36782  new_path="$input_to_shortpath"
36783
36784  input_path="$input_to_shortpath"
36785  # Check if we need to convert this using DOS-style short mode. If the path
36786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36787  # take no chances and rewrite it.
36788  # Note: m4 eats our [], so we need to use [ and ] instead.
36789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36790  if test "x$has_forbidden_chars" != x; then
36791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36795      # Going to short mode and back again did indeed matter. Since short mode is
36796      # case insensitive, let's make it lowercase to improve readability.
36797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36798      # Now convert it back to Unix-style (cygpath)
36799      input_path=`$CYGPATH -u "$shortmode_path"`
36800      new_path="$input_path"
36801    fi
36802  fi
36803
36804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36805  if test "x$test_cygdrive_prefix" = x; then
36806    # As a simple fix, exclude /usr/bin since it's not a real path.
36807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36809      # a path prefixed by /cygdrive for fixpath to work.
36810      new_path="$CYGWIN_ROOT_PATH$input_path"
36811    fi
36812  fi
36813
36814  # remove trailing .exe if any
36815  new_path="${new_path/%.exe/}"
36816
36817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36818
36819  # First separate the path from the arguments. This will split at the first
36820  # space.
36821  complete="$GNM"
36822  path="${complete%% *}"
36823  tmp="$complete EOL"
36824  arguments="${tmp#* }"
36825
36826  # Input might be given as Windows format, start by converting to
36827  # unix format.
36828  new_path="$path"
36829
36830  windows_path="$new_path"
36831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36832    unix_path=`$CYGPATH -u "$windows_path"`
36833    new_path="$unix_path"
36834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36836    new_path="$unix_path"
36837  fi
36838
36839
36840  # Now try to locate executable using which
36841  new_path=`$WHICH "$new_path" 2> /dev/null`
36842
36843  if test "x$new_path" = x; then
36844    # Oops. Which didn't find the executable.
36845    # The splitting of arguments from the executable at a space might have been incorrect,
36846    # since paths with space are more likely in Windows. Give it another try with the whole
36847    # argument.
36848    path="$complete"
36849    arguments="EOL"
36850    new_path="$path"
36851
36852  windows_path="$new_path"
36853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36854    unix_path=`$CYGPATH -u "$windows_path"`
36855    new_path="$unix_path"
36856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36858    new_path="$unix_path"
36859  fi
36860
36861
36862    new_path=`$WHICH "$new_path" 2> /dev/null`
36863    # bat and cmd files are not always considered executable in MSYS causing which
36864    # to not find them
36865    if test "x$new_path" = x \
36866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36868      new_path="$path"
36869
36870  windows_path="$new_path"
36871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36872    unix_path=`$CYGPATH -u "$windows_path"`
36873    new_path="$unix_path"
36874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36876    new_path="$unix_path"
36877  fi
36878
36879    fi
36880
36881    if test "x$new_path" = x; then
36882      # It's still not found. Now this is an unrecoverable error.
36883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36884$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36885      has_space=`$ECHO "$complete" | $GREP " "`
36886      if test "x$has_space" != x; then
36887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36889      fi
36890      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36891    fi
36892  fi
36893
36894  # Now new_path has a complete unix path to the binary
36895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36896    # Keep paths in /bin as-is, but remove trailing .exe if any
36897    new_path="${new_path/%.exe/}"
36898    # Do not save /bin paths to all_fixpath_prefixes!
36899  else
36900    # Not in mixed or Windows style, start by that.
36901    new_path=`cmd //c echo $new_path`
36902
36903  input_path="$new_path"
36904  # Check if we need to convert this using DOS-style short mode. If the path
36905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36906  # take no chances and rewrite it.
36907  # Note: m4 eats our [], so we need to use [ and ] instead.
36908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36909  if test "x$has_forbidden_chars" != x; then
36910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36912  fi
36913
36914    # Output is in $new_path
36915
36916  windows_path="$new_path"
36917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36918    unix_path=`$CYGPATH -u "$windows_path"`
36919    new_path="$unix_path"
36920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36922    new_path="$unix_path"
36923  fi
36924
36925    # remove trailing .exe if any
36926    new_path="${new_path/%.exe/}"
36927
36928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36930  fi
36931
36932    else
36933      # We're on a unix platform. Hooray! :)
36934      # First separate the path from the arguments. This will split at the first
36935      # space.
36936      complete="$GNM"
36937      path="${complete%% *}"
36938      tmp="$complete EOL"
36939      arguments="${tmp#* }"
36940
36941      # Cannot rely on the command "which" here since it doesn't always work.
36942      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36943      if test -z "$is_absolute_path"; then
36944        # Path to executable is not absolute. Find it.
36945        IFS_save="$IFS"
36946        IFS=:
36947        for p in $PATH; do
36948          if test -f "$p/$path" && test -x "$p/$path"; then
36949            new_path="$p/$path"
36950            break
36951          fi
36952        done
36953        IFS="$IFS_save"
36954      else
36955        # This is an absolute path, we can use it without further modifications.
36956        new_path="$path"
36957      fi
36958
36959      if test "x$new_path" = x; then
36960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36961$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36962        has_space=`$ECHO "$complete" | $GREP " "`
36963        if test "x$has_space" != x; then
36964          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36966        fi
36967        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36968      fi
36969    fi
36970
36971    # Now join together the path and the arguments once again
36972    if test "x$arguments" != xEOL; then
36973      new_complete="$new_path ${arguments% *}"
36974    else
36975      new_complete="$new_path"
36976    fi
36977
36978    if test "x$complete" != "x$new_complete"; then
36979      GNM="$new_complete"
36980      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36981$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36982    fi
36983  fi
36984
36985  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36986    # FIXME: we should unify this with the solaris case above.
36987
36988
36989  # Publish this variable in the help.
36990
36991
36992  if test "x$STRIP" = x; then
36993    # The variable is not set by user, try to locate tool using the code snippet
36994    if test -n "$ac_tool_prefix"; then
36995  for ac_prog in strip
36996  do
36997    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36998set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37000$as_echo_n "checking for $ac_word... " >&6; }
37001if ${ac_cv_prog_STRIP+:} false; then :
37002  $as_echo_n "(cached) " >&6
37003else
37004  if test -n "$STRIP"; then
37005  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37006else
37007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37008for as_dir in $PATH
37009do
37010  IFS=$as_save_IFS
37011  test -z "$as_dir" && as_dir=.
37012    for ac_exec_ext in '' $ac_executable_extensions; do
37013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37014    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37016    break 2
37017  fi
37018done
37019  done
37020IFS=$as_save_IFS
37021
37022fi
37023fi
37024STRIP=$ac_cv_prog_STRIP
37025if test -n "$STRIP"; then
37026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37027$as_echo "$STRIP" >&6; }
37028else
37029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37030$as_echo "no" >&6; }
37031fi
37032
37033
37034    test -n "$STRIP" && break
37035  done
37036fi
37037if test -z "$STRIP"; then
37038  ac_ct_STRIP=$STRIP
37039  for ac_prog in strip
37040do
37041  # Extract the first word of "$ac_prog", so it can be a program name with args.
37042set dummy $ac_prog; ac_word=$2
37043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37044$as_echo_n "checking for $ac_word... " >&6; }
37045if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37046  $as_echo_n "(cached) " >&6
37047else
37048  if test -n "$ac_ct_STRIP"; then
37049  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37050else
37051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37052for as_dir in $PATH
37053do
37054  IFS=$as_save_IFS
37055  test -z "$as_dir" && as_dir=.
37056    for ac_exec_ext in '' $ac_executable_extensions; do
37057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37058    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37060    break 2
37061  fi
37062done
37063  done
37064IFS=$as_save_IFS
37065
37066fi
37067fi
37068ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37069if test -n "$ac_ct_STRIP"; then
37070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37071$as_echo "$ac_ct_STRIP" >&6; }
37072else
37073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37074$as_echo "no" >&6; }
37075fi
37076
37077
37078  test -n "$ac_ct_STRIP" && break
37079done
37080
37081  if test "x$ac_ct_STRIP" = x; then
37082    STRIP=""
37083  else
37084    case $cross_compiling:$ac_tool_warned in
37085yes:)
37086{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37087$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37088ac_tool_warned=yes ;;
37089esac
37090    STRIP=$ac_ct_STRIP
37091  fi
37092fi
37093
37094  else
37095    # The variable is set, but is it from the command line or the environment?
37096
37097    # Try to remove the string !STRIP! from our list.
37098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37100      # If it failed, the variable was not from the command line. Ignore it,
37101      # but warn the user (except for BASH, which is always set by the calling BASH).
37102      if test "xSTRIP" != xBASH; then
37103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37104$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37105      fi
37106      # Try to locate tool using the code snippet
37107      if test -n "$ac_tool_prefix"; then
37108  for ac_prog in strip
37109  do
37110    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37111set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37113$as_echo_n "checking for $ac_word... " >&6; }
37114if ${ac_cv_prog_STRIP+:} false; then :
37115  $as_echo_n "(cached) " >&6
37116else
37117  if test -n "$STRIP"; then
37118  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37119else
37120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37121for as_dir in $PATH
37122do
37123  IFS=$as_save_IFS
37124  test -z "$as_dir" && as_dir=.
37125    for ac_exec_ext in '' $ac_executable_extensions; do
37126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37127    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37129    break 2
37130  fi
37131done
37132  done
37133IFS=$as_save_IFS
37134
37135fi
37136fi
37137STRIP=$ac_cv_prog_STRIP
37138if test -n "$STRIP"; then
37139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37140$as_echo "$STRIP" >&6; }
37141else
37142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37143$as_echo "no" >&6; }
37144fi
37145
37146
37147    test -n "$STRIP" && break
37148  done
37149fi
37150if test -z "$STRIP"; then
37151  ac_ct_STRIP=$STRIP
37152  for ac_prog in strip
37153do
37154  # Extract the first word of "$ac_prog", so it can be a program name with args.
37155set dummy $ac_prog; ac_word=$2
37156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37157$as_echo_n "checking for $ac_word... " >&6; }
37158if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37159  $as_echo_n "(cached) " >&6
37160else
37161  if test -n "$ac_ct_STRIP"; then
37162  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37163else
37164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37165for as_dir in $PATH
37166do
37167  IFS=$as_save_IFS
37168  test -z "$as_dir" && as_dir=.
37169    for ac_exec_ext in '' $ac_executable_extensions; do
37170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37171    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37173    break 2
37174  fi
37175done
37176  done
37177IFS=$as_save_IFS
37178
37179fi
37180fi
37181ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37182if test -n "$ac_ct_STRIP"; then
37183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37184$as_echo "$ac_ct_STRIP" >&6; }
37185else
37186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37187$as_echo "no" >&6; }
37188fi
37189
37190
37191  test -n "$ac_ct_STRIP" && break
37192done
37193
37194  if test "x$ac_ct_STRIP" = x; then
37195    STRIP=""
37196  else
37197    case $cross_compiling:$ac_tool_warned in
37198yes:)
37199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37201ac_tool_warned=yes ;;
37202esac
37203    STRIP=$ac_ct_STRIP
37204  fi
37205fi
37206
37207    else
37208      # If it succeeded, then it was overridden by the user. We will use it
37209      # for the tool.
37210
37211      # First remove it from the list of overridden variables, so we can test
37212      # for unknown variables in the end.
37213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37214
37215      # Check if the provided tool contains a complete path.
37216      tool_specified="$STRIP"
37217      tool_basename="${tool_specified##*/}"
37218      if test "x$tool_basename" = "x$tool_specified"; then
37219        # A command without a complete path is provided, search $PATH.
37220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37221$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37222        # Extract the first word of "$tool_basename", so it can be a program name with args.
37223set dummy $tool_basename; ac_word=$2
37224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37225$as_echo_n "checking for $ac_word... " >&6; }
37226if ${ac_cv_path_STRIP+:} false; then :
37227  $as_echo_n "(cached) " >&6
37228else
37229  case $STRIP in
37230  [\\/]* | ?:[\\/]*)
37231  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37232  ;;
37233  *)
37234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37235for as_dir in $PATH
37236do
37237  IFS=$as_save_IFS
37238  test -z "$as_dir" && as_dir=.
37239    for ac_exec_ext in '' $ac_executable_extensions; do
37240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37241    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37243    break 2
37244  fi
37245done
37246  done
37247IFS=$as_save_IFS
37248
37249  ;;
37250esac
37251fi
37252STRIP=$ac_cv_path_STRIP
37253if test -n "$STRIP"; then
37254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37255$as_echo "$STRIP" >&6; }
37256else
37257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37258$as_echo "no" >&6; }
37259fi
37260
37261
37262        if test "x$STRIP" = x; then
37263          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37264        fi
37265      else
37266        # Otherwise we believe it is a complete path. Use it as it is.
37267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37268$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37270$as_echo_n "checking for STRIP... " >&6; }
37271        if test ! -x "$tool_specified"; then
37272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37273$as_echo "not found" >&6; }
37274          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37275        fi
37276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37277$as_echo "$tool_specified" >&6; }
37278      fi
37279    fi
37280  fi
37281
37282
37283
37284  # Only process if variable expands to non-empty
37285
37286  if test "x$STRIP" != x; then
37287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37288
37289  # First separate the path from the arguments. This will split at the first
37290  # space.
37291  complete="$STRIP"
37292  path="${complete%% *}"
37293  tmp="$complete EOL"
37294  arguments="${tmp#* }"
37295
37296  # Input might be given as Windows format, start by converting to
37297  # unix format.
37298  new_path=`$CYGPATH -u "$path"`
37299
37300  # Now try to locate executable using which
37301  new_path=`$WHICH "$new_path" 2> /dev/null`
37302  # bat and cmd files are not always considered executable in cygwin causing which
37303  # to not find them
37304  if test "x$new_path" = x \
37305      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37306      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37307    new_path=`$CYGPATH -u "$path"`
37308  fi
37309  if test "x$new_path" = x; then
37310    # Oops. Which didn't find the executable.
37311    # The splitting of arguments from the executable at a space might have been incorrect,
37312    # since paths with space are more likely in Windows. Give it another try with the whole
37313    # argument.
37314    path="$complete"
37315    arguments="EOL"
37316    new_path=`$CYGPATH -u "$path"`
37317    new_path=`$WHICH "$new_path" 2> /dev/null`
37318    # bat and cmd files are not always considered executable in cygwin causing which
37319    # to not find them
37320    if test "x$new_path" = x \
37321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37323      new_path=`$CYGPATH -u "$path"`
37324    fi
37325    if test "x$new_path" = x; then
37326      # It's still not found. Now this is an unrecoverable error.
37327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37328$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37329      has_space=`$ECHO "$complete" | $GREP " "`
37330      if test "x$has_space" != x; then
37331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37333      fi
37334      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37335    fi
37336  fi
37337
37338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37341  # "foo.exe" is OK but "foo" is an error.
37342  #
37343  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37344  # It is also a way to make sure we got the proper file name for the real test later on.
37345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37346  if test "x$test_shortpath" = x; then
37347    # Short path failed, file does not exist as specified.
37348    # Try adding .exe or .cmd
37349    if test -f "${new_path}.exe"; then
37350      input_to_shortpath="${new_path}.exe"
37351    elif test -f "${new_path}.cmd"; then
37352      input_to_shortpath="${new_path}.cmd"
37353    else
37354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37355$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37356      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37357$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37358      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37359    fi
37360  else
37361    input_to_shortpath="$new_path"
37362  fi
37363
37364  # Call helper function which possibly converts this using DOS-style short mode.
37365  # If so, the updated path is stored in $new_path.
37366  new_path="$input_to_shortpath"
37367
37368  input_path="$input_to_shortpath"
37369  # Check if we need to convert this using DOS-style short mode. If the path
37370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37371  # take no chances and rewrite it.
37372  # Note: m4 eats our [], so we need to use [ and ] instead.
37373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37374  if test "x$has_forbidden_chars" != x; then
37375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37379      # Going to short mode and back again did indeed matter. Since short mode is
37380      # case insensitive, let's make it lowercase to improve readability.
37381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37382      # Now convert it back to Unix-style (cygpath)
37383      input_path=`$CYGPATH -u "$shortmode_path"`
37384      new_path="$input_path"
37385    fi
37386  fi
37387
37388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37389  if test "x$test_cygdrive_prefix" = x; then
37390    # As a simple fix, exclude /usr/bin since it's not a real path.
37391    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37393      # a path prefixed by /cygdrive for fixpath to work.
37394      new_path="$CYGWIN_ROOT_PATH$input_path"
37395    fi
37396  fi
37397
37398  # remove trailing .exe if any
37399  new_path="${new_path/%.exe/}"
37400
37401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37402
37403  # First separate the path from the arguments. This will split at the first
37404  # space.
37405  complete="$STRIP"
37406  path="${complete%% *}"
37407  tmp="$complete EOL"
37408  arguments="${tmp#* }"
37409
37410  # Input might be given as Windows format, start by converting to
37411  # unix format.
37412  new_path="$path"
37413
37414  windows_path="$new_path"
37415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37416    unix_path=`$CYGPATH -u "$windows_path"`
37417    new_path="$unix_path"
37418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37420    new_path="$unix_path"
37421  fi
37422
37423
37424  # Now try to locate executable using which
37425  new_path=`$WHICH "$new_path" 2> /dev/null`
37426
37427  if test "x$new_path" = x; then
37428    # Oops. Which didn't find the executable.
37429    # The splitting of arguments from the executable at a space might have been incorrect,
37430    # since paths with space are more likely in Windows. Give it another try with the whole
37431    # argument.
37432    path="$complete"
37433    arguments="EOL"
37434    new_path="$path"
37435
37436  windows_path="$new_path"
37437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37438    unix_path=`$CYGPATH -u "$windows_path"`
37439    new_path="$unix_path"
37440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37442    new_path="$unix_path"
37443  fi
37444
37445
37446    new_path=`$WHICH "$new_path" 2> /dev/null`
37447    # bat and cmd files are not always considered executable in MSYS causing which
37448    # to not find them
37449    if test "x$new_path" = x \
37450        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37451        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37452      new_path="$path"
37453
37454  windows_path="$new_path"
37455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37456    unix_path=`$CYGPATH -u "$windows_path"`
37457    new_path="$unix_path"
37458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37460    new_path="$unix_path"
37461  fi
37462
37463    fi
37464
37465    if test "x$new_path" = x; then
37466      # It's still not found. Now this is an unrecoverable error.
37467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37468$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37469      has_space=`$ECHO "$complete" | $GREP " "`
37470      if test "x$has_space" != x; then
37471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37473      fi
37474      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37475    fi
37476  fi
37477
37478  # Now new_path has a complete unix path to the binary
37479  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37480    # Keep paths in /bin as-is, but remove trailing .exe if any
37481    new_path="${new_path/%.exe/}"
37482    # Do not save /bin paths to all_fixpath_prefixes!
37483  else
37484    # Not in mixed or Windows style, start by that.
37485    new_path=`cmd //c echo $new_path`
37486
37487  input_path="$new_path"
37488  # Check if we need to convert this using DOS-style short mode. If the path
37489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37490  # take no chances and rewrite it.
37491  # Note: m4 eats our [], so we need to use [ and ] instead.
37492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37493  if test "x$has_forbidden_chars" != x; then
37494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37496  fi
37497
37498    # Output is in $new_path
37499
37500  windows_path="$new_path"
37501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37502    unix_path=`$CYGPATH -u "$windows_path"`
37503    new_path="$unix_path"
37504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37506    new_path="$unix_path"
37507  fi
37508
37509    # remove trailing .exe if any
37510    new_path="${new_path/%.exe/}"
37511
37512    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37513    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37514  fi
37515
37516    else
37517      # We're on a unix platform. Hooray! :)
37518      # First separate the path from the arguments. This will split at the first
37519      # space.
37520      complete="$STRIP"
37521      path="${complete%% *}"
37522      tmp="$complete EOL"
37523      arguments="${tmp#* }"
37524
37525      # Cannot rely on the command "which" here since it doesn't always work.
37526      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37527      if test -z "$is_absolute_path"; then
37528        # Path to executable is not absolute. Find it.
37529        IFS_save="$IFS"
37530        IFS=:
37531        for p in $PATH; do
37532          if test -f "$p/$path" && test -x "$p/$path"; then
37533            new_path="$p/$path"
37534            break
37535          fi
37536        done
37537        IFS="$IFS_save"
37538      else
37539        # This is an absolute path, we can use it without further modifications.
37540        new_path="$path"
37541      fi
37542
37543      if test "x$new_path" = x; then
37544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37545$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37546        has_space=`$ECHO "$complete" | $GREP " "`
37547        if test "x$has_space" != x; then
37548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37550        fi
37551        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37552      fi
37553    fi
37554
37555    # Now join together the path and the arguments once again
37556    if test "x$arguments" != xEOL; then
37557      new_complete="$new_path ${arguments% *}"
37558    else
37559      new_complete="$new_path"
37560    fi
37561
37562    if test "x$complete" != "x$new_complete"; then
37563      STRIP="$new_complete"
37564      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37565$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37566    fi
37567  fi
37568
37569
37570
37571  # Publish this variable in the help.
37572
37573
37574  if test "x$NM" = x; then
37575    # The variable is not set by user, try to locate tool using the code snippet
37576    if test -n "$ac_tool_prefix"; then
37577  for ac_prog in nm
37578  do
37579    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37580set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37582$as_echo_n "checking for $ac_word... " >&6; }
37583if ${ac_cv_prog_NM+:} false; then :
37584  $as_echo_n "(cached) " >&6
37585else
37586  if test -n "$NM"; then
37587  ac_cv_prog_NM="$NM" # Let the user override the test.
37588else
37589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37590for as_dir in $PATH
37591do
37592  IFS=$as_save_IFS
37593  test -z "$as_dir" && as_dir=.
37594    for ac_exec_ext in '' $ac_executable_extensions; do
37595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37596    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37598    break 2
37599  fi
37600done
37601  done
37602IFS=$as_save_IFS
37603
37604fi
37605fi
37606NM=$ac_cv_prog_NM
37607if test -n "$NM"; then
37608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37609$as_echo "$NM" >&6; }
37610else
37611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37612$as_echo "no" >&6; }
37613fi
37614
37615
37616    test -n "$NM" && break
37617  done
37618fi
37619if test -z "$NM"; then
37620  ac_ct_NM=$NM
37621  for ac_prog in nm
37622do
37623  # Extract the first word of "$ac_prog", so it can be a program name with args.
37624set dummy $ac_prog; ac_word=$2
37625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37626$as_echo_n "checking for $ac_word... " >&6; }
37627if ${ac_cv_prog_ac_ct_NM+:} false; then :
37628  $as_echo_n "(cached) " >&6
37629else
37630  if test -n "$ac_ct_NM"; then
37631  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37632else
37633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37634for as_dir in $PATH
37635do
37636  IFS=$as_save_IFS
37637  test -z "$as_dir" && as_dir=.
37638    for ac_exec_ext in '' $ac_executable_extensions; do
37639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37640    ac_cv_prog_ac_ct_NM="$ac_prog"
37641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37642    break 2
37643  fi
37644done
37645  done
37646IFS=$as_save_IFS
37647
37648fi
37649fi
37650ac_ct_NM=$ac_cv_prog_ac_ct_NM
37651if test -n "$ac_ct_NM"; then
37652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37653$as_echo "$ac_ct_NM" >&6; }
37654else
37655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37656$as_echo "no" >&6; }
37657fi
37658
37659
37660  test -n "$ac_ct_NM" && break
37661done
37662
37663  if test "x$ac_ct_NM" = x; then
37664    NM=""
37665  else
37666    case $cross_compiling:$ac_tool_warned in
37667yes:)
37668{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37669$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37670ac_tool_warned=yes ;;
37671esac
37672    NM=$ac_ct_NM
37673  fi
37674fi
37675
37676  else
37677    # The variable is set, but is it from the command line or the environment?
37678
37679    # Try to remove the string !NM! from our list.
37680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37682      # If it failed, the variable was not from the command line. Ignore it,
37683      # but warn the user (except for BASH, which is always set by the calling BASH).
37684      if test "xNM" != xBASH; then
37685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37686$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37687      fi
37688      # Try to locate tool using the code snippet
37689      if test -n "$ac_tool_prefix"; then
37690  for ac_prog in nm
37691  do
37692    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37695$as_echo_n "checking for $ac_word... " >&6; }
37696if ${ac_cv_prog_NM+:} false; then :
37697  $as_echo_n "(cached) " >&6
37698else
37699  if test -n "$NM"; then
37700  ac_cv_prog_NM="$NM" # Let the user override the test.
37701else
37702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37703for as_dir in $PATH
37704do
37705  IFS=$as_save_IFS
37706  test -z "$as_dir" && as_dir=.
37707    for ac_exec_ext in '' $ac_executable_extensions; do
37708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37709    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37711    break 2
37712  fi
37713done
37714  done
37715IFS=$as_save_IFS
37716
37717fi
37718fi
37719NM=$ac_cv_prog_NM
37720if test -n "$NM"; then
37721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37722$as_echo "$NM" >&6; }
37723else
37724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37725$as_echo "no" >&6; }
37726fi
37727
37728
37729    test -n "$NM" && break
37730  done
37731fi
37732if test -z "$NM"; then
37733  ac_ct_NM=$NM
37734  for ac_prog in nm
37735do
37736  # Extract the first word of "$ac_prog", so it can be a program name with args.
37737set dummy $ac_prog; ac_word=$2
37738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37739$as_echo_n "checking for $ac_word... " >&6; }
37740if ${ac_cv_prog_ac_ct_NM+:} false; then :
37741  $as_echo_n "(cached) " >&6
37742else
37743  if test -n "$ac_ct_NM"; then
37744  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37745else
37746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37747for as_dir in $PATH
37748do
37749  IFS=$as_save_IFS
37750  test -z "$as_dir" && as_dir=.
37751    for ac_exec_ext in '' $ac_executable_extensions; do
37752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37753    ac_cv_prog_ac_ct_NM="$ac_prog"
37754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37755    break 2
37756  fi
37757done
37758  done
37759IFS=$as_save_IFS
37760
37761fi
37762fi
37763ac_ct_NM=$ac_cv_prog_ac_ct_NM
37764if test -n "$ac_ct_NM"; then
37765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37766$as_echo "$ac_ct_NM" >&6; }
37767else
37768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37769$as_echo "no" >&6; }
37770fi
37771
37772
37773  test -n "$ac_ct_NM" && break
37774done
37775
37776  if test "x$ac_ct_NM" = x; then
37777    NM=""
37778  else
37779    case $cross_compiling:$ac_tool_warned in
37780yes:)
37781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37783ac_tool_warned=yes ;;
37784esac
37785    NM=$ac_ct_NM
37786  fi
37787fi
37788
37789    else
37790      # If it succeeded, then it was overridden by the user. We will use it
37791      # for the tool.
37792
37793      # First remove it from the list of overridden variables, so we can test
37794      # for unknown variables in the end.
37795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37796
37797      # Check if the provided tool contains a complete path.
37798      tool_specified="$NM"
37799      tool_basename="${tool_specified##*/}"
37800      if test "x$tool_basename" = "x$tool_specified"; then
37801        # A command without a complete path is provided, search $PATH.
37802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37803$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37804        # Extract the first word of "$tool_basename", so it can be a program name with args.
37805set dummy $tool_basename; ac_word=$2
37806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37807$as_echo_n "checking for $ac_word... " >&6; }
37808if ${ac_cv_path_NM+:} false; then :
37809  $as_echo_n "(cached) " >&6
37810else
37811  case $NM in
37812  [\\/]* | ?:[\\/]*)
37813  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37814  ;;
37815  *)
37816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37817for as_dir in $PATH
37818do
37819  IFS=$as_save_IFS
37820  test -z "$as_dir" && as_dir=.
37821    for ac_exec_ext in '' $ac_executable_extensions; do
37822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37823    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37825    break 2
37826  fi
37827done
37828  done
37829IFS=$as_save_IFS
37830
37831  ;;
37832esac
37833fi
37834NM=$ac_cv_path_NM
37835if test -n "$NM"; then
37836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37837$as_echo "$NM" >&6; }
37838else
37839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37840$as_echo "no" >&6; }
37841fi
37842
37843
37844        if test "x$NM" = x; then
37845          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37846        fi
37847      else
37848        # Otherwise we believe it is a complete path. Use it as it is.
37849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37850$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37852$as_echo_n "checking for NM... " >&6; }
37853        if test ! -x "$tool_specified"; then
37854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37855$as_echo "not found" >&6; }
37856          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37857        fi
37858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37859$as_echo "$tool_specified" >&6; }
37860      fi
37861    fi
37862  fi
37863
37864
37865
37866  # Only process if variable expands to non-empty
37867
37868  if test "x$NM" != x; then
37869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37870
37871  # First separate the path from the arguments. This will split at the first
37872  # space.
37873  complete="$NM"
37874  path="${complete%% *}"
37875  tmp="$complete EOL"
37876  arguments="${tmp#* }"
37877
37878  # Input might be given as Windows format, start by converting to
37879  # unix format.
37880  new_path=`$CYGPATH -u "$path"`
37881
37882  # Now try to locate executable using which
37883  new_path=`$WHICH "$new_path" 2> /dev/null`
37884  # bat and cmd files are not always considered executable in cygwin causing which
37885  # to not find them
37886  if test "x$new_path" = x \
37887      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37888      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37889    new_path=`$CYGPATH -u "$path"`
37890  fi
37891  if test "x$new_path" = x; then
37892    # Oops. Which didn't find the executable.
37893    # The splitting of arguments from the executable at a space might have been incorrect,
37894    # since paths with space are more likely in Windows. Give it another try with the whole
37895    # argument.
37896    path="$complete"
37897    arguments="EOL"
37898    new_path=`$CYGPATH -u "$path"`
37899    new_path=`$WHICH "$new_path" 2> /dev/null`
37900    # bat and cmd files are not always considered executable in cygwin causing which
37901    # to not find them
37902    if test "x$new_path" = x \
37903        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37904        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37905      new_path=`$CYGPATH -u "$path"`
37906    fi
37907    if test "x$new_path" = x; then
37908      # It's still not found. Now this is an unrecoverable error.
37909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37910$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37911      has_space=`$ECHO "$complete" | $GREP " "`
37912      if test "x$has_space" != x; then
37913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37915      fi
37916      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37917    fi
37918  fi
37919
37920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37923  # "foo.exe" is OK but "foo" is an error.
37924  #
37925  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37926  # It is also a way to make sure we got the proper file name for the real test later on.
37927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37928  if test "x$test_shortpath" = x; then
37929    # Short path failed, file does not exist as specified.
37930    # Try adding .exe or .cmd
37931    if test -f "${new_path}.exe"; then
37932      input_to_shortpath="${new_path}.exe"
37933    elif test -f "${new_path}.cmd"; then
37934      input_to_shortpath="${new_path}.cmd"
37935    else
37936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37937$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37938      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37939$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37940      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37941    fi
37942  else
37943    input_to_shortpath="$new_path"
37944  fi
37945
37946  # Call helper function which possibly converts this using DOS-style short mode.
37947  # If so, the updated path is stored in $new_path.
37948  new_path="$input_to_shortpath"
37949
37950  input_path="$input_to_shortpath"
37951  # Check if we need to convert this using DOS-style short mode. If the path
37952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37953  # take no chances and rewrite it.
37954  # Note: m4 eats our [], so we need to use [ and ] instead.
37955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37956  if test "x$has_forbidden_chars" != x; then
37957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37961      # Going to short mode and back again did indeed matter. Since short mode is
37962      # case insensitive, let's make it lowercase to improve readability.
37963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37964      # Now convert it back to Unix-style (cygpath)
37965      input_path=`$CYGPATH -u "$shortmode_path"`
37966      new_path="$input_path"
37967    fi
37968  fi
37969
37970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37971  if test "x$test_cygdrive_prefix" = x; then
37972    # As a simple fix, exclude /usr/bin since it's not a real path.
37973    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37975      # a path prefixed by /cygdrive for fixpath to work.
37976      new_path="$CYGWIN_ROOT_PATH$input_path"
37977    fi
37978  fi
37979
37980  # remove trailing .exe if any
37981  new_path="${new_path/%.exe/}"
37982
37983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37984
37985  # First separate the path from the arguments. This will split at the first
37986  # space.
37987  complete="$NM"
37988  path="${complete%% *}"
37989  tmp="$complete EOL"
37990  arguments="${tmp#* }"
37991
37992  # Input might be given as Windows format, start by converting to
37993  # unix format.
37994  new_path="$path"
37995
37996  windows_path="$new_path"
37997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37998    unix_path=`$CYGPATH -u "$windows_path"`
37999    new_path="$unix_path"
38000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38002    new_path="$unix_path"
38003  fi
38004
38005
38006  # Now try to locate executable using which
38007  new_path=`$WHICH "$new_path" 2> /dev/null`
38008
38009  if test "x$new_path" = x; then
38010    # Oops. Which didn't find the executable.
38011    # The splitting of arguments from the executable at a space might have been incorrect,
38012    # since paths with space are more likely in Windows. Give it another try with the whole
38013    # argument.
38014    path="$complete"
38015    arguments="EOL"
38016    new_path="$path"
38017
38018  windows_path="$new_path"
38019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38020    unix_path=`$CYGPATH -u "$windows_path"`
38021    new_path="$unix_path"
38022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38024    new_path="$unix_path"
38025  fi
38026
38027
38028    new_path=`$WHICH "$new_path" 2> /dev/null`
38029    # bat and cmd files are not always considered executable in MSYS causing which
38030    # to not find them
38031    if test "x$new_path" = x \
38032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38034      new_path="$path"
38035
38036  windows_path="$new_path"
38037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38038    unix_path=`$CYGPATH -u "$windows_path"`
38039    new_path="$unix_path"
38040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38042    new_path="$unix_path"
38043  fi
38044
38045    fi
38046
38047    if test "x$new_path" = x; then
38048      # It's still not found. Now this is an unrecoverable error.
38049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38050$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38051      has_space=`$ECHO "$complete" | $GREP " "`
38052      if test "x$has_space" != x; then
38053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38055      fi
38056      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38057    fi
38058  fi
38059
38060  # Now new_path has a complete unix path to the binary
38061  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38062    # Keep paths in /bin as-is, but remove trailing .exe if any
38063    new_path="${new_path/%.exe/}"
38064    # Do not save /bin paths to all_fixpath_prefixes!
38065  else
38066    # Not in mixed or Windows style, start by that.
38067    new_path=`cmd //c echo $new_path`
38068
38069  input_path="$new_path"
38070  # Check if we need to convert this using DOS-style short mode. If the path
38071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38072  # take no chances and rewrite it.
38073  # Note: m4 eats our [], so we need to use [ and ] instead.
38074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38075  if test "x$has_forbidden_chars" != x; then
38076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38078  fi
38079
38080    # Output is in $new_path
38081
38082  windows_path="$new_path"
38083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38084    unix_path=`$CYGPATH -u "$windows_path"`
38085    new_path="$unix_path"
38086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38088    new_path="$unix_path"
38089  fi
38090
38091    # remove trailing .exe if any
38092    new_path="${new_path/%.exe/}"
38093
38094    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38095    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38096  fi
38097
38098    else
38099      # We're on a unix platform. Hooray! :)
38100      # First separate the path from the arguments. This will split at the first
38101      # space.
38102      complete="$NM"
38103      path="${complete%% *}"
38104      tmp="$complete EOL"
38105      arguments="${tmp#* }"
38106
38107      # Cannot rely on the command "which" here since it doesn't always work.
38108      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38109      if test -z "$is_absolute_path"; then
38110        # Path to executable is not absolute. Find it.
38111        IFS_save="$IFS"
38112        IFS=:
38113        for p in $PATH; do
38114          if test -f "$p/$path" && test -x "$p/$path"; then
38115            new_path="$p/$path"
38116            break
38117          fi
38118        done
38119        IFS="$IFS_save"
38120      else
38121        # This is an absolute path, we can use it without further modifications.
38122        new_path="$path"
38123      fi
38124
38125      if test "x$new_path" = x; then
38126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38127$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38128        has_space=`$ECHO "$complete" | $GREP " "`
38129        if test "x$has_space" != x; then
38130          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38131$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38132        fi
38133        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38134      fi
38135    fi
38136
38137    # Now join together the path and the arguments once again
38138    if test "x$arguments" != xEOL; then
38139      new_complete="$new_path ${arguments% *}"
38140    else
38141      new_complete="$new_path"
38142    fi
38143
38144    if test "x$complete" != "x$new_complete"; then
38145      NM="$new_complete"
38146      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38147$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38148    fi
38149  fi
38150
38151    GNM="$NM"
38152
38153  fi
38154
38155  # objcopy is used for moving debug symbols to separate files when
38156  # full debug symbols are enabled.
38157  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38158
38159
38160  # Publish this variable in the help.
38161
38162
38163  if test "x$OBJCOPY" = x; then
38164    # The variable is not set by user, try to locate tool using the code snippet
38165    if test -n "$ac_tool_prefix"; then
38166  for ac_prog in gobjcopy objcopy
38167  do
38168    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38171$as_echo_n "checking for $ac_word... " >&6; }
38172if ${ac_cv_prog_OBJCOPY+:} false; then :
38173  $as_echo_n "(cached) " >&6
38174else
38175  if test -n "$OBJCOPY"; then
38176  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38177else
38178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38179for as_dir in $PATH
38180do
38181  IFS=$as_save_IFS
38182  test -z "$as_dir" && as_dir=.
38183    for ac_exec_ext in '' $ac_executable_extensions; do
38184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38185    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38187    break 2
38188  fi
38189done
38190  done
38191IFS=$as_save_IFS
38192
38193fi
38194fi
38195OBJCOPY=$ac_cv_prog_OBJCOPY
38196if test -n "$OBJCOPY"; then
38197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38198$as_echo "$OBJCOPY" >&6; }
38199else
38200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38201$as_echo "no" >&6; }
38202fi
38203
38204
38205    test -n "$OBJCOPY" && break
38206  done
38207fi
38208if test -z "$OBJCOPY"; then
38209  ac_ct_OBJCOPY=$OBJCOPY
38210  for ac_prog in gobjcopy objcopy
38211do
38212  # Extract the first word of "$ac_prog", so it can be a program name with args.
38213set dummy $ac_prog; ac_word=$2
38214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38215$as_echo_n "checking for $ac_word... " >&6; }
38216if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38217  $as_echo_n "(cached) " >&6
38218else
38219  if test -n "$ac_ct_OBJCOPY"; then
38220  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38221else
38222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38223for as_dir in $PATH
38224do
38225  IFS=$as_save_IFS
38226  test -z "$as_dir" && as_dir=.
38227    for ac_exec_ext in '' $ac_executable_extensions; do
38228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38229    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38231    break 2
38232  fi
38233done
38234  done
38235IFS=$as_save_IFS
38236
38237fi
38238fi
38239ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38240if test -n "$ac_ct_OBJCOPY"; then
38241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38242$as_echo "$ac_ct_OBJCOPY" >&6; }
38243else
38244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38245$as_echo "no" >&6; }
38246fi
38247
38248
38249  test -n "$ac_ct_OBJCOPY" && break
38250done
38251
38252  if test "x$ac_ct_OBJCOPY" = x; then
38253    OBJCOPY=""
38254  else
38255    case $cross_compiling:$ac_tool_warned in
38256yes:)
38257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38259ac_tool_warned=yes ;;
38260esac
38261    OBJCOPY=$ac_ct_OBJCOPY
38262  fi
38263fi
38264
38265  else
38266    # The variable is set, but is it from the command line or the environment?
38267
38268    # Try to remove the string !OBJCOPY! from our list.
38269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38271      # If it failed, the variable was not from the command line. Ignore it,
38272      # but warn the user (except for BASH, which is always set by the calling BASH).
38273      if test "xOBJCOPY" != xBASH; then
38274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38275$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38276      fi
38277      # Try to locate tool using the code snippet
38278      if test -n "$ac_tool_prefix"; then
38279  for ac_prog in gobjcopy objcopy
38280  do
38281    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38282set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38284$as_echo_n "checking for $ac_word... " >&6; }
38285if ${ac_cv_prog_OBJCOPY+:} false; then :
38286  $as_echo_n "(cached) " >&6
38287else
38288  if test -n "$OBJCOPY"; then
38289  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38290else
38291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38292for as_dir in $PATH
38293do
38294  IFS=$as_save_IFS
38295  test -z "$as_dir" && as_dir=.
38296    for ac_exec_ext in '' $ac_executable_extensions; do
38297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38298    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38300    break 2
38301  fi
38302done
38303  done
38304IFS=$as_save_IFS
38305
38306fi
38307fi
38308OBJCOPY=$ac_cv_prog_OBJCOPY
38309if test -n "$OBJCOPY"; then
38310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38311$as_echo "$OBJCOPY" >&6; }
38312else
38313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38314$as_echo "no" >&6; }
38315fi
38316
38317
38318    test -n "$OBJCOPY" && break
38319  done
38320fi
38321if test -z "$OBJCOPY"; then
38322  ac_ct_OBJCOPY=$OBJCOPY
38323  for ac_prog in gobjcopy objcopy
38324do
38325  # Extract the first word of "$ac_prog", so it can be a program name with args.
38326set dummy $ac_prog; ac_word=$2
38327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38328$as_echo_n "checking for $ac_word... " >&6; }
38329if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38330  $as_echo_n "(cached) " >&6
38331else
38332  if test -n "$ac_ct_OBJCOPY"; then
38333  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38334else
38335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38336for as_dir in $PATH
38337do
38338  IFS=$as_save_IFS
38339  test -z "$as_dir" && as_dir=.
38340    for ac_exec_ext in '' $ac_executable_extensions; do
38341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38342    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38344    break 2
38345  fi
38346done
38347  done
38348IFS=$as_save_IFS
38349
38350fi
38351fi
38352ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38353if test -n "$ac_ct_OBJCOPY"; then
38354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38355$as_echo "$ac_ct_OBJCOPY" >&6; }
38356else
38357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38358$as_echo "no" >&6; }
38359fi
38360
38361
38362  test -n "$ac_ct_OBJCOPY" && break
38363done
38364
38365  if test "x$ac_ct_OBJCOPY" = x; then
38366    OBJCOPY=""
38367  else
38368    case $cross_compiling:$ac_tool_warned in
38369yes:)
38370{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38371$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38372ac_tool_warned=yes ;;
38373esac
38374    OBJCOPY=$ac_ct_OBJCOPY
38375  fi
38376fi
38377
38378    else
38379      # If it succeeded, then it was overridden by the user. We will use it
38380      # for the tool.
38381
38382      # First remove it from the list of overridden variables, so we can test
38383      # for unknown variables in the end.
38384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38385
38386      # Check if the provided tool contains a complete path.
38387      tool_specified="$OBJCOPY"
38388      tool_basename="${tool_specified##*/}"
38389      if test "x$tool_basename" = "x$tool_specified"; then
38390        # A command without a complete path is provided, search $PATH.
38391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38392$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38393        # Extract the first word of "$tool_basename", so it can be a program name with args.
38394set dummy $tool_basename; ac_word=$2
38395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38396$as_echo_n "checking for $ac_word... " >&6; }
38397if ${ac_cv_path_OBJCOPY+:} false; then :
38398  $as_echo_n "(cached) " >&6
38399else
38400  case $OBJCOPY in
38401  [\\/]* | ?:[\\/]*)
38402  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38403  ;;
38404  *)
38405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38406for as_dir in $PATH
38407do
38408  IFS=$as_save_IFS
38409  test -z "$as_dir" && as_dir=.
38410    for ac_exec_ext in '' $ac_executable_extensions; do
38411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38412    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38414    break 2
38415  fi
38416done
38417  done
38418IFS=$as_save_IFS
38419
38420  ;;
38421esac
38422fi
38423OBJCOPY=$ac_cv_path_OBJCOPY
38424if test -n "$OBJCOPY"; then
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38426$as_echo "$OBJCOPY" >&6; }
38427else
38428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38429$as_echo "no" >&6; }
38430fi
38431
38432
38433        if test "x$OBJCOPY" = x; then
38434          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38435        fi
38436      else
38437        # Otherwise we believe it is a complete path. Use it as it is.
38438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38439$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38441$as_echo_n "checking for OBJCOPY... " >&6; }
38442        if test ! -x "$tool_specified"; then
38443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38444$as_echo "not found" >&6; }
38445          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38446        fi
38447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38448$as_echo "$tool_specified" >&6; }
38449      fi
38450    fi
38451  fi
38452
38453
38454    # Only call fixup if objcopy was found.
38455    if test -n "$OBJCOPY"; then
38456
38457  # Only process if variable expands to non-empty
38458
38459  if test "x$OBJCOPY" != x; then
38460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38461
38462  # First separate the path from the arguments. This will split at the first
38463  # space.
38464  complete="$OBJCOPY"
38465  path="${complete%% *}"
38466  tmp="$complete EOL"
38467  arguments="${tmp#* }"
38468
38469  # Input might be given as Windows format, start by converting to
38470  # unix format.
38471  new_path=`$CYGPATH -u "$path"`
38472
38473  # Now try to locate executable using which
38474  new_path=`$WHICH "$new_path" 2> /dev/null`
38475  # bat and cmd files are not always considered executable in cygwin causing which
38476  # to not find them
38477  if test "x$new_path" = x \
38478      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38479      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38480    new_path=`$CYGPATH -u "$path"`
38481  fi
38482  if test "x$new_path" = x; then
38483    # Oops. Which didn't find the executable.
38484    # The splitting of arguments from the executable at a space might have been incorrect,
38485    # since paths with space are more likely in Windows. Give it another try with the whole
38486    # argument.
38487    path="$complete"
38488    arguments="EOL"
38489    new_path=`$CYGPATH -u "$path"`
38490    new_path=`$WHICH "$new_path" 2> /dev/null`
38491    # bat and cmd files are not always considered executable in cygwin causing which
38492    # to not find them
38493    if test "x$new_path" = x \
38494        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38495        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38496      new_path=`$CYGPATH -u "$path"`
38497    fi
38498    if test "x$new_path" = x; then
38499      # It's still not found. Now this is an unrecoverable error.
38500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38501$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38502      has_space=`$ECHO "$complete" | $GREP " "`
38503      if test "x$has_space" != x; then
38504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38506      fi
38507      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38508    fi
38509  fi
38510
38511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38514  # "foo.exe" is OK but "foo" is an error.
38515  #
38516  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38517  # It is also a way to make sure we got the proper file name for the real test later on.
38518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38519  if test "x$test_shortpath" = x; then
38520    # Short path failed, file does not exist as specified.
38521    # Try adding .exe or .cmd
38522    if test -f "${new_path}.exe"; then
38523      input_to_shortpath="${new_path}.exe"
38524    elif test -f "${new_path}.cmd"; then
38525      input_to_shortpath="${new_path}.cmd"
38526    else
38527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38528$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38529      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38530$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38531      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38532    fi
38533  else
38534    input_to_shortpath="$new_path"
38535  fi
38536
38537  # Call helper function which possibly converts this using DOS-style short mode.
38538  # If so, the updated path is stored in $new_path.
38539  new_path="$input_to_shortpath"
38540
38541  input_path="$input_to_shortpath"
38542  # Check if we need to convert this using DOS-style short mode. If the path
38543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38544  # take no chances and rewrite it.
38545  # Note: m4 eats our [], so we need to use [ and ] instead.
38546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38547  if test "x$has_forbidden_chars" != x; then
38548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38552      # Going to short mode and back again did indeed matter. Since short mode is
38553      # case insensitive, let's make it lowercase to improve readability.
38554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38555      # Now convert it back to Unix-style (cygpath)
38556      input_path=`$CYGPATH -u "$shortmode_path"`
38557      new_path="$input_path"
38558    fi
38559  fi
38560
38561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38562  if test "x$test_cygdrive_prefix" = x; then
38563    # As a simple fix, exclude /usr/bin since it's not a real path.
38564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38566      # a path prefixed by /cygdrive for fixpath to work.
38567      new_path="$CYGWIN_ROOT_PATH$input_path"
38568    fi
38569  fi
38570
38571  # remove trailing .exe if any
38572  new_path="${new_path/%.exe/}"
38573
38574    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38575
38576  # First separate the path from the arguments. This will split at the first
38577  # space.
38578  complete="$OBJCOPY"
38579  path="${complete%% *}"
38580  tmp="$complete EOL"
38581  arguments="${tmp#* }"
38582
38583  # Input might be given as Windows format, start by converting to
38584  # unix format.
38585  new_path="$path"
38586
38587  windows_path="$new_path"
38588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38589    unix_path=`$CYGPATH -u "$windows_path"`
38590    new_path="$unix_path"
38591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38593    new_path="$unix_path"
38594  fi
38595
38596
38597  # Now try to locate executable using which
38598  new_path=`$WHICH "$new_path" 2> /dev/null`
38599
38600  if test "x$new_path" = x; then
38601    # Oops. Which didn't find the executable.
38602    # The splitting of arguments from the executable at a space might have been incorrect,
38603    # since paths with space are more likely in Windows. Give it another try with the whole
38604    # argument.
38605    path="$complete"
38606    arguments="EOL"
38607    new_path="$path"
38608
38609  windows_path="$new_path"
38610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38611    unix_path=`$CYGPATH -u "$windows_path"`
38612    new_path="$unix_path"
38613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38615    new_path="$unix_path"
38616  fi
38617
38618
38619    new_path=`$WHICH "$new_path" 2> /dev/null`
38620    # bat and cmd files are not always considered executable in MSYS causing which
38621    # to not find them
38622    if test "x$new_path" = x \
38623        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38624        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38625      new_path="$path"
38626
38627  windows_path="$new_path"
38628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38629    unix_path=`$CYGPATH -u "$windows_path"`
38630    new_path="$unix_path"
38631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38633    new_path="$unix_path"
38634  fi
38635
38636    fi
38637
38638    if test "x$new_path" = x; then
38639      # It's still not found. Now this is an unrecoverable error.
38640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38641$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38642      has_space=`$ECHO "$complete" | $GREP " "`
38643      if test "x$has_space" != x; then
38644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38646      fi
38647      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38648    fi
38649  fi
38650
38651  # Now new_path has a complete unix path to the binary
38652  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38653    # Keep paths in /bin as-is, but remove trailing .exe if any
38654    new_path="${new_path/%.exe/}"
38655    # Do not save /bin paths to all_fixpath_prefixes!
38656  else
38657    # Not in mixed or Windows style, start by that.
38658    new_path=`cmd //c echo $new_path`
38659
38660  input_path="$new_path"
38661  # Check if we need to convert this using DOS-style short mode. If the path
38662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38663  # take no chances and rewrite it.
38664  # Note: m4 eats our [], so we need to use [ and ] instead.
38665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38666  if test "x$has_forbidden_chars" != x; then
38667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38669  fi
38670
38671    # Output is in $new_path
38672
38673  windows_path="$new_path"
38674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38675    unix_path=`$CYGPATH -u "$windows_path"`
38676    new_path="$unix_path"
38677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38679    new_path="$unix_path"
38680  fi
38681
38682    # remove trailing .exe if any
38683    new_path="${new_path/%.exe/}"
38684
38685    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38686    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38687  fi
38688
38689    else
38690      # We're on a unix platform. Hooray! :)
38691      # First separate the path from the arguments. This will split at the first
38692      # space.
38693      complete="$OBJCOPY"
38694      path="${complete%% *}"
38695      tmp="$complete EOL"
38696      arguments="${tmp#* }"
38697
38698      # Cannot rely on the command "which" here since it doesn't always work.
38699      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38700      if test -z "$is_absolute_path"; then
38701        # Path to executable is not absolute. Find it.
38702        IFS_save="$IFS"
38703        IFS=:
38704        for p in $PATH; do
38705          if test -f "$p/$path" && test -x "$p/$path"; then
38706            new_path="$p/$path"
38707            break
38708          fi
38709        done
38710        IFS="$IFS_save"
38711      else
38712        # This is an absolute path, we can use it without further modifications.
38713        new_path="$path"
38714      fi
38715
38716      if test "x$new_path" = x; then
38717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38718$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38719        has_space=`$ECHO "$complete" | $GREP " "`
38720        if test "x$has_space" != x; then
38721          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38722$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38723        fi
38724        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38725      fi
38726    fi
38727
38728    # Now join together the path and the arguments once again
38729    if test "x$arguments" != xEOL; then
38730      new_complete="$new_path ${arguments% *}"
38731    else
38732      new_complete="$new_path"
38733    fi
38734
38735    if test "x$complete" != "x$new_complete"; then
38736      OBJCOPY="$new_complete"
38737      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38738$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38739    fi
38740  fi
38741
38742    fi
38743  fi
38744
38745
38746
38747  # Publish this variable in the help.
38748
38749
38750  if test "x$OBJDUMP" = x; then
38751    # The variable is not set by user, try to locate tool using the code snippet
38752    if test -n "$ac_tool_prefix"; then
38753  for ac_prog in gobjdump objdump
38754  do
38755    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38756set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38758$as_echo_n "checking for $ac_word... " >&6; }
38759if ${ac_cv_prog_OBJDUMP+:} false; then :
38760  $as_echo_n "(cached) " >&6
38761else
38762  if test -n "$OBJDUMP"; then
38763  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38764else
38765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38766for as_dir in $PATH
38767do
38768  IFS=$as_save_IFS
38769  test -z "$as_dir" && as_dir=.
38770    for ac_exec_ext in '' $ac_executable_extensions; do
38771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38772    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38774    break 2
38775  fi
38776done
38777  done
38778IFS=$as_save_IFS
38779
38780fi
38781fi
38782OBJDUMP=$ac_cv_prog_OBJDUMP
38783if test -n "$OBJDUMP"; then
38784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38785$as_echo "$OBJDUMP" >&6; }
38786else
38787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38788$as_echo "no" >&6; }
38789fi
38790
38791
38792    test -n "$OBJDUMP" && break
38793  done
38794fi
38795if test -z "$OBJDUMP"; then
38796  ac_ct_OBJDUMP=$OBJDUMP
38797  for ac_prog in gobjdump objdump
38798do
38799  # Extract the first word of "$ac_prog", so it can be a program name with args.
38800set dummy $ac_prog; ac_word=$2
38801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38802$as_echo_n "checking for $ac_word... " >&6; }
38803if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38804  $as_echo_n "(cached) " >&6
38805else
38806  if test -n "$ac_ct_OBJDUMP"; then
38807  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38808else
38809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38810for as_dir in $PATH
38811do
38812  IFS=$as_save_IFS
38813  test -z "$as_dir" && as_dir=.
38814    for ac_exec_ext in '' $ac_executable_extensions; do
38815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38816    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38818    break 2
38819  fi
38820done
38821  done
38822IFS=$as_save_IFS
38823
38824fi
38825fi
38826ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38827if test -n "$ac_ct_OBJDUMP"; then
38828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38829$as_echo "$ac_ct_OBJDUMP" >&6; }
38830else
38831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38832$as_echo "no" >&6; }
38833fi
38834
38835
38836  test -n "$ac_ct_OBJDUMP" && break
38837done
38838
38839  if test "x$ac_ct_OBJDUMP" = x; then
38840    OBJDUMP=""
38841  else
38842    case $cross_compiling:$ac_tool_warned in
38843yes:)
38844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38846ac_tool_warned=yes ;;
38847esac
38848    OBJDUMP=$ac_ct_OBJDUMP
38849  fi
38850fi
38851
38852  else
38853    # The variable is set, but is it from the command line or the environment?
38854
38855    # Try to remove the string !OBJDUMP! from our list.
38856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38858      # If it failed, the variable was not from the command line. Ignore it,
38859      # but warn the user (except for BASH, which is always set by the calling BASH).
38860      if test "xOBJDUMP" != xBASH; then
38861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38862$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38863      fi
38864      # Try to locate tool using the code snippet
38865      if test -n "$ac_tool_prefix"; then
38866  for ac_prog in gobjdump objdump
38867  do
38868    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38869set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38871$as_echo_n "checking for $ac_word... " >&6; }
38872if ${ac_cv_prog_OBJDUMP+:} false; then :
38873  $as_echo_n "(cached) " >&6
38874else
38875  if test -n "$OBJDUMP"; then
38876  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38877else
38878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38879for as_dir in $PATH
38880do
38881  IFS=$as_save_IFS
38882  test -z "$as_dir" && as_dir=.
38883    for ac_exec_ext in '' $ac_executable_extensions; do
38884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38885    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38887    break 2
38888  fi
38889done
38890  done
38891IFS=$as_save_IFS
38892
38893fi
38894fi
38895OBJDUMP=$ac_cv_prog_OBJDUMP
38896if test -n "$OBJDUMP"; then
38897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38898$as_echo "$OBJDUMP" >&6; }
38899else
38900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38901$as_echo "no" >&6; }
38902fi
38903
38904
38905    test -n "$OBJDUMP" && break
38906  done
38907fi
38908if test -z "$OBJDUMP"; then
38909  ac_ct_OBJDUMP=$OBJDUMP
38910  for ac_prog in gobjdump objdump
38911do
38912  # Extract the first word of "$ac_prog", so it can be a program name with args.
38913set dummy $ac_prog; ac_word=$2
38914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38915$as_echo_n "checking for $ac_word... " >&6; }
38916if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38917  $as_echo_n "(cached) " >&6
38918else
38919  if test -n "$ac_ct_OBJDUMP"; then
38920  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38921else
38922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38923for as_dir in $PATH
38924do
38925  IFS=$as_save_IFS
38926  test -z "$as_dir" && as_dir=.
38927    for ac_exec_ext in '' $ac_executable_extensions; do
38928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38929    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38931    break 2
38932  fi
38933done
38934  done
38935IFS=$as_save_IFS
38936
38937fi
38938fi
38939ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38940if test -n "$ac_ct_OBJDUMP"; then
38941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38942$as_echo "$ac_ct_OBJDUMP" >&6; }
38943else
38944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38945$as_echo "no" >&6; }
38946fi
38947
38948
38949  test -n "$ac_ct_OBJDUMP" && break
38950done
38951
38952  if test "x$ac_ct_OBJDUMP" = x; then
38953    OBJDUMP=""
38954  else
38955    case $cross_compiling:$ac_tool_warned in
38956yes:)
38957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38959ac_tool_warned=yes ;;
38960esac
38961    OBJDUMP=$ac_ct_OBJDUMP
38962  fi
38963fi
38964
38965    else
38966      # If it succeeded, then it was overridden by the user. We will use it
38967      # for the tool.
38968
38969      # First remove it from the list of overridden variables, so we can test
38970      # for unknown variables in the end.
38971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38972
38973      # Check if the provided tool contains a complete path.
38974      tool_specified="$OBJDUMP"
38975      tool_basename="${tool_specified##*/}"
38976      if test "x$tool_basename" = "x$tool_specified"; then
38977        # A command without a complete path is provided, search $PATH.
38978        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38979$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38980        # Extract the first word of "$tool_basename", so it can be a program name with args.
38981set dummy $tool_basename; ac_word=$2
38982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38983$as_echo_n "checking for $ac_word... " >&6; }
38984if ${ac_cv_path_OBJDUMP+:} false; then :
38985  $as_echo_n "(cached) " >&6
38986else
38987  case $OBJDUMP in
38988  [\\/]* | ?:[\\/]*)
38989  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38990  ;;
38991  *)
38992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38993for as_dir in $PATH
38994do
38995  IFS=$as_save_IFS
38996  test -z "$as_dir" && as_dir=.
38997    for ac_exec_ext in '' $ac_executable_extensions; do
38998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38999    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39001    break 2
39002  fi
39003done
39004  done
39005IFS=$as_save_IFS
39006
39007  ;;
39008esac
39009fi
39010OBJDUMP=$ac_cv_path_OBJDUMP
39011if test -n "$OBJDUMP"; then
39012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39013$as_echo "$OBJDUMP" >&6; }
39014else
39015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39016$as_echo "no" >&6; }
39017fi
39018
39019
39020        if test "x$OBJDUMP" = x; then
39021          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39022        fi
39023      else
39024        # Otherwise we believe it is a complete path. Use it as it is.
39025        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39026$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39028$as_echo_n "checking for OBJDUMP... " >&6; }
39029        if test ! -x "$tool_specified"; then
39030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39031$as_echo "not found" >&6; }
39032          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39033        fi
39034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39035$as_echo "$tool_specified" >&6; }
39036      fi
39037    fi
39038  fi
39039
39040
39041  if test "x$OBJDUMP" != x; then
39042    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39043    # bails if argument is missing.
39044
39045  # Only process if variable expands to non-empty
39046
39047  if test "x$OBJDUMP" != x; then
39048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39049
39050  # First separate the path from the arguments. This will split at the first
39051  # space.
39052  complete="$OBJDUMP"
39053  path="${complete%% *}"
39054  tmp="$complete EOL"
39055  arguments="${tmp#* }"
39056
39057  # Input might be given as Windows format, start by converting to
39058  # unix format.
39059  new_path=`$CYGPATH -u "$path"`
39060
39061  # Now try to locate executable using which
39062  new_path=`$WHICH "$new_path" 2> /dev/null`
39063  # bat and cmd files are not always considered executable in cygwin causing which
39064  # to not find them
39065  if test "x$new_path" = x \
39066      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39067      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39068    new_path=`$CYGPATH -u "$path"`
39069  fi
39070  if test "x$new_path" = x; then
39071    # Oops. Which didn't find the executable.
39072    # The splitting of arguments from the executable at a space might have been incorrect,
39073    # since paths with space are more likely in Windows. Give it another try with the whole
39074    # argument.
39075    path="$complete"
39076    arguments="EOL"
39077    new_path=`$CYGPATH -u "$path"`
39078    new_path=`$WHICH "$new_path" 2> /dev/null`
39079    # bat and cmd files are not always considered executable in cygwin causing which
39080    # to not find them
39081    if test "x$new_path" = x \
39082        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39083        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39084      new_path=`$CYGPATH -u "$path"`
39085    fi
39086    if test "x$new_path" = x; then
39087      # It's still not found. Now this is an unrecoverable error.
39088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39089$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39090      has_space=`$ECHO "$complete" | $GREP " "`
39091      if test "x$has_space" != x; then
39092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39094      fi
39095      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39096    fi
39097  fi
39098
39099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39102  # "foo.exe" is OK but "foo" is an error.
39103  #
39104  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39105  # It is also a way to make sure we got the proper file name for the real test later on.
39106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39107  if test "x$test_shortpath" = x; then
39108    # Short path failed, file does not exist as specified.
39109    # Try adding .exe or .cmd
39110    if test -f "${new_path}.exe"; then
39111      input_to_shortpath="${new_path}.exe"
39112    elif test -f "${new_path}.cmd"; then
39113      input_to_shortpath="${new_path}.cmd"
39114    else
39115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39116$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39117      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39118$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39119      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39120    fi
39121  else
39122    input_to_shortpath="$new_path"
39123  fi
39124
39125  # Call helper function which possibly converts this using DOS-style short mode.
39126  # If so, the updated path is stored in $new_path.
39127  new_path="$input_to_shortpath"
39128
39129  input_path="$input_to_shortpath"
39130  # Check if we need to convert this using DOS-style short mode. If the path
39131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39132  # take no chances and rewrite it.
39133  # Note: m4 eats our [], so we need to use [ and ] instead.
39134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39135  if test "x$has_forbidden_chars" != x; then
39136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39140      # Going to short mode and back again did indeed matter. Since short mode is
39141      # case insensitive, let's make it lowercase to improve readability.
39142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39143      # Now convert it back to Unix-style (cygpath)
39144      input_path=`$CYGPATH -u "$shortmode_path"`
39145      new_path="$input_path"
39146    fi
39147  fi
39148
39149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39150  if test "x$test_cygdrive_prefix" = x; then
39151    # As a simple fix, exclude /usr/bin since it's not a real path.
39152    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39154      # a path prefixed by /cygdrive for fixpath to work.
39155      new_path="$CYGWIN_ROOT_PATH$input_path"
39156    fi
39157  fi
39158
39159  # remove trailing .exe if any
39160  new_path="${new_path/%.exe/}"
39161
39162    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39163
39164  # First separate the path from the arguments. This will split at the first
39165  # space.
39166  complete="$OBJDUMP"
39167  path="${complete%% *}"
39168  tmp="$complete EOL"
39169  arguments="${tmp#* }"
39170
39171  # Input might be given as Windows format, start by converting to
39172  # unix format.
39173  new_path="$path"
39174
39175  windows_path="$new_path"
39176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39177    unix_path=`$CYGPATH -u "$windows_path"`
39178    new_path="$unix_path"
39179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39181    new_path="$unix_path"
39182  fi
39183
39184
39185  # Now try to locate executable using which
39186  new_path=`$WHICH "$new_path" 2> /dev/null`
39187
39188  if test "x$new_path" = x; then
39189    # Oops. Which didn't find the executable.
39190    # The splitting of arguments from the executable at a space might have been incorrect,
39191    # since paths with space are more likely in Windows. Give it another try with the whole
39192    # argument.
39193    path="$complete"
39194    arguments="EOL"
39195    new_path="$path"
39196
39197  windows_path="$new_path"
39198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39199    unix_path=`$CYGPATH -u "$windows_path"`
39200    new_path="$unix_path"
39201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39203    new_path="$unix_path"
39204  fi
39205
39206
39207    new_path=`$WHICH "$new_path" 2> /dev/null`
39208    # bat and cmd files are not always considered executable in MSYS causing which
39209    # to not find them
39210    if test "x$new_path" = x \
39211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39213      new_path="$path"
39214
39215  windows_path="$new_path"
39216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39217    unix_path=`$CYGPATH -u "$windows_path"`
39218    new_path="$unix_path"
39219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39221    new_path="$unix_path"
39222  fi
39223
39224    fi
39225
39226    if test "x$new_path" = x; then
39227      # It's still not found. Now this is an unrecoverable error.
39228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39229$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39230      has_space=`$ECHO "$complete" | $GREP " "`
39231      if test "x$has_space" != x; then
39232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39234      fi
39235      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39236    fi
39237  fi
39238
39239  # Now new_path has a complete unix path to the binary
39240  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39241    # Keep paths in /bin as-is, but remove trailing .exe if any
39242    new_path="${new_path/%.exe/}"
39243    # Do not save /bin paths to all_fixpath_prefixes!
39244  else
39245    # Not in mixed or Windows style, start by that.
39246    new_path=`cmd //c echo $new_path`
39247
39248  input_path="$new_path"
39249  # Check if we need to convert this using DOS-style short mode. If the path
39250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39251  # take no chances and rewrite it.
39252  # Note: m4 eats our [], so we need to use [ and ] instead.
39253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39254  if test "x$has_forbidden_chars" != x; then
39255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39257  fi
39258
39259    # Output is in $new_path
39260
39261  windows_path="$new_path"
39262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39263    unix_path=`$CYGPATH -u "$windows_path"`
39264    new_path="$unix_path"
39265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39267    new_path="$unix_path"
39268  fi
39269
39270    # remove trailing .exe if any
39271    new_path="${new_path/%.exe/}"
39272
39273    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39274    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39275  fi
39276
39277    else
39278      # We're on a unix platform. Hooray! :)
39279      # First separate the path from the arguments. This will split at the first
39280      # space.
39281      complete="$OBJDUMP"
39282      path="${complete%% *}"
39283      tmp="$complete EOL"
39284      arguments="${tmp#* }"
39285
39286      # Cannot rely on the command "which" here since it doesn't always work.
39287      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39288      if test -z "$is_absolute_path"; then
39289        # Path to executable is not absolute. Find it.
39290        IFS_save="$IFS"
39291        IFS=:
39292        for p in $PATH; do
39293          if test -f "$p/$path" && test -x "$p/$path"; then
39294            new_path="$p/$path"
39295            break
39296          fi
39297        done
39298        IFS="$IFS_save"
39299      else
39300        # This is an absolute path, we can use it without further modifications.
39301        new_path="$path"
39302      fi
39303
39304      if test "x$new_path" = x; then
39305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39306$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39307        has_space=`$ECHO "$complete" | $GREP " "`
39308        if test "x$has_space" != x; then
39309          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39310$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39311        fi
39312        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39313      fi
39314    fi
39315
39316    # Now join together the path and the arguments once again
39317    if test "x$arguments" != xEOL; then
39318      new_complete="$new_path ${arguments% *}"
39319    else
39320      new_complete="$new_path"
39321    fi
39322
39323    if test "x$complete" != "x$new_complete"; then
39324      OBJDUMP="$new_complete"
39325      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39326$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39327    fi
39328  fi
39329
39330  fi
39331
39332
39333  # Restore old path.
39334  PATH="$OLD_PATH"
39335
39336  # Restore the flags to the user specified values.
39337  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39338  CFLAGS="$ORG_CFLAGS"
39339  CXXFLAGS="$ORG_CXXFLAGS"
39340
39341
39342# Finally do some processing after the detection phase
39343
39344  if test "x$COMPILE_TYPE" = "xcross"; then
39345    # Now we need to find a C/C++ compiler that can build executables for the
39346    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39347    # used once. Also, we need to do this without adding a tools dir to the
39348    # path, otherwise we might pick up cross-compilers which don't use standard
39349    # naming.
39350
39351    # FIXME: we should list the discovered compilers as an exclude pattern!
39352    # If we do that, we can do this detection before POST_DETECTION, and still
39353    # find the build compilers in the tools dir, if needed.
39354
39355
39356  # Publish this variable in the help.
39357
39358
39359  if test "x$BUILD_CC" = x; then
39360    # The variable is not set by user, try to locate tool using the code snippet
39361    for ac_prog in cl cc gcc
39362do
39363  # Extract the first word of "$ac_prog", so it can be a program name with args.
39364set dummy $ac_prog; ac_word=$2
39365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39366$as_echo_n "checking for $ac_word... " >&6; }
39367if ${ac_cv_path_BUILD_CC+:} false; then :
39368  $as_echo_n "(cached) " >&6
39369else
39370  case $BUILD_CC in
39371  [\\/]* | ?:[\\/]*)
39372  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39373  ;;
39374  *)
39375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39376for as_dir in $PATH
39377do
39378  IFS=$as_save_IFS
39379  test -z "$as_dir" && as_dir=.
39380    for ac_exec_ext in '' $ac_executable_extensions; do
39381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39382    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39384    break 2
39385  fi
39386done
39387  done
39388IFS=$as_save_IFS
39389
39390  ;;
39391esac
39392fi
39393BUILD_CC=$ac_cv_path_BUILD_CC
39394if test -n "$BUILD_CC"; then
39395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39396$as_echo "$BUILD_CC" >&6; }
39397else
39398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39399$as_echo "no" >&6; }
39400fi
39401
39402
39403  test -n "$BUILD_CC" && break
39404done
39405
39406  else
39407    # The variable is set, but is it from the command line or the environment?
39408
39409    # Try to remove the string !BUILD_CC! from our list.
39410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39412      # If it failed, the variable was not from the command line. Ignore it,
39413      # but warn the user (except for BASH, which is always set by the calling BASH).
39414      if test "xBUILD_CC" != xBASH; then
39415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39416$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39417      fi
39418      # Try to locate tool using the code snippet
39419      for ac_prog in cl cc gcc
39420do
39421  # Extract the first word of "$ac_prog", so it can be a program name with args.
39422set dummy $ac_prog; ac_word=$2
39423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39424$as_echo_n "checking for $ac_word... " >&6; }
39425if ${ac_cv_path_BUILD_CC+:} false; then :
39426  $as_echo_n "(cached) " >&6
39427else
39428  case $BUILD_CC in
39429  [\\/]* | ?:[\\/]*)
39430  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39431  ;;
39432  *)
39433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39434for as_dir in $PATH
39435do
39436  IFS=$as_save_IFS
39437  test -z "$as_dir" && as_dir=.
39438    for ac_exec_ext in '' $ac_executable_extensions; do
39439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39440    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39442    break 2
39443  fi
39444done
39445  done
39446IFS=$as_save_IFS
39447
39448  ;;
39449esac
39450fi
39451BUILD_CC=$ac_cv_path_BUILD_CC
39452if test -n "$BUILD_CC"; then
39453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39454$as_echo "$BUILD_CC" >&6; }
39455else
39456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39457$as_echo "no" >&6; }
39458fi
39459
39460
39461  test -n "$BUILD_CC" && break
39462done
39463
39464    else
39465      # If it succeeded, then it was overridden by the user. We will use it
39466      # for the tool.
39467
39468      # First remove it from the list of overridden variables, so we can test
39469      # for unknown variables in the end.
39470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39471
39472      # Check if the provided tool contains a complete path.
39473      tool_specified="$BUILD_CC"
39474      tool_basename="${tool_specified##*/}"
39475      if test "x$tool_basename" = "x$tool_specified"; then
39476        # A command without a complete path is provided, search $PATH.
39477        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39478$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39479        # Extract the first word of "$tool_basename", so it can be a program name with args.
39480set dummy $tool_basename; ac_word=$2
39481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39482$as_echo_n "checking for $ac_word... " >&6; }
39483if ${ac_cv_path_BUILD_CC+:} false; then :
39484  $as_echo_n "(cached) " >&6
39485else
39486  case $BUILD_CC in
39487  [\\/]* | ?:[\\/]*)
39488  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39489  ;;
39490  *)
39491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39492for as_dir in $PATH
39493do
39494  IFS=$as_save_IFS
39495  test -z "$as_dir" && as_dir=.
39496    for ac_exec_ext in '' $ac_executable_extensions; do
39497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39498    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39500    break 2
39501  fi
39502done
39503  done
39504IFS=$as_save_IFS
39505
39506  ;;
39507esac
39508fi
39509BUILD_CC=$ac_cv_path_BUILD_CC
39510if test -n "$BUILD_CC"; then
39511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39512$as_echo "$BUILD_CC" >&6; }
39513else
39514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39515$as_echo "no" >&6; }
39516fi
39517
39518
39519        if test "x$BUILD_CC" = x; then
39520          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39521        fi
39522      else
39523        # Otherwise we believe it is a complete path. Use it as it is.
39524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39525$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39527$as_echo_n "checking for BUILD_CC... " >&6; }
39528        if test ! -x "$tool_specified"; then
39529          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39530$as_echo "not found" >&6; }
39531          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39532        fi
39533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39534$as_echo "$tool_specified" >&6; }
39535      fi
39536    fi
39537  fi
39538
39539
39540
39541  # Only process if variable expands to non-empty
39542
39543  if test "x$BUILD_CC" != x; then
39544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39545
39546  # First separate the path from the arguments. This will split at the first
39547  # space.
39548  complete="$BUILD_CC"
39549  path="${complete%% *}"
39550  tmp="$complete EOL"
39551  arguments="${tmp#* }"
39552
39553  # Input might be given as Windows format, start by converting to
39554  # unix format.
39555  new_path=`$CYGPATH -u "$path"`
39556
39557  # Now try to locate executable using which
39558  new_path=`$WHICH "$new_path" 2> /dev/null`
39559  # bat and cmd files are not always considered executable in cygwin causing which
39560  # to not find them
39561  if test "x$new_path" = x \
39562      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39563      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39564    new_path=`$CYGPATH -u "$path"`
39565  fi
39566  if test "x$new_path" = x; then
39567    # Oops. Which didn't find the executable.
39568    # The splitting of arguments from the executable at a space might have been incorrect,
39569    # since paths with space are more likely in Windows. Give it another try with the whole
39570    # argument.
39571    path="$complete"
39572    arguments="EOL"
39573    new_path=`$CYGPATH -u "$path"`
39574    new_path=`$WHICH "$new_path" 2> /dev/null`
39575    # bat and cmd files are not always considered executable in cygwin causing which
39576    # to not find them
39577    if test "x$new_path" = x \
39578        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39579        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39580      new_path=`$CYGPATH -u "$path"`
39581    fi
39582    if test "x$new_path" = x; then
39583      # It's still not found. Now this is an unrecoverable error.
39584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39585$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39586      has_space=`$ECHO "$complete" | $GREP " "`
39587      if test "x$has_space" != x; then
39588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39590      fi
39591      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39592    fi
39593  fi
39594
39595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39598  # "foo.exe" is OK but "foo" is an error.
39599  #
39600  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39601  # It is also a way to make sure we got the proper file name for the real test later on.
39602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39603  if test "x$test_shortpath" = x; then
39604    # Short path failed, file does not exist as specified.
39605    # Try adding .exe or .cmd
39606    if test -f "${new_path}.exe"; then
39607      input_to_shortpath="${new_path}.exe"
39608    elif test -f "${new_path}.cmd"; then
39609      input_to_shortpath="${new_path}.cmd"
39610    else
39611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39612$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39613      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39614$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39615      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39616    fi
39617  else
39618    input_to_shortpath="$new_path"
39619  fi
39620
39621  # Call helper function which possibly converts this using DOS-style short mode.
39622  # If so, the updated path is stored in $new_path.
39623  new_path="$input_to_shortpath"
39624
39625  input_path="$input_to_shortpath"
39626  # Check if we need to convert this using DOS-style short mode. If the path
39627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39628  # take no chances and rewrite it.
39629  # Note: m4 eats our [], so we need to use [ and ] instead.
39630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39631  if test "x$has_forbidden_chars" != x; then
39632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39636      # Going to short mode and back again did indeed matter. Since short mode is
39637      # case insensitive, let's make it lowercase to improve readability.
39638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39639      # Now convert it back to Unix-style (cygpath)
39640      input_path=`$CYGPATH -u "$shortmode_path"`
39641      new_path="$input_path"
39642    fi
39643  fi
39644
39645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39646  if test "x$test_cygdrive_prefix" = x; then
39647    # As a simple fix, exclude /usr/bin since it's not a real path.
39648    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39650      # a path prefixed by /cygdrive for fixpath to work.
39651      new_path="$CYGWIN_ROOT_PATH$input_path"
39652    fi
39653  fi
39654
39655  # remove trailing .exe if any
39656  new_path="${new_path/%.exe/}"
39657
39658    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39659
39660  # First separate the path from the arguments. This will split at the first
39661  # space.
39662  complete="$BUILD_CC"
39663  path="${complete%% *}"
39664  tmp="$complete EOL"
39665  arguments="${tmp#* }"
39666
39667  # Input might be given as Windows format, start by converting to
39668  # unix format.
39669  new_path="$path"
39670
39671  windows_path="$new_path"
39672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39673    unix_path=`$CYGPATH -u "$windows_path"`
39674    new_path="$unix_path"
39675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39677    new_path="$unix_path"
39678  fi
39679
39680
39681  # Now try to locate executable using which
39682  new_path=`$WHICH "$new_path" 2> /dev/null`
39683
39684  if test "x$new_path" = x; then
39685    # Oops. Which didn't find the executable.
39686    # The splitting of arguments from the executable at a space might have been incorrect,
39687    # since paths with space are more likely in Windows. Give it another try with the whole
39688    # argument.
39689    path="$complete"
39690    arguments="EOL"
39691    new_path="$path"
39692
39693  windows_path="$new_path"
39694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39695    unix_path=`$CYGPATH -u "$windows_path"`
39696    new_path="$unix_path"
39697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39699    new_path="$unix_path"
39700  fi
39701
39702
39703    new_path=`$WHICH "$new_path" 2> /dev/null`
39704    # bat and cmd files are not always considered executable in MSYS causing which
39705    # to not find them
39706    if test "x$new_path" = x \
39707        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39708        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39709      new_path="$path"
39710
39711  windows_path="$new_path"
39712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39713    unix_path=`$CYGPATH -u "$windows_path"`
39714    new_path="$unix_path"
39715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39717    new_path="$unix_path"
39718  fi
39719
39720    fi
39721
39722    if test "x$new_path" = x; then
39723      # It's still not found. Now this is an unrecoverable error.
39724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39725$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39726      has_space=`$ECHO "$complete" | $GREP " "`
39727      if test "x$has_space" != x; then
39728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39730      fi
39731      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39732    fi
39733  fi
39734
39735  # Now new_path has a complete unix path to the binary
39736  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39737    # Keep paths in /bin as-is, but remove trailing .exe if any
39738    new_path="${new_path/%.exe/}"
39739    # Do not save /bin paths to all_fixpath_prefixes!
39740  else
39741    # Not in mixed or Windows style, start by that.
39742    new_path=`cmd //c echo $new_path`
39743
39744  input_path="$new_path"
39745  # Check if we need to convert this using DOS-style short mode. If the path
39746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39747  # take no chances and rewrite it.
39748  # Note: m4 eats our [], so we need to use [ and ] instead.
39749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39750  if test "x$has_forbidden_chars" != x; then
39751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39753  fi
39754
39755    # Output is in $new_path
39756
39757  windows_path="$new_path"
39758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39759    unix_path=`$CYGPATH -u "$windows_path"`
39760    new_path="$unix_path"
39761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39763    new_path="$unix_path"
39764  fi
39765
39766    # remove trailing .exe if any
39767    new_path="${new_path/%.exe/}"
39768
39769    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39770    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39771  fi
39772
39773    else
39774      # We're on a unix platform. Hooray! :)
39775      # First separate the path from the arguments. This will split at the first
39776      # space.
39777      complete="$BUILD_CC"
39778      path="${complete%% *}"
39779      tmp="$complete EOL"
39780      arguments="${tmp#* }"
39781
39782      # Cannot rely on the command "which" here since it doesn't always work.
39783      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39784      if test -z "$is_absolute_path"; then
39785        # Path to executable is not absolute. Find it.
39786        IFS_save="$IFS"
39787        IFS=:
39788        for p in $PATH; do
39789          if test -f "$p/$path" && test -x "$p/$path"; then
39790            new_path="$p/$path"
39791            break
39792          fi
39793        done
39794        IFS="$IFS_save"
39795      else
39796        # This is an absolute path, we can use it without further modifications.
39797        new_path="$path"
39798      fi
39799
39800      if test "x$new_path" = x; then
39801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39802$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39803        has_space=`$ECHO "$complete" | $GREP " "`
39804        if test "x$has_space" != x; then
39805          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39806$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39807        fi
39808        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39809      fi
39810    fi
39811
39812    # Now join together the path and the arguments once again
39813    if test "x$arguments" != xEOL; then
39814      new_complete="$new_path ${arguments% *}"
39815    else
39816      new_complete="$new_path"
39817    fi
39818
39819    if test "x$complete" != "x$new_complete"; then
39820      BUILD_CC="$new_complete"
39821      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39822$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39823    fi
39824  fi
39825
39826
39827
39828  # Publish this variable in the help.
39829
39830
39831  if test "x$BUILD_CXX" = x; then
39832    # The variable is not set by user, try to locate tool using the code snippet
39833    for ac_prog in cl CC g++
39834do
39835  # Extract the first word of "$ac_prog", so it can be a program name with args.
39836set dummy $ac_prog; ac_word=$2
39837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39838$as_echo_n "checking for $ac_word... " >&6; }
39839if ${ac_cv_path_BUILD_CXX+:} false; then :
39840  $as_echo_n "(cached) " >&6
39841else
39842  case $BUILD_CXX in
39843  [\\/]* | ?:[\\/]*)
39844  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39845  ;;
39846  *)
39847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39848for as_dir in $PATH
39849do
39850  IFS=$as_save_IFS
39851  test -z "$as_dir" && as_dir=.
39852    for ac_exec_ext in '' $ac_executable_extensions; do
39853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39854    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39856    break 2
39857  fi
39858done
39859  done
39860IFS=$as_save_IFS
39861
39862  ;;
39863esac
39864fi
39865BUILD_CXX=$ac_cv_path_BUILD_CXX
39866if test -n "$BUILD_CXX"; then
39867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39868$as_echo "$BUILD_CXX" >&6; }
39869else
39870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39871$as_echo "no" >&6; }
39872fi
39873
39874
39875  test -n "$BUILD_CXX" && break
39876done
39877
39878  else
39879    # The variable is set, but is it from the command line or the environment?
39880
39881    # Try to remove the string !BUILD_CXX! from our list.
39882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39884      # If it failed, the variable was not from the command line. Ignore it,
39885      # but warn the user (except for BASH, which is always set by the calling BASH).
39886      if test "xBUILD_CXX" != xBASH; then
39887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39888$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39889      fi
39890      # Try to locate tool using the code snippet
39891      for ac_prog in cl CC g++
39892do
39893  # Extract the first word of "$ac_prog", so it can be a program name with args.
39894set dummy $ac_prog; ac_word=$2
39895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39896$as_echo_n "checking for $ac_word... " >&6; }
39897if ${ac_cv_path_BUILD_CXX+:} false; then :
39898  $as_echo_n "(cached) " >&6
39899else
39900  case $BUILD_CXX in
39901  [\\/]* | ?:[\\/]*)
39902  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39903  ;;
39904  *)
39905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39906for as_dir in $PATH
39907do
39908  IFS=$as_save_IFS
39909  test -z "$as_dir" && as_dir=.
39910    for ac_exec_ext in '' $ac_executable_extensions; do
39911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39912    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39914    break 2
39915  fi
39916done
39917  done
39918IFS=$as_save_IFS
39919
39920  ;;
39921esac
39922fi
39923BUILD_CXX=$ac_cv_path_BUILD_CXX
39924if test -n "$BUILD_CXX"; then
39925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39926$as_echo "$BUILD_CXX" >&6; }
39927else
39928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39929$as_echo "no" >&6; }
39930fi
39931
39932
39933  test -n "$BUILD_CXX" && break
39934done
39935
39936    else
39937      # If it succeeded, then it was overridden by the user. We will use it
39938      # for the tool.
39939
39940      # First remove it from the list of overridden variables, so we can test
39941      # for unknown variables in the end.
39942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39943
39944      # Check if the provided tool contains a complete path.
39945      tool_specified="$BUILD_CXX"
39946      tool_basename="${tool_specified##*/}"
39947      if test "x$tool_basename" = "x$tool_specified"; then
39948        # A command without a complete path is provided, search $PATH.
39949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39950$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39951        # Extract the first word of "$tool_basename", so it can be a program name with args.
39952set dummy $tool_basename; ac_word=$2
39953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39954$as_echo_n "checking for $ac_word... " >&6; }
39955if ${ac_cv_path_BUILD_CXX+:} false; then :
39956  $as_echo_n "(cached) " >&6
39957else
39958  case $BUILD_CXX in
39959  [\\/]* | ?:[\\/]*)
39960  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39961  ;;
39962  *)
39963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39964for as_dir in $PATH
39965do
39966  IFS=$as_save_IFS
39967  test -z "$as_dir" && as_dir=.
39968    for ac_exec_ext in '' $ac_executable_extensions; do
39969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39970    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39972    break 2
39973  fi
39974done
39975  done
39976IFS=$as_save_IFS
39977
39978  ;;
39979esac
39980fi
39981BUILD_CXX=$ac_cv_path_BUILD_CXX
39982if test -n "$BUILD_CXX"; then
39983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39984$as_echo "$BUILD_CXX" >&6; }
39985else
39986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39987$as_echo "no" >&6; }
39988fi
39989
39990
39991        if test "x$BUILD_CXX" = x; then
39992          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39993        fi
39994      else
39995        # Otherwise we believe it is a complete path. Use it as it is.
39996        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39997$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39999$as_echo_n "checking for BUILD_CXX... " >&6; }
40000        if test ! -x "$tool_specified"; then
40001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40002$as_echo "not found" >&6; }
40003          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40004        fi
40005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40006$as_echo "$tool_specified" >&6; }
40007      fi
40008    fi
40009  fi
40010
40011
40012
40013  # Only process if variable expands to non-empty
40014
40015  if test "x$BUILD_CXX" != x; then
40016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40017
40018  # First separate the path from the arguments. This will split at the first
40019  # space.
40020  complete="$BUILD_CXX"
40021  path="${complete%% *}"
40022  tmp="$complete EOL"
40023  arguments="${tmp#* }"
40024
40025  # Input might be given as Windows format, start by converting to
40026  # unix format.
40027  new_path=`$CYGPATH -u "$path"`
40028
40029  # Now try to locate executable using which
40030  new_path=`$WHICH "$new_path" 2> /dev/null`
40031  # bat and cmd files are not always considered executable in cygwin causing which
40032  # to not find them
40033  if test "x$new_path" = x \
40034      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40035      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40036    new_path=`$CYGPATH -u "$path"`
40037  fi
40038  if test "x$new_path" = x; then
40039    # Oops. Which didn't find the executable.
40040    # The splitting of arguments from the executable at a space might have been incorrect,
40041    # since paths with space are more likely in Windows. Give it another try with the whole
40042    # argument.
40043    path="$complete"
40044    arguments="EOL"
40045    new_path=`$CYGPATH -u "$path"`
40046    new_path=`$WHICH "$new_path" 2> /dev/null`
40047    # bat and cmd files are not always considered executable in cygwin causing which
40048    # to not find them
40049    if test "x$new_path" = x \
40050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40052      new_path=`$CYGPATH -u "$path"`
40053    fi
40054    if test "x$new_path" = x; then
40055      # It's still not found. Now this is an unrecoverable error.
40056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40057$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40058      has_space=`$ECHO "$complete" | $GREP " "`
40059      if test "x$has_space" != x; then
40060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40062      fi
40063      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40064    fi
40065  fi
40066
40067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40070  # "foo.exe" is OK but "foo" is an error.
40071  #
40072  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40073  # It is also a way to make sure we got the proper file name for the real test later on.
40074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40075  if test "x$test_shortpath" = x; then
40076    # Short path failed, file does not exist as specified.
40077    # Try adding .exe or .cmd
40078    if test -f "${new_path}.exe"; then
40079      input_to_shortpath="${new_path}.exe"
40080    elif test -f "${new_path}.cmd"; then
40081      input_to_shortpath="${new_path}.cmd"
40082    else
40083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40084$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40087      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40088    fi
40089  else
40090    input_to_shortpath="$new_path"
40091  fi
40092
40093  # Call helper function which possibly converts this using DOS-style short mode.
40094  # If so, the updated path is stored in $new_path.
40095  new_path="$input_to_shortpath"
40096
40097  input_path="$input_to_shortpath"
40098  # Check if we need to convert this using DOS-style short mode. If the path
40099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40100  # take no chances and rewrite it.
40101  # Note: m4 eats our [], so we need to use [ and ] instead.
40102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40103  if test "x$has_forbidden_chars" != x; then
40104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40108      # Going to short mode and back again did indeed matter. Since short mode is
40109      # case insensitive, let's make it lowercase to improve readability.
40110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40111      # Now convert it back to Unix-style (cygpath)
40112      input_path=`$CYGPATH -u "$shortmode_path"`
40113      new_path="$input_path"
40114    fi
40115  fi
40116
40117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40118  if test "x$test_cygdrive_prefix" = x; then
40119    # As a simple fix, exclude /usr/bin since it's not a real path.
40120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40122      # a path prefixed by /cygdrive for fixpath to work.
40123      new_path="$CYGWIN_ROOT_PATH$input_path"
40124    fi
40125  fi
40126
40127  # remove trailing .exe if any
40128  new_path="${new_path/%.exe/}"
40129
40130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40131
40132  # First separate the path from the arguments. This will split at the first
40133  # space.
40134  complete="$BUILD_CXX"
40135  path="${complete%% *}"
40136  tmp="$complete EOL"
40137  arguments="${tmp#* }"
40138
40139  # Input might be given as Windows format, start by converting to
40140  # unix format.
40141  new_path="$path"
40142
40143  windows_path="$new_path"
40144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40145    unix_path=`$CYGPATH -u "$windows_path"`
40146    new_path="$unix_path"
40147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40149    new_path="$unix_path"
40150  fi
40151
40152
40153  # Now try to locate executable using which
40154  new_path=`$WHICH "$new_path" 2> /dev/null`
40155
40156  if test "x$new_path" = x; then
40157    # Oops. Which didn't find the executable.
40158    # The splitting of arguments from the executable at a space might have been incorrect,
40159    # since paths with space are more likely in Windows. Give it another try with the whole
40160    # argument.
40161    path="$complete"
40162    arguments="EOL"
40163    new_path="$path"
40164
40165  windows_path="$new_path"
40166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40167    unix_path=`$CYGPATH -u "$windows_path"`
40168    new_path="$unix_path"
40169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40171    new_path="$unix_path"
40172  fi
40173
40174
40175    new_path=`$WHICH "$new_path" 2> /dev/null`
40176    # bat and cmd files are not always considered executable in MSYS causing which
40177    # to not find them
40178    if test "x$new_path" = x \
40179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40181      new_path="$path"
40182
40183  windows_path="$new_path"
40184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40185    unix_path=`$CYGPATH -u "$windows_path"`
40186    new_path="$unix_path"
40187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40189    new_path="$unix_path"
40190  fi
40191
40192    fi
40193
40194    if test "x$new_path" = x; then
40195      # It's still not found. Now this is an unrecoverable error.
40196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40197$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40198      has_space=`$ECHO "$complete" | $GREP " "`
40199      if test "x$has_space" != x; then
40200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40202      fi
40203      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40204    fi
40205  fi
40206
40207  # Now new_path has a complete unix path to the binary
40208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40209    # Keep paths in /bin as-is, but remove trailing .exe if any
40210    new_path="${new_path/%.exe/}"
40211    # Do not save /bin paths to all_fixpath_prefixes!
40212  else
40213    # Not in mixed or Windows style, start by that.
40214    new_path=`cmd //c echo $new_path`
40215
40216  input_path="$new_path"
40217  # Check if we need to convert this using DOS-style short mode. If the path
40218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40219  # take no chances and rewrite it.
40220  # Note: m4 eats our [], so we need to use [ and ] instead.
40221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40222  if test "x$has_forbidden_chars" != x; then
40223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40225  fi
40226
40227    # Output is in $new_path
40228
40229  windows_path="$new_path"
40230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40231    unix_path=`$CYGPATH -u "$windows_path"`
40232    new_path="$unix_path"
40233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40235    new_path="$unix_path"
40236  fi
40237
40238    # remove trailing .exe if any
40239    new_path="${new_path/%.exe/}"
40240
40241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40243  fi
40244
40245    else
40246      # We're on a unix platform. Hooray! :)
40247      # First separate the path from the arguments. This will split at the first
40248      # space.
40249      complete="$BUILD_CXX"
40250      path="${complete%% *}"
40251      tmp="$complete EOL"
40252      arguments="${tmp#* }"
40253
40254      # Cannot rely on the command "which" here since it doesn't always work.
40255      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40256      if test -z "$is_absolute_path"; then
40257        # Path to executable is not absolute. Find it.
40258        IFS_save="$IFS"
40259        IFS=:
40260        for p in $PATH; do
40261          if test -f "$p/$path" && test -x "$p/$path"; then
40262            new_path="$p/$path"
40263            break
40264          fi
40265        done
40266        IFS="$IFS_save"
40267      else
40268        # This is an absolute path, we can use it without further modifications.
40269        new_path="$path"
40270      fi
40271
40272      if test "x$new_path" = x; then
40273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40274$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40275        has_space=`$ECHO "$complete" | $GREP " "`
40276        if test "x$has_space" != x; then
40277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40279        fi
40280        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40281      fi
40282    fi
40283
40284    # Now join together the path and the arguments once again
40285    if test "x$arguments" != xEOL; then
40286      new_complete="$new_path ${arguments% *}"
40287    else
40288      new_complete="$new_path"
40289    fi
40290
40291    if test "x$complete" != "x$new_complete"; then
40292      BUILD_CXX="$new_complete"
40293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40294$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40295    fi
40296  fi
40297
40298
40299
40300  # Publish this variable in the help.
40301
40302
40303  if test "x$BUILD_LD" = x; then
40304    # The variable is not set by user, try to locate tool using the code snippet
40305    for ac_prog in ld
40306do
40307  # Extract the first word of "$ac_prog", so it can be a program name with args.
40308set dummy $ac_prog; ac_word=$2
40309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40310$as_echo_n "checking for $ac_word... " >&6; }
40311if ${ac_cv_path_BUILD_LD+:} false; then :
40312  $as_echo_n "(cached) " >&6
40313else
40314  case $BUILD_LD in
40315  [\\/]* | ?:[\\/]*)
40316  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40317  ;;
40318  *)
40319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40320for as_dir in $PATH
40321do
40322  IFS=$as_save_IFS
40323  test -z "$as_dir" && as_dir=.
40324    for ac_exec_ext in '' $ac_executable_extensions; do
40325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40326    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40328    break 2
40329  fi
40330done
40331  done
40332IFS=$as_save_IFS
40333
40334  ;;
40335esac
40336fi
40337BUILD_LD=$ac_cv_path_BUILD_LD
40338if test -n "$BUILD_LD"; then
40339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40340$as_echo "$BUILD_LD" >&6; }
40341else
40342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40343$as_echo "no" >&6; }
40344fi
40345
40346
40347  test -n "$BUILD_LD" && break
40348done
40349
40350  else
40351    # The variable is set, but is it from the command line or the environment?
40352
40353    # Try to remove the string !BUILD_LD! from our list.
40354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40356      # If it failed, the variable was not from the command line. Ignore it,
40357      # but warn the user (except for BASH, which is always set by the calling BASH).
40358      if test "xBUILD_LD" != xBASH; then
40359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40360$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40361      fi
40362      # Try to locate tool using the code snippet
40363      for ac_prog in ld
40364do
40365  # Extract the first word of "$ac_prog", so it can be a program name with args.
40366set dummy $ac_prog; ac_word=$2
40367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40368$as_echo_n "checking for $ac_word... " >&6; }
40369if ${ac_cv_path_BUILD_LD+:} false; then :
40370  $as_echo_n "(cached) " >&6
40371else
40372  case $BUILD_LD in
40373  [\\/]* | ?:[\\/]*)
40374  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40375  ;;
40376  *)
40377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40378for as_dir in $PATH
40379do
40380  IFS=$as_save_IFS
40381  test -z "$as_dir" && as_dir=.
40382    for ac_exec_ext in '' $ac_executable_extensions; do
40383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40384    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40386    break 2
40387  fi
40388done
40389  done
40390IFS=$as_save_IFS
40391
40392  ;;
40393esac
40394fi
40395BUILD_LD=$ac_cv_path_BUILD_LD
40396if test -n "$BUILD_LD"; then
40397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40398$as_echo "$BUILD_LD" >&6; }
40399else
40400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40401$as_echo "no" >&6; }
40402fi
40403
40404
40405  test -n "$BUILD_LD" && break
40406done
40407
40408    else
40409      # If it succeeded, then it was overridden by the user. We will use it
40410      # for the tool.
40411
40412      # First remove it from the list of overridden variables, so we can test
40413      # for unknown variables in the end.
40414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40415
40416      # Check if the provided tool contains a complete path.
40417      tool_specified="$BUILD_LD"
40418      tool_basename="${tool_specified##*/}"
40419      if test "x$tool_basename" = "x$tool_specified"; then
40420        # A command without a complete path is provided, search $PATH.
40421        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40422$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40423        # Extract the first word of "$tool_basename", so it can be a program name with args.
40424set dummy $tool_basename; ac_word=$2
40425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40426$as_echo_n "checking for $ac_word... " >&6; }
40427if ${ac_cv_path_BUILD_LD+:} false; then :
40428  $as_echo_n "(cached) " >&6
40429else
40430  case $BUILD_LD in
40431  [\\/]* | ?:[\\/]*)
40432  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40433  ;;
40434  *)
40435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40436for as_dir in $PATH
40437do
40438  IFS=$as_save_IFS
40439  test -z "$as_dir" && as_dir=.
40440    for ac_exec_ext in '' $ac_executable_extensions; do
40441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40442    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40444    break 2
40445  fi
40446done
40447  done
40448IFS=$as_save_IFS
40449
40450  ;;
40451esac
40452fi
40453BUILD_LD=$ac_cv_path_BUILD_LD
40454if test -n "$BUILD_LD"; then
40455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40456$as_echo "$BUILD_LD" >&6; }
40457else
40458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40459$as_echo "no" >&6; }
40460fi
40461
40462
40463        if test "x$BUILD_LD" = x; then
40464          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40465        fi
40466      else
40467        # Otherwise we believe it is a complete path. Use it as it is.
40468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40469$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40471$as_echo_n "checking for BUILD_LD... " >&6; }
40472        if test ! -x "$tool_specified"; then
40473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40474$as_echo "not found" >&6; }
40475          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40476        fi
40477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40478$as_echo "$tool_specified" >&6; }
40479      fi
40480    fi
40481  fi
40482
40483
40484
40485  # Only process if variable expands to non-empty
40486
40487  if test "x$BUILD_LD" != x; then
40488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40489
40490  # First separate the path from the arguments. This will split at the first
40491  # space.
40492  complete="$BUILD_LD"
40493  path="${complete%% *}"
40494  tmp="$complete EOL"
40495  arguments="${tmp#* }"
40496
40497  # Input might be given as Windows format, start by converting to
40498  # unix format.
40499  new_path=`$CYGPATH -u "$path"`
40500
40501  # Now try to locate executable using which
40502  new_path=`$WHICH "$new_path" 2> /dev/null`
40503  # bat and cmd files are not always considered executable in cygwin causing which
40504  # to not find them
40505  if test "x$new_path" = x \
40506      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40507      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40508    new_path=`$CYGPATH -u "$path"`
40509  fi
40510  if test "x$new_path" = x; then
40511    # Oops. Which didn't find the executable.
40512    # The splitting of arguments from the executable at a space might have been incorrect,
40513    # since paths with space are more likely in Windows. Give it another try with the whole
40514    # argument.
40515    path="$complete"
40516    arguments="EOL"
40517    new_path=`$CYGPATH -u "$path"`
40518    new_path=`$WHICH "$new_path" 2> /dev/null`
40519    # bat and cmd files are not always considered executable in cygwin causing which
40520    # to not find them
40521    if test "x$new_path" = x \
40522        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40523        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40524      new_path=`$CYGPATH -u "$path"`
40525    fi
40526    if test "x$new_path" = x; then
40527      # It's still not found. Now this is an unrecoverable error.
40528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40529$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40530      has_space=`$ECHO "$complete" | $GREP " "`
40531      if test "x$has_space" != x; then
40532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40534      fi
40535      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40536    fi
40537  fi
40538
40539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40542  # "foo.exe" is OK but "foo" is an error.
40543  #
40544  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40545  # It is also a way to make sure we got the proper file name for the real test later on.
40546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40547  if test "x$test_shortpath" = x; then
40548    # Short path failed, file does not exist as specified.
40549    # Try adding .exe or .cmd
40550    if test -f "${new_path}.exe"; then
40551      input_to_shortpath="${new_path}.exe"
40552    elif test -f "${new_path}.cmd"; then
40553      input_to_shortpath="${new_path}.cmd"
40554    else
40555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40556$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40557      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40558$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40559      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40560    fi
40561  else
40562    input_to_shortpath="$new_path"
40563  fi
40564
40565  # Call helper function which possibly converts this using DOS-style short mode.
40566  # If so, the updated path is stored in $new_path.
40567  new_path="$input_to_shortpath"
40568
40569  input_path="$input_to_shortpath"
40570  # Check if we need to convert this using DOS-style short mode. If the path
40571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40572  # take no chances and rewrite it.
40573  # Note: m4 eats our [], so we need to use [ and ] instead.
40574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40575  if test "x$has_forbidden_chars" != x; then
40576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40580      # Going to short mode and back again did indeed matter. Since short mode is
40581      # case insensitive, let's make it lowercase to improve readability.
40582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40583      # Now convert it back to Unix-style (cygpath)
40584      input_path=`$CYGPATH -u "$shortmode_path"`
40585      new_path="$input_path"
40586    fi
40587  fi
40588
40589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40590  if test "x$test_cygdrive_prefix" = x; then
40591    # As a simple fix, exclude /usr/bin since it's not a real path.
40592    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40594      # a path prefixed by /cygdrive for fixpath to work.
40595      new_path="$CYGWIN_ROOT_PATH$input_path"
40596    fi
40597  fi
40598
40599  # remove trailing .exe if any
40600  new_path="${new_path/%.exe/}"
40601
40602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40603
40604  # First separate the path from the arguments. This will split at the first
40605  # space.
40606  complete="$BUILD_LD"
40607  path="${complete%% *}"
40608  tmp="$complete EOL"
40609  arguments="${tmp#* }"
40610
40611  # Input might be given as Windows format, start by converting to
40612  # unix format.
40613  new_path="$path"
40614
40615  windows_path="$new_path"
40616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40617    unix_path=`$CYGPATH -u "$windows_path"`
40618    new_path="$unix_path"
40619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40621    new_path="$unix_path"
40622  fi
40623
40624
40625  # Now try to locate executable using which
40626  new_path=`$WHICH "$new_path" 2> /dev/null`
40627
40628  if test "x$new_path" = x; then
40629    # Oops. Which didn't find the executable.
40630    # The splitting of arguments from the executable at a space might have been incorrect,
40631    # since paths with space are more likely in Windows. Give it another try with the whole
40632    # argument.
40633    path="$complete"
40634    arguments="EOL"
40635    new_path="$path"
40636
40637  windows_path="$new_path"
40638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40639    unix_path=`$CYGPATH -u "$windows_path"`
40640    new_path="$unix_path"
40641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40643    new_path="$unix_path"
40644  fi
40645
40646
40647    new_path=`$WHICH "$new_path" 2> /dev/null`
40648    # bat and cmd files are not always considered executable in MSYS causing which
40649    # to not find them
40650    if test "x$new_path" = x \
40651        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40652        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40653      new_path="$path"
40654
40655  windows_path="$new_path"
40656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40657    unix_path=`$CYGPATH -u "$windows_path"`
40658    new_path="$unix_path"
40659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40661    new_path="$unix_path"
40662  fi
40663
40664    fi
40665
40666    if test "x$new_path" = x; then
40667      # It's still not found. Now this is an unrecoverable error.
40668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40669$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40670      has_space=`$ECHO "$complete" | $GREP " "`
40671      if test "x$has_space" != x; then
40672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40674      fi
40675      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40676    fi
40677  fi
40678
40679  # Now new_path has a complete unix path to the binary
40680  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40681    # Keep paths in /bin as-is, but remove trailing .exe if any
40682    new_path="${new_path/%.exe/}"
40683    # Do not save /bin paths to all_fixpath_prefixes!
40684  else
40685    # Not in mixed or Windows style, start by that.
40686    new_path=`cmd //c echo $new_path`
40687
40688  input_path="$new_path"
40689  # Check if we need to convert this using DOS-style short mode. If the path
40690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40691  # take no chances and rewrite it.
40692  # Note: m4 eats our [], so we need to use [ and ] instead.
40693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40694  if test "x$has_forbidden_chars" != x; then
40695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40697  fi
40698
40699    # Output is in $new_path
40700
40701  windows_path="$new_path"
40702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40703    unix_path=`$CYGPATH -u "$windows_path"`
40704    new_path="$unix_path"
40705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40707    new_path="$unix_path"
40708  fi
40709
40710    # remove trailing .exe if any
40711    new_path="${new_path/%.exe/}"
40712
40713    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40714    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40715  fi
40716
40717    else
40718      # We're on a unix platform. Hooray! :)
40719      # First separate the path from the arguments. This will split at the first
40720      # space.
40721      complete="$BUILD_LD"
40722      path="${complete%% *}"
40723      tmp="$complete EOL"
40724      arguments="${tmp#* }"
40725
40726      # Cannot rely on the command "which" here since it doesn't always work.
40727      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40728      if test -z "$is_absolute_path"; then
40729        # Path to executable is not absolute. Find it.
40730        IFS_save="$IFS"
40731        IFS=:
40732        for p in $PATH; do
40733          if test -f "$p/$path" && test -x "$p/$path"; then
40734            new_path="$p/$path"
40735            break
40736          fi
40737        done
40738        IFS="$IFS_save"
40739      else
40740        # This is an absolute path, we can use it without further modifications.
40741        new_path="$path"
40742      fi
40743
40744      if test "x$new_path" = x; then
40745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40746$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40747        has_space=`$ECHO "$complete" | $GREP " "`
40748        if test "x$has_space" != x; then
40749          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40750$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40751        fi
40752        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40753      fi
40754    fi
40755
40756    # Now join together the path and the arguments once again
40757    if test "x$arguments" != xEOL; then
40758      new_complete="$new_path ${arguments% *}"
40759    else
40760      new_complete="$new_path"
40761    fi
40762
40763    if test "x$complete" != "x$new_complete"; then
40764      BUILD_LD="$new_complete"
40765      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40766$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40767    fi
40768  fi
40769
40770  else
40771    # If we are not cross compiling, use the normal target compilers for
40772    # building the build platform executables.
40773    BUILD_CC="$CC"
40774    BUILD_CXX="$CXX"
40775    BUILD_LD="$LD"
40776  fi
40777
40778
40779
40780
40781
40782
40783  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40784    # For hotspot, we need these in Windows mixed path,
40785    # so rewrite them all. Need added .exe suffix.
40786    HOTSPOT_CXX="$CXX.exe"
40787    HOTSPOT_LD="$LD.exe"
40788    HOTSPOT_MT="$MT.exe"
40789    HOTSPOT_RC="$RC.exe"
40790
40791  unix_path="$HOTSPOT_CXX"
40792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40793    windows_path=`$CYGPATH -m "$unix_path"`
40794    HOTSPOT_CXX="$windows_path"
40795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40796    windows_path=`cmd //c echo $unix_path`
40797    HOTSPOT_CXX="$windows_path"
40798  fi
40799
40800
40801  unix_path="$HOTSPOT_LD"
40802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40803    windows_path=`$CYGPATH -m "$unix_path"`
40804    HOTSPOT_LD="$windows_path"
40805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40806    windows_path=`cmd //c echo $unix_path`
40807    HOTSPOT_LD="$windows_path"
40808  fi
40809
40810
40811  unix_path="$HOTSPOT_MT"
40812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40813    windows_path=`$CYGPATH -m "$unix_path"`
40814    HOTSPOT_MT="$windows_path"
40815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40816    windows_path=`cmd //c echo $unix_path`
40817    HOTSPOT_MT="$windows_path"
40818  fi
40819
40820
40821  unix_path="$HOTSPOT_RC"
40822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40823    windows_path=`$CYGPATH -m "$unix_path"`
40824    HOTSPOT_RC="$windows_path"
40825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40826    windows_path=`cmd //c echo $unix_path`
40827    HOTSPOT_RC="$windows_path"
40828  fi
40829
40830
40831
40832  else
40833    HOTSPOT_CXX="$CXX"
40834    HOTSPOT_LD="$LD"
40835  fi
40836
40837
40838
40839  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40840    USE_CLANG=true
40841  fi
40842
40843
40844
40845
40846
40847  # The package path is used only on macosx?
40848  # FIXME: clean this up, and/or move it elsewhere.
40849  PACKAGE_PATH=/opt/local
40850
40851
40852  # Check for extra potential brokenness.
40853  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40854    # On Windows, double-check that we got the right compiler.
40855    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40856    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40857    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40858      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40859        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
40860      fi
40861    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40862      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40863        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40864      fi
40865    fi
40866  fi
40867
40868  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40869    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40870    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40871    # This is later checked when setting flags.
40872
40873    # "-Og" suppported for GCC 4.8 and later
40874    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40875
40876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40877$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40878  supports=yes
40879
40880  saved_cflags="$CFLAGS"
40881  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40882  ac_ext=c
40883ac_cpp='$CPP $CPPFLAGS'
40884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40886ac_compiler_gnu=$ac_cv_c_compiler_gnu
40887
40888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40889/* end confdefs.h.  */
40890int i;
40891_ACEOF
40892if ac_fn_c_try_compile "$LINENO"; then :
40893
40894else
40895  supports=no
40896fi
40897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40898  ac_ext=cpp
40899ac_cpp='$CXXCPP $CPPFLAGS'
40900ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40901ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40902ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40903
40904  CFLAGS="$saved_cflags"
40905
40906  saved_cxxflags="$CXXFLAGS"
40907  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40908  ac_ext=cpp
40909ac_cpp='$CXXCPP $CPPFLAGS'
40910ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40911ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40912ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40913
40914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40915/* end confdefs.h.  */
40916int i;
40917_ACEOF
40918if ac_fn_cxx_try_compile "$LINENO"; then :
40919
40920else
40921  supports=no
40922fi
40923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40924  ac_ext=cpp
40925ac_cpp='$CXXCPP $CPPFLAGS'
40926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40929
40930  CXXFLAGS="$saved_cxxflags"
40931
40932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40933$as_echo "$supports" >&6; }
40934  if test "x$supports" = "xyes" ; then
40935    HAS_CFLAG_OPTIMIZE_DEBUG=true
40936  else
40937    HAS_CFLAG_OPTIMIZE_DEBUG=false
40938  fi
40939
40940
40941    # "-z relro" supported in GNU binutils 2.17 and later
40942    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40943
40944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40945$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40946  supports=yes
40947
40948  saved_ldflags="$LDFLAGS"
40949  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40950  ac_ext=c
40951ac_cpp='$CPP $CPPFLAGS'
40952ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40953ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40954ac_compiler_gnu=$ac_cv_c_compiler_gnu
40955
40956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40957/* end confdefs.h.  */
40958
40959int
40960main ()
40961{
40962
40963  ;
40964  return 0;
40965}
40966_ACEOF
40967if ac_fn_c_try_link "$LINENO"; then :
40968
40969else
40970  supports=no
40971fi
40972rm -f core conftest.err conftest.$ac_objext \
40973    conftest$ac_exeext conftest.$ac_ext
40974  ac_ext=cpp
40975ac_cpp='$CXXCPP $CPPFLAGS'
40976ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40977ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40978ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40979
40980  LDFLAGS="$saved_ldflags"
40981
40982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40983$as_echo "$supports" >&6; }
40984  if test "x$supports" = "xyes" ; then
40985    HAS_LINKER_RELRO=true
40986  else
40987    HAS_LINKER_RELRO=false
40988  fi
40989
40990
40991    # "-z now" supported in GNU binutils 2.11 and later
40992    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40993
40994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40995$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40996  supports=yes
40997
40998  saved_ldflags="$LDFLAGS"
40999  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41000  ac_ext=c
41001ac_cpp='$CPP $CPPFLAGS'
41002ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41003ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41004ac_compiler_gnu=$ac_cv_c_compiler_gnu
41005
41006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41007/* end confdefs.h.  */
41008
41009int
41010main ()
41011{
41012
41013  ;
41014  return 0;
41015}
41016_ACEOF
41017if ac_fn_c_try_link "$LINENO"; then :
41018
41019else
41020  supports=no
41021fi
41022rm -f core conftest.err conftest.$ac_objext \
41023    conftest$ac_exeext conftest.$ac_ext
41024  ac_ext=cpp
41025ac_cpp='$CXXCPP $CPPFLAGS'
41026ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41027ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41028ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41029
41030  LDFLAGS="$saved_ldflags"
41031
41032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41033$as_echo "$supports" >&6; }
41034  if test "x$supports" = "xyes" ; then
41035    HAS_LINKER_NOW=true
41036  else
41037    HAS_LINKER_NOW=false
41038  fi
41039
41040  fi
41041
41042  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41043  # in executable.'
41044  USING_BROKEN_SUSE_LD=no
41045  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41047$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41048    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41049    $ECHO "int main() { }" > main.c
41050    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41052$as_echo "no" >&6; }
41053      USING_BROKEN_SUSE_LD=no
41054    else
41055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41056$as_echo "yes" >&6; }
41057      USING_BROKEN_SUSE_LD=yes
41058    fi
41059    rm -rf version-script.map main.c a.out
41060  fi
41061
41062
41063
41064# Setup the JTReg Regression Test Harness.
41065
41066
41067# Check whether --with-jtreg was given.
41068if test "${with_jtreg+set}" = set; then :
41069  withval=$with_jtreg;
41070else
41071  with_jtreg=no
41072fi
41073
41074
41075  if test "x$with_jtreg" = xno; then
41076    # jtreg disabled
41077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41078$as_echo_n "checking for jtreg... " >&6; }
41079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41080$as_echo "no" >&6; }
41081  else
41082    if test "x$with_jtreg" != xyes; then
41083      # with path specified.
41084      JT_HOME="$with_jtreg"
41085    fi
41086
41087    if test "x$JT_HOME" != x; then
41088      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41089$as_echo_n "checking for jtreg... " >&6; }
41090
41091      # use JT_HOME enviroment var.
41092
41093  # Only process if variable expands to non-empty
41094
41095  if test "x$JT_HOME" != x; then
41096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41097
41098  # Input might be given as Windows format, start by converting to
41099  # unix format.
41100  path="$JT_HOME"
41101  new_path=`$CYGPATH -u "$path"`
41102
41103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41106  # "foo.exe" is OK but "foo" is an error.
41107  #
41108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41109  # It is also a way to make sure we got the proper file name for the real test later on.
41110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41111  if test "x$test_shortpath" = x; then
41112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41113$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41114    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41115  fi
41116
41117  # Call helper function which possibly converts this using DOS-style short mode.
41118  # If so, the updated path is stored in $new_path.
41119
41120  input_path="$new_path"
41121  # Check if we need to convert this using DOS-style short mode. If the path
41122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41123  # take no chances and rewrite it.
41124  # Note: m4 eats our [], so we need to use [ and ] instead.
41125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41126  if test "x$has_forbidden_chars" != x; then
41127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41131      # Going to short mode and back again did indeed matter. Since short mode is
41132      # case insensitive, let's make it lowercase to improve readability.
41133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41134      # Now convert it back to Unix-style (cygpath)
41135      input_path=`$CYGPATH -u "$shortmode_path"`
41136      new_path="$input_path"
41137    fi
41138  fi
41139
41140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41141  if test "x$test_cygdrive_prefix" = x; then
41142    # As a simple fix, exclude /usr/bin since it's not a real path.
41143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41145      # a path prefixed by /cygdrive for fixpath to work.
41146      new_path="$CYGWIN_ROOT_PATH$input_path"
41147    fi
41148  fi
41149
41150
41151  if test "x$path" != "x$new_path"; then
41152    JT_HOME="$new_path"
41153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41154$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41155  fi
41156
41157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41158
41159  path="$JT_HOME"
41160  has_colon=`$ECHO $path | $GREP ^.:`
41161  new_path="$path"
41162  if test "x$has_colon" = x; then
41163    # Not in mixed or Windows style, start by that.
41164    new_path=`cmd //c echo $path`
41165  fi
41166
41167
41168  input_path="$new_path"
41169  # Check if we need to convert this using DOS-style short mode. If the path
41170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41171  # take no chances and rewrite it.
41172  # Note: m4 eats our [], so we need to use [ and ] instead.
41173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41174  if test "x$has_forbidden_chars" != x; then
41175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41177  fi
41178
41179
41180  windows_path="$new_path"
41181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41182    unix_path=`$CYGPATH -u "$windows_path"`
41183    new_path="$unix_path"
41184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41186    new_path="$unix_path"
41187  fi
41188
41189  if test "x$path" != "x$new_path"; then
41190    JT_HOME="$new_path"
41191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41192$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41193  fi
41194
41195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41197
41198    else
41199      # We're on a unix platform. Hooray! :)
41200      path="$JT_HOME"
41201      has_space=`$ECHO "$path" | $GREP " "`
41202      if test "x$has_space" != x; then
41203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41204$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41206      fi
41207
41208      # Use eval to expand a potential ~
41209      eval path="$path"
41210      if test ! -f "$path" && test ! -d "$path"; then
41211        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41212      fi
41213
41214      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41215    fi
41216  fi
41217
41218
41219      # jtreg win32 script works for everybody
41220      JTREGEXE="$JT_HOME/bin/jtreg"
41221
41222      if test ! -f "$JTREGEXE"; then
41223        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41224      fi
41225
41226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41227$as_echo "$JTREGEXE" >&6; }
41228    else
41229      # try to find jtreg on path
41230
41231
41232
41233  # Publish this variable in the help.
41234
41235
41236  if test "x$JTREGEXE" = x; then
41237    # The variable is not set by user, try to locate tool using the code snippet
41238    for ac_prog in jtreg
41239do
41240  # Extract the first word of "$ac_prog", so it can be a program name with args.
41241set dummy $ac_prog; ac_word=$2
41242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41243$as_echo_n "checking for $ac_word... " >&6; }
41244if ${ac_cv_path_JTREGEXE+:} false; then :
41245  $as_echo_n "(cached) " >&6
41246else
41247  case $JTREGEXE in
41248  [\\/]* | ?:[\\/]*)
41249  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41250  ;;
41251  *)
41252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41253for as_dir in $PATH
41254do
41255  IFS=$as_save_IFS
41256  test -z "$as_dir" && as_dir=.
41257    for ac_exec_ext in '' $ac_executable_extensions; do
41258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41259    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41261    break 2
41262  fi
41263done
41264  done
41265IFS=$as_save_IFS
41266
41267  ;;
41268esac
41269fi
41270JTREGEXE=$ac_cv_path_JTREGEXE
41271if test -n "$JTREGEXE"; then
41272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41273$as_echo "$JTREGEXE" >&6; }
41274else
41275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41276$as_echo "no" >&6; }
41277fi
41278
41279
41280  test -n "$JTREGEXE" && break
41281done
41282
41283  else
41284    # The variable is set, but is it from the command line or the environment?
41285
41286    # Try to remove the string !JTREGEXE! from our list.
41287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41289      # If it failed, the variable was not from the command line. Ignore it,
41290      # but warn the user (except for BASH, which is always set by the calling BASH).
41291      if test "xJTREGEXE" != xBASH; then
41292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41293$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41294      fi
41295      # Try to locate tool using the code snippet
41296      for ac_prog in jtreg
41297do
41298  # Extract the first word of "$ac_prog", so it can be a program name with args.
41299set dummy $ac_prog; ac_word=$2
41300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41301$as_echo_n "checking for $ac_word... " >&6; }
41302if ${ac_cv_path_JTREGEXE+:} false; then :
41303  $as_echo_n "(cached) " >&6
41304else
41305  case $JTREGEXE in
41306  [\\/]* | ?:[\\/]*)
41307  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41308  ;;
41309  *)
41310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41311for as_dir in $PATH
41312do
41313  IFS=$as_save_IFS
41314  test -z "$as_dir" && as_dir=.
41315    for ac_exec_ext in '' $ac_executable_extensions; do
41316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41317    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41319    break 2
41320  fi
41321done
41322  done
41323IFS=$as_save_IFS
41324
41325  ;;
41326esac
41327fi
41328JTREGEXE=$ac_cv_path_JTREGEXE
41329if test -n "$JTREGEXE"; then
41330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41331$as_echo "$JTREGEXE" >&6; }
41332else
41333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41334$as_echo "no" >&6; }
41335fi
41336
41337
41338  test -n "$JTREGEXE" && break
41339done
41340
41341    else
41342      # If it succeeded, then it was overridden by the user. We will use it
41343      # for the tool.
41344
41345      # First remove it from the list of overridden variables, so we can test
41346      # for unknown variables in the end.
41347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41348
41349      # Check if the provided tool contains a complete path.
41350      tool_specified="$JTREGEXE"
41351      tool_basename="${tool_specified##*/}"
41352      if test "x$tool_basename" = "x$tool_specified"; then
41353        # A command without a complete path is provided, search $PATH.
41354        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41355$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41356        # Extract the first word of "$tool_basename", so it can be a program name with args.
41357set dummy $tool_basename; ac_word=$2
41358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41359$as_echo_n "checking for $ac_word... " >&6; }
41360if ${ac_cv_path_JTREGEXE+:} false; then :
41361  $as_echo_n "(cached) " >&6
41362else
41363  case $JTREGEXE in
41364  [\\/]* | ?:[\\/]*)
41365  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41366  ;;
41367  *)
41368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41369for as_dir in $PATH
41370do
41371  IFS=$as_save_IFS
41372  test -z "$as_dir" && as_dir=.
41373    for ac_exec_ext in '' $ac_executable_extensions; do
41374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41375    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41377    break 2
41378  fi
41379done
41380  done
41381IFS=$as_save_IFS
41382
41383  ;;
41384esac
41385fi
41386JTREGEXE=$ac_cv_path_JTREGEXE
41387if test -n "$JTREGEXE"; then
41388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41389$as_echo "$JTREGEXE" >&6; }
41390else
41391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41392$as_echo "no" >&6; }
41393fi
41394
41395
41396        if test "x$JTREGEXE" = x; then
41397          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41398        fi
41399      else
41400        # Otherwise we believe it is a complete path. Use it as it is.
41401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41402$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41404$as_echo_n "checking for JTREGEXE... " >&6; }
41405        if test ! -x "$tool_specified"; then
41406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41407$as_echo "not found" >&6; }
41408          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41409        fi
41410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41411$as_echo "$tool_specified" >&6; }
41412      fi
41413    fi
41414  fi
41415
41416
41417
41418  if test "x$JTREGEXE" = x; then
41419    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41420  fi
41421
41422
41423      JT_HOME="`$DIRNAME $JTREGEXE`"
41424    fi
41425  fi
41426
41427
41428
41429
41430
41431
41432  # Option used to tell the compiler whether to create 32- or 64-bit executables
41433  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41434    COMPILER_TARGET_BITS_FLAG="-q"
41435  else
41436    COMPILER_TARGET_BITS_FLAG="-m"
41437  fi
41438
41439
41440  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41441  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41442    ARFLAGS="-r"
41443  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41444    ARFLAGS="-X64"
41445  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41446    # lib.exe is used as AR to create static libraries.
41447    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41448  else
41449    ARFLAGS=""
41450  fi
41451
41452
41453  ## Setup strip.
41454  # FIXME: should this really be per platform, or should it be per toolchain type?
41455  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41456  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41457  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41458    STRIPFLAGS="-g"
41459  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41460    STRIPFLAGS="-x"
41461  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41462    STRIPFLAGS="-S"
41463  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41464    STRIPFLAGS="-X32_64"
41465  fi
41466
41467  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41468    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41469  fi
41470
41471
41472  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41473    CC_OUT_OPTION=-Fo
41474    EXE_OUT_OPTION=-out:
41475    LD_OUT_OPTION=-out:
41476    AR_OUT_OPTION=-out:
41477  else
41478    # The option used to specify the target .o,.a or .so file.
41479    # When compiling, how to specify the to be created object file.
41480    CC_OUT_OPTION='-o$(SPACE)'
41481    # When linking, how to specify the to be created executable.
41482    EXE_OUT_OPTION='-o$(SPACE)'
41483    # When linking, how to specify the to be created dynamically linkable library.
41484    LD_OUT_OPTION='-o$(SPACE)'
41485    # When archiving, how to specify the to be create static archive for object files.
41486    AR_OUT_OPTION='rcs$(SPACE)'
41487  fi
41488
41489
41490
41491
41492
41493  # On Windows, we need to set RC flags.
41494  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41495    RC_FLAGS="-nologo -l0x409"
41496    if test "x$VARIANT" = xOPT; then
41497      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41498    fi
41499
41500    # The version variables used to create RC_FLAGS may be overridden
41501    # in a custom configure script, or possibly the command line.
41502    # Let those variables be expanded at make time in spec.gmk.
41503    # The \$ are escaped to the shell, and the $(...) variables
41504    # are evaluated by make.
41505    RC_FLAGS="$RC_FLAGS \
41506        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41507        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41508        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41509        -D\"JDK_VER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
41510        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41511        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41512        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41513  fi
41514
41515
41516  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41517    # silence copyright notice and other headers.
41518    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41519  fi
41520
41521  if test "x$SYSROOT" != "x"; then
41522    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41523      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41524        # Solaris Studio does not have a concept of sysroot. Instead we must
41525        # make sure the default include and lib dirs are appended to each
41526        # compile and link command line.
41527        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41528        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41529            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41530            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41531      fi
41532    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41533      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41534      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41535      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41536    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41537      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41538      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41539    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41540      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41541      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41542    fi
41543    # Propagate the sysroot args to hotspot
41544    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41545    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41546    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41547  fi
41548
41549  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41550  # set this here so it doesn't have to be peppered throughout the forest
41551  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41552    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41553    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41554  fi
41555
41556
41557
41558
41559
41560# FIXME: Currently we must test this after toolchain but before flags. Fix!
41561
41562# Now we can test some aspects on the target using configure macros.
41563
41564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41565$as_echo_n "checking for ANSI C header files... " >&6; }
41566if ${ac_cv_header_stdc+:} false; then :
41567  $as_echo_n "(cached) " >&6
41568else
41569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41570/* end confdefs.h.  */
41571#include <stdlib.h>
41572#include <stdarg.h>
41573#include <string.h>
41574#include <float.h>
41575
41576int
41577main ()
41578{
41579
41580  ;
41581  return 0;
41582}
41583_ACEOF
41584if ac_fn_cxx_try_compile "$LINENO"; then :
41585  ac_cv_header_stdc=yes
41586else
41587  ac_cv_header_stdc=no
41588fi
41589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41590
41591if test $ac_cv_header_stdc = yes; then
41592  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41594/* end confdefs.h.  */
41595#include <string.h>
41596
41597_ACEOF
41598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41599  $EGREP "memchr" >/dev/null 2>&1; then :
41600
41601else
41602  ac_cv_header_stdc=no
41603fi
41604rm -f conftest*
41605
41606fi
41607
41608if test $ac_cv_header_stdc = yes; then
41609  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41611/* end confdefs.h.  */
41612#include <stdlib.h>
41613
41614_ACEOF
41615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41616  $EGREP "free" >/dev/null 2>&1; then :
41617
41618else
41619  ac_cv_header_stdc=no
41620fi
41621rm -f conftest*
41622
41623fi
41624
41625if test $ac_cv_header_stdc = yes; then
41626  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41627  if test "$cross_compiling" = yes; then :
41628  :
41629else
41630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41631/* end confdefs.h.  */
41632#include <ctype.h>
41633#include <stdlib.h>
41634#if ((' ' & 0x0FF) == 0x020)
41635# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41636# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41637#else
41638# define ISLOWER(c) \
41639		   (('a' <= (c) && (c) <= 'i') \
41640		     || ('j' <= (c) && (c) <= 'r') \
41641		     || ('s' <= (c) && (c) <= 'z'))
41642# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41643#endif
41644
41645#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41646int
41647main ()
41648{
41649  int i;
41650  for (i = 0; i < 256; i++)
41651    if (XOR (islower (i), ISLOWER (i))
41652	|| toupper (i) != TOUPPER (i))
41653      return 2;
41654  return 0;
41655}
41656_ACEOF
41657if ac_fn_cxx_try_run "$LINENO"; then :
41658
41659else
41660  ac_cv_header_stdc=no
41661fi
41662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41663  conftest.$ac_objext conftest.beam conftest.$ac_ext
41664fi
41665
41666fi
41667fi
41668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41669$as_echo "$ac_cv_header_stdc" >&6; }
41670if test $ac_cv_header_stdc = yes; then
41671
41672$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41673
41674fi
41675
41676# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41677for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41678		  inttypes.h stdint.h unistd.h
41679do :
41680  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41681ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41682"
41683if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41684  cat >>confdefs.h <<_ACEOF
41685#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41686_ACEOF
41687
41688fi
41689
41690done
41691
41692
41693
41694  ###############################################################################
41695  #
41696  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41697  # (The JVM can use 32 or 64 bit Java pointers but that decision
41698  # is made at runtime.)
41699  #
41700
41701  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41702    # Always specify -m flag on Solaris
41703    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41704
41705  # When we add flags to the "official" CFLAGS etc, we need to
41706  # keep track of these additions in ADDED_CFLAGS etc. These
41707  # will later be checked to make sure only controlled additions
41708  # have been made to CFLAGS etc.
41709  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41710  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41711  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41712
41713  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41714  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41715  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41716
41717  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41718  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41719  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41720
41721  elif test "x$COMPILE_TYPE" = xreduced; then
41722    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41723      # Specify -m if running reduced on unix platforms
41724
41725  # When we add flags to the "official" CFLAGS etc, we need to
41726  # keep track of these additions in ADDED_CFLAGS etc. These
41727  # will later be checked to make sure only controlled additions
41728  # have been made to CFLAGS etc.
41729  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41730  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41731  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41732
41733  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41734  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41735  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41736
41737  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41738  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41739  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41740
41741    fi
41742  fi
41743
41744  # Make compilation sanity check
41745  for ac_header in stdio.h
41746do :
41747  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41748if test "x$ac_cv_header_stdio_h" = xyes; then :
41749  cat >>confdefs.h <<_ACEOF
41750#define HAVE_STDIO_H 1
41751_ACEOF
41752
41753else
41754
41755    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41756$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41757    if test "x$COMPILE_TYPE" = xreduced; then
41758      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41759$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41760    elif test "x$COMPILE_TYPE" = xcross; then
41761      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41762$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41763    fi
41764    as_fn_error $? "Cannot continue." "$LINENO" 5
41765
41766fi
41767
41768done
41769
41770
41771  # The cast to long int works around a bug in the HP C Compiler
41772# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41773# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41774# This bug is HP SR number 8606223364.
41775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41776$as_echo_n "checking size of int *... " >&6; }
41777if ${ac_cv_sizeof_int_p+:} false; then :
41778  $as_echo_n "(cached) " >&6
41779else
41780  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41781
41782else
41783  if test "$ac_cv_type_int_p" = yes; then
41784     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41786as_fn_error 77 "cannot compute sizeof (int *)
41787See \`config.log' for more details" "$LINENO" 5; }
41788   else
41789     ac_cv_sizeof_int_p=0
41790   fi
41791fi
41792
41793fi
41794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41795$as_echo "$ac_cv_sizeof_int_p" >&6; }
41796
41797
41798
41799cat >>confdefs.h <<_ACEOF
41800#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41801_ACEOF
41802
41803
41804
41805  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41806  if test "x$ac_cv_sizeof_int_p" = x; then
41807    # The test failed, lets stick to the assumed value.
41808    { $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
41809$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41810  else
41811    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41812
41813    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41814      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41815      # Let's try to implicitely set the compilers target architecture and retry the test
41816      { $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
41817$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;}
41818      { $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
41819$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;}
41820
41821  # When we add flags to the "official" CFLAGS etc, we need to
41822  # keep track of these additions in ADDED_CFLAGS etc. These
41823  # will later be checked to make sure only controlled additions
41824  # have been made to CFLAGS etc.
41825  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41826  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41827  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41828
41829  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41830  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41831  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41832
41833  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41834  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41835  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41836
41837
41838      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41839      unset ac_cv_sizeof_int_p
41840      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41841      cat >>confdefs.h <<_ACEOF
41842#undef SIZEOF_INT_P
41843_ACEOF
41844
41845      # The cast to long int works around a bug in the HP C Compiler
41846# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41847# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41848# This bug is HP SR number 8606223364.
41849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41850$as_echo_n "checking size of int *... " >&6; }
41851if ${ac_cv_sizeof_int_p+:} false; then :
41852  $as_echo_n "(cached) " >&6
41853else
41854  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41855
41856else
41857  if test "$ac_cv_type_int_p" = yes; then
41858     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41859$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41860as_fn_error 77 "cannot compute sizeof (int *)
41861See \`config.log' for more details" "$LINENO" 5; }
41862   else
41863     ac_cv_sizeof_int_p=0
41864   fi
41865fi
41866
41867fi
41868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41869$as_echo "$ac_cv_sizeof_int_p" >&6; }
41870
41871
41872
41873cat >>confdefs.h <<_ACEOF
41874#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41875_ACEOF
41876
41877
41878
41879      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41880
41881      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41882        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
41883      fi
41884    fi
41885  fi
41886
41887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41888$as_echo_n "checking for target address size... " >&6; }
41889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41890$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41891
41892
41893  ###############################################################################
41894  #
41895  # Is the target little of big endian?
41896  #
41897   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41898$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41899if ${ac_cv_c_bigendian+:} false; then :
41900  $as_echo_n "(cached) " >&6
41901else
41902  ac_cv_c_bigendian=unknown
41903    # See if we're dealing with a universal compiler.
41904    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41905/* end confdefs.h.  */
41906#ifndef __APPLE_CC__
41907	       not a universal capable compiler
41908	     #endif
41909	     typedef int dummy;
41910
41911_ACEOF
41912if ac_fn_cxx_try_compile "$LINENO"; then :
41913
41914	# Check for potential -arch flags.  It is not universal unless
41915	# there are at least two -arch flags with different values.
41916	ac_arch=
41917	ac_prev=
41918	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41919	 if test -n "$ac_prev"; then
41920	   case $ac_word in
41921	     i?86 | x86_64 | ppc | ppc64)
41922	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41923		 ac_arch=$ac_word
41924	       else
41925		 ac_cv_c_bigendian=universal
41926		 break
41927	       fi
41928	       ;;
41929	   esac
41930	   ac_prev=
41931	 elif test "x$ac_word" = "x-arch"; then
41932	   ac_prev=arch
41933	 fi
41934       done
41935fi
41936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41937    if test $ac_cv_c_bigendian = unknown; then
41938      # See if sys/param.h defines the BYTE_ORDER macro.
41939      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41940/* end confdefs.h.  */
41941#include <sys/types.h>
41942	     #include <sys/param.h>
41943
41944int
41945main ()
41946{
41947#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41948		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41949		     && LITTLE_ENDIAN)
41950	      bogus endian macros
41951	     #endif
41952
41953  ;
41954  return 0;
41955}
41956_ACEOF
41957if ac_fn_cxx_try_compile "$LINENO"; then :
41958  # It does; now see whether it defined to BIG_ENDIAN or not.
41959	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41960/* end confdefs.h.  */
41961#include <sys/types.h>
41962		#include <sys/param.h>
41963
41964int
41965main ()
41966{
41967#if BYTE_ORDER != BIG_ENDIAN
41968		 not big endian
41969		#endif
41970
41971  ;
41972  return 0;
41973}
41974_ACEOF
41975if ac_fn_cxx_try_compile "$LINENO"; then :
41976  ac_cv_c_bigendian=yes
41977else
41978  ac_cv_c_bigendian=no
41979fi
41980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41981fi
41982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41983    fi
41984    if test $ac_cv_c_bigendian = unknown; then
41985      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41986      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41987/* end confdefs.h.  */
41988#include <limits.h>
41989
41990int
41991main ()
41992{
41993#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41994	      bogus endian macros
41995	     #endif
41996
41997  ;
41998  return 0;
41999}
42000_ACEOF
42001if ac_fn_cxx_try_compile "$LINENO"; then :
42002  # It does; now see whether it defined to _BIG_ENDIAN or not.
42003	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42004/* end confdefs.h.  */
42005#include <limits.h>
42006
42007int
42008main ()
42009{
42010#ifndef _BIG_ENDIAN
42011		 not big endian
42012		#endif
42013
42014  ;
42015  return 0;
42016}
42017_ACEOF
42018if ac_fn_cxx_try_compile "$LINENO"; then :
42019  ac_cv_c_bigendian=yes
42020else
42021  ac_cv_c_bigendian=no
42022fi
42023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42024fi
42025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42026    fi
42027    if test $ac_cv_c_bigendian = unknown; then
42028      # Compile a test program.
42029      if test "$cross_compiling" = yes; then :
42030  # Try to guess by grepping values from an object file.
42031	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42032/* end confdefs.h.  */
42033short int ascii_mm[] =
42034		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42035		short int ascii_ii[] =
42036		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42037		int use_ascii (int i) {
42038		  return ascii_mm[i] + ascii_ii[i];
42039		}
42040		short int ebcdic_ii[] =
42041		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42042		short int ebcdic_mm[] =
42043		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42044		int use_ebcdic (int i) {
42045		  return ebcdic_mm[i] + ebcdic_ii[i];
42046		}
42047		extern int foo;
42048
42049int
42050main ()
42051{
42052return use_ascii (foo) == use_ebcdic (foo);
42053  ;
42054  return 0;
42055}
42056_ACEOF
42057if ac_fn_cxx_try_compile "$LINENO"; then :
42058  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42059	      ac_cv_c_bigendian=yes
42060	    fi
42061	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42062	      if test "$ac_cv_c_bigendian" = unknown; then
42063		ac_cv_c_bigendian=no
42064	      else
42065		# finding both strings is unlikely to happen, but who knows?
42066		ac_cv_c_bigendian=unknown
42067	      fi
42068	    fi
42069fi
42070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42071else
42072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42073/* end confdefs.h.  */
42074$ac_includes_default
42075int
42076main ()
42077{
42078
42079	     /* Are we little or big endian?  From Harbison&Steele.  */
42080	     union
42081	     {
42082	       long int l;
42083	       char c[sizeof (long int)];
42084	     } u;
42085	     u.l = 1;
42086	     return u.c[sizeof (long int) - 1] == 1;
42087
42088  ;
42089  return 0;
42090}
42091_ACEOF
42092if ac_fn_cxx_try_run "$LINENO"; then :
42093  ac_cv_c_bigendian=no
42094else
42095  ac_cv_c_bigendian=yes
42096fi
42097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42098  conftest.$ac_objext conftest.beam conftest.$ac_ext
42099fi
42100
42101    fi
42102fi
42103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42104$as_echo "$ac_cv_c_bigendian" >&6; }
42105 case $ac_cv_c_bigendian in #(
42106   yes)
42107     ENDIAN="big";; #(
42108   no)
42109     ENDIAN="little" ;; #(
42110   universal)
42111     ENDIAN="universal_endianness"
42112     ;; #(
42113   *)
42114     ENDIAN="unknown" ;;
42115 esac
42116
42117
42118  if test "x$ENDIAN" = xuniversal_endianness; then
42119    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42120  fi
42121  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42122    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
42123  fi
42124
42125
42126# Configure flags for the tools
42127
42128  ###############################################################################
42129  #
42130  # How to compile shared libraries.
42131  #
42132
42133  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42134    PICFLAG="-fPIC"
42135    C_FLAG_REORDER=''
42136    CXX_FLAG_REORDER=''
42137
42138    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42139      # Linking is different on MacOSX
42140      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42141      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42142      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42143      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42144      SET_SHARED_LIBRARY_MAPFILE=''
42145    else
42146      # Default works for linux, might work on other platforms as well.
42147      SHARED_LIBRARY_FLAGS='-shared'
42148      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42149      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42150      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42151      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42152    fi
42153  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42154    PICFLAG=''
42155    C_FLAG_REORDER=''
42156    CXX_FLAG_REORDER=''
42157
42158    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42159      # Linking is different on MacOSX
42160      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42161      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42162      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42163      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42164      SET_SHARED_LIBRARY_MAPFILE=''
42165    else
42166      # Default works for linux, might work on other platforms as well.
42167      SHARED_LIBRARY_FLAGS='-shared'
42168      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42169      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42170      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42171      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42172    fi
42173  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42174    PICFLAG="-KPIC"
42175    C_FLAG_REORDER='-xF'
42176    CXX_FLAG_REORDER='-xF'
42177    SHARED_LIBRARY_FLAGS="-G"
42178    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42179    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42180    SET_SHARED_LIBRARY_NAME=''
42181    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42182  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42183    PICFLAG="-qpic=large"
42184    C_FLAG_REORDER=''
42185    CXX_FLAG_REORDER=''
42186    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42187    SET_EXECUTABLE_ORIGIN=""
42188    SET_SHARED_LIBRARY_ORIGIN=''
42189    SET_SHARED_LIBRARY_NAME=''
42190    SET_SHARED_LIBRARY_MAPFILE=''
42191  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42192    PICFLAG=""
42193    C_FLAG_REORDER=''
42194    CXX_FLAG_REORDER=''
42195    SHARED_LIBRARY_FLAGS="-LD"
42196    SET_EXECUTABLE_ORIGIN=''
42197    SET_SHARED_LIBRARY_ORIGIN=''
42198    SET_SHARED_LIBRARY_NAME=''
42199    SET_SHARED_LIBRARY_MAPFILE=''
42200  fi
42201
42202
42203
42204
42205
42206
42207
42208
42209  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42210    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42211    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42212    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42213  fi
42214  # The (cross) compiler is now configured, we can now test capabilities
42215  # of the target platform.
42216
42217
42218
42219  ###############################################################################
42220  #
42221  # Setup the opt flags for different compilers
42222  # and different operating systems.
42223  #
42224
42225  # FIXME: this was indirectly the old default, but just inherited.
42226  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42227  #   C_FLAG_DEPS="-MMD -MF"
42228  # fi
42229
42230  # Generate make dependency files
42231  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42232    C_FLAG_DEPS="-MMD -MF"
42233  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42234    C_FLAG_DEPS="-MMD -MF"
42235  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42236    C_FLAG_DEPS="-xMMD -xMF"
42237  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42238    C_FLAG_DEPS="-qmakedep=gcc -MF"
42239  fi
42240  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42241
42242
42243
42244  # Debug symbols
42245  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42246    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42247      # reduce from default "-g2" option to save space
42248      CFLAGS_DEBUG_SYMBOLS="-g1"
42249      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42250    else
42251      CFLAGS_DEBUG_SYMBOLS="-g"
42252      CXXFLAGS_DEBUG_SYMBOLS="-g"
42253    fi
42254  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42255    CFLAGS_DEBUG_SYMBOLS="-g"
42256    CXXFLAGS_DEBUG_SYMBOLS="-g"
42257  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42258    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42259    # FIXME: likely a bug, this disables debug symbols rather than enables them
42260    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42261  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42262    CFLAGS_DEBUG_SYMBOLS="-g"
42263    CXXFLAGS_DEBUG_SYMBOLS="-g"
42264  fi
42265
42266
42267
42268  # bounds, memory and behavior checking options
42269  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42270    case $DEBUG_LEVEL in
42271    release )
42272      # no adjustment
42273      ;;
42274    fastdebug )
42275      # no adjustment
42276      ;;
42277    slowdebug )
42278      # Add runtime stack smashing and undefined behavior checks.
42279      # Not all versions of gcc support -fstack-protector
42280      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42281
42282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42283$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42284  supports=yes
42285
42286  saved_cflags="$CFLAGS"
42287  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42288  ac_ext=c
42289ac_cpp='$CPP $CPPFLAGS'
42290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42292ac_compiler_gnu=$ac_cv_c_compiler_gnu
42293
42294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42295/* end confdefs.h.  */
42296int i;
42297_ACEOF
42298if ac_fn_c_try_compile "$LINENO"; then :
42299
42300else
42301  supports=no
42302fi
42303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42304  ac_ext=cpp
42305ac_cpp='$CXXCPP $CPPFLAGS'
42306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42309
42310  CFLAGS="$saved_cflags"
42311
42312  saved_cxxflags="$CXXFLAGS"
42313  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42314  ac_ext=cpp
42315ac_cpp='$CXXCPP $CPPFLAGS'
42316ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42317ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42318ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42319
42320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42321/* end confdefs.h.  */
42322int i;
42323_ACEOF
42324if ac_fn_cxx_try_compile "$LINENO"; then :
42325
42326else
42327  supports=no
42328fi
42329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42330  ac_ext=cpp
42331ac_cpp='$CXXCPP $CPPFLAGS'
42332ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42333ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42334ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42335
42336  CXXFLAGS="$saved_cxxflags"
42337
42338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42339$as_echo "$supports" >&6; }
42340  if test "x$supports" = "xyes" ; then
42341    :
42342  else
42343    STACK_PROTECTOR_CFLAG=""
42344  fi
42345
42346
42347      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42348      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42349      ;;
42350    esac
42351  fi
42352
42353  # Optimization levels
42354  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42355    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42356
42357    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42358      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42359      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42360      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42361      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42362      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42363      C_O_FLAG_NONE="-xregs=no%frameptr"
42364      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42365      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42366      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42367      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42368      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42369      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42370        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42371        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42372      fi
42373    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42374      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42375      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42376      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42377      C_O_FLAG_DEBUG=""
42378      C_O_FLAG_NONE=""
42379      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42380      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42381      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42382      C_O_FLAG_DEBUG=""
42383      CXX_O_FLAG_NONE=""
42384    fi
42385  else
42386    # The remaining toolchains share opt flags between CC and CXX;
42387    # setup for C and duplicate afterwards.
42388    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42389      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42390        # On MacOSX we optimize for size, something
42391        # we should do for all platforms?
42392        C_O_FLAG_HIGHEST="-Os"
42393        C_O_FLAG_HI="-Os"
42394        C_O_FLAG_NORM="-Os"
42395      else
42396        C_O_FLAG_HIGHEST="-O3"
42397        C_O_FLAG_HI="-O3"
42398        C_O_FLAG_NORM="-O2"
42399      fi
42400      C_O_FLAG_DEBUG="-O0"
42401      C_O_FLAG_NONE="-O0"
42402    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42403      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42404        # On MacOSX we optimize for size, something
42405        # we should do for all platforms?
42406        C_O_FLAG_HIGHEST="-Os"
42407        C_O_FLAG_HI="-Os"
42408        C_O_FLAG_NORM="-Os"
42409      else
42410        C_O_FLAG_HIGHEST="-O3"
42411        C_O_FLAG_HI="-O3"
42412        C_O_FLAG_NORM="-O2"
42413      fi
42414      C_O_FLAG_DEBUG="-O0"
42415      C_O_FLAG_NONE="-O0"
42416    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42417      C_O_FLAG_HIGHEST="-O3"
42418      C_O_FLAG_HI="-O3 -qstrict"
42419      C_O_FLAG_NORM="-O2"
42420      C_O_FLAG_DEBUG="-qnoopt"
42421      C_O_FLAG_NONE="-qnoop"
42422    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42423      C_O_FLAG_HIGHEST="-O2"
42424      C_O_FLAG_HI="-O1"
42425      C_O_FLAG_NORM="-O1"
42426      C_O_FLAG_DEBUG="-Od"
42427      C_O_FLAG_NONE="-Od"
42428    fi
42429    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42430    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42431    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42432    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42433    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42434  fi
42435
42436  # Adjust optimization flags according to debug level.
42437  case $DEBUG_LEVEL in
42438    release )
42439      # no adjustment
42440      ;;
42441    fastdebug )
42442      # Not quite so much optimization
42443      C_O_FLAG_HI="$C_O_FLAG_NORM"
42444      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42445      ;;
42446    slowdebug )
42447      # Disable optimization
42448      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42449      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42450      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42451      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42452      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42453      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42454      ;;
42455  esac
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469  # Special extras...
42470  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42471    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42472      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42473      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42474    fi
42475    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42476    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42477  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42478    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42479    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42480  fi
42481
42482  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42484$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42485  fi
42486
42487  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42489$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42490  fi
42491
42492  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42493    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42494$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42495  fi
42496
42497
42498# Check whether --with-extra-cflags was given.
42499if test "${with_extra_cflags+set}" = set; then :
42500  withval=$with_extra_cflags;
42501fi
42502
42503
42504
42505# Check whether --with-extra-cxxflags was given.
42506if test "${with_extra_cxxflags+set}" = set; then :
42507  withval=$with_extra_cxxflags;
42508fi
42509
42510
42511
42512# Check whether --with-extra-ldflags was given.
42513if test "${with_extra_ldflags+set}" = set; then :
42514  withval=$with_extra_ldflags;
42515fi
42516
42517
42518  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42519  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42520  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42521
42522  # Hotspot needs these set in their legacy form
42523  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42524  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42525  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42526
42527
42528
42529
42530
42531  ###############################################################################
42532  #
42533  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42534  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42535  #
42536
42537  # Setup compiler/platform specific flags into
42538  #    CFLAGS_JDK    - C Compiler flags
42539  #    CXXFLAGS_JDK  - C++ Compiler flags
42540  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42541  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42542    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42543      # Force compatibility with i586 on 32 bit intel platforms.
42544      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42545    fi
42546    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42547        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42548    case $OPENJDK_TARGET_CPU_ARCH in
42549      arm )
42550        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42551        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42552        ;;
42553      ppc )
42554        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42555        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42556        ;;
42557      * )
42558        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42559        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42560        ;;
42561    esac
42562  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42563    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42564    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42565      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42566    fi
42567
42568    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42569    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42570  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42571    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42572    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42573  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42574    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42575        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42576        -DWIN32_LEAN_AND_MEAN \
42577        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42578        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42579        -DWIN32 -DIAL"
42580    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42581      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42582    else
42583      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42584    fi
42585    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42586    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42587    # studio.
42588    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42589      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42590          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42591    fi
42592  fi
42593
42594  ###############################################################################
42595
42596  # Adjust flags according to debug level.
42597  case $DEBUG_LEVEL in
42598    fastdebug | slowdebug )
42599      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42600      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42601      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42602      ;;
42603    release )
42604      ;;
42605    * )
42606      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42607      ;;
42608  esac
42609
42610  # Setup LP64
42611  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42612
42613  # Set some common defines. These works for all compilers, but assume
42614  # -D is universally accepted.
42615
42616  # Setup endianness
42617  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42618    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42619    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42620    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42621    #   Note: -Dmacro         is the same as    #define macro 1
42622    #         -Dmacro=        is the same as    #define macro
42623    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42624      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42625    else
42626      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42627    fi
42628  else
42629    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42630    # are defined in the system?
42631    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42632      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42633    else
42634      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42635    fi
42636  fi
42637
42638  # Setup target OS define. Use OS target name but in upper case.
42639  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42640  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42641
42642  # Setup target CPU
42643  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42644
42645  # Setup debug/release defines
42646  if test "x$DEBUG_LEVEL" = xrelease; then
42647    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42648    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42649      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42650    fi
42651  else
42652    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42653  fi
42654
42655  # Set some additional per-OS defines.
42656  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42657    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42658  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42659    # FIXME: PPC64 should not be here.
42660    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42661  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42662    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42663  fi
42664
42665  # Additional macosx handling
42666  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42667    # Setting these parameters makes it an error to link to macosx APIs that are
42668    # newer than the given OS version and makes the linked binaries compatible
42669    # even if built on a newer version of the OS.
42670    # The expected format is X.Y.Z
42671    MACOSX_VERSION_MIN=10.7.0
42672
42673
42674    # The macro takes the version with no dots, ex: 1070
42675    # Let the flags variables get resolved in make for easier override on make
42676    # command line.
42677    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42678    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42679  fi
42680
42681  # Setup some hard coded includes
42682  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42683      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42684      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42685      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42686
42687  # The shared libraries are compiled using the picflag.
42688  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42689  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42690
42691  # Executable flags
42692  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42693  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42694
42695
42696
42697
42698
42699
42700  # Flags for compiling test libraries
42701  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42702  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42703
42704  # Flags for compiling test executables
42705  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42706  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42707
42708
42709
42710
42711
42712
42713  # Setup LDFLAGS et al.
42714  #
42715
42716  # Now this is odd. The JDK native libraries have to link against libjvm.so
42717  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42718  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42719  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42720  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42721  # libraries will link to whatever is in memory. Yuck.
42722  #
42723  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42724  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42725    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42726    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42727      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42728    fi
42729    # TODO: make -debug optional "--disable-full-debug-symbols"
42730    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42731  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42732    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42733    # We have previously set HAS_GNU_HASH if this is the case
42734    if test -n "$HAS_GNU_HASH"; then
42735      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42736    fi
42737    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42738      # And since we now know that the linker is gnu, then add -z defs, to forbid
42739      # undefined symbols in object files.
42740      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42741      case $DEBUG_LEVEL in
42742        release )
42743          # tell linker to optimize libraries.
42744          # Should this be supplied to the OSS linker as well?
42745          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42746          ;;
42747        slowdebug )
42748          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42749            # do relocations at load
42750            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42751            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42752          fi
42753          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42754            # mark relocations read only
42755            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42756            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42757          fi
42758          ;;
42759        fastdebug )
42760          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42761            # mark relocations read only
42762            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42763            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42764          fi
42765          ;;
42766        * )
42767          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42768          ;;
42769        esac
42770    fi
42771  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42772    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42773    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42774  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42775    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42776  fi
42777
42778  # Customize LDFLAGS for executables
42779
42780  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42781
42782  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42783    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42784      LDFLAGS_STACK_SIZE=1048576
42785    else
42786      LDFLAGS_STACK_SIZE=327680
42787    fi
42788    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42789  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42790    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42791  fi
42792
42793  # Customize LDFLAGS for libs
42794  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42795
42796  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42797    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42798    LDFLAGS_JDKLIB_SUFFIX=""
42799  else
42800    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42801        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42802
42803    # On some platforms (mac) the linker warns about non existing -L dirs.
42804    # Add server first if available. Linking aginst client does not always produce the same results.
42805    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42806    # Default to server for other variants.
42807    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42808      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42809    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42810      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42811    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42812      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42813    else
42814      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42815    fi
42816
42817    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42818    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42819      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42820    fi
42821  fi
42822
42823
42824
42825
42826
42827
42828
42829  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42830  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42831  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42832  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42833
42834
42835
42836
42837
42838
42839
42840  # Some Zero and Shark settings.
42841  # ZERO_ARCHFLAG tells the compiler which mode to build for
42842  case "${OPENJDK_TARGET_CPU}" in
42843    s390)
42844      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42845      ;;
42846    *)
42847      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42848  esac
42849
42850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42851$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42852  supports=yes
42853
42854  saved_cflags="$CFLAGS"
42855  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42856  ac_ext=c
42857ac_cpp='$CPP $CPPFLAGS'
42858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42860ac_compiler_gnu=$ac_cv_c_compiler_gnu
42861
42862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42863/* end confdefs.h.  */
42864int i;
42865_ACEOF
42866if ac_fn_c_try_compile "$LINENO"; then :
42867
42868else
42869  supports=no
42870fi
42871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42872  ac_ext=cpp
42873ac_cpp='$CXXCPP $CPPFLAGS'
42874ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42875ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42876ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42877
42878  CFLAGS="$saved_cflags"
42879
42880  saved_cxxflags="$CXXFLAGS"
42881  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42882  ac_ext=cpp
42883ac_cpp='$CXXCPP $CPPFLAGS'
42884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42887
42888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42889/* end confdefs.h.  */
42890int i;
42891_ACEOF
42892if ac_fn_cxx_try_compile "$LINENO"; then :
42893
42894else
42895  supports=no
42896fi
42897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42898  ac_ext=cpp
42899ac_cpp='$CXXCPP $CPPFLAGS'
42900ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42901ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42902ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42903
42904  CXXFLAGS="$saved_cxxflags"
42905
42906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42907$as_echo "$supports" >&6; }
42908  if test "x$supports" = "xyes" ; then
42909    :
42910  else
42911    ZERO_ARCHFLAG=""
42912  fi
42913
42914
42915
42916  # Check that the compiler supports -mX (or -qX on AIX) flags
42917  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42918
42919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42920$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42921  supports=yes
42922
42923  saved_cflags="$CFLAGS"
42924  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42925  ac_ext=c
42926ac_cpp='$CPP $CPPFLAGS'
42927ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42928ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42929ac_compiler_gnu=$ac_cv_c_compiler_gnu
42930
42931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42932/* end confdefs.h.  */
42933int i;
42934_ACEOF
42935if ac_fn_c_try_compile "$LINENO"; then :
42936
42937else
42938  supports=no
42939fi
42940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42941  ac_ext=cpp
42942ac_cpp='$CXXCPP $CPPFLAGS'
42943ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42944ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42945ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42946
42947  CFLAGS="$saved_cflags"
42948
42949  saved_cxxflags="$CXXFLAGS"
42950  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42951  ac_ext=cpp
42952ac_cpp='$CXXCPP $CPPFLAGS'
42953ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42954ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42955ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42956
42957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42958/* end confdefs.h.  */
42959int i;
42960_ACEOF
42961if ac_fn_cxx_try_compile "$LINENO"; then :
42962
42963else
42964  supports=no
42965fi
42966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42967  ac_ext=cpp
42968ac_cpp='$CXXCPP $CPPFLAGS'
42969ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42970ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42971ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42972
42973  CXXFLAGS="$saved_cxxflags"
42974
42975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42976$as_echo "$supports" >&6; }
42977  if test "x$supports" = "xyes" ; then
42978    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42979  else
42980    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42981  fi
42982
42983
42984
42985  # Check whether --enable-warnings-as-errors was given.
42986if test "${enable_warnings_as_errors+set}" = set; then :
42987  enableval=$enable_warnings_as_errors;
42988fi
42989
42990
42991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42992$as_echo_n "checking if native warnings are errors... " >&6; }
42993  if test "x$enable_warnings_as_errors" = "xyes"; then
42994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42995$as_echo "yes (explicitely set)" >&6; }
42996    WARNINGS_AS_ERRORS=true
42997  elif test "x$enable_warnings_as_errors" = "xno"; then
42998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42999$as_echo "no" >&6; }
43000    WARNINGS_AS_ERRORS=false
43001  elif test "x$enable_warnings_as_errors" = "x"; then
43002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43003$as_echo "yes (default)" >&6; }
43004    WARNINGS_AS_ERRORS=true
43005  else
43006    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43007  fi
43008
43009
43010  case "${TOOLCHAIN_TYPE}" in
43011    microsoft)
43012      DISABLE_WARNING_PREFIX="-wd"
43013      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43014      ;;
43015    solstudio)
43016      DISABLE_WARNING_PREFIX="-erroff="
43017      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43018      ;;
43019    gcc)
43020      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43021
43022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43023$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43024  supports=yes
43025
43026  saved_cflags="$CFLAGS"
43027  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43028  ac_ext=c
43029ac_cpp='$CPP $CPPFLAGS'
43030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43032ac_compiler_gnu=$ac_cv_c_compiler_gnu
43033
43034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43035/* end confdefs.h.  */
43036int i;
43037_ACEOF
43038if ac_fn_c_try_compile "$LINENO"; then :
43039
43040else
43041  supports=no
43042fi
43043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43044  ac_ext=cpp
43045ac_cpp='$CXXCPP $CPPFLAGS'
43046ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43047ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43048ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43049
43050  CFLAGS="$saved_cflags"
43051
43052  saved_cxxflags="$CXXFLAGS"
43053  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43054  ac_ext=cpp
43055ac_cpp='$CXXCPP $CPPFLAGS'
43056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43059
43060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43061/* end confdefs.h.  */
43062int i;
43063_ACEOF
43064if ac_fn_cxx_try_compile "$LINENO"; then :
43065
43066else
43067  supports=no
43068fi
43069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43070  ac_ext=cpp
43071ac_cpp='$CXXCPP $CPPFLAGS'
43072ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43073ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43074ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43075
43076  CXXFLAGS="$saved_cxxflags"
43077
43078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43079$as_echo "$supports" >&6; }
43080  if test "x$supports" = "xyes" ; then
43081    GCC_CAN_DISABLE_WARNINGS=true
43082  else
43083    GCC_CAN_DISABLE_WARNINGS=false
43084
43085  fi
43086
43087      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43088        DISABLE_WARNING_PREFIX="-Wno-"
43089      else
43090        DISABLE_WARNING_PREFIX=
43091      fi
43092      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43093      ;;
43094    clang)
43095      DISABLE_WARNING_PREFIX="-Wno-"
43096      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43097      ;;
43098  esac
43099
43100
43101
43102
43103# Setup debug symbols (need objcopy from the toolchain for that)
43104
43105  #
43106  # ENABLE_DEBUG_SYMBOLS
43107  # This must be done after the toolchain is setup, since we're looking at objcopy.
43108  #
43109  # Check whether --enable-debug-symbols was given.
43110if test "${enable_debug_symbols+set}" = set; then :
43111  enableval=$enable_debug_symbols;
43112fi
43113
43114
43115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43116$as_echo_n "checking if we should generate debug symbols... " >&6; }
43117
43118  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43119    # explicit enabling of enable-debug-symbols and can't find objcopy
43120    #   this is an error
43121    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43122  fi
43123
43124  if test "x$enable_debug_symbols" = "xyes"; then
43125    ENABLE_DEBUG_SYMBOLS=true
43126  elif test "x$enable_debug_symbols" = "xno"; then
43127    ENABLE_DEBUG_SYMBOLS=false
43128  else
43129    # Default is on if objcopy is found
43130    if test "x$OBJCOPY" != x; then
43131      ENABLE_DEBUG_SYMBOLS=true
43132    # MacOS X and Windows don't use objcopy but default is on for those OSes
43133    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43134      ENABLE_DEBUG_SYMBOLS=true
43135    else
43136      ENABLE_DEBUG_SYMBOLS=false
43137    fi
43138  fi
43139
43140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43141$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43142
43143  #
43144  # ZIP_DEBUGINFO_FILES
43145  #
43146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43147$as_echo_n "checking if we should zip debug-info files... " >&6; }
43148  # Check whether --enable-zip-debug-info was given.
43149if test "${enable_zip_debug_info+set}" = set; then :
43150  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43151else
43152  enable_zip_debug_info="yes"
43153fi
43154
43155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43156$as_echo "${enable_zip_debug_info}" >&6; }
43157
43158  if test "x${enable_zip_debug_info}" = "xno"; then
43159    ZIP_DEBUGINFO_FILES=false
43160  else
43161    ZIP_DEBUGINFO_FILES=true
43162  fi
43163
43164
43165
43166
43167
43168  # Check whether --enable-native-coverage was given.
43169if test "${enable_native_coverage+set}" = set; then :
43170  enableval=$enable_native_coverage;
43171fi
43172
43173  GCOV_ENABLED="false"
43174  if test "x$enable_native_coverage" = "xyes"; then
43175    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43177$as_echo_n "checking if native coverage is enabled... " >&6; }
43178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43179$as_echo "yes" >&6; }
43180      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43181      GCOV_LDFLAGS="-fprofile-arcs"
43182      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43183      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43184      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43185      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43186      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43187      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43188      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43189      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43190      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43191      GCOV_ENABLED="true"
43192    else
43193      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43194    fi
43195  elif test "x$enable_native_coverage" = "xno"; then
43196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43197$as_echo_n "checking if native coverage is enabled... " >&6; }
43198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43199$as_echo "no" >&6; }
43200  elif test "x$enable_native_coverage" != "x"; then
43201    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43202  fi
43203
43204
43205
43206
43207###############################################################################
43208#
43209# Check dependencies for external and internal libraries.
43210#
43211###############################################################################
43212
43213# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43214
43215  # When using cygwin or msys, we need a wrapper binary that renames
43216  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43217  # @files and rewrites these too! This wrapper binary is
43218  # called fixpath.
43219  FIXPATH=
43220  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43222$as_echo_n "checking if fixpath can be created... " >&6; }
43223    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43224    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43225    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43226    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43227      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43228      FIXPATH="$FIXPATH_BIN -c"
43229    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43230      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43231      # @ was chosen as separator to minimize risk of other tools messing around with it
43232      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43233          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43234      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43235      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43236    fi
43237    FIXPATH_SRC_W="$FIXPATH_SRC"
43238    FIXPATH_BIN_W="$FIXPATH_BIN"
43239
43240  unix_path="$FIXPATH_SRC_W"
43241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43242    windows_path=`$CYGPATH -m "$unix_path"`
43243    FIXPATH_SRC_W="$windows_path"
43244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43245    windows_path=`cmd //c echo $unix_path`
43246    FIXPATH_SRC_W="$windows_path"
43247  fi
43248
43249
43250  unix_path="$FIXPATH_BIN_W"
43251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43252    windows_path=`$CYGPATH -m "$unix_path"`
43253    FIXPATH_BIN_W="$windows_path"
43254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43255    windows_path=`cmd //c echo $unix_path`
43256    FIXPATH_BIN_W="$windows_path"
43257  fi
43258
43259    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43260    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43261    cd $FIXPATH_DIR
43262    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43263    cd $CURDIR
43264
43265    if test ! -x $FIXPATH_BIN; then
43266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43267$as_echo "no" >&6; }
43268      cat $FIXPATH_DIR/fixpath1.log
43269      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43270    fi
43271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43272$as_echo "yes" >&6; }
43273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43274$as_echo_n "checking if fixpath.exe works... " >&6; }
43275    cd $FIXPATH_DIR
43276    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43277        > $FIXPATH_DIR/fixpath2.log 2>&1
43278    cd $CURDIR
43279    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43281$as_echo "no" >&6; }
43282      cat $FIXPATH_DIR/fixpath2.log
43283      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43284    fi
43285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43286$as_echo "yes" >&6; }
43287  fi
43288
43289
43290
43291
43292
43293
43294  ###############################################################################
43295  #
43296  # OS specific settings that we never will need to probe.
43297  #
43298  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43300$as_echo_n "checking what is not needed on Linux?... " >&6; }
43301    PULSE_NOT_NEEDED=yes
43302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43303$as_echo "pulse" >&6; }
43304  fi
43305
43306  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43308$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43309    ALSA_NOT_NEEDED=yes
43310    PULSE_NOT_NEEDED=yes
43311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43312$as_echo "alsa pulse" >&6; }
43313  fi
43314
43315  if test "x$OPENJDK_TARGET_OS" = xaix; then
43316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43317$as_echo_n "checking what is not needed on AIX?... " >&6; }
43318    ALSA_NOT_NEEDED=yes
43319    PULSE_NOT_NEEDED=yes
43320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43321$as_echo "alsa pulse" >&6; }
43322  fi
43323
43324
43325  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43327$as_echo_n "checking what is not needed on Windows?... " >&6; }
43328    CUPS_NOT_NEEDED=yes
43329    ALSA_NOT_NEEDED=yes
43330    PULSE_NOT_NEEDED=yes
43331    X11_NOT_NEEDED=yes
43332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43333$as_echo "alsa cups pulse x11" >&6; }
43334  fi
43335
43336  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43338$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43339    ALSA_NOT_NEEDED=yes
43340    PULSE_NOT_NEEDED=yes
43341    X11_NOT_NEEDED=yes
43342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43343$as_echo "alsa pulse x11" >&6; }
43344  fi
43345
43346  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43348$as_echo_n "checking what is not needed on bsd?... " >&6; }
43349    ALSA_NOT_NEEDED=yes
43350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43351$as_echo "alsa" >&6; }
43352  fi
43353
43354  if test "x$OPENJDK" = "xfalse"; then
43355    FREETYPE_NOT_NEEDED=yes
43356  fi
43357
43358  if test "x$SUPPORT_HEADFUL" = xno; then
43359    X11_NOT_NEEDED=yes
43360  fi
43361
43362
43363
43364  ###############################################################################
43365  #
43366  # Check for X Windows
43367  #
43368
43369  if test "x$X11_NOT_NEEDED" = xyes; then
43370    if test "x${with_x}" != x; then
43371      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43372$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43373    fi
43374    X_CFLAGS=
43375    X_LIBS=
43376  else
43377    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43378    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43379    # --x-libraries for the sysroot, if that seems to be correct.
43380    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43381      if test "x$SYSROOT" != "x"; then
43382        if test "x$x_includes" = xNONE; then
43383          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43384            x_includes="$SYSROOT/usr/X11R6/include"
43385          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43386            x_includes="$SYSROOT/usr/include"
43387          fi
43388        fi
43389        if test "x$x_libraries" = xNONE; then
43390          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43391            x_libraries="$SYSROOT/usr/X11R6/lib"
43392          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43393            x_libraries="$SYSROOT/usr/lib64"
43394          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43395            x_libraries="$SYSROOT/usr/lib"
43396          fi
43397        fi
43398      fi
43399    fi
43400
43401    # Now let autoconf do it's magic
43402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43403$as_echo_n "checking for X... " >&6; }
43404
43405
43406# Check whether --with-x was given.
43407if test "${with_x+set}" = set; then :
43408  withval=$with_x;
43409fi
43410
43411# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43412if test "x$with_x" = xno; then
43413  # The user explicitly disabled X.
43414  have_x=disabled
43415else
43416  case $x_includes,$x_libraries in #(
43417    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43418    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43419  $as_echo_n "(cached) " >&6
43420else
43421  # One or both of the vars are not set, and there is no cached value.
43422ac_x_includes=no ac_x_libraries=no
43423rm -f -r conftest.dir
43424if mkdir conftest.dir; then
43425  cd conftest.dir
43426  cat >Imakefile <<'_ACEOF'
43427incroot:
43428	@echo incroot='${INCROOT}'
43429usrlibdir:
43430	@echo usrlibdir='${USRLIBDIR}'
43431libdir:
43432	@echo libdir='${LIBDIR}'
43433_ACEOF
43434  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43435    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43436    for ac_var in incroot usrlibdir libdir; do
43437      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43438    done
43439    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43440    for ac_extension in a so sl dylib la dll; do
43441      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43442	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43443	ac_im_usrlibdir=$ac_im_libdir; break
43444      fi
43445    done
43446    # Screen out bogus values from the imake configuration.  They are
43447    # bogus both because they are the default anyway, and because
43448    # using them would break gcc on systems where it needs fixed includes.
43449    case $ac_im_incroot in
43450	/usr/include) ac_x_includes= ;;
43451	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43452    esac
43453    case $ac_im_usrlibdir in
43454	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43455	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43456    esac
43457  fi
43458  cd ..
43459  rm -f -r conftest.dir
43460fi
43461
43462# Standard set of common directories for X headers.
43463# Check X11 before X11Rn because it is often a symlink to the current release.
43464ac_x_header_dirs='
43465/usr/X11/include
43466/usr/X11R7/include
43467/usr/X11R6/include
43468/usr/X11R5/include
43469/usr/X11R4/include
43470
43471/usr/include/X11
43472/usr/include/X11R7
43473/usr/include/X11R6
43474/usr/include/X11R5
43475/usr/include/X11R4
43476
43477/usr/local/X11/include
43478/usr/local/X11R7/include
43479/usr/local/X11R6/include
43480/usr/local/X11R5/include
43481/usr/local/X11R4/include
43482
43483/usr/local/include/X11
43484/usr/local/include/X11R7
43485/usr/local/include/X11R6
43486/usr/local/include/X11R5
43487/usr/local/include/X11R4
43488
43489/usr/X386/include
43490/usr/x386/include
43491/usr/XFree86/include/X11
43492
43493/usr/include
43494/usr/local/include
43495/usr/unsupported/include
43496/usr/athena/include
43497/usr/local/x11r5/include
43498/usr/lpp/Xamples/include
43499
43500/usr/openwin/include
43501/usr/openwin/share/include'
43502
43503if test "$ac_x_includes" = no; then
43504  # Guess where to find include files, by looking for Xlib.h.
43505  # First, try using that file with no special directory specified.
43506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43507/* end confdefs.h.  */
43508#include <X11/Xlib.h>
43509_ACEOF
43510if ac_fn_cxx_try_cpp "$LINENO"; then :
43511  # We can compile using X headers with no special include directory.
43512ac_x_includes=
43513else
43514  for ac_dir in $ac_x_header_dirs; do
43515  if test -r "$ac_dir/X11/Xlib.h"; then
43516    ac_x_includes=$ac_dir
43517    break
43518  fi
43519done
43520fi
43521rm -f conftest.err conftest.i conftest.$ac_ext
43522fi # $ac_x_includes = no
43523
43524if test "$ac_x_libraries" = no; then
43525  # Check for the libraries.
43526  # See if we find them without any special options.
43527  # Don't add to $LIBS permanently.
43528  ac_save_LIBS=$LIBS
43529  LIBS="-lX11 $LIBS"
43530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43531/* end confdefs.h.  */
43532#include <X11/Xlib.h>
43533int
43534main ()
43535{
43536XrmInitialize ()
43537  ;
43538  return 0;
43539}
43540_ACEOF
43541if ac_fn_cxx_try_link "$LINENO"; then :
43542  LIBS=$ac_save_LIBS
43543# We can link X programs with no special library path.
43544ac_x_libraries=
43545else
43546  LIBS=$ac_save_LIBS
43547for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43548do
43549  # Don't even attempt the hair of trying to link an X program!
43550  for ac_extension in a so sl dylib la dll; do
43551    if test -r "$ac_dir/libX11.$ac_extension"; then
43552      ac_x_libraries=$ac_dir
43553      break 2
43554    fi
43555  done
43556done
43557fi
43558rm -f core conftest.err conftest.$ac_objext \
43559    conftest$ac_exeext conftest.$ac_ext
43560fi # $ac_x_libraries = no
43561
43562case $ac_x_includes,$ac_x_libraries in #(
43563  no,* | *,no | *\'*)
43564    # Didn't find X, or a directory has "'" in its name.
43565    ac_cv_have_x="have_x=no";; #(
43566  *)
43567    # Record where we found X for the cache.
43568    ac_cv_have_x="have_x=yes\
43569	ac_x_includes='$ac_x_includes'\
43570	ac_x_libraries='$ac_x_libraries'"
43571esac
43572fi
43573;; #(
43574    *) have_x=yes;;
43575  esac
43576  eval "$ac_cv_have_x"
43577fi # $with_x != no
43578
43579if test "$have_x" != yes; then
43580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43581$as_echo "$have_x" >&6; }
43582  no_x=yes
43583else
43584  # If each of the values was on the command line, it overrides each guess.
43585  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43586  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43587  # Update the cache value to reflect the command line values.
43588  ac_cv_have_x="have_x=yes\
43589	ac_x_includes='$x_includes'\
43590	ac_x_libraries='$x_libraries'"
43591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43592$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43593fi
43594
43595    if test "$no_x" = yes; then
43596  # Not all programs may use this symbol, but it does not hurt to define it.
43597
43598$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43599
43600  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43601else
43602  if test -n "$x_includes"; then
43603    X_CFLAGS="$X_CFLAGS -I$x_includes"
43604  fi
43605
43606  # It would also be nice to do this for all -L options, not just this one.
43607  if test -n "$x_libraries"; then
43608    X_LIBS="$X_LIBS -L$x_libraries"
43609    # For Solaris; some versions of Sun CC require a space after -R and
43610    # others require no space.  Words are not sufficient . . . .
43611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43612$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43613    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43614    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43615    ac_cxx_werror_flag=yes
43616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43617/* end confdefs.h.  */
43618
43619int
43620main ()
43621{
43622
43623  ;
43624  return 0;
43625}
43626_ACEOF
43627if ac_fn_cxx_try_link "$LINENO"; then :
43628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43629$as_echo "no" >&6; }
43630       X_LIBS="$X_LIBS -R$x_libraries"
43631else
43632  LIBS="$ac_xsave_LIBS -R $x_libraries"
43633       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43634/* end confdefs.h.  */
43635
43636int
43637main ()
43638{
43639
43640  ;
43641  return 0;
43642}
43643_ACEOF
43644if ac_fn_cxx_try_link "$LINENO"; then :
43645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43646$as_echo "yes" >&6; }
43647	  X_LIBS="$X_LIBS -R $x_libraries"
43648else
43649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43650$as_echo "neither works" >&6; }
43651fi
43652rm -f core conftest.err conftest.$ac_objext \
43653    conftest$ac_exeext conftest.$ac_ext
43654fi
43655rm -f core conftest.err conftest.$ac_objext \
43656    conftest$ac_exeext conftest.$ac_ext
43657    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43658    LIBS=$ac_xsave_LIBS
43659  fi
43660
43661  # Check for system-dependent libraries X programs must link with.
43662  # Do this before checking for the system-independent R6 libraries
43663  # (-lICE), since we may need -lsocket or whatever for X linking.
43664
43665  if test "$ISC" = yes; then
43666    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43667  else
43668    # Martyn Johnson says this is needed for Ultrix, if the X
43669    # libraries were built with DECnet support.  And Karl Berry says
43670    # the Alpha needs dnet_stub (dnet does not exist).
43671    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43672    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43673/* end confdefs.h.  */
43674
43675/* Override any GCC internal prototype to avoid an error.
43676   Use char because int might match the return type of a GCC
43677   builtin and then its argument prototype would still apply.  */
43678#ifdef __cplusplus
43679extern "C"
43680#endif
43681char XOpenDisplay ();
43682int
43683main ()
43684{
43685return XOpenDisplay ();
43686  ;
43687  return 0;
43688}
43689_ACEOF
43690if ac_fn_cxx_try_link "$LINENO"; then :
43691
43692else
43693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43694$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43695if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43696  $as_echo_n "(cached) " >&6
43697else
43698  ac_check_lib_save_LIBS=$LIBS
43699LIBS="-ldnet  $LIBS"
43700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43701/* end confdefs.h.  */
43702
43703/* Override any GCC internal prototype to avoid an error.
43704   Use char because int might match the return type of a GCC
43705   builtin and then its argument prototype would still apply.  */
43706#ifdef __cplusplus
43707extern "C"
43708#endif
43709char dnet_ntoa ();
43710int
43711main ()
43712{
43713return dnet_ntoa ();
43714  ;
43715  return 0;
43716}
43717_ACEOF
43718if ac_fn_cxx_try_link "$LINENO"; then :
43719  ac_cv_lib_dnet_dnet_ntoa=yes
43720else
43721  ac_cv_lib_dnet_dnet_ntoa=no
43722fi
43723rm -f core conftest.err conftest.$ac_objext \
43724    conftest$ac_exeext conftest.$ac_ext
43725LIBS=$ac_check_lib_save_LIBS
43726fi
43727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43728$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43729if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43730  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43731fi
43732
43733    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43734      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43735$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43736if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43737  $as_echo_n "(cached) " >&6
43738else
43739  ac_check_lib_save_LIBS=$LIBS
43740LIBS="-ldnet_stub  $LIBS"
43741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43742/* end confdefs.h.  */
43743
43744/* Override any GCC internal prototype to avoid an error.
43745   Use char because int might match the return type of a GCC
43746   builtin and then its argument prototype would still apply.  */
43747#ifdef __cplusplus
43748extern "C"
43749#endif
43750char dnet_ntoa ();
43751int
43752main ()
43753{
43754return dnet_ntoa ();
43755  ;
43756  return 0;
43757}
43758_ACEOF
43759if ac_fn_cxx_try_link "$LINENO"; then :
43760  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43761else
43762  ac_cv_lib_dnet_stub_dnet_ntoa=no
43763fi
43764rm -f core conftest.err conftest.$ac_objext \
43765    conftest$ac_exeext conftest.$ac_ext
43766LIBS=$ac_check_lib_save_LIBS
43767fi
43768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43769$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43770if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43771  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43772fi
43773
43774    fi
43775fi
43776rm -f core conftest.err conftest.$ac_objext \
43777    conftest$ac_exeext conftest.$ac_ext
43778    LIBS="$ac_xsave_LIBS"
43779
43780    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43781    # to get the SysV transport functions.
43782    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43783    # needs -lnsl.
43784    # The nsl library prevents programs from opening the X display
43785    # on Irix 5.2, according to T.E. Dickey.
43786    # The functions gethostbyname, getservbyname, and inet_addr are
43787    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43788    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43789if test "x$ac_cv_func_gethostbyname" = xyes; then :
43790
43791fi
43792
43793    if test $ac_cv_func_gethostbyname = no; then
43794      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43795$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43796if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43797  $as_echo_n "(cached) " >&6
43798else
43799  ac_check_lib_save_LIBS=$LIBS
43800LIBS="-lnsl  $LIBS"
43801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43802/* end confdefs.h.  */
43803
43804/* Override any GCC internal prototype to avoid an error.
43805   Use char because int might match the return type of a GCC
43806   builtin and then its argument prototype would still apply.  */
43807#ifdef __cplusplus
43808extern "C"
43809#endif
43810char gethostbyname ();
43811int
43812main ()
43813{
43814return gethostbyname ();
43815  ;
43816  return 0;
43817}
43818_ACEOF
43819if ac_fn_cxx_try_link "$LINENO"; then :
43820  ac_cv_lib_nsl_gethostbyname=yes
43821else
43822  ac_cv_lib_nsl_gethostbyname=no
43823fi
43824rm -f core conftest.err conftest.$ac_objext \
43825    conftest$ac_exeext conftest.$ac_ext
43826LIBS=$ac_check_lib_save_LIBS
43827fi
43828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43829$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43830if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43831  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43832fi
43833
43834      if test $ac_cv_lib_nsl_gethostbyname = no; then
43835	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43836$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43837if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43838  $as_echo_n "(cached) " >&6
43839else
43840  ac_check_lib_save_LIBS=$LIBS
43841LIBS="-lbsd  $LIBS"
43842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43843/* end confdefs.h.  */
43844
43845/* Override any GCC internal prototype to avoid an error.
43846   Use char because int might match the return type of a GCC
43847   builtin and then its argument prototype would still apply.  */
43848#ifdef __cplusplus
43849extern "C"
43850#endif
43851char gethostbyname ();
43852int
43853main ()
43854{
43855return gethostbyname ();
43856  ;
43857  return 0;
43858}
43859_ACEOF
43860if ac_fn_cxx_try_link "$LINENO"; then :
43861  ac_cv_lib_bsd_gethostbyname=yes
43862else
43863  ac_cv_lib_bsd_gethostbyname=no
43864fi
43865rm -f core conftest.err conftest.$ac_objext \
43866    conftest$ac_exeext conftest.$ac_ext
43867LIBS=$ac_check_lib_save_LIBS
43868fi
43869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43870$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43871if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43872  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43873fi
43874
43875      fi
43876    fi
43877
43878    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43879    # socket/setsockopt and other routines are undefined under SCO ODT
43880    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43881    # on later versions), says Simon Leinen: it contains gethostby*
43882    # variants that don't use the name server (or something).  -lsocket
43883    # must be given before -lnsl if both are needed.  We assume that
43884    # if connect needs -lnsl, so does gethostbyname.
43885    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43886if test "x$ac_cv_func_connect" = xyes; then :
43887
43888fi
43889
43890    if test $ac_cv_func_connect = no; then
43891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43892$as_echo_n "checking for connect in -lsocket... " >&6; }
43893if ${ac_cv_lib_socket_connect+:} false; then :
43894  $as_echo_n "(cached) " >&6
43895else
43896  ac_check_lib_save_LIBS=$LIBS
43897LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43899/* end confdefs.h.  */
43900
43901/* Override any GCC internal prototype to avoid an error.
43902   Use char because int might match the return type of a GCC
43903   builtin and then its argument prototype would still apply.  */
43904#ifdef __cplusplus
43905extern "C"
43906#endif
43907char connect ();
43908int
43909main ()
43910{
43911return connect ();
43912  ;
43913  return 0;
43914}
43915_ACEOF
43916if ac_fn_cxx_try_link "$LINENO"; then :
43917  ac_cv_lib_socket_connect=yes
43918else
43919  ac_cv_lib_socket_connect=no
43920fi
43921rm -f core conftest.err conftest.$ac_objext \
43922    conftest$ac_exeext conftest.$ac_ext
43923LIBS=$ac_check_lib_save_LIBS
43924fi
43925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43926$as_echo "$ac_cv_lib_socket_connect" >&6; }
43927if test "x$ac_cv_lib_socket_connect" = xyes; then :
43928  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43929fi
43930
43931    fi
43932
43933    # Guillermo Gomez says -lposix is necessary on A/UX.
43934    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43935if test "x$ac_cv_func_remove" = xyes; then :
43936
43937fi
43938
43939    if test $ac_cv_func_remove = no; then
43940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43941$as_echo_n "checking for remove in -lposix... " >&6; }
43942if ${ac_cv_lib_posix_remove+:} false; then :
43943  $as_echo_n "(cached) " >&6
43944else
43945  ac_check_lib_save_LIBS=$LIBS
43946LIBS="-lposix  $LIBS"
43947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43948/* end confdefs.h.  */
43949
43950/* Override any GCC internal prototype to avoid an error.
43951   Use char because int might match the return type of a GCC
43952   builtin and then its argument prototype would still apply.  */
43953#ifdef __cplusplus
43954extern "C"
43955#endif
43956char remove ();
43957int
43958main ()
43959{
43960return remove ();
43961  ;
43962  return 0;
43963}
43964_ACEOF
43965if ac_fn_cxx_try_link "$LINENO"; then :
43966  ac_cv_lib_posix_remove=yes
43967else
43968  ac_cv_lib_posix_remove=no
43969fi
43970rm -f core conftest.err conftest.$ac_objext \
43971    conftest$ac_exeext conftest.$ac_ext
43972LIBS=$ac_check_lib_save_LIBS
43973fi
43974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43975$as_echo "$ac_cv_lib_posix_remove" >&6; }
43976if test "x$ac_cv_lib_posix_remove" = xyes; then :
43977  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43978fi
43979
43980    fi
43981
43982    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43983    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43984if test "x$ac_cv_func_shmat" = xyes; then :
43985
43986fi
43987
43988    if test $ac_cv_func_shmat = no; then
43989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43990$as_echo_n "checking for shmat in -lipc... " >&6; }
43991if ${ac_cv_lib_ipc_shmat+:} false; then :
43992  $as_echo_n "(cached) " >&6
43993else
43994  ac_check_lib_save_LIBS=$LIBS
43995LIBS="-lipc  $LIBS"
43996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43997/* end confdefs.h.  */
43998
43999/* Override any GCC internal prototype to avoid an error.
44000   Use char because int might match the return type of a GCC
44001   builtin and then its argument prototype would still apply.  */
44002#ifdef __cplusplus
44003extern "C"
44004#endif
44005char shmat ();
44006int
44007main ()
44008{
44009return shmat ();
44010  ;
44011  return 0;
44012}
44013_ACEOF
44014if ac_fn_cxx_try_link "$LINENO"; then :
44015  ac_cv_lib_ipc_shmat=yes
44016else
44017  ac_cv_lib_ipc_shmat=no
44018fi
44019rm -f core conftest.err conftest.$ac_objext \
44020    conftest$ac_exeext conftest.$ac_ext
44021LIBS=$ac_check_lib_save_LIBS
44022fi
44023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44024$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44025if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44026  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44027fi
44028
44029    fi
44030  fi
44031
44032  # Check for libraries that X11R6 Xt/Xaw programs need.
44033  ac_save_LDFLAGS=$LDFLAGS
44034  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44035  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44036  # check for ICE first), but we must link in the order -lSM -lICE or
44037  # we get undefined symbols.  So assume we have SM if we have ICE.
44038  # These have to be linked with before -lX11, unlike the other
44039  # libraries we check for below, so use a different variable.
44040  # John Interrante, Karl Berry
44041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44042$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44043if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44044  $as_echo_n "(cached) " >&6
44045else
44046  ac_check_lib_save_LIBS=$LIBS
44047LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44049/* end confdefs.h.  */
44050
44051/* Override any GCC internal prototype to avoid an error.
44052   Use char because int might match the return type of a GCC
44053   builtin and then its argument prototype would still apply.  */
44054#ifdef __cplusplus
44055extern "C"
44056#endif
44057char IceConnectionNumber ();
44058int
44059main ()
44060{
44061return IceConnectionNumber ();
44062  ;
44063  return 0;
44064}
44065_ACEOF
44066if ac_fn_cxx_try_link "$LINENO"; then :
44067  ac_cv_lib_ICE_IceConnectionNumber=yes
44068else
44069  ac_cv_lib_ICE_IceConnectionNumber=no
44070fi
44071rm -f core conftest.err conftest.$ac_objext \
44072    conftest$ac_exeext conftest.$ac_ext
44073LIBS=$ac_check_lib_save_LIBS
44074fi
44075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44076$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44077if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44078  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44079fi
44080
44081  LDFLAGS=$ac_save_LDFLAGS
44082
44083fi
44084
44085
44086    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44087    # this doesn't make sense so we remove it.
44088    if test "x$COMPILE_TYPE" = xcross; then
44089      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44090    fi
44091
44092    if test "x$no_x" = xyes; then
44093
44094  # Print a helpful message on how to acquire the necessary build dependency.
44095  # x11 is the help tag: freetype, cups, pulse, alsa etc
44096  MISSING_DEPENDENCY=x11
44097
44098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44099    cygwin_help $MISSING_DEPENDENCY
44100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44101    msys_help $MISSING_DEPENDENCY
44102  else
44103    PKGHANDLER_COMMAND=
44104
44105    case $PKGHANDLER in
44106      apt-get)
44107        apt_help     $MISSING_DEPENDENCY ;;
44108      yum)
44109        yum_help     $MISSING_DEPENDENCY ;;
44110      port)
44111        port_help    $MISSING_DEPENDENCY ;;
44112      pkgutil)
44113        pkgutil_help $MISSING_DEPENDENCY ;;
44114      pkgadd)
44115        pkgadd_help  $MISSING_DEPENDENCY ;;
44116    esac
44117
44118    if test "x$PKGHANDLER_COMMAND" != x; then
44119      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44120    fi
44121  fi
44122
44123      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44124    fi
44125
44126    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44127      OPENWIN_HOME="/usr/openwin"
44128      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44129      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44130          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44131          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44132          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44133    fi
44134
44135    ac_ext=c
44136ac_cpp='$CPP $CPPFLAGS'
44137ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44138ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44139ac_compiler_gnu=$ac_cv_c_compiler_gnu
44140
44141    OLD_CFLAGS="$CFLAGS"
44142    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44143
44144    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44145    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44146do :
44147  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44148ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44149          # include <X11/Xlib.h>
44150          # include <X11/Xutil.h>
44151
44152
44153"
44154if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44155  cat >>confdefs.h <<_ACEOF
44156#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44157_ACEOF
44158 X11_HEADERS_OK=yes
44159else
44160  X11_HEADERS_OK=no; break
44161fi
44162
44163done
44164
44165
44166    if test "x$X11_HEADERS_OK" = xno; then
44167
44168  # Print a helpful message on how to acquire the necessary build dependency.
44169  # x11 is the help tag: freetype, cups, pulse, alsa etc
44170  MISSING_DEPENDENCY=x11
44171
44172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44173    cygwin_help $MISSING_DEPENDENCY
44174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44175    msys_help $MISSING_DEPENDENCY
44176  else
44177    PKGHANDLER_COMMAND=
44178
44179    case $PKGHANDLER in
44180      apt-get)
44181        apt_help     $MISSING_DEPENDENCY ;;
44182      yum)
44183        yum_help     $MISSING_DEPENDENCY ;;
44184      port)
44185        port_help    $MISSING_DEPENDENCY ;;
44186      pkgutil)
44187        pkgutil_help $MISSING_DEPENDENCY ;;
44188      pkgadd)
44189        pkgadd_help  $MISSING_DEPENDENCY ;;
44190    esac
44191
44192    if test "x$PKGHANDLER_COMMAND" != x; then
44193      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44194    fi
44195  fi
44196
44197      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44198    fi
44199
44200    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44201    # defined in libawt_xawt.
44202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44203$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44204    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44205/* end confdefs.h.  */
44206#include <X11/extensions/Xrender.h>
44207int
44208main ()
44209{
44210XLinearGradient x;
44211  ;
44212  return 0;
44213}
44214_ACEOF
44215if ac_fn_c_try_compile "$LINENO"; then :
44216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44217$as_echo "yes" >&6; }
44218else
44219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44220$as_echo "no" >&6; }
44221         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44222fi
44223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44224
44225    CFLAGS="$OLD_CFLAGS"
44226    ac_ext=cpp
44227ac_cpp='$CXXCPP $CPPFLAGS'
44228ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44229ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44230ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44231
44232  fi # X11_NOT_NEEDED
44233
44234
44235
44236
44237
44238
44239  ###############################################################################
44240  #
44241  # The common unix printing system cups is used to print from java.
44242  #
44243
44244# Check whether --with-cups was given.
44245if test "${with_cups+set}" = set; then :
44246  withval=$with_cups;
44247fi
44248
44249
44250# Check whether --with-cups-include was given.
44251if test "${with_cups_include+set}" = set; then :
44252  withval=$with_cups_include;
44253fi
44254
44255
44256  if test "x$CUPS_NOT_NEEDED" = xyes; then
44257    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44258      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44259$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44260    fi
44261    CUPS_CFLAGS=
44262  else
44263    CUPS_FOUND=no
44264
44265    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44266      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44267    fi
44268
44269    if test "x${with_cups}" != x; then
44270      CUPS_CFLAGS="-I${with_cups}/include"
44271      CUPS_FOUND=yes
44272    fi
44273    if test "x${with_cups_include}" != x; then
44274      CUPS_CFLAGS="-I${with_cups_include}"
44275      CUPS_FOUND=yes
44276    fi
44277    if test "x$CUPS_FOUND" = xno; then
44278
44279
44280  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44281    # Source the builddeps file again, to make sure it uses the latest variables!
44282    . $builddepsfile
44283    # Look for a target and build machine specific resource!
44284    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44285    if test "x$resource" = x; then
44286      # Ok, lets instead look for a target specific resource
44287      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44288    fi
44289    if test "x$resource" = x; then
44290      # Ok, lets instead look for a build specific resource
44291      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44292    fi
44293    if test "x$resource" = x; then
44294      # Ok, lets instead look for a generic resource
44295      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44296      resource=${builddep_cups}
44297    fi
44298    if test "x$resource" != x; then
44299      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44300$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44301      # If the resource in the builddeps.conf file is an existing directory,
44302      # for example /java/linux/cups
44303      if test -d ${resource}; then
44304        depdir=${resource}
44305      else
44306
44307  # cups is for example mymodule
44308  # $resource is for example libs/general/libmymod_1_2_3.zip
44309  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44310  # $with_builddeps_dir is for example /localhome/builddeps
44311  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44312  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44313  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44314  filename=`basename $resource`
44315  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44316  filebase=${filename%%.*}
44317  extension=${filename#*.}
44318  installdir=$with_builddeps_dir/$filebase
44319  if test ! -f $installdir/$filename.unpacked; then
44320    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44321$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44322    if test ! -d $installdir; then
44323      mkdir -p $installdir
44324    fi
44325    if test ! -d $installdir; then
44326      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44327    fi
44328    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44329    touch $tmpfile
44330    if test ! -f $tmpfile; then
44331      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44332    fi
44333
44334  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44335  # $tmpfile is the local file name for the downloaded file.
44336  VALID_TOOL=no
44337  if test "x$BDEPS_FTP" = xwget; then
44338    VALID_TOOL=yes
44339    wget -O $tmpfile $with_builddeps_server/$resource
44340  fi
44341  if test "x$BDEPS_FTP" = xlftp; then
44342    VALID_TOOL=yes
44343    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44344  fi
44345  if test "x$BDEPS_FTP" = xftp; then
44346    VALID_TOOL=yes
44347    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44348    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44349    FTPUSERPWD=${FTPSERVER%%@*}
44350    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44351      FTPUSER=${userpwd%%:*}
44352      FTPPWD=${userpwd#*@}
44353      FTPSERVER=${FTPSERVER#*@}
44354    else
44355      FTPUSER=ftp
44356      FTPPWD=ftp
44357    fi
44358    # the "pass" command does not work on some
44359    # ftp clients (read ftp.exe) but if it works,
44360    # passive mode is better!
44361    ( \
44362        echo "user $FTPUSER $FTPPWD"        ; \
44363        echo "pass"                         ; \
44364        echo "bin"                          ; \
44365        echo "get $FTPPATH $tmpfile"              ; \
44366    ) | ftp -in $FTPSERVER
44367  fi
44368  if test "x$VALID_TOOL" != xyes; then
44369    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44370  fi
44371
44372    mv $tmpfile $installdir/$filename
44373    if test ! -s $installdir/$filename; then
44374      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44375    fi
44376    case "$extension" in
44377      zip)  echo "Unzipping $installdir/$filename..."
44378        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44379        ;;
44380      tar.gz) echo "Untaring $installdir/$filename..."
44381        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44382        ;;
44383      tgz) echo "Untaring $installdir/$filename..."
44384        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44385        ;;
44386      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44387        ;;
44388    esac
44389  fi
44390  if test -f $installdir/$filename.unpacked; then
44391    depdir=$installdir
44392  fi
44393
44394      fi
44395      # Source the builddeps file again, because in the previous command, the depdir
44396      # was updated to point at the current build dependency install directory.
44397      . $builddepsfile
44398      # Now extract variables from the builddeps.conf files.
44399      theroot=${builddep_cups_ROOT}
44400      thecflags=${builddep_cups_CFLAGS}
44401      thelibs=${builddep_cups_LIBS}
44402      if test "x$depdir" = x; then
44403        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44404      fi
44405      CUPS=$depdir
44406      if test "x$theroot" != x; then
44407        CUPS="$theroot"
44408      fi
44409      if test "x$thecflags" != x; then
44410        CUPS_CFLAGS="$thecflags"
44411      fi
44412      if test "x$thelibs" != x; then
44413        CUPS_LIBS="$thelibs"
44414      fi
44415      CUPS_FOUND=yes
44416
44417    fi
44418
44419  fi
44420
44421    fi
44422    if test "x$CUPS_FOUND" = xno; then
44423      # Are the cups headers installed in the default /usr/include location?
44424      for ac_header in cups/cups.h cups/ppd.h
44425do :
44426  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44427ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44428if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44429  cat >>confdefs.h <<_ACEOF
44430#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44431_ACEOF
44432
44433            CUPS_FOUND=yes
44434            CUPS_CFLAGS=
44435            DEFAULT_CUPS=yes
44436
44437
44438fi
44439
44440done
44441
44442    fi
44443    if test "x$CUPS_FOUND" = xno; then
44444      # Getting nervous now? Lets poke around for standard Solaris third-party
44445      # package installation locations.
44446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44447$as_echo_n "checking for cups headers... " >&6; }
44448      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44449        # An SFW package seems to be installed!
44450        CUPS_FOUND=yes
44451        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44452      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44453        # A CSW package seems to be installed!
44454        CUPS_FOUND=yes
44455        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44456      fi
44457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44458$as_echo "$CUPS_FOUND" >&6; }
44459    fi
44460    if test "x$CUPS_FOUND" = xno; then
44461
44462  # Print a helpful message on how to acquire the necessary build dependency.
44463  # cups is the help tag: freetype, cups, pulse, alsa etc
44464  MISSING_DEPENDENCY=cups
44465
44466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44467    cygwin_help $MISSING_DEPENDENCY
44468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44469    msys_help $MISSING_DEPENDENCY
44470  else
44471    PKGHANDLER_COMMAND=
44472
44473    case $PKGHANDLER in
44474      apt-get)
44475        apt_help     $MISSING_DEPENDENCY ;;
44476      yum)
44477        yum_help     $MISSING_DEPENDENCY ;;
44478      port)
44479        port_help    $MISSING_DEPENDENCY ;;
44480      pkgutil)
44481        pkgutil_help $MISSING_DEPENDENCY ;;
44482      pkgadd)
44483        pkgadd_help  $MISSING_DEPENDENCY ;;
44484    esac
44485
44486    if test "x$PKGHANDLER_COMMAND" != x; then
44487      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44488    fi
44489  fi
44490
44491      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44492    fi
44493  fi
44494
44495
44496
44497
44498
44499
44500  ###############################################################################
44501  #
44502  # The ubiquitous freetype library is used to render fonts.
44503  #
44504
44505# Check whether --with-freetype was given.
44506if test "${with_freetype+set}" = set; then :
44507  withval=$with_freetype;
44508fi
44509
44510
44511# Check whether --with-freetype-include was given.
44512if test "${with_freetype_include+set}" = set; then :
44513  withval=$with_freetype_include;
44514fi
44515
44516
44517# Check whether --with-freetype-lib was given.
44518if test "${with_freetype_lib+set}" = set; then :
44519  withval=$with_freetype_lib;
44520fi
44521
44522
44523# Check whether --with-freetype-src was given.
44524if test "${with_freetype_src+set}" = set; then :
44525  withval=$with_freetype_src;
44526fi
44527
44528  # Check whether --enable-freetype-bundling was given.
44529if test "${enable_freetype_bundling+set}" = set; then :
44530  enableval=$enable_freetype_bundling;
44531fi
44532
44533
44534  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44535  FREETYPE_BASE_NAME=freetype
44536  FREETYPE_CFLAGS=
44537  FREETYPE_LIBS=
44538  FREETYPE_BUNDLE_LIB_PATH=
44539
44540  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44541    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
44542      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44543$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44544    fi
44545    if test "x$enable_freetype_bundling" != x; then
44546      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44547$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44548    fi
44549  else
44550    # freetype is needed to build; go get it!
44551
44552    BUNDLE_FREETYPE="$enable_freetype_bundling"
44553
44554    if  test "x$with_freetype_src" != x; then
44555      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44556        # Try to build freetype if --with-freetype-src was given on Windows
44557
44558  FREETYPE_SRC_PATH="$with_freetype_src"
44559  BUILD_FREETYPE=yes
44560
44561  # Check if the freetype sources are acessible..
44562  if ! test -d $FREETYPE_SRC_PATH; then
44563    { $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
44564$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44565    BUILD_FREETYPE=no
44566  fi
44567  # ..and contain a vc2010 project file
44568  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44569  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44570    { $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
44571$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44572    BUILD_FREETYPE=no
44573  fi
44574  # Now check if configure found a version of 'msbuild.exe'
44575  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44576    { $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
44577$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;}
44578    BUILD_FREETYPE=no
44579  fi
44580
44581  # Ready to go..
44582  if test "x$BUILD_FREETYPE" = xyes; then
44583
44584    # msbuild requires trailing slashes for output directories
44585    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44586    freetype_lib_path_unix="$freetype_lib_path"
44587    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44588
44589  unix_path="$vcxproj_path"
44590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44591    windows_path=`$CYGPATH -m "$unix_path"`
44592    vcxproj_path="$windows_path"
44593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44594    windows_path=`cmd //c echo $unix_path`
44595    vcxproj_path="$windows_path"
44596  fi
44597
44598
44599  unix_path="$freetype_lib_path"
44600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44601    windows_path=`$CYGPATH -m "$unix_path"`
44602    freetype_lib_path="$windows_path"
44603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44604    windows_path=`cmd //c echo $unix_path`
44605    freetype_lib_path="$windows_path"
44606  fi
44607
44608
44609  unix_path="$freetype_obj_path"
44610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44611    windows_path=`$CYGPATH -m "$unix_path"`
44612    freetype_obj_path="$windows_path"
44613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44614    windows_path=`cmd //c echo $unix_path`
44615    freetype_obj_path="$windows_path"
44616  fi
44617
44618    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44619      freetype_platform=x64
44620    else
44621      freetype_platform=win32
44622    fi
44623
44624    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44625    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44626    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44627    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44628    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44629$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44630
44631    # First we try to build the freetype.dll
44632    $ECHO -e "@echo off\n"\
44633	     "$MSBUILD $vcxproj_path "\
44634		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44635		       "/p:Configuration=\"Release Multithreaded\" "\
44636		       "/p:Platform=$freetype_platform "\
44637		       "/p:ConfigurationType=DynamicLibrary "\
44638		       "/p:TargetName=freetype "\
44639		       "/p:OutDir=\"$freetype_lib_path\" "\
44640		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44641    cmd /c freetype.bat
44642
44643    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44644      # If that succeeds we also build freetype.lib
44645      $ECHO -e "@echo off\n"\
44646	       "$MSBUILD $vcxproj_path "\
44647			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44648			 "/p:Configuration=\"Release Multithreaded\" "\
44649			 "/p:Platform=$freetype_platform "\
44650			 "/p:ConfigurationType=StaticLibrary "\
44651			 "/p:TargetName=freetype "\
44652			 "/p:OutDir=\"$freetype_lib_path\" "\
44653			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44654      cmd /c freetype.bat
44655
44656      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44657	# Once we build both, lib and dll, set freetype lib and include path appropriately
44658	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44659	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44660	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44661$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44662      else
44663	BUILD_FREETYPE=no
44664      fi
44665    else
44666      BUILD_FREETYPE=no
44667    fi
44668  fi
44669
44670        if test "x$BUILD_FREETYPE" = xyes; then
44671          # Okay, we built it. Check that it works.
44672
44673  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44674  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44675  METHOD="--with-freetype-src"
44676
44677  # Let's start with an optimistic view of the world :-)
44678  FOUND_FREETYPE=yes
44679
44680  # First look for the canonical freetype main include file ft2build.h.
44681  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44682    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44683    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44684    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44685      # Fail.
44686      FOUND_FREETYPE=no
44687    fi
44688  fi
44689
44690  if test "x$FOUND_FREETYPE" = xyes; then
44691    # Include file found, let's continue the sanity check.
44692    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44693$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44694
44695    # Reset to default value
44696    FREETYPE_BASE_NAME=freetype
44697    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44698    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44699      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44700          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44701        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44702        # for the .6 version explicitly.
44703        FREETYPE_BASE_NAME=freetype.6
44704        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44705        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44706$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44707      else
44708        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44709$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44710        FOUND_FREETYPE=no
44711      fi
44712    else
44713      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44714        # On Windows, we will need both .lib and .dll file.
44715        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44716          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44717$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44718          FOUND_FREETYPE=no
44719        fi
44720      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44721          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44722        # Found lib in isa dir, use that instead.
44723        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44724        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44725$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44726      fi
44727    fi
44728  fi
44729
44730  if test "x$FOUND_FREETYPE" = xyes; then
44731
44732  # Only process if variable expands to non-empty
44733
44734  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44736
44737  # Input might be given as Windows format, start by converting to
44738  # unix format.
44739  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44740  new_path=`$CYGPATH -u "$path"`
44741
44742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44745  # "foo.exe" is OK but "foo" is an error.
44746  #
44747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44748  # It is also a way to make sure we got the proper file name for the real test later on.
44749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44750  if test "x$test_shortpath" = x; then
44751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44753    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44754  fi
44755
44756  # Call helper function which possibly converts this using DOS-style short mode.
44757  # If so, the updated path is stored in $new_path.
44758
44759  input_path="$new_path"
44760  # Check if we need to convert this using DOS-style short mode. If the path
44761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44762  # take no chances and rewrite it.
44763  # Note: m4 eats our [], so we need to use [ and ] instead.
44764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44765  if test "x$has_forbidden_chars" != x; then
44766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44770      # Going to short mode and back again did indeed matter. Since short mode is
44771      # case insensitive, let's make it lowercase to improve readability.
44772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44773      # Now convert it back to Unix-style (cygpath)
44774      input_path=`$CYGPATH -u "$shortmode_path"`
44775      new_path="$input_path"
44776    fi
44777  fi
44778
44779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44780  if test "x$test_cygdrive_prefix" = x; then
44781    # As a simple fix, exclude /usr/bin since it's not a real path.
44782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44784      # a path prefixed by /cygdrive for fixpath to work.
44785      new_path="$CYGWIN_ROOT_PATH$input_path"
44786    fi
44787  fi
44788
44789
44790  if test "x$path" != "x$new_path"; then
44791    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44793$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44794  fi
44795
44796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44797
44798  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44799  has_colon=`$ECHO $path | $GREP ^.:`
44800  new_path="$path"
44801  if test "x$has_colon" = x; then
44802    # Not in mixed or Windows style, start by that.
44803    new_path=`cmd //c echo $path`
44804  fi
44805
44806
44807  input_path="$new_path"
44808  # Check if we need to convert this using DOS-style short mode. If the path
44809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44810  # take no chances and rewrite it.
44811  # Note: m4 eats our [], so we need to use [ and ] instead.
44812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44813  if test "x$has_forbidden_chars" != x; then
44814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44816  fi
44817
44818
44819  windows_path="$new_path"
44820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44821    unix_path=`$CYGPATH -u "$windows_path"`
44822    new_path="$unix_path"
44823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44825    new_path="$unix_path"
44826  fi
44827
44828  if test "x$path" != "x$new_path"; then
44829    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44832  fi
44833
44834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44836
44837    else
44838      # We're on a unix platform. Hooray! :)
44839      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44840      has_space=`$ECHO "$path" | $GREP " "`
44841      if test "x$has_space" != x; then
44842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44844        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44845      fi
44846
44847      # Use eval to expand a potential ~
44848      eval path="$path"
44849      if test ! -f "$path" && test ! -d "$path"; then
44850        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44851      fi
44852
44853      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44854    fi
44855  fi
44856
44857
44858  # Only process if variable expands to non-empty
44859
44860  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44862
44863  # Input might be given as Windows format, start by converting to
44864  # unix format.
44865  path="$POTENTIAL_FREETYPE_LIB_PATH"
44866  new_path=`$CYGPATH -u "$path"`
44867
44868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44871  # "foo.exe" is OK but "foo" is an error.
44872  #
44873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44874  # It is also a way to make sure we got the proper file name for the real test later on.
44875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44876  if test "x$test_shortpath" = x; then
44877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44878$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44879    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44880  fi
44881
44882  # Call helper function which possibly converts this using DOS-style short mode.
44883  # If so, the updated path is stored in $new_path.
44884
44885  input_path="$new_path"
44886  # Check if we need to convert this using DOS-style short mode. If the path
44887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44888  # take no chances and rewrite it.
44889  # Note: m4 eats our [], so we need to use [ and ] instead.
44890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44891  if test "x$has_forbidden_chars" != x; then
44892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44896      # Going to short mode and back again did indeed matter. Since short mode is
44897      # case insensitive, let's make it lowercase to improve readability.
44898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44899      # Now convert it back to Unix-style (cygpath)
44900      input_path=`$CYGPATH -u "$shortmode_path"`
44901      new_path="$input_path"
44902    fi
44903  fi
44904
44905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44906  if test "x$test_cygdrive_prefix" = x; then
44907    # As a simple fix, exclude /usr/bin since it's not a real path.
44908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44910      # a path prefixed by /cygdrive for fixpath to work.
44911      new_path="$CYGWIN_ROOT_PATH$input_path"
44912    fi
44913  fi
44914
44915
44916  if test "x$path" != "x$new_path"; then
44917    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44919$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44920  fi
44921
44922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44923
44924  path="$POTENTIAL_FREETYPE_LIB_PATH"
44925  has_colon=`$ECHO $path | $GREP ^.:`
44926  new_path="$path"
44927  if test "x$has_colon" = x; then
44928    # Not in mixed or Windows style, start by that.
44929    new_path=`cmd //c echo $path`
44930  fi
44931
44932
44933  input_path="$new_path"
44934  # Check if we need to convert this using DOS-style short mode. If the path
44935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44936  # take no chances and rewrite it.
44937  # Note: m4 eats our [], so we need to use [ and ] instead.
44938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44939  if test "x$has_forbidden_chars" != x; then
44940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44942  fi
44943
44944
44945  windows_path="$new_path"
44946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44947    unix_path=`$CYGPATH -u "$windows_path"`
44948    new_path="$unix_path"
44949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44951    new_path="$unix_path"
44952  fi
44953
44954  if test "x$path" != "x$new_path"; then
44955    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44957$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44958  fi
44959
44960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44962
44963    else
44964      # We're on a unix platform. Hooray! :)
44965      path="$POTENTIAL_FREETYPE_LIB_PATH"
44966      has_space=`$ECHO "$path" | $GREP " "`
44967      if test "x$has_space" != x; then
44968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44969$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44971      fi
44972
44973      # Use eval to expand a potential ~
44974      eval path="$path"
44975      if test ! -f "$path" && test ! -d "$path"; then
44976        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44977      fi
44978
44979      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44980    fi
44981  fi
44982
44983
44984    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44986$as_echo_n "checking for freetype includes... " >&6; }
44987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44988$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44989    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44991$as_echo_n "checking for freetype libraries... " >&6; }
44992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44993$as_echo "$FREETYPE_LIB_PATH" >&6; }
44994  fi
44995
44996          if test "x$FOUND_FREETYPE" != xyes; then
44997            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44998          fi
44999        else
45000          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45001$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45002          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45003        fi
45004      else
45005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45006$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45007      fi
45008    fi
45009
45010    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45011      # User has specified settings
45012
45013      if test "x$BUNDLE_FREETYPE" = x; then
45014        # If not specified, default is to bundle freetype
45015        BUNDLE_FREETYPE=yes
45016      fi
45017
45018      if test "x$with_freetype" != x; then
45019        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45020        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45021      fi
45022
45023      # Allow --with-freetype-lib and --with-freetype-include to override
45024      if test "x$with_freetype_include" != x; then
45025        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45026      fi
45027      if test "x$with_freetype_lib" != x; then
45028        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45029      fi
45030
45031      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45032        # Okay, we got it. Check that it works.
45033
45034  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45035  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45036  METHOD="--with-freetype"
45037
45038  # Let's start with an optimistic view of the world :-)
45039  FOUND_FREETYPE=yes
45040
45041  # First look for the canonical freetype main include file ft2build.h.
45042  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45043    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45044    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45045    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45046      # Fail.
45047      FOUND_FREETYPE=no
45048    fi
45049  fi
45050
45051  if test "x$FOUND_FREETYPE" = xyes; then
45052    # Include file found, let's continue the sanity check.
45053    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45054$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45055
45056    # Reset to default value
45057    FREETYPE_BASE_NAME=freetype
45058    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45059    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45060      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45061          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45062        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45063        # for the .6 version explicitly.
45064        FREETYPE_BASE_NAME=freetype.6
45065        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45066        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45067$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45068      else
45069        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45070$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45071        FOUND_FREETYPE=no
45072      fi
45073    else
45074      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45075        # On Windows, we will need both .lib and .dll file.
45076        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45077          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45078$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45079          FOUND_FREETYPE=no
45080        fi
45081      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45082          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45083        # Found lib in isa dir, use that instead.
45084        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45085        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45086$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45087      fi
45088    fi
45089  fi
45090
45091  if test "x$FOUND_FREETYPE" = xyes; then
45092
45093  # Only process if variable expands to non-empty
45094
45095  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45097
45098  # Input might be given as Windows format, start by converting to
45099  # unix format.
45100  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45101  new_path=`$CYGPATH -u "$path"`
45102
45103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45106  # "foo.exe" is OK but "foo" is an error.
45107  #
45108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45109  # It is also a way to make sure we got the proper file name for the real test later on.
45110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45111  if test "x$test_shortpath" = x; then
45112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45113$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45114    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45115  fi
45116
45117  # Call helper function which possibly converts this using DOS-style short mode.
45118  # If so, the updated path is stored in $new_path.
45119
45120  input_path="$new_path"
45121  # Check if we need to convert this using DOS-style short mode. If the path
45122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45123  # take no chances and rewrite it.
45124  # Note: m4 eats our [], so we need to use [ and ] instead.
45125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45126  if test "x$has_forbidden_chars" != x; then
45127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45131      # Going to short mode and back again did indeed matter. Since short mode is
45132      # case insensitive, let's make it lowercase to improve readability.
45133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45134      # Now convert it back to Unix-style (cygpath)
45135      input_path=`$CYGPATH -u "$shortmode_path"`
45136      new_path="$input_path"
45137    fi
45138  fi
45139
45140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45141  if test "x$test_cygdrive_prefix" = x; then
45142    # As a simple fix, exclude /usr/bin since it's not a real path.
45143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45145      # a path prefixed by /cygdrive for fixpath to work.
45146      new_path="$CYGWIN_ROOT_PATH$input_path"
45147    fi
45148  fi
45149
45150
45151  if test "x$path" != "x$new_path"; then
45152    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45154$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45155  fi
45156
45157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45158
45159  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45160  has_colon=`$ECHO $path | $GREP ^.:`
45161  new_path="$path"
45162  if test "x$has_colon" = x; then
45163    # Not in mixed or Windows style, start by that.
45164    new_path=`cmd //c echo $path`
45165  fi
45166
45167
45168  input_path="$new_path"
45169  # Check if we need to convert this using DOS-style short mode. If the path
45170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45171  # take no chances and rewrite it.
45172  # Note: m4 eats our [], so we need to use [ and ] instead.
45173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45174  if test "x$has_forbidden_chars" != x; then
45175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45177  fi
45178
45179
45180  windows_path="$new_path"
45181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45182    unix_path=`$CYGPATH -u "$windows_path"`
45183    new_path="$unix_path"
45184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45186    new_path="$unix_path"
45187  fi
45188
45189  if test "x$path" != "x$new_path"; then
45190    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45192$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45193  fi
45194
45195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45197
45198    else
45199      # We're on a unix platform. Hooray! :)
45200      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45201      has_space=`$ECHO "$path" | $GREP " "`
45202      if test "x$has_space" != x; then
45203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45206      fi
45207
45208      # Use eval to expand a potential ~
45209      eval path="$path"
45210      if test ! -f "$path" && test ! -d "$path"; then
45211        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45212      fi
45213
45214      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45215    fi
45216  fi
45217
45218
45219  # Only process if variable expands to non-empty
45220
45221  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45223
45224  # Input might be given as Windows format, start by converting to
45225  # unix format.
45226  path="$POTENTIAL_FREETYPE_LIB_PATH"
45227  new_path=`$CYGPATH -u "$path"`
45228
45229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45232  # "foo.exe" is OK but "foo" is an error.
45233  #
45234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45235  # It is also a way to make sure we got the proper file name for the real test later on.
45236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45237  if test "x$test_shortpath" = x; then
45238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45239$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45240    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45241  fi
45242
45243  # Call helper function which possibly converts this using DOS-style short mode.
45244  # If so, the updated path is stored in $new_path.
45245
45246  input_path="$new_path"
45247  # Check if we need to convert this using DOS-style short mode. If the path
45248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45249  # take no chances and rewrite it.
45250  # Note: m4 eats our [], so we need to use [ and ] instead.
45251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45252  if test "x$has_forbidden_chars" != x; then
45253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45257      # Going to short mode and back again did indeed matter. Since short mode is
45258      # case insensitive, let's make it lowercase to improve readability.
45259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45260      # Now convert it back to Unix-style (cygpath)
45261      input_path=`$CYGPATH -u "$shortmode_path"`
45262      new_path="$input_path"
45263    fi
45264  fi
45265
45266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45267  if test "x$test_cygdrive_prefix" = x; then
45268    # As a simple fix, exclude /usr/bin since it's not a real path.
45269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45271      # a path prefixed by /cygdrive for fixpath to work.
45272      new_path="$CYGWIN_ROOT_PATH$input_path"
45273    fi
45274  fi
45275
45276
45277  if test "x$path" != "x$new_path"; then
45278    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45281  fi
45282
45283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45284
45285  path="$POTENTIAL_FREETYPE_LIB_PATH"
45286  has_colon=`$ECHO $path | $GREP ^.:`
45287  new_path="$path"
45288  if test "x$has_colon" = x; then
45289    # Not in mixed or Windows style, start by that.
45290    new_path=`cmd //c echo $path`
45291  fi
45292
45293
45294  input_path="$new_path"
45295  # Check if we need to convert this using DOS-style short mode. If the path
45296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45297  # take no chances and rewrite it.
45298  # Note: m4 eats our [], so we need to use [ and ] instead.
45299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45300  if test "x$has_forbidden_chars" != x; then
45301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45303  fi
45304
45305
45306  windows_path="$new_path"
45307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45308    unix_path=`$CYGPATH -u "$windows_path"`
45309    new_path="$unix_path"
45310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45312    new_path="$unix_path"
45313  fi
45314
45315  if test "x$path" != "x$new_path"; then
45316    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45318$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45319  fi
45320
45321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45323
45324    else
45325      # We're on a unix platform. Hooray! :)
45326      path="$POTENTIAL_FREETYPE_LIB_PATH"
45327      has_space=`$ECHO "$path" | $GREP " "`
45328      if test "x$has_space" != x; then
45329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45331        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45332      fi
45333
45334      # Use eval to expand a potential ~
45335      eval path="$path"
45336      if test ! -f "$path" && test ! -d "$path"; then
45337        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45338      fi
45339
45340      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45341    fi
45342  fi
45343
45344
45345    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45347$as_echo_n "checking for freetype includes... " >&6; }
45348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45349$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45350    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45352$as_echo_n "checking for freetype libraries... " >&6; }
45353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45354$as_echo "$FREETYPE_LIB_PATH" >&6; }
45355  fi
45356
45357        if test "x$FOUND_FREETYPE" != xyes; then
45358          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45359        fi
45360      else
45361        # User specified only one of lib or include. This is an error.
45362        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45363          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45364$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45365          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45366        else
45367          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45368$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45369          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45370        fi
45371      fi
45372    else
45373      # User did not specify settings, but we need freetype. Try to locate it.
45374
45375      if test "x$BUNDLE_FREETYPE" = x; then
45376        # If not specified, default is to bundle freetype only on windows
45377        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45378          BUNDLE_FREETYPE=yes
45379        else
45380          BUNDLE_FREETYPE=no
45381        fi
45382      fi
45383
45384      if test "x$FOUND_FREETYPE" != xyes; then
45385        # Check builddeps
45386
45387
45388  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45389    # Source the builddeps file again, to make sure it uses the latest variables!
45390    . $builddepsfile
45391    # Look for a target and build machine specific resource!
45392    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45393    if test "x$resource" = x; then
45394      # Ok, lets instead look for a target specific resource
45395      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45396    fi
45397    if test "x$resource" = x; then
45398      # Ok, lets instead look for a build specific resource
45399      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45400    fi
45401    if test "x$resource" = x; then
45402      # Ok, lets instead look for a generic resource
45403      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45404      resource=${builddep_freetype2}
45405    fi
45406    if test "x$resource" != x; then
45407      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45408$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45409      # If the resource in the builddeps.conf file is an existing directory,
45410      # for example /java/linux/cups
45411      if test -d ${resource}; then
45412        depdir=${resource}
45413      else
45414
45415  # freetype2 is for example mymodule
45416  # $resource is for example libs/general/libmymod_1_2_3.zip
45417  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45418  # $with_builddeps_dir is for example /localhome/builddeps
45419  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45420  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45421  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45422  filename=`basename $resource`
45423  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45424  filebase=${filename%%.*}
45425  extension=${filename#*.}
45426  installdir=$with_builddeps_dir/$filebase
45427  if test ! -f $installdir/$filename.unpacked; then
45428    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45429$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45430    if test ! -d $installdir; then
45431      mkdir -p $installdir
45432    fi
45433    if test ! -d $installdir; then
45434      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45435    fi
45436    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45437    touch $tmpfile
45438    if test ! -f $tmpfile; then
45439      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45440    fi
45441
45442  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45443  # $tmpfile is the local file name for the downloaded file.
45444  VALID_TOOL=no
45445  if test "x$BDEPS_FTP" = xwget; then
45446    VALID_TOOL=yes
45447    wget -O $tmpfile $with_builddeps_server/$resource
45448  fi
45449  if test "x$BDEPS_FTP" = xlftp; then
45450    VALID_TOOL=yes
45451    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45452  fi
45453  if test "x$BDEPS_FTP" = xftp; then
45454    VALID_TOOL=yes
45455    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45456    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45457    FTPUSERPWD=${FTPSERVER%%@*}
45458    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45459      FTPUSER=${userpwd%%:*}
45460      FTPPWD=${userpwd#*@}
45461      FTPSERVER=${FTPSERVER#*@}
45462    else
45463      FTPUSER=ftp
45464      FTPPWD=ftp
45465    fi
45466    # the "pass" command does not work on some
45467    # ftp clients (read ftp.exe) but if it works,
45468    # passive mode is better!
45469    ( \
45470        echo "user $FTPUSER $FTPPWD"        ; \
45471        echo "pass"                         ; \
45472        echo "bin"                          ; \
45473        echo "get $FTPPATH $tmpfile"              ; \
45474    ) | ftp -in $FTPSERVER
45475  fi
45476  if test "x$VALID_TOOL" != xyes; then
45477    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45478  fi
45479
45480    mv $tmpfile $installdir/$filename
45481    if test ! -s $installdir/$filename; then
45482      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45483    fi
45484    case "$extension" in
45485      zip)  echo "Unzipping $installdir/$filename..."
45486        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45487        ;;
45488      tar.gz) echo "Untaring $installdir/$filename..."
45489        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45490        ;;
45491      tgz) echo "Untaring $installdir/$filename..."
45492        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45493        ;;
45494      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45495        ;;
45496    esac
45497  fi
45498  if test -f $installdir/$filename.unpacked; then
45499    depdir=$installdir
45500  fi
45501
45502      fi
45503      # Source the builddeps file again, because in the previous command, the depdir
45504      # was updated to point at the current build dependency install directory.
45505      . $builddepsfile
45506      # Now extract variables from the builddeps.conf files.
45507      theroot=${builddep_freetype2_ROOT}
45508      thecflags=${builddep_freetype2_CFLAGS}
45509      thelibs=${builddep_freetype2_LIBS}
45510      if test "x$depdir" = x; then
45511        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45512      fi
45513      FREETYPE=$depdir
45514      if test "x$theroot" != x; then
45515        FREETYPE="$theroot"
45516      fi
45517      if test "x$thecflags" != x; then
45518        FREETYPE_CFLAGS="$thecflags"
45519      fi
45520      if test "x$thelibs" != x; then
45521        FREETYPE_LIBS="$thelibs"
45522      fi
45523      FOUND_FREETYPE=yes
45524      else FOUND_FREETYPE=no
45525
45526    fi
45527    else FOUND_FREETYPE=no
45528
45529  fi
45530
45531        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45532        if test "x$FOUND_FREETYPE" = xyes; then
45533          if test "x$BUNDLE_FREETYPE" = xyes; then
45534            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45535$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45536            FOUND_FREETYPE=no
45537          else
45538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45539$as_echo_n "checking for freetype... " >&6; }
45540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45541$as_echo "yes (using builddeps)" >&6; }
45542          fi
45543        fi
45544      fi
45545
45546      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45547      if test "x$SYSROOT" = x; then
45548        if test "x$FOUND_FREETYPE" != xyes; then
45549          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45550          if test "x$PKG_CONFIG" != x; then
45551
45552pkg_failed=no
45553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45554$as_echo_n "checking for FREETYPE... " >&6; }
45555
45556if test -n "$FREETYPE_CFLAGS"; then
45557    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45558 elif test -n "$PKG_CONFIG"; then
45559    if test -n "$PKG_CONFIG" && \
45560    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45561  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45562  ac_status=$?
45563  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45564  test $ac_status = 0; }; then
45565  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45566else
45567  pkg_failed=yes
45568fi
45569 else
45570    pkg_failed=untried
45571fi
45572if test -n "$FREETYPE_LIBS"; then
45573    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45574 elif test -n "$PKG_CONFIG"; then
45575    if test -n "$PKG_CONFIG" && \
45576    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45577  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45578  ac_status=$?
45579  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45580  test $ac_status = 0; }; then
45581  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45582else
45583  pkg_failed=yes
45584fi
45585 else
45586    pkg_failed=untried
45587fi
45588
45589
45590
45591if test $pkg_failed = yes; then
45592
45593if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45594        _pkg_short_errors_supported=yes
45595else
45596        _pkg_short_errors_supported=no
45597fi
45598        if test $_pkg_short_errors_supported = yes; then
45599	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45600        else
45601	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45602        fi
45603	# Put the nasty error message in config.log where it belongs
45604	echo "$FREETYPE_PKG_ERRORS" >&5
45605
45606	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45607$as_echo "no" >&6; }
45608                FOUND_FREETYPE=no
45609elif test $pkg_failed = untried; then
45610	FOUND_FREETYPE=no
45611else
45612	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45613	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45615$as_echo "yes" >&6; }
45616	FOUND_FREETYPE=yes
45617fi
45618            if test "x$FOUND_FREETYPE" = xyes; then
45619              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45620              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45621              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45622              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45623                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45624              fi
45625              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45626              if test "x$BUNDLE_FREETYPE" = xyes; then
45627                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45628$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45629                FOUND_FREETYPE=no
45630              else
45631                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45632$as_echo_n "checking for freetype... " >&6; }
45633                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45634$as_echo "yes (using pkg-config)" >&6; }
45635              fi
45636            fi
45637          fi
45638        fi
45639      fi
45640
45641      if test "x$FOUND_FREETYPE" != xyes; then
45642        # Check in well-known locations
45643        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45644          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45645
45646  windows_path="$FREETYPE_BASE_DIR"
45647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45648    unix_path=`$CYGPATH -u "$windows_path"`
45649    FREETYPE_BASE_DIR="$unix_path"
45650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45652    FREETYPE_BASE_DIR="$unix_path"
45653  fi
45654
45655
45656  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45657  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45658  METHOD="well-known location"
45659
45660  # Let's start with an optimistic view of the world :-)
45661  FOUND_FREETYPE=yes
45662
45663  # First look for the canonical freetype main include file ft2build.h.
45664  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45665    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45666    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45667    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45668      # Fail.
45669      FOUND_FREETYPE=no
45670    fi
45671  fi
45672
45673  if test "x$FOUND_FREETYPE" = xyes; then
45674    # Include file found, let's continue the sanity check.
45675    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45676$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45677
45678    # Reset to default value
45679    FREETYPE_BASE_NAME=freetype
45680    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45681    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45682      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45683          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45684        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45685        # for the .6 version explicitly.
45686        FREETYPE_BASE_NAME=freetype.6
45687        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45688        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45689$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45690      else
45691        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45692$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45693        FOUND_FREETYPE=no
45694      fi
45695    else
45696      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45697        # On Windows, we will need both .lib and .dll file.
45698        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45699          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45700$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45701          FOUND_FREETYPE=no
45702        fi
45703      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45704          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45705        # Found lib in isa dir, use that instead.
45706        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45707        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45708$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45709      fi
45710    fi
45711  fi
45712
45713  if test "x$FOUND_FREETYPE" = xyes; then
45714
45715  # Only process if variable expands to non-empty
45716
45717  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45719
45720  # Input might be given as Windows format, start by converting to
45721  # unix format.
45722  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45723  new_path=`$CYGPATH -u "$path"`
45724
45725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45728  # "foo.exe" is OK but "foo" is an error.
45729  #
45730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45731  # It is also a way to make sure we got the proper file name for the real test later on.
45732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45733  if test "x$test_shortpath" = x; then
45734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45735$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45736    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45737  fi
45738
45739  # Call helper function which possibly converts this using DOS-style short mode.
45740  # If so, the updated path is stored in $new_path.
45741
45742  input_path="$new_path"
45743  # Check if we need to convert this using DOS-style short mode. If the path
45744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45745  # take no chances and rewrite it.
45746  # Note: m4 eats our [], so we need to use [ and ] instead.
45747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45748  if test "x$has_forbidden_chars" != x; then
45749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45753      # Going to short mode and back again did indeed matter. Since short mode is
45754      # case insensitive, let's make it lowercase to improve readability.
45755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45756      # Now convert it back to Unix-style (cygpath)
45757      input_path=`$CYGPATH -u "$shortmode_path"`
45758      new_path="$input_path"
45759    fi
45760  fi
45761
45762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45763  if test "x$test_cygdrive_prefix" = x; then
45764    # As a simple fix, exclude /usr/bin since it's not a real path.
45765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45767      # a path prefixed by /cygdrive for fixpath to work.
45768      new_path="$CYGWIN_ROOT_PATH$input_path"
45769    fi
45770  fi
45771
45772
45773  if test "x$path" != "x$new_path"; then
45774    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45776$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45777  fi
45778
45779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45780
45781  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45782  has_colon=`$ECHO $path | $GREP ^.:`
45783  new_path="$path"
45784  if test "x$has_colon" = x; then
45785    # Not in mixed or Windows style, start by that.
45786    new_path=`cmd //c echo $path`
45787  fi
45788
45789
45790  input_path="$new_path"
45791  # Check if we need to convert this using DOS-style short mode. If the path
45792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45793  # take no chances and rewrite it.
45794  # Note: m4 eats our [], so we need to use [ and ] instead.
45795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45796  if test "x$has_forbidden_chars" != x; then
45797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45799  fi
45800
45801
45802  windows_path="$new_path"
45803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45804    unix_path=`$CYGPATH -u "$windows_path"`
45805    new_path="$unix_path"
45806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45808    new_path="$unix_path"
45809  fi
45810
45811  if test "x$path" != "x$new_path"; then
45812    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45814$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45815  fi
45816
45817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45819
45820    else
45821      # We're on a unix platform. Hooray! :)
45822      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45823      has_space=`$ECHO "$path" | $GREP " "`
45824      if test "x$has_space" != x; then
45825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45826$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45828      fi
45829
45830      # Use eval to expand a potential ~
45831      eval path="$path"
45832      if test ! -f "$path" && test ! -d "$path"; then
45833        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45834      fi
45835
45836      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45837    fi
45838  fi
45839
45840
45841  # Only process if variable expands to non-empty
45842
45843  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45845
45846  # Input might be given as Windows format, start by converting to
45847  # unix format.
45848  path="$POTENTIAL_FREETYPE_LIB_PATH"
45849  new_path=`$CYGPATH -u "$path"`
45850
45851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45854  # "foo.exe" is OK but "foo" is an error.
45855  #
45856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45857  # It is also a way to make sure we got the proper file name for the real test later on.
45858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45859  if test "x$test_shortpath" = x; then
45860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45862    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45863  fi
45864
45865  # Call helper function which possibly converts this using DOS-style short mode.
45866  # If so, the updated path is stored in $new_path.
45867
45868  input_path="$new_path"
45869  # Check if we need to convert this using DOS-style short mode. If the path
45870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45871  # take no chances and rewrite it.
45872  # Note: m4 eats our [], so we need to use [ and ] instead.
45873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45874  if test "x$has_forbidden_chars" != x; then
45875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45879      # Going to short mode and back again did indeed matter. Since short mode is
45880      # case insensitive, let's make it lowercase to improve readability.
45881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45882      # Now convert it back to Unix-style (cygpath)
45883      input_path=`$CYGPATH -u "$shortmode_path"`
45884      new_path="$input_path"
45885    fi
45886  fi
45887
45888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45889  if test "x$test_cygdrive_prefix" = x; then
45890    # As a simple fix, exclude /usr/bin since it's not a real path.
45891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45893      # a path prefixed by /cygdrive for fixpath to work.
45894      new_path="$CYGWIN_ROOT_PATH$input_path"
45895    fi
45896  fi
45897
45898
45899  if test "x$path" != "x$new_path"; then
45900    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45903  fi
45904
45905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45906
45907  path="$POTENTIAL_FREETYPE_LIB_PATH"
45908  has_colon=`$ECHO $path | $GREP ^.:`
45909  new_path="$path"
45910  if test "x$has_colon" = x; then
45911    # Not in mixed or Windows style, start by that.
45912    new_path=`cmd //c echo $path`
45913  fi
45914
45915
45916  input_path="$new_path"
45917  # Check if we need to convert this using DOS-style short mode. If the path
45918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45919  # take no chances and rewrite it.
45920  # Note: m4 eats our [], so we need to use [ and ] instead.
45921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45922  if test "x$has_forbidden_chars" != x; then
45923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45925  fi
45926
45927
45928  windows_path="$new_path"
45929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45930    unix_path=`$CYGPATH -u "$windows_path"`
45931    new_path="$unix_path"
45932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45934    new_path="$unix_path"
45935  fi
45936
45937  if test "x$path" != "x$new_path"; then
45938    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45941  fi
45942
45943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45945
45946    else
45947      # We're on a unix platform. Hooray! :)
45948      path="$POTENTIAL_FREETYPE_LIB_PATH"
45949      has_space=`$ECHO "$path" | $GREP " "`
45950      if test "x$has_space" != x; then
45951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45952$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45953        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45954      fi
45955
45956      # Use eval to expand a potential ~
45957      eval path="$path"
45958      if test ! -f "$path" && test ! -d "$path"; then
45959        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45960      fi
45961
45962      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45963    fi
45964  fi
45965
45966
45967    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45969$as_echo_n "checking for freetype includes... " >&6; }
45970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45971$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45972    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45974$as_echo_n "checking for freetype libraries... " >&6; }
45975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45976$as_echo "$FREETYPE_LIB_PATH" >&6; }
45977  fi
45978
45979          if test "x$FOUND_FREETYPE" != xyes; then
45980            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45981
45982  windows_path="$FREETYPE_BASE_DIR"
45983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45984    unix_path=`$CYGPATH -u "$windows_path"`
45985    FREETYPE_BASE_DIR="$unix_path"
45986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45988    FREETYPE_BASE_DIR="$unix_path"
45989  fi
45990
45991
45992  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45993  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45994  METHOD="well-known location"
45995
45996  # Let's start with an optimistic view of the world :-)
45997  FOUND_FREETYPE=yes
45998
45999  # First look for the canonical freetype main include file ft2build.h.
46000  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46001    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46002    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46003    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46004      # Fail.
46005      FOUND_FREETYPE=no
46006    fi
46007  fi
46008
46009  if test "x$FOUND_FREETYPE" = xyes; then
46010    # Include file found, let's continue the sanity check.
46011    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46012$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46013
46014    # Reset to default value
46015    FREETYPE_BASE_NAME=freetype
46016    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46017    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46018      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46019          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46020        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46021        # for the .6 version explicitly.
46022        FREETYPE_BASE_NAME=freetype.6
46023        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46024        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46025$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46026      else
46027        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46028$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46029        FOUND_FREETYPE=no
46030      fi
46031    else
46032      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46033        # On Windows, we will need both .lib and .dll file.
46034        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46035          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46036$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46037          FOUND_FREETYPE=no
46038        fi
46039      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46040          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46041        # Found lib in isa dir, use that instead.
46042        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46043        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46044$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46045      fi
46046    fi
46047  fi
46048
46049  if test "x$FOUND_FREETYPE" = xyes; then
46050
46051  # Only process if variable expands to non-empty
46052
46053  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46055
46056  # Input might be given as Windows format, start by converting to
46057  # unix format.
46058  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46059  new_path=`$CYGPATH -u "$path"`
46060
46061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46064  # "foo.exe" is OK but "foo" is an error.
46065  #
46066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46067  # It is also a way to make sure we got the proper file name for the real test later on.
46068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46069  if test "x$test_shortpath" = x; then
46070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46071$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46072    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46073  fi
46074
46075  # Call helper function which possibly converts this using DOS-style short mode.
46076  # If so, the updated path is stored in $new_path.
46077
46078  input_path="$new_path"
46079  # Check if we need to convert this using DOS-style short mode. If the path
46080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46081  # take no chances and rewrite it.
46082  # Note: m4 eats our [], so we need to use [ and ] instead.
46083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46084  if test "x$has_forbidden_chars" != x; then
46085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46089      # Going to short mode and back again did indeed matter. Since short mode is
46090      # case insensitive, let's make it lowercase to improve readability.
46091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46092      # Now convert it back to Unix-style (cygpath)
46093      input_path=`$CYGPATH -u "$shortmode_path"`
46094      new_path="$input_path"
46095    fi
46096  fi
46097
46098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46099  if test "x$test_cygdrive_prefix" = x; then
46100    # As a simple fix, exclude /usr/bin since it's not a real path.
46101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46103      # a path prefixed by /cygdrive for fixpath to work.
46104      new_path="$CYGWIN_ROOT_PATH$input_path"
46105    fi
46106  fi
46107
46108
46109  if test "x$path" != "x$new_path"; then
46110    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46113  fi
46114
46115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46116
46117  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46118  has_colon=`$ECHO $path | $GREP ^.:`
46119  new_path="$path"
46120  if test "x$has_colon" = x; then
46121    # Not in mixed or Windows style, start by that.
46122    new_path=`cmd //c echo $path`
46123  fi
46124
46125
46126  input_path="$new_path"
46127  # Check if we need to convert this using DOS-style short mode. If the path
46128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46129  # take no chances and rewrite it.
46130  # Note: m4 eats our [], so we need to use [ and ] instead.
46131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46132  if test "x$has_forbidden_chars" != x; then
46133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46135  fi
46136
46137
46138  windows_path="$new_path"
46139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46140    unix_path=`$CYGPATH -u "$windows_path"`
46141    new_path="$unix_path"
46142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46144    new_path="$unix_path"
46145  fi
46146
46147  if test "x$path" != "x$new_path"; then
46148    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46150$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46151  fi
46152
46153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46155
46156    else
46157      # We're on a unix platform. Hooray! :)
46158      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46159      has_space=`$ECHO "$path" | $GREP " "`
46160      if test "x$has_space" != x; then
46161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46162$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46163        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46164      fi
46165
46166      # Use eval to expand a potential ~
46167      eval path="$path"
46168      if test ! -f "$path" && test ! -d "$path"; then
46169        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46170      fi
46171
46172      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46173    fi
46174  fi
46175
46176
46177  # Only process if variable expands to non-empty
46178
46179  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46181
46182  # Input might be given as Windows format, start by converting to
46183  # unix format.
46184  path="$POTENTIAL_FREETYPE_LIB_PATH"
46185  new_path=`$CYGPATH -u "$path"`
46186
46187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46190  # "foo.exe" is OK but "foo" is an error.
46191  #
46192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46193  # It is also a way to make sure we got the proper file name for the real test later on.
46194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46195  if test "x$test_shortpath" = x; then
46196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46197$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46198    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46199  fi
46200
46201  # Call helper function which possibly converts this using DOS-style short mode.
46202  # If so, the updated path is stored in $new_path.
46203
46204  input_path="$new_path"
46205  # Check if we need to convert this using DOS-style short mode. If the path
46206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46207  # take no chances and rewrite it.
46208  # Note: m4 eats our [], so we need to use [ and ] instead.
46209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46210  if test "x$has_forbidden_chars" != x; then
46211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46215      # Going to short mode and back again did indeed matter. Since short mode is
46216      # case insensitive, let's make it lowercase to improve readability.
46217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46218      # Now convert it back to Unix-style (cygpath)
46219      input_path=`$CYGPATH -u "$shortmode_path"`
46220      new_path="$input_path"
46221    fi
46222  fi
46223
46224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46225  if test "x$test_cygdrive_prefix" = x; then
46226    # As a simple fix, exclude /usr/bin since it's not a real path.
46227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46229      # a path prefixed by /cygdrive for fixpath to work.
46230      new_path="$CYGWIN_ROOT_PATH$input_path"
46231    fi
46232  fi
46233
46234
46235  if test "x$path" != "x$new_path"; then
46236    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46238$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46239  fi
46240
46241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46242
46243  path="$POTENTIAL_FREETYPE_LIB_PATH"
46244  has_colon=`$ECHO $path | $GREP ^.:`
46245  new_path="$path"
46246  if test "x$has_colon" = x; then
46247    # Not in mixed or Windows style, start by that.
46248    new_path=`cmd //c echo $path`
46249  fi
46250
46251
46252  input_path="$new_path"
46253  # Check if we need to convert this using DOS-style short mode. If the path
46254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46255  # take no chances and rewrite it.
46256  # Note: m4 eats our [], so we need to use [ and ] instead.
46257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46258  if test "x$has_forbidden_chars" != x; then
46259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46261  fi
46262
46263
46264  windows_path="$new_path"
46265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46266    unix_path=`$CYGPATH -u "$windows_path"`
46267    new_path="$unix_path"
46268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46270    new_path="$unix_path"
46271  fi
46272
46273  if test "x$path" != "x$new_path"; then
46274    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46277  fi
46278
46279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46281
46282    else
46283      # We're on a unix platform. Hooray! :)
46284      path="$POTENTIAL_FREETYPE_LIB_PATH"
46285      has_space=`$ECHO "$path" | $GREP " "`
46286      if test "x$has_space" != x; then
46287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46290      fi
46291
46292      # Use eval to expand a potential ~
46293      eval path="$path"
46294      if test ! -f "$path" && test ! -d "$path"; then
46295        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46296      fi
46297
46298      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46299    fi
46300  fi
46301
46302
46303    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46305$as_echo_n "checking for freetype includes... " >&6; }
46306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46307$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46308    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46310$as_echo_n "checking for freetype libraries... " >&6; }
46311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46312$as_echo "$FREETYPE_LIB_PATH" >&6; }
46313  fi
46314
46315          fi
46316        else
46317          FREETYPE_BASE_DIR="$SYSROOT/usr"
46318
46319  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46320  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46321  METHOD="well-known location"
46322
46323  # Let's start with an optimistic view of the world :-)
46324  FOUND_FREETYPE=yes
46325
46326  # First look for the canonical freetype main include file ft2build.h.
46327  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46328    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46329    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46330    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46331      # Fail.
46332      FOUND_FREETYPE=no
46333    fi
46334  fi
46335
46336  if test "x$FOUND_FREETYPE" = xyes; then
46337    # Include file found, let's continue the sanity check.
46338    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46339$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46340
46341    # Reset to default value
46342    FREETYPE_BASE_NAME=freetype
46343    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46344    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46345      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46346          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46347        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46348        # for the .6 version explicitly.
46349        FREETYPE_BASE_NAME=freetype.6
46350        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46351        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46352$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46353      else
46354        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46355$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46356        FOUND_FREETYPE=no
46357      fi
46358    else
46359      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46360        # On Windows, we will need both .lib and .dll file.
46361        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46362          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46363$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46364          FOUND_FREETYPE=no
46365        fi
46366      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46367          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46368        # Found lib in isa dir, use that instead.
46369        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46370        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46371$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46372      fi
46373    fi
46374  fi
46375
46376  if test "x$FOUND_FREETYPE" = xyes; then
46377
46378  # Only process if variable expands to non-empty
46379
46380  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46382
46383  # Input might be given as Windows format, start by converting to
46384  # unix format.
46385  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46386  new_path=`$CYGPATH -u "$path"`
46387
46388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46391  # "foo.exe" is OK but "foo" is an error.
46392  #
46393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46394  # It is also a way to make sure we got the proper file name for the real test later on.
46395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46396  if test "x$test_shortpath" = x; then
46397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46399    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46400  fi
46401
46402  # Call helper function which possibly converts this using DOS-style short mode.
46403  # If so, the updated path is stored in $new_path.
46404
46405  input_path="$new_path"
46406  # Check if we need to convert this using DOS-style short mode. If the path
46407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46408  # take no chances and rewrite it.
46409  # Note: m4 eats our [], so we need to use [ and ] instead.
46410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46411  if test "x$has_forbidden_chars" != x; then
46412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46416      # Going to short mode and back again did indeed matter. Since short mode is
46417      # case insensitive, let's make it lowercase to improve readability.
46418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46419      # Now convert it back to Unix-style (cygpath)
46420      input_path=`$CYGPATH -u "$shortmode_path"`
46421      new_path="$input_path"
46422    fi
46423  fi
46424
46425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46426  if test "x$test_cygdrive_prefix" = x; then
46427    # As a simple fix, exclude /usr/bin since it's not a real path.
46428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46430      # a path prefixed by /cygdrive for fixpath to work.
46431      new_path="$CYGWIN_ROOT_PATH$input_path"
46432    fi
46433  fi
46434
46435
46436  if test "x$path" != "x$new_path"; then
46437    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46440  fi
46441
46442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46443
46444  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46445  has_colon=`$ECHO $path | $GREP ^.:`
46446  new_path="$path"
46447  if test "x$has_colon" = x; then
46448    # Not in mixed or Windows style, start by that.
46449    new_path=`cmd //c echo $path`
46450  fi
46451
46452
46453  input_path="$new_path"
46454  # Check if we need to convert this using DOS-style short mode. If the path
46455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46456  # take no chances and rewrite it.
46457  # Note: m4 eats our [], so we need to use [ and ] instead.
46458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46459  if test "x$has_forbidden_chars" != x; then
46460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46462  fi
46463
46464
46465  windows_path="$new_path"
46466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46467    unix_path=`$CYGPATH -u "$windows_path"`
46468    new_path="$unix_path"
46469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46471    new_path="$unix_path"
46472  fi
46473
46474  if test "x$path" != "x$new_path"; then
46475    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46477$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46478  fi
46479
46480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46482
46483    else
46484      # We're on a unix platform. Hooray! :)
46485      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46486      has_space=`$ECHO "$path" | $GREP " "`
46487      if test "x$has_space" != x; then
46488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46490        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46491      fi
46492
46493      # Use eval to expand a potential ~
46494      eval path="$path"
46495      if test ! -f "$path" && test ! -d "$path"; then
46496        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46497      fi
46498
46499      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46500    fi
46501  fi
46502
46503
46504  # Only process if variable expands to non-empty
46505
46506  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46508
46509  # Input might be given as Windows format, start by converting to
46510  # unix format.
46511  path="$POTENTIAL_FREETYPE_LIB_PATH"
46512  new_path=`$CYGPATH -u "$path"`
46513
46514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46517  # "foo.exe" is OK but "foo" is an error.
46518  #
46519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46520  # It is also a way to make sure we got the proper file name for the real test later on.
46521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46522  if test "x$test_shortpath" = x; then
46523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46525    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46526  fi
46527
46528  # Call helper function which possibly converts this using DOS-style short mode.
46529  # If so, the updated path is stored in $new_path.
46530
46531  input_path="$new_path"
46532  # Check if we need to convert this using DOS-style short mode. If the path
46533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46534  # take no chances and rewrite it.
46535  # Note: m4 eats our [], so we need to use [ and ] instead.
46536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46537  if test "x$has_forbidden_chars" != x; then
46538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46542      # Going to short mode and back again did indeed matter. Since short mode is
46543      # case insensitive, let's make it lowercase to improve readability.
46544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46545      # Now convert it back to Unix-style (cygpath)
46546      input_path=`$CYGPATH -u "$shortmode_path"`
46547      new_path="$input_path"
46548    fi
46549  fi
46550
46551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46552  if test "x$test_cygdrive_prefix" = x; then
46553    # As a simple fix, exclude /usr/bin since it's not a real path.
46554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46556      # a path prefixed by /cygdrive for fixpath to work.
46557      new_path="$CYGWIN_ROOT_PATH$input_path"
46558    fi
46559  fi
46560
46561
46562  if test "x$path" != "x$new_path"; then
46563    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46565$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46566  fi
46567
46568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46569
46570  path="$POTENTIAL_FREETYPE_LIB_PATH"
46571  has_colon=`$ECHO $path | $GREP ^.:`
46572  new_path="$path"
46573  if test "x$has_colon" = x; then
46574    # Not in mixed or Windows style, start by that.
46575    new_path=`cmd //c echo $path`
46576  fi
46577
46578
46579  input_path="$new_path"
46580  # Check if we need to convert this using DOS-style short mode. If the path
46581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46582  # take no chances and rewrite it.
46583  # Note: m4 eats our [], so we need to use [ and ] instead.
46584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46585  if test "x$has_forbidden_chars" != x; then
46586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46588  fi
46589
46590
46591  windows_path="$new_path"
46592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46593    unix_path=`$CYGPATH -u "$windows_path"`
46594    new_path="$unix_path"
46595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46597    new_path="$unix_path"
46598  fi
46599
46600  if test "x$path" != "x$new_path"; then
46601    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46604  fi
46605
46606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46608
46609    else
46610      # We're on a unix platform. Hooray! :)
46611      path="$POTENTIAL_FREETYPE_LIB_PATH"
46612      has_space=`$ECHO "$path" | $GREP " "`
46613      if test "x$has_space" != x; then
46614        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46615$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46616        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46617      fi
46618
46619      # Use eval to expand a potential ~
46620      eval path="$path"
46621      if test ! -f "$path" && test ! -d "$path"; then
46622        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46623      fi
46624
46625      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46626    fi
46627  fi
46628
46629
46630    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46632$as_echo_n "checking for freetype includes... " >&6; }
46633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46634$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46635    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46637$as_echo_n "checking for freetype libraries... " >&6; }
46638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46639$as_echo "$FREETYPE_LIB_PATH" >&6; }
46640  fi
46641
46642
46643          if test "x$FOUND_FREETYPE" != xyes; then
46644            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46645
46646  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46647  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46648  METHOD="well-known location"
46649
46650  # Let's start with an optimistic view of the world :-)
46651  FOUND_FREETYPE=yes
46652
46653  # First look for the canonical freetype main include file ft2build.h.
46654  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46655    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46656    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46657    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46658      # Fail.
46659      FOUND_FREETYPE=no
46660    fi
46661  fi
46662
46663  if test "x$FOUND_FREETYPE" = xyes; then
46664    # Include file found, let's continue the sanity check.
46665    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46666$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46667
46668    # Reset to default value
46669    FREETYPE_BASE_NAME=freetype
46670    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46671    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46672      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46673          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46674        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46675        # for the .6 version explicitly.
46676        FREETYPE_BASE_NAME=freetype.6
46677        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46678        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46679$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46680      else
46681        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46682$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46683        FOUND_FREETYPE=no
46684      fi
46685    else
46686      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46687        # On Windows, we will need both .lib and .dll file.
46688        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46689          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46690$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46691          FOUND_FREETYPE=no
46692        fi
46693      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46694          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46695        # Found lib in isa dir, use that instead.
46696        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46697        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46698$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46699      fi
46700    fi
46701  fi
46702
46703  if test "x$FOUND_FREETYPE" = xyes; then
46704
46705  # Only process if variable expands to non-empty
46706
46707  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46709
46710  # Input might be given as Windows format, start by converting to
46711  # unix format.
46712  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46713  new_path=`$CYGPATH -u "$path"`
46714
46715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46718  # "foo.exe" is OK but "foo" is an error.
46719  #
46720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46721  # It is also a way to make sure we got the proper file name for the real test later on.
46722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46723  if test "x$test_shortpath" = x; then
46724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46725$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46726    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46727  fi
46728
46729  # Call helper function which possibly converts this using DOS-style short mode.
46730  # If so, the updated path is stored in $new_path.
46731
46732  input_path="$new_path"
46733  # Check if we need to convert this using DOS-style short mode. If the path
46734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46735  # take no chances and rewrite it.
46736  # Note: m4 eats our [], so we need to use [ and ] instead.
46737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46738  if test "x$has_forbidden_chars" != x; then
46739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46743      # Going to short mode and back again did indeed matter. Since short mode is
46744      # case insensitive, let's make it lowercase to improve readability.
46745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46746      # Now convert it back to Unix-style (cygpath)
46747      input_path=`$CYGPATH -u "$shortmode_path"`
46748      new_path="$input_path"
46749    fi
46750  fi
46751
46752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46753  if test "x$test_cygdrive_prefix" = x; then
46754    # As a simple fix, exclude /usr/bin since it's not a real path.
46755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46757      # a path prefixed by /cygdrive for fixpath to work.
46758      new_path="$CYGWIN_ROOT_PATH$input_path"
46759    fi
46760  fi
46761
46762
46763  if test "x$path" != "x$new_path"; then
46764    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46766$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46767  fi
46768
46769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46770
46771  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46772  has_colon=`$ECHO $path | $GREP ^.:`
46773  new_path="$path"
46774  if test "x$has_colon" = x; then
46775    # Not in mixed or Windows style, start by that.
46776    new_path=`cmd //c echo $path`
46777  fi
46778
46779
46780  input_path="$new_path"
46781  # Check if we need to convert this using DOS-style short mode. If the path
46782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46783  # take no chances and rewrite it.
46784  # Note: m4 eats our [], so we need to use [ and ] instead.
46785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46786  if test "x$has_forbidden_chars" != x; then
46787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46789  fi
46790
46791
46792  windows_path="$new_path"
46793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46794    unix_path=`$CYGPATH -u "$windows_path"`
46795    new_path="$unix_path"
46796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46798    new_path="$unix_path"
46799  fi
46800
46801  if test "x$path" != "x$new_path"; then
46802    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46804$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46805  fi
46806
46807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46809
46810    else
46811      # We're on a unix platform. Hooray! :)
46812      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46813      has_space=`$ECHO "$path" | $GREP " "`
46814      if test "x$has_space" != x; then
46815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46816$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46818      fi
46819
46820      # Use eval to expand a potential ~
46821      eval path="$path"
46822      if test ! -f "$path" && test ! -d "$path"; then
46823        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46824      fi
46825
46826      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46827    fi
46828  fi
46829
46830
46831  # Only process if variable expands to non-empty
46832
46833  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46835
46836  # Input might be given as Windows format, start by converting to
46837  # unix format.
46838  path="$POTENTIAL_FREETYPE_LIB_PATH"
46839  new_path=`$CYGPATH -u "$path"`
46840
46841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46844  # "foo.exe" is OK but "foo" is an error.
46845  #
46846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46847  # It is also a way to make sure we got the proper file name for the real test later on.
46848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46849  if test "x$test_shortpath" = x; then
46850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46852    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46853  fi
46854
46855  # Call helper function which possibly converts this using DOS-style short mode.
46856  # If so, the updated path is stored in $new_path.
46857
46858  input_path="$new_path"
46859  # Check if we need to convert this using DOS-style short mode. If the path
46860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46861  # take no chances and rewrite it.
46862  # Note: m4 eats our [], so we need to use [ and ] instead.
46863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46864  if test "x$has_forbidden_chars" != x; then
46865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46869      # Going to short mode and back again did indeed matter. Since short mode is
46870      # case insensitive, let's make it lowercase to improve readability.
46871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46872      # Now convert it back to Unix-style (cygpath)
46873      input_path=`$CYGPATH -u "$shortmode_path"`
46874      new_path="$input_path"
46875    fi
46876  fi
46877
46878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46879  if test "x$test_cygdrive_prefix" = x; then
46880    # As a simple fix, exclude /usr/bin since it's not a real path.
46881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46883      # a path prefixed by /cygdrive for fixpath to work.
46884      new_path="$CYGWIN_ROOT_PATH$input_path"
46885    fi
46886  fi
46887
46888
46889  if test "x$path" != "x$new_path"; then
46890    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46892$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46893  fi
46894
46895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46896
46897  path="$POTENTIAL_FREETYPE_LIB_PATH"
46898  has_colon=`$ECHO $path | $GREP ^.:`
46899  new_path="$path"
46900  if test "x$has_colon" = x; then
46901    # Not in mixed or Windows style, start by that.
46902    new_path=`cmd //c echo $path`
46903  fi
46904
46905
46906  input_path="$new_path"
46907  # Check if we need to convert this using DOS-style short mode. If the path
46908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46909  # take no chances and rewrite it.
46910  # Note: m4 eats our [], so we need to use [ and ] instead.
46911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46912  if test "x$has_forbidden_chars" != x; then
46913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46915  fi
46916
46917
46918  windows_path="$new_path"
46919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46920    unix_path=`$CYGPATH -u "$windows_path"`
46921    new_path="$unix_path"
46922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46924    new_path="$unix_path"
46925  fi
46926
46927  if test "x$path" != "x$new_path"; then
46928    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46930$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46931  fi
46932
46933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46935
46936    else
46937      # We're on a unix platform. Hooray! :)
46938      path="$POTENTIAL_FREETYPE_LIB_PATH"
46939      has_space=`$ECHO "$path" | $GREP " "`
46940      if test "x$has_space" != x; then
46941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46942$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46944      fi
46945
46946      # Use eval to expand a potential ~
46947      eval path="$path"
46948      if test ! -f "$path" && test ! -d "$path"; then
46949        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46950      fi
46951
46952      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46953    fi
46954  fi
46955
46956
46957    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46959$as_echo_n "checking for freetype includes... " >&6; }
46960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46961$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46962    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46964$as_echo_n "checking for freetype libraries... " >&6; }
46965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46966$as_echo "$FREETYPE_LIB_PATH" >&6; }
46967  fi
46968
46969          fi
46970
46971          if test "x$FOUND_FREETYPE" != xyes; then
46972            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46973
46974  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46975  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46976  METHOD="well-known location"
46977
46978  # Let's start with an optimistic view of the world :-)
46979  FOUND_FREETYPE=yes
46980
46981  # First look for the canonical freetype main include file ft2build.h.
46982  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46983    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46984    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46985    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46986      # Fail.
46987      FOUND_FREETYPE=no
46988    fi
46989  fi
46990
46991  if test "x$FOUND_FREETYPE" = xyes; then
46992    # Include file found, let's continue the sanity check.
46993    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46994$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46995
46996    # Reset to default value
46997    FREETYPE_BASE_NAME=freetype
46998    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46999    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47000      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47001          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47002        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47003        # for the .6 version explicitly.
47004        FREETYPE_BASE_NAME=freetype.6
47005        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47006        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47007$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47008      else
47009        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47010$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47011        FOUND_FREETYPE=no
47012      fi
47013    else
47014      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47015        # On Windows, we will need both .lib and .dll file.
47016        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47017          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47018$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47019          FOUND_FREETYPE=no
47020        fi
47021      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47022          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47023        # Found lib in isa dir, use that instead.
47024        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47025        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47026$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47027      fi
47028    fi
47029  fi
47030
47031  if test "x$FOUND_FREETYPE" = xyes; then
47032
47033  # Only process if variable expands to non-empty
47034
47035  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47037
47038  # Input might be given as Windows format, start by converting to
47039  # unix format.
47040  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47041  new_path=`$CYGPATH -u "$path"`
47042
47043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47046  # "foo.exe" is OK but "foo" is an error.
47047  #
47048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47049  # It is also a way to make sure we got the proper file name for the real test later on.
47050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47051  if test "x$test_shortpath" = x; then
47052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47053$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47054    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47055  fi
47056
47057  # Call helper function which possibly converts this using DOS-style short mode.
47058  # If so, the updated path is stored in $new_path.
47059
47060  input_path="$new_path"
47061  # Check if we need to convert this using DOS-style short mode. If the path
47062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47063  # take no chances and rewrite it.
47064  # Note: m4 eats our [], so we need to use [ and ] instead.
47065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47066  if test "x$has_forbidden_chars" != x; then
47067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47071      # Going to short mode and back again did indeed matter. Since short mode is
47072      # case insensitive, let's make it lowercase to improve readability.
47073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47074      # Now convert it back to Unix-style (cygpath)
47075      input_path=`$CYGPATH -u "$shortmode_path"`
47076      new_path="$input_path"
47077    fi
47078  fi
47079
47080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47081  if test "x$test_cygdrive_prefix" = x; then
47082    # As a simple fix, exclude /usr/bin since it's not a real path.
47083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47085      # a path prefixed by /cygdrive for fixpath to work.
47086      new_path="$CYGWIN_ROOT_PATH$input_path"
47087    fi
47088  fi
47089
47090
47091  if test "x$path" != "x$new_path"; then
47092    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47095  fi
47096
47097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47098
47099  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47100  has_colon=`$ECHO $path | $GREP ^.:`
47101  new_path="$path"
47102  if test "x$has_colon" = x; then
47103    # Not in mixed or Windows style, start by that.
47104    new_path=`cmd //c echo $path`
47105  fi
47106
47107
47108  input_path="$new_path"
47109  # Check if we need to convert this using DOS-style short mode. If the path
47110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47111  # take no chances and rewrite it.
47112  # Note: m4 eats our [], so we need to use [ and ] instead.
47113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47114  if test "x$has_forbidden_chars" != x; then
47115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47117  fi
47118
47119
47120  windows_path="$new_path"
47121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47122    unix_path=`$CYGPATH -u "$windows_path"`
47123    new_path="$unix_path"
47124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47126    new_path="$unix_path"
47127  fi
47128
47129  if test "x$path" != "x$new_path"; then
47130    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47133  fi
47134
47135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47137
47138    else
47139      # We're on a unix platform. Hooray! :)
47140      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47141      has_space=`$ECHO "$path" | $GREP " "`
47142      if test "x$has_space" != x; then
47143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47144$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47146      fi
47147
47148      # Use eval to expand a potential ~
47149      eval path="$path"
47150      if test ! -f "$path" && test ! -d "$path"; then
47151        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47152      fi
47153
47154      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47155    fi
47156  fi
47157
47158
47159  # Only process if variable expands to non-empty
47160
47161  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47163
47164  # Input might be given as Windows format, start by converting to
47165  # unix format.
47166  path="$POTENTIAL_FREETYPE_LIB_PATH"
47167  new_path=`$CYGPATH -u "$path"`
47168
47169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47172  # "foo.exe" is OK but "foo" is an error.
47173  #
47174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47175  # It is also a way to make sure we got the proper file name for the real test later on.
47176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47177  if test "x$test_shortpath" = x; then
47178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47180    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47181  fi
47182
47183  # Call helper function which possibly converts this using DOS-style short mode.
47184  # If so, the updated path is stored in $new_path.
47185
47186  input_path="$new_path"
47187  # Check if we need to convert this using DOS-style short mode. If the path
47188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47189  # take no chances and rewrite it.
47190  # Note: m4 eats our [], so we need to use [ and ] instead.
47191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47192  if test "x$has_forbidden_chars" != x; then
47193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47197      # Going to short mode and back again did indeed matter. Since short mode is
47198      # case insensitive, let's make it lowercase to improve readability.
47199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47200      # Now convert it back to Unix-style (cygpath)
47201      input_path=`$CYGPATH -u "$shortmode_path"`
47202      new_path="$input_path"
47203    fi
47204  fi
47205
47206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47207  if test "x$test_cygdrive_prefix" = x; then
47208    # As a simple fix, exclude /usr/bin since it's not a real path.
47209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47211      # a path prefixed by /cygdrive for fixpath to work.
47212      new_path="$CYGWIN_ROOT_PATH$input_path"
47213    fi
47214  fi
47215
47216
47217  if test "x$path" != "x$new_path"; then
47218    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47220$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47221  fi
47222
47223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47224
47225  path="$POTENTIAL_FREETYPE_LIB_PATH"
47226  has_colon=`$ECHO $path | $GREP ^.:`
47227  new_path="$path"
47228  if test "x$has_colon" = x; then
47229    # Not in mixed or Windows style, start by that.
47230    new_path=`cmd //c echo $path`
47231  fi
47232
47233
47234  input_path="$new_path"
47235  # Check if we need to convert this using DOS-style short mode. If the path
47236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47237  # take no chances and rewrite it.
47238  # Note: m4 eats our [], so we need to use [ and ] instead.
47239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47240  if test "x$has_forbidden_chars" != x; then
47241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47243  fi
47244
47245
47246  windows_path="$new_path"
47247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47248    unix_path=`$CYGPATH -u "$windows_path"`
47249    new_path="$unix_path"
47250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47252    new_path="$unix_path"
47253  fi
47254
47255  if test "x$path" != "x$new_path"; then
47256    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47258$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47259  fi
47260
47261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47263
47264    else
47265      # We're on a unix platform. Hooray! :)
47266      path="$POTENTIAL_FREETYPE_LIB_PATH"
47267      has_space=`$ECHO "$path" | $GREP " "`
47268      if test "x$has_space" != x; then
47269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47270$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47272      fi
47273
47274      # Use eval to expand a potential ~
47275      eval path="$path"
47276      if test ! -f "$path" && test ! -d "$path"; then
47277        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47278      fi
47279
47280      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47281    fi
47282  fi
47283
47284
47285    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47287$as_echo_n "checking for freetype includes... " >&6; }
47288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47289$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47290    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47292$as_echo_n "checking for freetype libraries... " >&6; }
47293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47294$as_echo "$FREETYPE_LIB_PATH" >&6; }
47295  fi
47296
47297          fi
47298
47299          if test "x$FOUND_FREETYPE" != xyes; then
47300            FREETYPE_BASE_DIR="$SYSROOT/usr"
47301            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47302
47303  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47304  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47305  METHOD="well-known location"
47306
47307  # Let's start with an optimistic view of the world :-)
47308  FOUND_FREETYPE=yes
47309
47310  # First look for the canonical freetype main include file ft2build.h.
47311  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47312    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47313    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47314    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47315      # Fail.
47316      FOUND_FREETYPE=no
47317    fi
47318  fi
47319
47320  if test "x$FOUND_FREETYPE" = xyes; then
47321    # Include file found, let's continue the sanity check.
47322    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47323$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47324
47325    # Reset to default value
47326    FREETYPE_BASE_NAME=freetype
47327    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47328    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47329      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47330          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47331        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47332        # for the .6 version explicitly.
47333        FREETYPE_BASE_NAME=freetype.6
47334        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47335        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47336$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47337      else
47338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47339$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47340        FOUND_FREETYPE=no
47341      fi
47342    else
47343      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47344        # On Windows, we will need both .lib and .dll file.
47345        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47346          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47347$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47348          FOUND_FREETYPE=no
47349        fi
47350      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47351          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47352        # Found lib in isa dir, use that instead.
47353        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47354        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47355$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47356      fi
47357    fi
47358  fi
47359
47360  if test "x$FOUND_FREETYPE" = xyes; then
47361
47362  # Only process if variable expands to non-empty
47363
47364  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47366
47367  # Input might be given as Windows format, start by converting to
47368  # unix format.
47369  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47370  new_path=`$CYGPATH -u "$path"`
47371
47372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47375  # "foo.exe" is OK but "foo" is an error.
47376  #
47377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47378  # It is also a way to make sure we got the proper file name for the real test later on.
47379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47380  if test "x$test_shortpath" = x; then
47381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47382$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47383    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47384  fi
47385
47386  # Call helper function which possibly converts this using DOS-style short mode.
47387  # If so, the updated path is stored in $new_path.
47388
47389  input_path="$new_path"
47390  # Check if we need to convert this using DOS-style short mode. If the path
47391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47392  # take no chances and rewrite it.
47393  # Note: m4 eats our [], so we need to use [ and ] instead.
47394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47395  if test "x$has_forbidden_chars" != x; then
47396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47400      # Going to short mode and back again did indeed matter. Since short mode is
47401      # case insensitive, let's make it lowercase to improve readability.
47402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47403      # Now convert it back to Unix-style (cygpath)
47404      input_path=`$CYGPATH -u "$shortmode_path"`
47405      new_path="$input_path"
47406    fi
47407  fi
47408
47409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47410  if test "x$test_cygdrive_prefix" = x; then
47411    # As a simple fix, exclude /usr/bin since it's not a real path.
47412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47414      # a path prefixed by /cygdrive for fixpath to work.
47415      new_path="$CYGWIN_ROOT_PATH$input_path"
47416    fi
47417  fi
47418
47419
47420  if test "x$path" != "x$new_path"; then
47421    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47423$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47424  fi
47425
47426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47427
47428  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47429  has_colon=`$ECHO $path | $GREP ^.:`
47430  new_path="$path"
47431  if test "x$has_colon" = x; then
47432    # Not in mixed or Windows style, start by that.
47433    new_path=`cmd //c echo $path`
47434  fi
47435
47436
47437  input_path="$new_path"
47438  # Check if we need to convert this using DOS-style short mode. If the path
47439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47440  # take no chances and rewrite it.
47441  # Note: m4 eats our [], so we need to use [ and ] instead.
47442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47443  if test "x$has_forbidden_chars" != x; then
47444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47446  fi
47447
47448
47449  windows_path="$new_path"
47450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47451    unix_path=`$CYGPATH -u "$windows_path"`
47452    new_path="$unix_path"
47453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47455    new_path="$unix_path"
47456  fi
47457
47458  if test "x$path" != "x$new_path"; then
47459    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47462  fi
47463
47464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47466
47467    else
47468      # We're on a unix platform. Hooray! :)
47469      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47470      has_space=`$ECHO "$path" | $GREP " "`
47471      if test "x$has_space" != x; then
47472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47475      fi
47476
47477      # Use eval to expand a potential ~
47478      eval path="$path"
47479      if test ! -f "$path" && test ! -d "$path"; then
47480        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47481      fi
47482
47483      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47484    fi
47485  fi
47486
47487
47488  # Only process if variable expands to non-empty
47489
47490  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47492
47493  # Input might be given as Windows format, start by converting to
47494  # unix format.
47495  path="$POTENTIAL_FREETYPE_LIB_PATH"
47496  new_path=`$CYGPATH -u "$path"`
47497
47498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47501  # "foo.exe" is OK but "foo" is an error.
47502  #
47503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47504  # It is also a way to make sure we got the proper file name for the real test later on.
47505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47506  if test "x$test_shortpath" = x; then
47507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47509    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47510  fi
47511
47512  # Call helper function which possibly converts this using DOS-style short mode.
47513  # If so, the updated path is stored in $new_path.
47514
47515  input_path="$new_path"
47516  # Check if we need to convert this using DOS-style short mode. If the path
47517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47518  # take no chances and rewrite it.
47519  # Note: m4 eats our [], so we need to use [ and ] instead.
47520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47521  if test "x$has_forbidden_chars" != x; then
47522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47526      # Going to short mode and back again did indeed matter. Since short mode is
47527      # case insensitive, let's make it lowercase to improve readability.
47528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47529      # Now convert it back to Unix-style (cygpath)
47530      input_path=`$CYGPATH -u "$shortmode_path"`
47531      new_path="$input_path"
47532    fi
47533  fi
47534
47535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47536  if test "x$test_cygdrive_prefix" = x; then
47537    # As a simple fix, exclude /usr/bin since it's not a real path.
47538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47540      # a path prefixed by /cygdrive for fixpath to work.
47541      new_path="$CYGWIN_ROOT_PATH$input_path"
47542    fi
47543  fi
47544
47545
47546  if test "x$path" != "x$new_path"; then
47547    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47550  fi
47551
47552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47553
47554  path="$POTENTIAL_FREETYPE_LIB_PATH"
47555  has_colon=`$ECHO $path | $GREP ^.:`
47556  new_path="$path"
47557  if test "x$has_colon" = x; then
47558    # Not in mixed or Windows style, start by that.
47559    new_path=`cmd //c echo $path`
47560  fi
47561
47562
47563  input_path="$new_path"
47564  # Check if we need to convert this using DOS-style short mode. If the path
47565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47566  # take no chances and rewrite it.
47567  # Note: m4 eats our [], so we need to use [ and ] instead.
47568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47569  if test "x$has_forbidden_chars" != x; then
47570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47572  fi
47573
47574
47575  windows_path="$new_path"
47576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47577    unix_path=`$CYGPATH -u "$windows_path"`
47578    new_path="$unix_path"
47579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47581    new_path="$unix_path"
47582  fi
47583
47584  if test "x$path" != "x$new_path"; then
47585    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47588  fi
47589
47590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47592
47593    else
47594      # We're on a unix platform. Hooray! :)
47595      path="$POTENTIAL_FREETYPE_LIB_PATH"
47596      has_space=`$ECHO "$path" | $GREP " "`
47597      if test "x$has_space" != x; then
47598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47601      fi
47602
47603      # Use eval to expand a potential ~
47604      eval path="$path"
47605      if test ! -f "$path" && test ! -d "$path"; then
47606        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47607      fi
47608
47609      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47610    fi
47611  fi
47612
47613
47614    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47616$as_echo_n "checking for freetype includes... " >&6; }
47617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47618$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47619    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47621$as_echo_n "checking for freetype libraries... " >&6; }
47622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47623$as_echo "$FREETYPE_LIB_PATH" >&6; }
47624  fi
47625
47626            else
47627
47628  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47629  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47630  METHOD="well-known location"
47631
47632  # Let's start with an optimistic view of the world :-)
47633  FOUND_FREETYPE=yes
47634
47635  # First look for the canonical freetype main include file ft2build.h.
47636  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47637    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47638    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47639    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47640      # Fail.
47641      FOUND_FREETYPE=no
47642    fi
47643  fi
47644
47645  if test "x$FOUND_FREETYPE" = xyes; then
47646    # Include file found, let's continue the sanity check.
47647    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47648$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47649
47650    # Reset to default value
47651    FREETYPE_BASE_NAME=freetype
47652    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47653    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47654      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47655          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47656        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47657        # for the .6 version explicitly.
47658        FREETYPE_BASE_NAME=freetype.6
47659        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47660        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47661$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47662      else
47663        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47664$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47665        FOUND_FREETYPE=no
47666      fi
47667    else
47668      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47669        # On Windows, we will need both .lib and .dll file.
47670        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47671          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47672$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47673          FOUND_FREETYPE=no
47674        fi
47675      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47676          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47677        # Found lib in isa dir, use that instead.
47678        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47679        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47680$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47681      fi
47682    fi
47683  fi
47684
47685  if test "x$FOUND_FREETYPE" = xyes; then
47686
47687  # Only process if variable expands to non-empty
47688
47689  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47691
47692  # Input might be given as Windows format, start by converting to
47693  # unix format.
47694  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47695  new_path=`$CYGPATH -u "$path"`
47696
47697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47700  # "foo.exe" is OK but "foo" is an error.
47701  #
47702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47703  # It is also a way to make sure we got the proper file name for the real test later on.
47704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47705  if test "x$test_shortpath" = x; then
47706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47707$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47708    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47709  fi
47710
47711  # Call helper function which possibly converts this using DOS-style short mode.
47712  # If so, the updated path is stored in $new_path.
47713
47714  input_path="$new_path"
47715  # Check if we need to convert this using DOS-style short mode. If the path
47716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47717  # take no chances and rewrite it.
47718  # Note: m4 eats our [], so we need to use [ and ] instead.
47719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47720  if test "x$has_forbidden_chars" != x; then
47721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47725      # Going to short mode and back again did indeed matter. Since short mode is
47726      # case insensitive, let's make it lowercase to improve readability.
47727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47728      # Now convert it back to Unix-style (cygpath)
47729      input_path=`$CYGPATH -u "$shortmode_path"`
47730      new_path="$input_path"
47731    fi
47732  fi
47733
47734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47735  if test "x$test_cygdrive_prefix" = x; then
47736    # As a simple fix, exclude /usr/bin since it's not a real path.
47737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47739      # a path prefixed by /cygdrive for fixpath to work.
47740      new_path="$CYGWIN_ROOT_PATH$input_path"
47741    fi
47742  fi
47743
47744
47745  if test "x$path" != "x$new_path"; then
47746    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47748$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47749  fi
47750
47751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47752
47753  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47754  has_colon=`$ECHO $path | $GREP ^.:`
47755  new_path="$path"
47756  if test "x$has_colon" = x; then
47757    # Not in mixed or Windows style, start by that.
47758    new_path=`cmd //c echo $path`
47759  fi
47760
47761
47762  input_path="$new_path"
47763  # Check if we need to convert this using DOS-style short mode. If the path
47764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47765  # take no chances and rewrite it.
47766  # Note: m4 eats our [], so we need to use [ and ] instead.
47767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47768  if test "x$has_forbidden_chars" != x; then
47769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47771  fi
47772
47773
47774  windows_path="$new_path"
47775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47776    unix_path=`$CYGPATH -u "$windows_path"`
47777    new_path="$unix_path"
47778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47780    new_path="$unix_path"
47781  fi
47782
47783  if test "x$path" != "x$new_path"; then
47784    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47787  fi
47788
47789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47791
47792    else
47793      # We're on a unix platform. Hooray! :)
47794      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47795      has_space=`$ECHO "$path" | $GREP " "`
47796      if test "x$has_space" != x; then
47797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47800      fi
47801
47802      # Use eval to expand a potential ~
47803      eval path="$path"
47804      if test ! -f "$path" && test ! -d "$path"; then
47805        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47806      fi
47807
47808      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47809    fi
47810  fi
47811
47812
47813  # Only process if variable expands to non-empty
47814
47815  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47817
47818  # Input might be given as Windows format, start by converting to
47819  # unix format.
47820  path="$POTENTIAL_FREETYPE_LIB_PATH"
47821  new_path=`$CYGPATH -u "$path"`
47822
47823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47826  # "foo.exe" is OK but "foo" is an error.
47827  #
47828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47829  # It is also a way to make sure we got the proper file name for the real test later on.
47830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47831  if test "x$test_shortpath" = x; then
47832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47833$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47834    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47835  fi
47836
47837  # Call helper function which possibly converts this using DOS-style short mode.
47838  # If so, the updated path is stored in $new_path.
47839
47840  input_path="$new_path"
47841  # Check if we need to convert this using DOS-style short mode. If the path
47842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47843  # take no chances and rewrite it.
47844  # Note: m4 eats our [], so we need to use [ and ] instead.
47845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47846  if test "x$has_forbidden_chars" != x; then
47847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47851      # Going to short mode and back again did indeed matter. Since short mode is
47852      # case insensitive, let's make it lowercase to improve readability.
47853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47854      # Now convert it back to Unix-style (cygpath)
47855      input_path=`$CYGPATH -u "$shortmode_path"`
47856      new_path="$input_path"
47857    fi
47858  fi
47859
47860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47861  if test "x$test_cygdrive_prefix" = x; then
47862    # As a simple fix, exclude /usr/bin since it's not a real path.
47863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47865      # a path prefixed by /cygdrive for fixpath to work.
47866      new_path="$CYGWIN_ROOT_PATH$input_path"
47867    fi
47868  fi
47869
47870
47871  if test "x$path" != "x$new_path"; then
47872    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47874$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47875  fi
47876
47877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47878
47879  path="$POTENTIAL_FREETYPE_LIB_PATH"
47880  has_colon=`$ECHO $path | $GREP ^.:`
47881  new_path="$path"
47882  if test "x$has_colon" = x; then
47883    # Not in mixed or Windows style, start by that.
47884    new_path=`cmd //c echo $path`
47885  fi
47886
47887
47888  input_path="$new_path"
47889  # Check if we need to convert this using DOS-style short mode. If the path
47890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47891  # take no chances and rewrite it.
47892  # Note: m4 eats our [], so we need to use [ and ] instead.
47893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47894  if test "x$has_forbidden_chars" != x; then
47895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47897  fi
47898
47899
47900  windows_path="$new_path"
47901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47902    unix_path=`$CYGPATH -u "$windows_path"`
47903    new_path="$unix_path"
47904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47906    new_path="$unix_path"
47907  fi
47908
47909  if test "x$path" != "x$new_path"; then
47910    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47912$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47913  fi
47914
47915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47917
47918    else
47919      # We're on a unix platform. Hooray! :)
47920      path="$POTENTIAL_FREETYPE_LIB_PATH"
47921      has_space=`$ECHO "$path" | $GREP " "`
47922      if test "x$has_space" != x; then
47923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47924$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47925        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47926      fi
47927
47928      # Use eval to expand a potential ~
47929      eval path="$path"
47930      if test ! -f "$path" && test ! -d "$path"; then
47931        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47932      fi
47933
47934      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47935    fi
47936  fi
47937
47938
47939    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47941$as_echo_n "checking for freetype includes... " >&6; }
47942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47943$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47944    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47946$as_echo_n "checking for freetype libraries... " >&6; }
47947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47948$as_echo "$FREETYPE_LIB_PATH" >&6; }
47949  fi
47950
47951              if test "x$FOUND_FREETYPE" != xyes; then
47952
47953  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47954  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47955  METHOD="well-known location"
47956
47957  # Let's start with an optimistic view of the world :-)
47958  FOUND_FREETYPE=yes
47959
47960  # First look for the canonical freetype main include file ft2build.h.
47961  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47962    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47963    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47964    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47965      # Fail.
47966      FOUND_FREETYPE=no
47967    fi
47968  fi
47969
47970  if test "x$FOUND_FREETYPE" = xyes; then
47971    # Include file found, let's continue the sanity check.
47972    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47973$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47974
47975    # Reset to default value
47976    FREETYPE_BASE_NAME=freetype
47977    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47978    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47979      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47980          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47981        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47982        # for the .6 version explicitly.
47983        FREETYPE_BASE_NAME=freetype.6
47984        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47985        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47986$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47987      else
47988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47989$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47990        FOUND_FREETYPE=no
47991      fi
47992    else
47993      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47994        # On Windows, we will need both .lib and .dll file.
47995        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47996          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47997$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47998          FOUND_FREETYPE=no
47999        fi
48000      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48001          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48002        # Found lib in isa dir, use that instead.
48003        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48004        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48005$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48006      fi
48007    fi
48008  fi
48009
48010  if test "x$FOUND_FREETYPE" = xyes; then
48011
48012  # Only process if variable expands to non-empty
48013
48014  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48016
48017  # Input might be given as Windows format, start by converting to
48018  # unix format.
48019  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48020  new_path=`$CYGPATH -u "$path"`
48021
48022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48025  # "foo.exe" is OK but "foo" is an error.
48026  #
48027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48028  # It is also a way to make sure we got the proper file name for the real test later on.
48029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48030  if test "x$test_shortpath" = x; then
48031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48032$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48033    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48034  fi
48035
48036  # Call helper function which possibly converts this using DOS-style short mode.
48037  # If so, the updated path is stored in $new_path.
48038
48039  input_path="$new_path"
48040  # Check if we need to convert this using DOS-style short mode. If the path
48041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48042  # take no chances and rewrite it.
48043  # Note: m4 eats our [], so we need to use [ and ] instead.
48044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48045  if test "x$has_forbidden_chars" != x; then
48046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48050      # Going to short mode and back again did indeed matter. Since short mode is
48051      # case insensitive, let's make it lowercase to improve readability.
48052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48053      # Now convert it back to Unix-style (cygpath)
48054      input_path=`$CYGPATH -u "$shortmode_path"`
48055      new_path="$input_path"
48056    fi
48057  fi
48058
48059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48060  if test "x$test_cygdrive_prefix" = x; then
48061    # As a simple fix, exclude /usr/bin since it's not a real path.
48062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48064      # a path prefixed by /cygdrive for fixpath to work.
48065      new_path="$CYGWIN_ROOT_PATH$input_path"
48066    fi
48067  fi
48068
48069
48070  if test "x$path" != "x$new_path"; then
48071    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48073$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48074  fi
48075
48076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48077
48078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48079  has_colon=`$ECHO $path | $GREP ^.:`
48080  new_path="$path"
48081  if test "x$has_colon" = x; then
48082    # Not in mixed or Windows style, start by that.
48083    new_path=`cmd //c echo $path`
48084  fi
48085
48086
48087  input_path="$new_path"
48088  # Check if we need to convert this using DOS-style short mode. If the path
48089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48090  # take no chances and rewrite it.
48091  # Note: m4 eats our [], so we need to use [ and ] instead.
48092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48093  if test "x$has_forbidden_chars" != x; then
48094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48096  fi
48097
48098
48099  windows_path="$new_path"
48100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48101    unix_path=`$CYGPATH -u "$windows_path"`
48102    new_path="$unix_path"
48103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48105    new_path="$unix_path"
48106  fi
48107
48108  if test "x$path" != "x$new_path"; then
48109    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48111$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48112  fi
48113
48114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48116
48117    else
48118      # We're on a unix platform. Hooray! :)
48119      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48120      has_space=`$ECHO "$path" | $GREP " "`
48121      if test "x$has_space" != x; then
48122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48123$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48124        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48125      fi
48126
48127      # Use eval to expand a potential ~
48128      eval path="$path"
48129      if test ! -f "$path" && test ! -d "$path"; then
48130        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48131      fi
48132
48133      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48134    fi
48135  fi
48136
48137
48138  # Only process if variable expands to non-empty
48139
48140  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48142
48143  # Input might be given as Windows format, start by converting to
48144  # unix format.
48145  path="$POTENTIAL_FREETYPE_LIB_PATH"
48146  new_path=`$CYGPATH -u "$path"`
48147
48148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48151  # "foo.exe" is OK but "foo" is an error.
48152  #
48153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48154  # It is also a way to make sure we got the proper file name for the real test later on.
48155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48156  if test "x$test_shortpath" = x; then
48157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48158$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48159    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48160  fi
48161
48162  # Call helper function which possibly converts this using DOS-style short mode.
48163  # If so, the updated path is stored in $new_path.
48164
48165  input_path="$new_path"
48166  # Check if we need to convert this using DOS-style short mode. If the path
48167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48168  # take no chances and rewrite it.
48169  # Note: m4 eats our [], so we need to use [ and ] instead.
48170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48171  if test "x$has_forbidden_chars" != x; then
48172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48176      # Going to short mode and back again did indeed matter. Since short mode is
48177      # case insensitive, let's make it lowercase to improve readability.
48178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48179      # Now convert it back to Unix-style (cygpath)
48180      input_path=`$CYGPATH -u "$shortmode_path"`
48181      new_path="$input_path"
48182    fi
48183  fi
48184
48185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48186  if test "x$test_cygdrive_prefix" = x; then
48187    # As a simple fix, exclude /usr/bin since it's not a real path.
48188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48190      # a path prefixed by /cygdrive for fixpath to work.
48191      new_path="$CYGWIN_ROOT_PATH$input_path"
48192    fi
48193  fi
48194
48195
48196  if test "x$path" != "x$new_path"; then
48197    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48199$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48200  fi
48201
48202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48203
48204  path="$POTENTIAL_FREETYPE_LIB_PATH"
48205  has_colon=`$ECHO $path | $GREP ^.:`
48206  new_path="$path"
48207  if test "x$has_colon" = x; then
48208    # Not in mixed or Windows style, start by that.
48209    new_path=`cmd //c echo $path`
48210  fi
48211
48212
48213  input_path="$new_path"
48214  # Check if we need to convert this using DOS-style short mode. If the path
48215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48216  # take no chances and rewrite it.
48217  # Note: m4 eats our [], so we need to use [ and ] instead.
48218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48219  if test "x$has_forbidden_chars" != x; then
48220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48222  fi
48223
48224
48225  windows_path="$new_path"
48226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48227    unix_path=`$CYGPATH -u "$windows_path"`
48228    new_path="$unix_path"
48229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48231    new_path="$unix_path"
48232  fi
48233
48234  if test "x$path" != "x$new_path"; then
48235    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48238  fi
48239
48240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48242
48243    else
48244      # We're on a unix platform. Hooray! :)
48245      path="$POTENTIAL_FREETYPE_LIB_PATH"
48246      has_space=`$ECHO "$path" | $GREP " "`
48247      if test "x$has_space" != x; then
48248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48251      fi
48252
48253      # Use eval to expand a potential ~
48254      eval path="$path"
48255      if test ! -f "$path" && test ! -d "$path"; then
48256        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48257      fi
48258
48259      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48260    fi
48261  fi
48262
48263
48264    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48266$as_echo_n "checking for freetype includes... " >&6; }
48267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48268$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48269    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48271$as_echo_n "checking for freetype libraries... " >&6; }
48272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48273$as_echo "$FREETYPE_LIB_PATH" >&6; }
48274  fi
48275
48276              fi
48277            fi
48278          fi
48279        fi
48280      fi # end check in well-known locations
48281
48282      if test "x$FOUND_FREETYPE" != xyes; then
48283
48284  # Print a helpful message on how to acquire the necessary build dependency.
48285  # freetype is the help tag: freetype, cups, pulse, alsa etc
48286  MISSING_DEPENDENCY=freetype
48287
48288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48289    cygwin_help $MISSING_DEPENDENCY
48290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48291    msys_help $MISSING_DEPENDENCY
48292  else
48293    PKGHANDLER_COMMAND=
48294
48295    case $PKGHANDLER in
48296      apt-get)
48297        apt_help     $MISSING_DEPENDENCY ;;
48298      yum)
48299        yum_help     $MISSING_DEPENDENCY ;;
48300      port)
48301        port_help    $MISSING_DEPENDENCY ;;
48302      pkgutil)
48303        pkgutil_help $MISSING_DEPENDENCY ;;
48304      pkgadd)
48305        pkgadd_help  $MISSING_DEPENDENCY ;;
48306    esac
48307
48308    if test "x$PKGHANDLER_COMMAND" != x; then
48309      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48310    fi
48311  fi
48312
48313        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48314      fi
48315    fi # end user specified settings
48316
48317    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48318    if test "x$FREETYPE_CFLAGS" = x; then
48319
48320  # Only process if variable expands to non-empty
48321
48322  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48324
48325  # Input might be given as Windows format, start by converting to
48326  # unix format.
48327  path="$FREETYPE_INCLUDE_PATH"
48328  new_path=`$CYGPATH -u "$path"`
48329
48330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48333  # "foo.exe" is OK but "foo" is an error.
48334  #
48335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48336  # It is also a way to make sure we got the proper file name for the real test later on.
48337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48338  if test "x$test_shortpath" = x; then
48339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48340$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48341    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48342  fi
48343
48344  # Call helper function which possibly converts this using DOS-style short mode.
48345  # If so, the updated path is stored in $new_path.
48346
48347  input_path="$new_path"
48348  # Check if we need to convert this using DOS-style short mode. If the path
48349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48350  # take no chances and rewrite it.
48351  # Note: m4 eats our [], so we need to use [ and ] instead.
48352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48353  if test "x$has_forbidden_chars" != x; then
48354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48358      # Going to short mode and back again did indeed matter. Since short mode is
48359      # case insensitive, let's make it lowercase to improve readability.
48360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48361      # Now convert it back to Unix-style (cygpath)
48362      input_path=`$CYGPATH -u "$shortmode_path"`
48363      new_path="$input_path"
48364    fi
48365  fi
48366
48367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48368  if test "x$test_cygdrive_prefix" = x; then
48369    # As a simple fix, exclude /usr/bin since it's not a real path.
48370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48372      # a path prefixed by /cygdrive for fixpath to work.
48373      new_path="$CYGWIN_ROOT_PATH$input_path"
48374    fi
48375  fi
48376
48377
48378  if test "x$path" != "x$new_path"; then
48379    FREETYPE_INCLUDE_PATH="$new_path"
48380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48381$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48382  fi
48383
48384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48385
48386  path="$FREETYPE_INCLUDE_PATH"
48387  has_colon=`$ECHO $path | $GREP ^.:`
48388  new_path="$path"
48389  if test "x$has_colon" = x; then
48390    # Not in mixed or Windows style, start by that.
48391    new_path=`cmd //c echo $path`
48392  fi
48393
48394
48395  input_path="$new_path"
48396  # Check if we need to convert this using DOS-style short mode. If the path
48397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48398  # take no chances and rewrite it.
48399  # Note: m4 eats our [], so we need to use [ and ] instead.
48400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48401  if test "x$has_forbidden_chars" != x; then
48402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48404  fi
48405
48406
48407  windows_path="$new_path"
48408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48409    unix_path=`$CYGPATH -u "$windows_path"`
48410    new_path="$unix_path"
48411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48413    new_path="$unix_path"
48414  fi
48415
48416  if test "x$path" != "x$new_path"; then
48417    FREETYPE_INCLUDE_PATH="$new_path"
48418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48419$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48420  fi
48421
48422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48424
48425    else
48426      # We're on a unix platform. Hooray! :)
48427      path="$FREETYPE_INCLUDE_PATH"
48428      has_space=`$ECHO "$path" | $GREP " "`
48429      if test "x$has_space" != x; then
48430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48431$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48433      fi
48434
48435      # Use eval to expand a potential ~
48436      eval path="$path"
48437      if test ! -f "$path" && test ! -d "$path"; then
48438        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48439      fi
48440
48441      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48442    fi
48443  fi
48444
48445      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48446        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48447      else
48448        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48449      fi
48450    fi
48451
48452    if test "x$FREETYPE_LIBS" = x; then
48453
48454  # Only process if variable expands to non-empty
48455
48456  if test "x$FREETYPE_LIB_PATH" != x; then
48457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48458
48459  # Input might be given as Windows format, start by converting to
48460  # unix format.
48461  path="$FREETYPE_LIB_PATH"
48462  new_path=`$CYGPATH -u "$path"`
48463
48464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48467  # "foo.exe" is OK but "foo" is an error.
48468  #
48469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48470  # It is also a way to make sure we got the proper file name for the real test later on.
48471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48472  if test "x$test_shortpath" = x; then
48473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48474$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48475    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48476  fi
48477
48478  # Call helper function which possibly converts this using DOS-style short mode.
48479  # If so, the updated path is stored in $new_path.
48480
48481  input_path="$new_path"
48482  # Check if we need to convert this using DOS-style short mode. If the path
48483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48484  # take no chances and rewrite it.
48485  # Note: m4 eats our [], so we need to use [ and ] instead.
48486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48487  if test "x$has_forbidden_chars" != x; then
48488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48492      # Going to short mode and back again did indeed matter. Since short mode is
48493      # case insensitive, let's make it lowercase to improve readability.
48494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48495      # Now convert it back to Unix-style (cygpath)
48496      input_path=`$CYGPATH -u "$shortmode_path"`
48497      new_path="$input_path"
48498    fi
48499  fi
48500
48501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48502  if test "x$test_cygdrive_prefix" = x; then
48503    # As a simple fix, exclude /usr/bin since it's not a real path.
48504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48506      # a path prefixed by /cygdrive for fixpath to work.
48507      new_path="$CYGWIN_ROOT_PATH$input_path"
48508    fi
48509  fi
48510
48511
48512  if test "x$path" != "x$new_path"; then
48513    FREETYPE_LIB_PATH="$new_path"
48514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48515$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48516  fi
48517
48518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48519
48520  path="$FREETYPE_LIB_PATH"
48521  has_colon=`$ECHO $path | $GREP ^.:`
48522  new_path="$path"
48523  if test "x$has_colon" = x; then
48524    # Not in mixed or Windows style, start by that.
48525    new_path=`cmd //c echo $path`
48526  fi
48527
48528
48529  input_path="$new_path"
48530  # Check if we need to convert this using DOS-style short mode. If the path
48531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48532  # take no chances and rewrite it.
48533  # Note: m4 eats our [], so we need to use [ and ] instead.
48534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48535  if test "x$has_forbidden_chars" != x; then
48536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48538  fi
48539
48540
48541  windows_path="$new_path"
48542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48543    unix_path=`$CYGPATH -u "$windows_path"`
48544    new_path="$unix_path"
48545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48547    new_path="$unix_path"
48548  fi
48549
48550  if test "x$path" != "x$new_path"; then
48551    FREETYPE_LIB_PATH="$new_path"
48552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48553$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48554  fi
48555
48556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48558
48559    else
48560      # We're on a unix platform. Hooray! :)
48561      path="$FREETYPE_LIB_PATH"
48562      has_space=`$ECHO "$path" | $GREP " "`
48563      if test "x$has_space" != x; then
48564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48565$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48567      fi
48568
48569      # Use eval to expand a potential ~
48570      eval path="$path"
48571      if test ! -f "$path" && test ! -d "$path"; then
48572        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48573      fi
48574
48575      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48576    fi
48577  fi
48578
48579      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48580        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48581      else
48582        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48583      fi
48584    fi
48585
48586    # Try to compile it
48587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48588$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48589    ac_ext=cpp
48590ac_cpp='$CXXCPP $CPPFLAGS'
48591ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48592ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48593ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48594
48595    PREV_CXXCFLAGS="$CXXFLAGS"
48596    PREV_LIBS="$LIBS"
48597    PREV_CXX="$CXX"
48598    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48599    LIBS="$LIBS $FREETYPE_LIBS"
48600    CXX="$FIXPATH $CXX"
48601    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48602/* end confdefs.h.  */
48603
48604          #include<ft2build.h>
48605          #include FT_FREETYPE_H
48606          int main () {
48607            FT_Init_FreeType(NULL);
48608            return 0;
48609          }
48610
48611_ACEOF
48612if ac_fn_cxx_try_link "$LINENO"; then :
48613
48614          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48615$as_echo "yes" >&6; }
48616
48617else
48618
48619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48620$as_echo "no" >&6; }
48621          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48622$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48623          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48624$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48625
48626
48627  # Print a helpful message on how to acquire the necessary build dependency.
48628  # freetype is the help tag: freetype, cups, pulse, alsa etc
48629  MISSING_DEPENDENCY=freetype
48630
48631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48632    cygwin_help $MISSING_DEPENDENCY
48633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48634    msys_help $MISSING_DEPENDENCY
48635  else
48636    PKGHANDLER_COMMAND=
48637
48638    case $PKGHANDLER in
48639      apt-get)
48640        apt_help     $MISSING_DEPENDENCY ;;
48641      yum)
48642        yum_help     $MISSING_DEPENDENCY ;;
48643      port)
48644        port_help    $MISSING_DEPENDENCY ;;
48645      pkgutil)
48646        pkgutil_help $MISSING_DEPENDENCY ;;
48647      pkgadd)
48648        pkgadd_help  $MISSING_DEPENDENCY ;;
48649    esac
48650
48651    if test "x$PKGHANDLER_COMMAND" != x; then
48652      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48653    fi
48654  fi
48655
48656
48657          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48658
48659
48660fi
48661rm -f core conftest.err conftest.$ac_objext \
48662    conftest$ac_exeext conftest.$ac_ext
48663    CXXCFLAGS="$PREV_CXXFLAGS"
48664    LIBS="$PREV_LIBS"
48665    CXX="$PREV_CXX"
48666    ac_ext=cpp
48667ac_cpp='$CXXCPP $CPPFLAGS'
48668ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48669ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48670ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48671
48672
48673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48674$as_echo_n "checking if we should bundle freetype... " >&6; }
48675    if test "x$BUNDLE_FREETYPE" = xyes; then
48676      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48677    fi
48678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48679$as_echo "$BUNDLE_FREETYPE" >&6; }
48680
48681  fi # end freetype needed
48682
48683
48684
48685
48686
48687
48688
48689  ###############################################################################
48690  #
48691  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48692  #
48693
48694# Check whether --with-alsa was given.
48695if test "${with_alsa+set}" = set; then :
48696  withval=$with_alsa;
48697fi
48698
48699
48700# Check whether --with-alsa-include was given.
48701if test "${with_alsa_include+set}" = set; then :
48702  withval=$with_alsa_include;
48703fi
48704
48705
48706# Check whether --with-alsa-lib was given.
48707if test "${with_alsa_lib+set}" = set; then :
48708  withval=$with_alsa_lib;
48709fi
48710
48711
48712  if test "x$ALSA_NOT_NEEDED" = xyes; then
48713    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48714      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48715$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48716    fi
48717    ALSA_CFLAGS=
48718    ALSA_LIBS=
48719  else
48720    ALSA_FOUND=no
48721
48722    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48723      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48724    fi
48725
48726    if test "x${with_alsa}" != x; then
48727      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48728      ALSA_CFLAGS="-I${with_alsa}/include"
48729      ALSA_FOUND=yes
48730    fi
48731    if test "x${with_alsa_include}" != x; then
48732      ALSA_CFLAGS="-I${with_alsa_include}"
48733      ALSA_FOUND=yes
48734    fi
48735    if test "x${with_alsa_lib}" != x; then
48736      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48737      ALSA_FOUND=yes
48738    fi
48739    if test "x$ALSA_FOUND" = xno; then
48740
48741
48742  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48743    # Source the builddeps file again, to make sure it uses the latest variables!
48744    . $builddepsfile
48745    # Look for a target and build machine specific resource!
48746    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48747    if test "x$resource" = x; then
48748      # Ok, lets instead look for a target specific resource
48749      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48750    fi
48751    if test "x$resource" = x; then
48752      # Ok, lets instead look for a build specific resource
48753      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48754    fi
48755    if test "x$resource" = x; then
48756      # Ok, lets instead look for a generic resource
48757      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48758      resource=${builddep_alsa}
48759    fi
48760    if test "x$resource" != x; then
48761      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48762$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48763      # If the resource in the builddeps.conf file is an existing directory,
48764      # for example /java/linux/cups
48765      if test -d ${resource}; then
48766        depdir=${resource}
48767      else
48768
48769  # alsa is for example mymodule
48770  # $resource is for example libs/general/libmymod_1_2_3.zip
48771  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48772  # $with_builddeps_dir is for example /localhome/builddeps
48773  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48774  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48775  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48776  filename=`basename $resource`
48777  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48778  filebase=${filename%%.*}
48779  extension=${filename#*.}
48780  installdir=$with_builddeps_dir/$filebase
48781  if test ! -f $installdir/$filename.unpacked; then
48782    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48783$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48784    if test ! -d $installdir; then
48785      mkdir -p $installdir
48786    fi
48787    if test ! -d $installdir; then
48788      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48789    fi
48790    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48791    touch $tmpfile
48792    if test ! -f $tmpfile; then
48793      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48794    fi
48795
48796  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48797  # $tmpfile is the local file name for the downloaded file.
48798  VALID_TOOL=no
48799  if test "x$BDEPS_FTP" = xwget; then
48800    VALID_TOOL=yes
48801    wget -O $tmpfile $with_builddeps_server/$resource
48802  fi
48803  if test "x$BDEPS_FTP" = xlftp; then
48804    VALID_TOOL=yes
48805    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48806  fi
48807  if test "x$BDEPS_FTP" = xftp; then
48808    VALID_TOOL=yes
48809    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48810    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48811    FTPUSERPWD=${FTPSERVER%%@*}
48812    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48813      FTPUSER=${userpwd%%:*}
48814      FTPPWD=${userpwd#*@}
48815      FTPSERVER=${FTPSERVER#*@}
48816    else
48817      FTPUSER=ftp
48818      FTPPWD=ftp
48819    fi
48820    # the "pass" command does not work on some
48821    # ftp clients (read ftp.exe) but if it works,
48822    # passive mode is better!
48823    ( \
48824        echo "user $FTPUSER $FTPPWD"        ; \
48825        echo "pass"                         ; \
48826        echo "bin"                          ; \
48827        echo "get $FTPPATH $tmpfile"              ; \
48828    ) | ftp -in $FTPSERVER
48829  fi
48830  if test "x$VALID_TOOL" != xyes; then
48831    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48832  fi
48833
48834    mv $tmpfile $installdir/$filename
48835    if test ! -s $installdir/$filename; then
48836      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48837    fi
48838    case "$extension" in
48839      zip)  echo "Unzipping $installdir/$filename..."
48840        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48841        ;;
48842      tar.gz) echo "Untaring $installdir/$filename..."
48843        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48844        ;;
48845      tgz) echo "Untaring $installdir/$filename..."
48846        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48847        ;;
48848      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48849        ;;
48850    esac
48851  fi
48852  if test -f $installdir/$filename.unpacked; then
48853    depdir=$installdir
48854  fi
48855
48856      fi
48857      # Source the builddeps file again, because in the previous command, the depdir
48858      # was updated to point at the current build dependency install directory.
48859      . $builddepsfile
48860      # Now extract variables from the builddeps.conf files.
48861      theroot=${builddep_alsa_ROOT}
48862      thecflags=${builddep_alsa_CFLAGS}
48863      thelibs=${builddep_alsa_LIBS}
48864      if test "x$depdir" = x; then
48865        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48866      fi
48867      ALSA=$depdir
48868      if test "x$theroot" != x; then
48869        ALSA="$theroot"
48870      fi
48871      if test "x$thecflags" != x; then
48872        ALSA_CFLAGS="$thecflags"
48873      fi
48874      if test "x$thelibs" != x; then
48875        ALSA_LIBS="$thelibs"
48876      fi
48877      ALSA_FOUND=yes
48878      else ALSA_FOUND=no
48879
48880    fi
48881    else ALSA_FOUND=no
48882
48883  fi
48884
48885    fi
48886    # Do not try pkg-config if we have a sysroot set.
48887    if test "x$SYSROOT" = x; then
48888      if test "x$ALSA_FOUND" = xno; then
48889
48890pkg_failed=no
48891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48892$as_echo_n "checking for ALSA... " >&6; }
48893
48894if test -n "$ALSA_CFLAGS"; then
48895    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48896 elif test -n "$PKG_CONFIG"; then
48897    if test -n "$PKG_CONFIG" && \
48898    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48899  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48900  ac_status=$?
48901  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48902  test $ac_status = 0; }; then
48903  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48904else
48905  pkg_failed=yes
48906fi
48907 else
48908    pkg_failed=untried
48909fi
48910if test -n "$ALSA_LIBS"; then
48911    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48912 elif test -n "$PKG_CONFIG"; then
48913    if test -n "$PKG_CONFIG" && \
48914    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48915  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48916  ac_status=$?
48917  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48918  test $ac_status = 0; }; then
48919  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48920else
48921  pkg_failed=yes
48922fi
48923 else
48924    pkg_failed=untried
48925fi
48926
48927
48928
48929if test $pkg_failed = yes; then
48930
48931if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48932        _pkg_short_errors_supported=yes
48933else
48934        _pkg_short_errors_supported=no
48935fi
48936        if test $_pkg_short_errors_supported = yes; then
48937	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48938        else
48939	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48940        fi
48941	# Put the nasty error message in config.log where it belongs
48942	echo "$ALSA_PKG_ERRORS" >&5
48943
48944	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48945$as_echo "no" >&6; }
48946                ALSA_FOUND=no
48947elif test $pkg_failed = untried; then
48948	ALSA_FOUND=no
48949else
48950	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48951	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48953$as_echo "yes" >&6; }
48954	ALSA_FOUND=yes
48955fi
48956      fi
48957    fi
48958    if test "x$ALSA_FOUND" = xno; then
48959      for ac_header in alsa/asoundlib.h
48960do :
48961  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48962if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48963  cat >>confdefs.h <<_ACEOF
48964#define HAVE_ALSA_ASOUNDLIB_H 1
48965_ACEOF
48966
48967            ALSA_FOUND=yes
48968            ALSA_CFLAGS=-Iignoreme
48969            ALSA_LIBS=-lasound
48970            DEFAULT_ALSA=yes
48971
48972else
48973  ALSA_FOUND=no
48974fi
48975
48976done
48977
48978    fi
48979    if test "x$ALSA_FOUND" = xno; then
48980
48981  # Print a helpful message on how to acquire the necessary build dependency.
48982  # alsa is the help tag: freetype, cups, pulse, alsa etc
48983  MISSING_DEPENDENCY=alsa
48984
48985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48986    cygwin_help $MISSING_DEPENDENCY
48987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48988    msys_help $MISSING_DEPENDENCY
48989  else
48990    PKGHANDLER_COMMAND=
48991
48992    case $PKGHANDLER in
48993      apt-get)
48994        apt_help     $MISSING_DEPENDENCY ;;
48995      yum)
48996        yum_help     $MISSING_DEPENDENCY ;;
48997      port)
48998        port_help    $MISSING_DEPENDENCY ;;
48999      pkgutil)
49000        pkgutil_help $MISSING_DEPENDENCY ;;
49001      pkgadd)
49002        pkgadd_help  $MISSING_DEPENDENCY ;;
49003    esac
49004
49005    if test "x$PKGHANDLER_COMMAND" != x; then
49006      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49007    fi
49008  fi
49009
49010      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49011    fi
49012  fi
49013
49014
49015
49016
49017
49018
49019  ###############################################################################
49020  #
49021  # Check for the jpeg library
49022  #
49023
49024
49025# Check whether --with-libjpeg was given.
49026if test "${with_libjpeg+set}" = set; then :
49027  withval=$with_libjpeg;
49028fi
49029
49030
49031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49032$as_echo_n "checking for which libjpeg to use... " >&6; }
49033
49034  # default is bundled
49035  DEFAULT_LIBJPEG=bundled
49036
49037  #
49038  # if user didn't specify, use DEFAULT_LIBJPEG
49039  #
49040  if test "x${with_libjpeg}" = "x"; then
49041    with_libjpeg=${DEFAULT_LIBJPEG}
49042  fi
49043
49044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49045$as_echo "${with_libjpeg}" >&6; }
49046
49047  if test "x${with_libjpeg}" = "xbundled"; then
49048    USE_EXTERNAL_LIBJPEG=false
49049  elif test "x${with_libjpeg}" = "xsystem"; then
49050    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49051if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49052
49053else
49054   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49055fi
49056
49057
49058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49059$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49060if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49061  $as_echo_n "(cached) " >&6
49062else
49063  ac_check_lib_save_LIBS=$LIBS
49064LIBS="-ljpeg  $LIBS"
49065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49066/* end confdefs.h.  */
49067
49068/* Override any GCC internal prototype to avoid an error.
49069   Use char because int might match the return type of a GCC
49070   builtin and then its argument prototype would still apply.  */
49071#ifdef __cplusplus
49072extern "C"
49073#endif
49074char jpeg_CreateDecompress ();
49075int
49076main ()
49077{
49078return jpeg_CreateDecompress ();
49079  ;
49080  return 0;
49081}
49082_ACEOF
49083if ac_fn_cxx_try_link "$LINENO"; then :
49084  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49085else
49086  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49087fi
49088rm -f core conftest.err conftest.$ac_objext \
49089    conftest$ac_exeext conftest.$ac_ext
49090LIBS=$ac_check_lib_save_LIBS
49091fi
49092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49093$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49094if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49095  cat >>confdefs.h <<_ACEOF
49096#define HAVE_LIBJPEG 1
49097_ACEOF
49098
49099  LIBS="-ljpeg $LIBS"
49100
49101else
49102   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49103fi
49104
49105
49106    USE_EXTERNAL_LIBJPEG=true
49107  else
49108    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49109  fi
49110
49111
49112
49113  ###############################################################################
49114  #
49115  # Check for the gif library
49116  #
49117
49118
49119# Check whether --with-giflib was given.
49120if test "${with_giflib+set}" = set; then :
49121  withval=$with_giflib;
49122fi
49123
49124
49125
49126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49127$as_echo_n "checking for which giflib to use... " >&6; }
49128
49129  # default is bundled
49130  DEFAULT_GIFLIB=bundled
49131
49132  #
49133  # if user didn't specify, use DEFAULT_GIFLIB
49134  #
49135  if test "x${with_giflib}" = "x"; then
49136    with_giflib=${DEFAULT_GIFLIB}
49137  fi
49138
49139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49140$as_echo "${with_giflib}" >&6; }
49141
49142  if test "x${with_giflib}" = "xbundled"; then
49143    USE_EXTERNAL_LIBGIF=false
49144  elif test "x${with_giflib}" = "xsystem"; then
49145    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49146if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49147
49148else
49149   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49150fi
49151
49152
49153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49154$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49155if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49156  $as_echo_n "(cached) " >&6
49157else
49158  ac_check_lib_save_LIBS=$LIBS
49159LIBS="-lgif  $LIBS"
49160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49161/* end confdefs.h.  */
49162
49163/* Override any GCC internal prototype to avoid an error.
49164   Use char because int might match the return type of a GCC
49165   builtin and then its argument prototype would still apply.  */
49166#ifdef __cplusplus
49167extern "C"
49168#endif
49169char DGifGetCode ();
49170int
49171main ()
49172{
49173return DGifGetCode ();
49174  ;
49175  return 0;
49176}
49177_ACEOF
49178if ac_fn_cxx_try_link "$LINENO"; then :
49179  ac_cv_lib_gif_DGifGetCode=yes
49180else
49181  ac_cv_lib_gif_DGifGetCode=no
49182fi
49183rm -f core conftest.err conftest.$ac_objext \
49184    conftest$ac_exeext conftest.$ac_ext
49185LIBS=$ac_check_lib_save_LIBS
49186fi
49187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49188$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49189if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49190  cat >>confdefs.h <<_ACEOF
49191#define HAVE_LIBGIF 1
49192_ACEOF
49193
49194  LIBS="-lgif $LIBS"
49195
49196else
49197   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49198fi
49199
49200
49201    USE_EXTERNAL_LIBGIF=true
49202  else
49203    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49204  fi
49205
49206
49207  ###############################################################################
49208  #
49209  # Check for the lcms2 library
49210  #
49211
49212
49213# Check whether --with-lcms was given.
49214if test "${with_lcms+set}" = set; then :
49215  withval=$with_lcms;
49216fi
49217
49218
49219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49220$as_echo_n "checking for which lcms to use... " >&6; }
49221
49222  DEFAULT_LCMS=bundled
49223
49224  #
49225  # If user didn't specify, use DEFAULT_LCMS
49226  #
49227  if test "x${with_lcms}" = "x"; then
49228      with_lcms=${DEFAULT_LCMS}
49229  fi
49230
49231  if test "x${with_lcms}" = "xbundled"; then
49232    USE_EXTERNAL_LCMS=false
49233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49234$as_echo "bundled" >&6; }
49235  elif test "x${with_lcms}" = "xsystem"; then
49236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49237$as_echo "system" >&6; }
49238
49239pkg_failed=no
49240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49241$as_echo_n "checking for LCMS... " >&6; }
49242
49243if test -n "$LCMS_CFLAGS"; then
49244    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49245 elif test -n "$PKG_CONFIG"; then
49246    if test -n "$PKG_CONFIG" && \
49247    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49248  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49249  ac_status=$?
49250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49251  test $ac_status = 0; }; then
49252  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49253else
49254  pkg_failed=yes
49255fi
49256 else
49257    pkg_failed=untried
49258fi
49259if test -n "$LCMS_LIBS"; then
49260    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49261 elif test -n "$PKG_CONFIG"; then
49262    if test -n "$PKG_CONFIG" && \
49263    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49264  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49265  ac_status=$?
49266  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49267  test $ac_status = 0; }; then
49268  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49269else
49270  pkg_failed=yes
49271fi
49272 else
49273    pkg_failed=untried
49274fi
49275
49276
49277
49278if test $pkg_failed = yes; then
49279
49280if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49281        _pkg_short_errors_supported=yes
49282else
49283        _pkg_short_errors_supported=no
49284fi
49285        if test $_pkg_short_errors_supported = yes; then
49286	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49287        else
49288	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49289        fi
49290	# Put the nasty error message in config.log where it belongs
49291	echo "$LCMS_PKG_ERRORS" >&5
49292
49293	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49294$as_echo "no" >&6; }
49295                LCMS_FOUND=no
49296elif test $pkg_failed = untried; then
49297	LCMS_FOUND=no
49298else
49299	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49300	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49302$as_echo "yes" >&6; }
49303	LCMS_FOUND=yes
49304fi
49305    if test "x${LCMS_FOUND}" = "xyes"; then
49306      USE_EXTERNAL_LCMS=true
49307    else
49308      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49309    fi
49310  else
49311    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49312  fi
49313
49314
49315
49316  ###############################################################################
49317  #
49318  # Check for the png library
49319  #
49320
49321
49322# Check whether --with-libpng was given.
49323if test "${with_libpng+set}" = set; then :
49324  withval=$with_libpng;
49325fi
49326
49327
49328
49329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49330$as_echo_n "checking for which libpng to use... " >&6; }
49331
49332  # default is bundled
49333  DEFAULT_LIBPNG=bundled
49334
49335  #
49336  # if user didn't specify, use DEFAULT_LIBPNG
49337  #
49338  if test "x${with_libpng}" = "x"; then
49339      with_libpng=${DEFAULT_LIBPNG}
49340  fi
49341
49342  if test "x${with_libpng}" = "xbundled"; then
49343      USE_EXTERNAL_LIBPNG=false
49344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49345$as_echo "bundled" >&6; }
49346  elif test "x${with_libpng}" = "xsystem"; then
49347
49348pkg_failed=no
49349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49350$as_echo_n "checking for PNG... " >&6; }
49351
49352if test -n "$PNG_CFLAGS"; then
49353    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49354 elif test -n "$PKG_CONFIG"; then
49355    if test -n "$PKG_CONFIG" && \
49356    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49357  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49358  ac_status=$?
49359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49360  test $ac_status = 0; }; then
49361  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49362else
49363  pkg_failed=yes
49364fi
49365 else
49366    pkg_failed=untried
49367fi
49368if test -n "$PNG_LIBS"; then
49369    pkg_cv_PNG_LIBS="$PNG_LIBS"
49370 elif test -n "$PKG_CONFIG"; then
49371    if test -n "$PKG_CONFIG" && \
49372    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49373  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49374  ac_status=$?
49375  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49376  test $ac_status = 0; }; then
49377  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49378else
49379  pkg_failed=yes
49380fi
49381 else
49382    pkg_failed=untried
49383fi
49384
49385
49386
49387if test $pkg_failed = yes; then
49388
49389if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49390        _pkg_short_errors_supported=yes
49391else
49392        _pkg_short_errors_supported=no
49393fi
49394        if test $_pkg_short_errors_supported = yes; then
49395	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49396        else
49397	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49398        fi
49399	# Put the nasty error message in config.log where it belongs
49400	echo "$PNG_PKG_ERRORS" >&5
49401
49402	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49403$as_echo "no" >&6; }
49404                 LIBPNG_FOUND=no
49405elif test $pkg_failed = untried; then
49406	 LIBPNG_FOUND=no
49407else
49408	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49409	PNG_LIBS=$pkg_cv_PNG_LIBS
49410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49411$as_echo "yes" >&6; }
49412	 LIBPNG_FOUND=yes
49413fi
49414      if test "x${LIBPNG_FOUND}" = "xyes"; then
49415          USE_EXTERNAL_LIBPNG=true
49416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49417$as_echo "system" >&6; }
49418      else
49419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49420$as_echo "system not found" >&6; }
49421          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49422      fi
49423  else
49424      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49425  fi
49426
49427
49428  ###############################################################################
49429  #
49430  # Check for the zlib library
49431  #
49432
49433
49434# Check whether --with-zlib was given.
49435if test "${with_zlib+set}" = set; then :
49436  withval=$with_zlib;
49437fi
49438
49439
49440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49441$as_echo_n "checking for compress in -lz... " >&6; }
49442if ${ac_cv_lib_z_compress+:} false; then :
49443  $as_echo_n "(cached) " >&6
49444else
49445  ac_check_lib_save_LIBS=$LIBS
49446LIBS="-lz  $LIBS"
49447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49448/* end confdefs.h.  */
49449
49450/* Override any GCC internal prototype to avoid an error.
49451   Use char because int might match the return type of a GCC
49452   builtin and then its argument prototype would still apply.  */
49453#ifdef __cplusplus
49454extern "C"
49455#endif
49456char compress ();
49457int
49458main ()
49459{
49460return compress ();
49461  ;
49462  return 0;
49463}
49464_ACEOF
49465if ac_fn_cxx_try_link "$LINENO"; then :
49466  ac_cv_lib_z_compress=yes
49467else
49468  ac_cv_lib_z_compress=no
49469fi
49470rm -f core conftest.err conftest.$ac_objext \
49471    conftest$ac_exeext conftest.$ac_ext
49472LIBS=$ac_check_lib_save_LIBS
49473fi
49474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49475$as_echo "$ac_cv_lib_z_compress" >&6; }
49476if test "x$ac_cv_lib_z_compress" = xyes; then :
49477   ZLIB_FOUND=yes
49478else
49479   ZLIB_FOUND=no
49480fi
49481
49482
49483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49484$as_echo_n "checking for which zlib to use... " >&6; }
49485
49486  DEFAULT_ZLIB=bundled
49487  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49488    #
49489    # On macosx default is system...on others default is
49490    #
49491    DEFAULT_ZLIB=system
49492  fi
49493
49494  if test "x${ZLIB_FOUND}" != "xyes"; then
49495    #
49496    # If we don't find any system...set default to bundled
49497    #
49498    DEFAULT_ZLIB=bundled
49499  fi
49500
49501  #
49502  # If user didn't specify, use DEFAULT_ZLIB
49503  #
49504  if test "x${with_zlib}" = "x"; then
49505    with_zlib=${DEFAULT_ZLIB}
49506  fi
49507
49508  if test "x${with_zlib}" = "xbundled"; then
49509    USE_EXTERNAL_LIBZ=false
49510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49511$as_echo "bundled" >&6; }
49512  elif test "x${with_zlib}" = "xsystem"; then
49513    if test "x${ZLIB_FOUND}" = "xyes"; then
49514      USE_EXTERNAL_LIBZ=true
49515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49516$as_echo "system" >&6; }
49517    else
49518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49519$as_echo "system not found" >&6; }
49520      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49521    fi
49522  else
49523    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49524  fi
49525
49526
49527
49528  ###############################################################################
49529  LIBZIP_CAN_USE_MMAP=true
49530
49531
49532
49533  ###############################################################################
49534  #
49535  # Check if altzone exists in time.h
49536  #
49537
49538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49539/* end confdefs.h.  */
49540#include <time.h>
49541int
49542main ()
49543{
49544return (int)altzone;
49545  ;
49546  return 0;
49547}
49548_ACEOF
49549if ac_fn_cxx_try_link "$LINENO"; then :
49550  has_altzone=yes
49551else
49552  has_altzone=no
49553fi
49554rm -f core conftest.err conftest.$ac_objext \
49555    conftest$ac_exeext conftest.$ac_ext
49556  if test "x$has_altzone" = xyes; then
49557
49558$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49559
49560  fi
49561
49562  ###############################################################################
49563  #
49564  # Check the maths library
49565  #
49566
49567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49568$as_echo_n "checking for cos in -lm... " >&6; }
49569if ${ac_cv_lib_m_cos+:} false; then :
49570  $as_echo_n "(cached) " >&6
49571else
49572  ac_check_lib_save_LIBS=$LIBS
49573LIBS="-lm  $LIBS"
49574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49575/* end confdefs.h.  */
49576
49577/* Override any GCC internal prototype to avoid an error.
49578   Use char because int might match the return type of a GCC
49579   builtin and then its argument prototype would still apply.  */
49580#ifdef __cplusplus
49581extern "C"
49582#endif
49583char cos ();
49584int
49585main ()
49586{
49587return cos ();
49588  ;
49589  return 0;
49590}
49591_ACEOF
49592if ac_fn_cxx_try_link "$LINENO"; then :
49593  ac_cv_lib_m_cos=yes
49594else
49595  ac_cv_lib_m_cos=no
49596fi
49597rm -f core conftest.err conftest.$ac_objext \
49598    conftest$ac_exeext conftest.$ac_ext
49599LIBS=$ac_check_lib_save_LIBS
49600fi
49601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49602$as_echo "$ac_cv_lib_m_cos" >&6; }
49603if test "x$ac_cv_lib_m_cos" = xyes; then :
49604  cat >>confdefs.h <<_ACEOF
49605#define HAVE_LIBM 1
49606_ACEOF
49607
49608  LIBS="-lm $LIBS"
49609
49610else
49611
49612        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49613$as_echo "$as_me: Maths library was not found" >&6;}
49614
49615
49616fi
49617
49618
49619
49620  ###############################################################################
49621  #
49622  # Check for libdl.so
49623
49624  save_LIBS="$LIBS"
49625  LIBS=""
49626  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49627$as_echo_n "checking for dlopen in -ldl... " >&6; }
49628if ${ac_cv_lib_dl_dlopen+:} false; then :
49629  $as_echo_n "(cached) " >&6
49630else
49631  ac_check_lib_save_LIBS=$LIBS
49632LIBS="-ldl  $LIBS"
49633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49634/* end confdefs.h.  */
49635
49636/* Override any GCC internal prototype to avoid an error.
49637   Use char because int might match the return type of a GCC
49638   builtin and then its argument prototype would still apply.  */
49639#ifdef __cplusplus
49640extern "C"
49641#endif
49642char dlopen ();
49643int
49644main ()
49645{
49646return dlopen ();
49647  ;
49648  return 0;
49649}
49650_ACEOF
49651if ac_fn_cxx_try_link "$LINENO"; then :
49652  ac_cv_lib_dl_dlopen=yes
49653else
49654  ac_cv_lib_dl_dlopen=no
49655fi
49656rm -f core conftest.err conftest.$ac_objext \
49657    conftest$ac_exeext conftest.$ac_ext
49658LIBS=$ac_check_lib_save_LIBS
49659fi
49660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49661$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49662if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49663  cat >>confdefs.h <<_ACEOF
49664#define HAVE_LIBDL 1
49665_ACEOF
49666
49667  LIBS="-ldl $LIBS"
49668
49669fi
49670
49671  LIBDL="$LIBS"
49672
49673  LIBS="$save_LIBS"
49674
49675
49676  ###############################################################################
49677  #
49678  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49679  # dynamic build is configured on command line.
49680  #
49681
49682# Check whether --with-stdc++lib was given.
49683if test "${with_stdc__lib+set}" = set; then :
49684  withval=$with_stdc__lib;
49685        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49686                && test "x$with_stdc__lib" != xdefault; then
49687          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49688        fi
49689
49690else
49691  with_stdc__lib=default
49692
49693fi
49694
49695
49696  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49697    # Test if -lstdc++ works.
49698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49699$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49700    ac_ext=cpp
49701ac_cpp='$CXXCPP $CPPFLAGS'
49702ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49703ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49704ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49705
49706    OLD_CXXFLAGS="$CXXFLAGS"
49707    CXXFLAGS="$CXXFLAGS -lstdc++"
49708    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49709/* end confdefs.h.  */
49710
49711int
49712main ()
49713{
49714return 0;
49715  ;
49716  return 0;
49717}
49718_ACEOF
49719if ac_fn_cxx_try_link "$LINENO"; then :
49720  has_dynamic_libstdcxx=yes
49721else
49722  has_dynamic_libstdcxx=no
49723fi
49724rm -f core conftest.err conftest.$ac_objext \
49725    conftest$ac_exeext conftest.$ac_ext
49726    CXXFLAGS="$OLD_CXXFLAGS"
49727    ac_ext=cpp
49728ac_cpp='$CXXCPP $CPPFLAGS'
49729ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49730ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49731ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49732
49733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49734$as_echo "$has_dynamic_libstdcxx" >&6; }
49735
49736    # Test if stdc++ can be linked statically.
49737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49738$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49739    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49740    ac_ext=cpp
49741ac_cpp='$CXXCPP $CPPFLAGS'
49742ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49743ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49744ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49745
49746    OLD_LIBS="$LIBS"
49747    OLD_CXX="$CXX"
49748    LIBS="$STATIC_STDCXX_FLAGS"
49749    CXX="$CC"
49750    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49751/* end confdefs.h.  */
49752
49753int
49754main ()
49755{
49756return 0;
49757  ;
49758  return 0;
49759}
49760_ACEOF
49761if ac_fn_cxx_try_link "$LINENO"; then :
49762  has_static_libstdcxx=yes
49763else
49764  has_static_libstdcxx=no
49765fi
49766rm -f core conftest.err conftest.$ac_objext \
49767    conftest$ac_exeext conftest.$ac_ext
49768    LIBS="$OLD_LIBS"
49769    CXX="$OLD_CXX"
49770    ac_ext=cpp
49771ac_cpp='$CXXCPP $CPPFLAGS'
49772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49775
49776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49777$as_echo "$has_static_libstdcxx" >&6; }
49778
49779    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49780      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49781    fi
49782
49783    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49784      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49785    fi
49786
49787    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49788      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49789    fi
49790
49791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49792$as_echo_n "checking how to link with libstdc++... " >&6; }
49793    # If dynamic was requested, it's available since it would fail above otherwise.
49794    # If dynamic wasn't requested, go with static unless it isn't available.
49795    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49796      LIBCXX="$LIBCXX -lstdc++"
49797      LDCXX="$CXX"
49798      STATIC_CXX_SETTING="STATIC_CXX=false"
49799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49800$as_echo "dynamic" >&6; }
49801    else
49802      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49803      LDCXX="$CC"
49804      STATIC_CXX_SETTING="STATIC_CXX=true"
49805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49806$as_echo "static" >&6; }
49807    fi
49808  fi
49809
49810
49811  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49812    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49813
49814pkg_failed=no
49815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49816$as_echo_n "checking for LIBFFI... " >&6; }
49817
49818if test -n "$LIBFFI_CFLAGS"; then
49819    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49820 elif test -n "$PKG_CONFIG"; then
49821    if test -n "$PKG_CONFIG" && \
49822    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49823  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49824  ac_status=$?
49825  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49826  test $ac_status = 0; }; then
49827  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49828else
49829  pkg_failed=yes
49830fi
49831 else
49832    pkg_failed=untried
49833fi
49834if test -n "$LIBFFI_LIBS"; then
49835    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49836 elif test -n "$PKG_CONFIG"; then
49837    if test -n "$PKG_CONFIG" && \
49838    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49839  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49840  ac_status=$?
49841  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49842  test $ac_status = 0; }; then
49843  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49844else
49845  pkg_failed=yes
49846fi
49847 else
49848    pkg_failed=untried
49849fi
49850
49851
49852
49853if test $pkg_failed = yes; then
49854
49855if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49856        _pkg_short_errors_supported=yes
49857else
49858        _pkg_short_errors_supported=no
49859fi
49860        if test $_pkg_short_errors_supported = yes; then
49861	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49862        else
49863	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49864        fi
49865	# Put the nasty error message in config.log where it belongs
49866	echo "$LIBFFI_PKG_ERRORS" >&5
49867
49868	as_fn_error $? "Package requirements (libffi) were not met:
49869
49870$LIBFFI_PKG_ERRORS
49871
49872Consider adjusting the PKG_CONFIG_PATH environment variable if you
49873installed software in a non-standard prefix.
49874
49875Alternatively, you may set the environment variables LIBFFI_CFLAGS
49876and LIBFFI_LIBS to avoid the need to call pkg-config.
49877See the pkg-config man page for more details.
49878" "$LINENO" 5
49879elif test $pkg_failed = untried; then
49880	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49882as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49883is in your PATH or set the PKG_CONFIG environment variable to the full
49884path to pkg-config.
49885
49886Alternatively, you may set the environment variables LIBFFI_CFLAGS
49887and LIBFFI_LIBS to avoid the need to call pkg-config.
49888See the pkg-config man page for more details.
49889
49890To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49891See \`config.log' for more details" "$LINENO" 5; }
49892else
49893	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49894	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49896$as_echo "yes" >&6; }
49897	:
49898fi
49899
49900  fi
49901
49902  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49903    # Extract the first word of "llvm-config", so it can be a program name with args.
49904set dummy llvm-config; ac_word=$2
49905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49906$as_echo_n "checking for $ac_word... " >&6; }
49907if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49908  $as_echo_n "(cached) " >&6
49909else
49910  if test -n "$LLVM_CONFIG"; then
49911  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49912else
49913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49914for as_dir in $PATH
49915do
49916  IFS=$as_save_IFS
49917  test -z "$as_dir" && as_dir=.
49918    for ac_exec_ext in '' $ac_executable_extensions; do
49919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49920    ac_cv_prog_LLVM_CONFIG="llvm-config"
49921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49922    break 2
49923  fi
49924done
49925  done
49926IFS=$as_save_IFS
49927
49928fi
49929fi
49930LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49931if test -n "$LLVM_CONFIG"; then
49932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49933$as_echo "$LLVM_CONFIG" >&6; }
49934else
49935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49936$as_echo "no" >&6; }
49937fi
49938
49939
49940
49941    if test "x$LLVM_CONFIG" != xllvm-config; then
49942      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49943    fi
49944
49945    llvm_components="jit mcjit engine nativecodegen native"
49946    unset LLVM_CFLAGS
49947    for flag in $("$LLVM_CONFIG" --cxxflags); do
49948      if echo "${flag}" | grep -q '^-[ID]'; then
49949        if test "${flag}" != "-D_DEBUG" ; then
49950          if test "${LLVM_CFLAGS}" != "" ; then
49951            LLVM_CFLAGS="${LLVM_CFLAGS} "
49952          fi
49953          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49954        fi
49955      fi
49956    done
49957    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49958    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49959
49960    unset LLVM_LDFLAGS
49961    for flag in $("${LLVM_CONFIG}" --ldflags); do
49962      if echo "${flag}" | grep -q '^-L'; then
49963        if test "${LLVM_LDFLAGS}" != ""; then
49964          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49965        fi
49966        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49967      fi
49968    done
49969
49970    unset LLVM_LIBS
49971    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49972      if echo "${flag}" | grep -q '^-l'; then
49973        if test "${LLVM_LIBS}" != ""; then
49974          LLVM_LIBS="${LLVM_LIBS} "
49975        fi
49976        LLVM_LIBS="${LLVM_LIBS}${flag}"
49977      fi
49978    done
49979
49980
49981
49982
49983  fi
49984
49985  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49986  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49987    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49988  fi
49989
49990  # TODO better (platform agnostic) test
49991  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49992    LIBCXX="-lstdc++"
49993  fi
49994
49995
49996
49997
49998  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49999
50000
50001# Check whether --with-msvcr-dll was given.
50002if test "${with_msvcr_dll+set}" = set; then :
50003  withval=$with_msvcr_dll;
50004fi
50005
50006
50007  if test "x$with_msvcr_dll" != x; then
50008    # If given explicitely by user, do not probe. If not present, fail directly.
50009
50010  DLL_NAME="$MSVCR_NAME"
50011  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50012  METHOD="--with-msvcr-dll"
50013  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50014    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50015$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50016
50017    # Need to check if the found msvcr is correct architecture
50018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50019$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50020    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50022      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50023      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50024      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50025        CORRECT_MSVCR_ARCH="PE32 executable"
50026      else
50027        CORRECT_MSVCR_ARCH="PE32+ executable"
50028      fi
50029    else
50030      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50031        CORRECT_MSVCR_ARCH=386
50032      else
50033        CORRECT_MSVCR_ARCH=x86-64
50034      fi
50035    fi
50036    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50038$as_echo "ok" >&6; }
50039      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50040
50041  # Only process if variable expands to non-empty
50042
50043  if test "x$MSVC_DLL" != x; then
50044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50045
50046  # Input might be given as Windows format, start by converting to
50047  # unix format.
50048  path="$MSVC_DLL"
50049  new_path=`$CYGPATH -u "$path"`
50050
50051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50054  # "foo.exe" is OK but "foo" is an error.
50055  #
50056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50057  # It is also a way to make sure we got the proper file name for the real test later on.
50058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50059  if test "x$test_shortpath" = x; then
50060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50061$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50062    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50063  fi
50064
50065  # Call helper function which possibly converts this using DOS-style short mode.
50066  # If so, the updated path is stored in $new_path.
50067
50068  input_path="$new_path"
50069  # Check if we need to convert this using DOS-style short mode. If the path
50070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50071  # take no chances and rewrite it.
50072  # Note: m4 eats our [], so we need to use [ and ] instead.
50073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50074  if test "x$has_forbidden_chars" != x; then
50075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50079      # Going to short mode and back again did indeed matter. Since short mode is
50080      # case insensitive, let's make it lowercase to improve readability.
50081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50082      # Now convert it back to Unix-style (cygpath)
50083      input_path=`$CYGPATH -u "$shortmode_path"`
50084      new_path="$input_path"
50085    fi
50086  fi
50087
50088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50089  if test "x$test_cygdrive_prefix" = x; then
50090    # As a simple fix, exclude /usr/bin since it's not a real path.
50091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50093      # a path prefixed by /cygdrive for fixpath to work.
50094      new_path="$CYGWIN_ROOT_PATH$input_path"
50095    fi
50096  fi
50097
50098
50099  if test "x$path" != "x$new_path"; then
50100    MSVC_DLL="$new_path"
50101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50102$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50103  fi
50104
50105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50106
50107  path="$MSVC_DLL"
50108  has_colon=`$ECHO $path | $GREP ^.:`
50109  new_path="$path"
50110  if test "x$has_colon" = x; then
50111    # Not in mixed or Windows style, start by that.
50112    new_path=`cmd //c echo $path`
50113  fi
50114
50115
50116  input_path="$new_path"
50117  # Check if we need to convert this using DOS-style short mode. If the path
50118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50119  # take no chances and rewrite it.
50120  # Note: m4 eats our [], so we need to use [ and ] instead.
50121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50122  if test "x$has_forbidden_chars" != x; then
50123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50125  fi
50126
50127
50128  windows_path="$new_path"
50129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50130    unix_path=`$CYGPATH -u "$windows_path"`
50131    new_path="$unix_path"
50132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50134    new_path="$unix_path"
50135  fi
50136
50137  if test "x$path" != "x$new_path"; then
50138    MSVC_DLL="$new_path"
50139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50140$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50141  fi
50142
50143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50145
50146    else
50147      # We're on a unix platform. Hooray! :)
50148      path="$MSVC_DLL"
50149      has_space=`$ECHO "$path" | $GREP " "`
50150      if test "x$has_space" != x; then
50151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50152$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50154      fi
50155
50156      # Use eval to expand a potential ~
50157      eval path="$path"
50158      if test ! -f "$path" && test ! -d "$path"; then
50159        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50160      fi
50161
50162      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50163    fi
50164  fi
50165
50166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50167$as_echo_n "checking for $DLL_NAME... " >&6; }
50168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50169$as_echo "$MSVC_DLL" >&6; }
50170    else
50171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50172$as_echo "incorrect, ignoring" >&6; }
50173      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50174$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50175    fi
50176  fi
50177
50178    if test "x$MSVC_DLL" = x; then
50179      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50180    fi
50181    MSVCR_DLL="$MSVC_DLL"
50182  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50183
50184  DLL_NAME="$MSVCR_NAME"
50185  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50186  METHOD="devkit"
50187  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50189$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50190
50191    # Need to check if the found msvcr is correct architecture
50192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50193$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50194    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50196      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50197      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50198      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50199        CORRECT_MSVCR_ARCH="PE32 executable"
50200      else
50201        CORRECT_MSVCR_ARCH="PE32+ executable"
50202      fi
50203    else
50204      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50205        CORRECT_MSVCR_ARCH=386
50206      else
50207        CORRECT_MSVCR_ARCH=x86-64
50208      fi
50209    fi
50210    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50212$as_echo "ok" >&6; }
50213      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50214
50215  # Only process if variable expands to non-empty
50216
50217  if test "x$MSVC_DLL" != x; then
50218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50219
50220  # Input might be given as Windows format, start by converting to
50221  # unix format.
50222  path="$MSVC_DLL"
50223  new_path=`$CYGPATH -u "$path"`
50224
50225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50228  # "foo.exe" is OK but "foo" is an error.
50229  #
50230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50231  # It is also a way to make sure we got the proper file name for the real test later on.
50232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50233  if test "x$test_shortpath" = x; then
50234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50235$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50236    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50237  fi
50238
50239  # Call helper function which possibly converts this using DOS-style short mode.
50240  # If so, the updated path is stored in $new_path.
50241
50242  input_path="$new_path"
50243  # Check if we need to convert this using DOS-style short mode. If the path
50244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50245  # take no chances and rewrite it.
50246  # Note: m4 eats our [], so we need to use [ and ] instead.
50247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50248  if test "x$has_forbidden_chars" != x; then
50249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50253      # Going to short mode and back again did indeed matter. Since short mode is
50254      # case insensitive, let's make it lowercase to improve readability.
50255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50256      # Now convert it back to Unix-style (cygpath)
50257      input_path=`$CYGPATH -u "$shortmode_path"`
50258      new_path="$input_path"
50259    fi
50260  fi
50261
50262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50263  if test "x$test_cygdrive_prefix" = x; then
50264    # As a simple fix, exclude /usr/bin since it's not a real path.
50265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50267      # a path prefixed by /cygdrive for fixpath to work.
50268      new_path="$CYGWIN_ROOT_PATH$input_path"
50269    fi
50270  fi
50271
50272
50273  if test "x$path" != "x$new_path"; then
50274    MSVC_DLL="$new_path"
50275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50276$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50277  fi
50278
50279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50280
50281  path="$MSVC_DLL"
50282  has_colon=`$ECHO $path | $GREP ^.:`
50283  new_path="$path"
50284  if test "x$has_colon" = x; then
50285    # Not in mixed or Windows style, start by that.
50286    new_path=`cmd //c echo $path`
50287  fi
50288
50289
50290  input_path="$new_path"
50291  # Check if we need to convert this using DOS-style short mode. If the path
50292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50293  # take no chances and rewrite it.
50294  # Note: m4 eats our [], so we need to use [ and ] instead.
50295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50296  if test "x$has_forbidden_chars" != x; then
50297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50299  fi
50300
50301
50302  windows_path="$new_path"
50303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50304    unix_path=`$CYGPATH -u "$windows_path"`
50305    new_path="$unix_path"
50306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50308    new_path="$unix_path"
50309  fi
50310
50311  if test "x$path" != "x$new_path"; then
50312    MSVC_DLL="$new_path"
50313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50314$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50315  fi
50316
50317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50319
50320    else
50321      # We're on a unix platform. Hooray! :)
50322      path="$MSVC_DLL"
50323      has_space=`$ECHO "$path" | $GREP " "`
50324      if test "x$has_space" != x; then
50325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50326$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50328      fi
50329
50330      # Use eval to expand a potential ~
50331      eval path="$path"
50332      if test ! -f "$path" && test ! -d "$path"; then
50333        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50334      fi
50335
50336      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50337    fi
50338  fi
50339
50340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50341$as_echo_n "checking for $DLL_NAME... " >&6; }
50342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50343$as_echo "$MSVC_DLL" >&6; }
50344    else
50345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50346$as_echo "incorrect, ignoring" >&6; }
50347      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50348$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50349    fi
50350  fi
50351
50352    if test "x$MSVC_DLL" = x; then
50353      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50354    fi
50355    MSVCR_DLL="$MSVC_DLL"
50356  else
50357
50358  DLL_NAME="${MSVCR_NAME}"
50359  MSVC_DLL=
50360
50361  if test "x$MSVC_DLL" = x; then
50362    # Probe: Using well-known location from Visual Studio 10.0
50363    if test "x$VCINSTALLDIR" != x; then
50364      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50365
50366  windows_path="$CYGWIN_VC_INSTALL_DIR"
50367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50368    unix_path=`$CYGPATH -u "$windows_path"`
50369    CYGWIN_VC_INSTALL_DIR="$unix_path"
50370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50372    CYGWIN_VC_INSTALL_DIR="$unix_path"
50373  fi
50374
50375      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50376        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50377      else
50378        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50379      fi
50380      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50381
50382  DLL_NAME="$DLL_NAME"
50383  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50384  METHOD="well-known location in VCINSTALLDIR"
50385  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50387$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50388
50389    # Need to check if the found msvcr is correct architecture
50390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50391$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50392    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50394      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50395      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50397        CORRECT_MSVCR_ARCH="PE32 executable"
50398      else
50399        CORRECT_MSVCR_ARCH="PE32+ executable"
50400      fi
50401    else
50402      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50403        CORRECT_MSVCR_ARCH=386
50404      else
50405        CORRECT_MSVCR_ARCH=x86-64
50406      fi
50407    fi
50408    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50410$as_echo "ok" >&6; }
50411      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50412
50413  # Only process if variable expands to non-empty
50414
50415  if test "x$MSVC_DLL" != x; then
50416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50417
50418  # Input might be given as Windows format, start by converting to
50419  # unix format.
50420  path="$MSVC_DLL"
50421  new_path=`$CYGPATH -u "$path"`
50422
50423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50426  # "foo.exe" is OK but "foo" is an error.
50427  #
50428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50429  # It is also a way to make sure we got the proper file name for the real test later on.
50430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50431  if test "x$test_shortpath" = x; then
50432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50433$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50434    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50435  fi
50436
50437  # Call helper function which possibly converts this using DOS-style short mode.
50438  # If so, the updated path is stored in $new_path.
50439
50440  input_path="$new_path"
50441  # Check if we need to convert this using DOS-style short mode. If the path
50442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50443  # take no chances and rewrite it.
50444  # Note: m4 eats our [], so we need to use [ and ] instead.
50445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50446  if test "x$has_forbidden_chars" != x; then
50447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50451      # Going to short mode and back again did indeed matter. Since short mode is
50452      # case insensitive, let's make it lowercase to improve readability.
50453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50454      # Now convert it back to Unix-style (cygpath)
50455      input_path=`$CYGPATH -u "$shortmode_path"`
50456      new_path="$input_path"
50457    fi
50458  fi
50459
50460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50461  if test "x$test_cygdrive_prefix" = x; then
50462    # As a simple fix, exclude /usr/bin since it's not a real path.
50463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50465      # a path prefixed by /cygdrive for fixpath to work.
50466      new_path="$CYGWIN_ROOT_PATH$input_path"
50467    fi
50468  fi
50469
50470
50471  if test "x$path" != "x$new_path"; then
50472    MSVC_DLL="$new_path"
50473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50474$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50475  fi
50476
50477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50478
50479  path="$MSVC_DLL"
50480  has_colon=`$ECHO $path | $GREP ^.:`
50481  new_path="$path"
50482  if test "x$has_colon" = x; then
50483    # Not in mixed or Windows style, start by that.
50484    new_path=`cmd //c echo $path`
50485  fi
50486
50487
50488  input_path="$new_path"
50489  # Check if we need to convert this using DOS-style short mode. If the path
50490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50491  # take no chances and rewrite it.
50492  # Note: m4 eats our [], so we need to use [ and ] instead.
50493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50494  if test "x$has_forbidden_chars" != x; then
50495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50497  fi
50498
50499
50500  windows_path="$new_path"
50501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50502    unix_path=`$CYGPATH -u "$windows_path"`
50503    new_path="$unix_path"
50504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50506    new_path="$unix_path"
50507  fi
50508
50509  if test "x$path" != "x$new_path"; then
50510    MSVC_DLL="$new_path"
50511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50512$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50513  fi
50514
50515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50517
50518    else
50519      # We're on a unix platform. Hooray! :)
50520      path="$MSVC_DLL"
50521      has_space=`$ECHO "$path" | $GREP " "`
50522      if test "x$has_space" != x; then
50523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50524$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50526      fi
50527
50528      # Use eval to expand a potential ~
50529      eval path="$path"
50530      if test ! -f "$path" && test ! -d "$path"; then
50531        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50532      fi
50533
50534      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50535    fi
50536  fi
50537
50538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50539$as_echo_n "checking for $DLL_NAME... " >&6; }
50540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50541$as_echo "$MSVC_DLL" >&6; }
50542    else
50543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50544$as_echo "incorrect, ignoring" >&6; }
50545      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50546$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50547    fi
50548  fi
50549
50550    fi
50551  fi
50552
50553  if test "x$MSVC_DLL" = x; then
50554    # Probe: Check in the Boot JDK directory.
50555    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50556
50557  DLL_NAME="$DLL_NAME"
50558  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50559  METHOD="well-known location in Boot JDK"
50560  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50561    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50562$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50563
50564    # Need to check if the found msvcr is correct architecture
50565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50566$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50567    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50569      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50570      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50571      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50572        CORRECT_MSVCR_ARCH="PE32 executable"
50573      else
50574        CORRECT_MSVCR_ARCH="PE32+ executable"
50575      fi
50576    else
50577      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50578        CORRECT_MSVCR_ARCH=386
50579      else
50580        CORRECT_MSVCR_ARCH=x86-64
50581      fi
50582    fi
50583    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50585$as_echo "ok" >&6; }
50586      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50587
50588  # Only process if variable expands to non-empty
50589
50590  if test "x$MSVC_DLL" != x; then
50591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50592
50593  # Input might be given as Windows format, start by converting to
50594  # unix format.
50595  path="$MSVC_DLL"
50596  new_path=`$CYGPATH -u "$path"`
50597
50598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50601  # "foo.exe" is OK but "foo" is an error.
50602  #
50603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50604  # It is also a way to make sure we got the proper file name for the real test later on.
50605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50606  if test "x$test_shortpath" = x; then
50607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50608$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50609    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50610  fi
50611
50612  # Call helper function which possibly converts this using DOS-style short mode.
50613  # If so, the updated path is stored in $new_path.
50614
50615  input_path="$new_path"
50616  # Check if we need to convert this using DOS-style short mode. If the path
50617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50618  # take no chances and rewrite it.
50619  # Note: m4 eats our [], so we need to use [ and ] instead.
50620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50621  if test "x$has_forbidden_chars" != x; then
50622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50626      # Going to short mode and back again did indeed matter. Since short mode is
50627      # case insensitive, let's make it lowercase to improve readability.
50628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50629      # Now convert it back to Unix-style (cygpath)
50630      input_path=`$CYGPATH -u "$shortmode_path"`
50631      new_path="$input_path"
50632    fi
50633  fi
50634
50635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50636  if test "x$test_cygdrive_prefix" = x; then
50637    # As a simple fix, exclude /usr/bin since it's not a real path.
50638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50640      # a path prefixed by /cygdrive for fixpath to work.
50641      new_path="$CYGWIN_ROOT_PATH$input_path"
50642    fi
50643  fi
50644
50645
50646  if test "x$path" != "x$new_path"; then
50647    MSVC_DLL="$new_path"
50648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50649$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50650  fi
50651
50652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50653
50654  path="$MSVC_DLL"
50655  has_colon=`$ECHO $path | $GREP ^.:`
50656  new_path="$path"
50657  if test "x$has_colon" = x; then
50658    # Not in mixed or Windows style, start by that.
50659    new_path=`cmd //c echo $path`
50660  fi
50661
50662
50663  input_path="$new_path"
50664  # Check if we need to convert this using DOS-style short mode. If the path
50665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50666  # take no chances and rewrite it.
50667  # Note: m4 eats our [], so we need to use [ and ] instead.
50668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50669  if test "x$has_forbidden_chars" != x; then
50670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50672  fi
50673
50674
50675  windows_path="$new_path"
50676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50677    unix_path=`$CYGPATH -u "$windows_path"`
50678    new_path="$unix_path"
50679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50681    new_path="$unix_path"
50682  fi
50683
50684  if test "x$path" != "x$new_path"; then
50685    MSVC_DLL="$new_path"
50686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50687$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50688  fi
50689
50690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50692
50693    else
50694      # We're on a unix platform. Hooray! :)
50695      path="$MSVC_DLL"
50696      has_space=`$ECHO "$path" | $GREP " "`
50697      if test "x$has_space" != x; then
50698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50699$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50701      fi
50702
50703      # Use eval to expand a potential ~
50704      eval path="$path"
50705      if test ! -f "$path" && test ! -d "$path"; then
50706        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50707      fi
50708
50709      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50710    fi
50711  fi
50712
50713      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50714$as_echo_n "checking for $DLL_NAME... " >&6; }
50715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50716$as_echo "$MSVC_DLL" >&6; }
50717    else
50718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50719$as_echo "incorrect, ignoring" >&6; }
50720      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50721$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50722    fi
50723  fi
50724
50725  fi
50726
50727  if test "x$MSVC_DLL" = x; then
50728    # Probe: Look in the Windows system32 directory
50729    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50730
50731  windows_path="$CYGWIN_SYSTEMROOT"
50732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50733    unix_path=`$CYGPATH -u "$windows_path"`
50734    CYGWIN_SYSTEMROOT="$unix_path"
50735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50737    CYGWIN_SYSTEMROOT="$unix_path"
50738  fi
50739
50740    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50741
50742  DLL_NAME="$DLL_NAME"
50743  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50744  METHOD="well-known location in SYSTEMROOT"
50745  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50746    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50747$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50748
50749    # Need to check if the found msvcr is correct architecture
50750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50751$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50752    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50754      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50755      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50756      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50757        CORRECT_MSVCR_ARCH="PE32 executable"
50758      else
50759        CORRECT_MSVCR_ARCH="PE32+ executable"
50760      fi
50761    else
50762      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50763        CORRECT_MSVCR_ARCH=386
50764      else
50765        CORRECT_MSVCR_ARCH=x86-64
50766      fi
50767    fi
50768    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50770$as_echo "ok" >&6; }
50771      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50772
50773  # Only process if variable expands to non-empty
50774
50775  if test "x$MSVC_DLL" != x; then
50776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50777
50778  # Input might be given as Windows format, start by converting to
50779  # unix format.
50780  path="$MSVC_DLL"
50781  new_path=`$CYGPATH -u "$path"`
50782
50783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50786  # "foo.exe" is OK but "foo" is an error.
50787  #
50788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50789  # It is also a way to make sure we got the proper file name for the real test later on.
50790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50791  if test "x$test_shortpath" = x; then
50792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50793$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50794    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50795  fi
50796
50797  # Call helper function which possibly converts this using DOS-style short mode.
50798  # If so, the updated path is stored in $new_path.
50799
50800  input_path="$new_path"
50801  # Check if we need to convert this using DOS-style short mode. If the path
50802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50803  # take no chances and rewrite it.
50804  # Note: m4 eats our [], so we need to use [ and ] instead.
50805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50806  if test "x$has_forbidden_chars" != x; then
50807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50811      # Going to short mode and back again did indeed matter. Since short mode is
50812      # case insensitive, let's make it lowercase to improve readability.
50813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50814      # Now convert it back to Unix-style (cygpath)
50815      input_path=`$CYGPATH -u "$shortmode_path"`
50816      new_path="$input_path"
50817    fi
50818  fi
50819
50820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50821  if test "x$test_cygdrive_prefix" = x; then
50822    # As a simple fix, exclude /usr/bin since it's not a real path.
50823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50825      # a path prefixed by /cygdrive for fixpath to work.
50826      new_path="$CYGWIN_ROOT_PATH$input_path"
50827    fi
50828  fi
50829
50830
50831  if test "x$path" != "x$new_path"; then
50832    MSVC_DLL="$new_path"
50833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50834$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50835  fi
50836
50837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50838
50839  path="$MSVC_DLL"
50840  has_colon=`$ECHO $path | $GREP ^.:`
50841  new_path="$path"
50842  if test "x$has_colon" = x; then
50843    # Not in mixed or Windows style, start by that.
50844    new_path=`cmd //c echo $path`
50845  fi
50846
50847
50848  input_path="$new_path"
50849  # Check if we need to convert this using DOS-style short mode. If the path
50850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50851  # take no chances and rewrite it.
50852  # Note: m4 eats our [], so we need to use [ and ] instead.
50853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50854  if test "x$has_forbidden_chars" != x; then
50855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50857  fi
50858
50859
50860  windows_path="$new_path"
50861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50862    unix_path=`$CYGPATH -u "$windows_path"`
50863    new_path="$unix_path"
50864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50866    new_path="$unix_path"
50867  fi
50868
50869  if test "x$path" != "x$new_path"; then
50870    MSVC_DLL="$new_path"
50871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50872$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50873  fi
50874
50875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50877
50878    else
50879      # We're on a unix platform. Hooray! :)
50880      path="$MSVC_DLL"
50881      has_space=`$ECHO "$path" | $GREP " "`
50882      if test "x$has_space" != x; then
50883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50884$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50886      fi
50887
50888      # Use eval to expand a potential ~
50889      eval path="$path"
50890      if test ! -f "$path" && test ! -d "$path"; then
50891        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50892      fi
50893
50894      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50895    fi
50896  fi
50897
50898      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50899$as_echo_n "checking for $DLL_NAME... " >&6; }
50900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50901$as_echo "$MSVC_DLL" >&6; }
50902    else
50903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50904$as_echo "incorrect, ignoring" >&6; }
50905      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50906$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50907    fi
50908  fi
50909
50910  fi
50911
50912  if test "x$MSVC_DLL" = x; then
50913    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50914    if test "x$VS100COMNTOOLS" != x; then
50915      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50916
50917  windows_path="$CYGWIN_VS_TOOLS_DIR"
50918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50919    unix_path=`$CYGPATH -u "$windows_path"`
50920    CYGWIN_VS_TOOLS_DIR="$unix_path"
50921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50923    CYGWIN_VS_TOOLS_DIR="$unix_path"
50924  fi
50925
50926      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50927        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50928	    | $GREP -i /x64/ | $HEAD --lines 1`
50929      else
50930        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50931	    | $GREP -i /x86/ | $HEAD --lines 1`
50932      fi
50933
50934  DLL_NAME="$DLL_NAME"
50935  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50936  METHOD="search of VS100COMNTOOLS"
50937  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50938    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50939$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50940
50941    # Need to check if the found msvcr is correct architecture
50942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50943$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50944    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50946      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50947      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50948      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50949        CORRECT_MSVCR_ARCH="PE32 executable"
50950      else
50951        CORRECT_MSVCR_ARCH="PE32+ executable"
50952      fi
50953    else
50954      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50955        CORRECT_MSVCR_ARCH=386
50956      else
50957        CORRECT_MSVCR_ARCH=x86-64
50958      fi
50959    fi
50960    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50962$as_echo "ok" >&6; }
50963      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50964
50965  # Only process if variable expands to non-empty
50966
50967  if test "x$MSVC_DLL" != x; then
50968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50969
50970  # Input might be given as Windows format, start by converting to
50971  # unix format.
50972  path="$MSVC_DLL"
50973  new_path=`$CYGPATH -u "$path"`
50974
50975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50978  # "foo.exe" is OK but "foo" is an error.
50979  #
50980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50981  # It is also a way to make sure we got the proper file name for the real test later on.
50982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50983  if test "x$test_shortpath" = x; then
50984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50985$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50986    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50987  fi
50988
50989  # Call helper function which possibly converts this using DOS-style short mode.
50990  # If so, the updated path is stored in $new_path.
50991
50992  input_path="$new_path"
50993  # Check if we need to convert this using DOS-style short mode. If the path
50994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50995  # take no chances and rewrite it.
50996  # Note: m4 eats our [], so we need to use [ and ] instead.
50997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50998  if test "x$has_forbidden_chars" != x; then
50999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51003      # Going to short mode and back again did indeed matter. Since short mode is
51004      # case insensitive, let's make it lowercase to improve readability.
51005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51006      # Now convert it back to Unix-style (cygpath)
51007      input_path=`$CYGPATH -u "$shortmode_path"`
51008      new_path="$input_path"
51009    fi
51010  fi
51011
51012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51013  if test "x$test_cygdrive_prefix" = x; then
51014    # As a simple fix, exclude /usr/bin since it's not a real path.
51015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51017      # a path prefixed by /cygdrive for fixpath to work.
51018      new_path="$CYGWIN_ROOT_PATH$input_path"
51019    fi
51020  fi
51021
51022
51023  if test "x$path" != "x$new_path"; then
51024    MSVC_DLL="$new_path"
51025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51026$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51027  fi
51028
51029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51030
51031  path="$MSVC_DLL"
51032  has_colon=`$ECHO $path | $GREP ^.:`
51033  new_path="$path"
51034  if test "x$has_colon" = x; then
51035    # Not in mixed or Windows style, start by that.
51036    new_path=`cmd //c echo $path`
51037  fi
51038
51039
51040  input_path="$new_path"
51041  # Check if we need to convert this using DOS-style short mode. If the path
51042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51043  # take no chances and rewrite it.
51044  # Note: m4 eats our [], so we need to use [ and ] instead.
51045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51046  if test "x$has_forbidden_chars" != x; then
51047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51049  fi
51050
51051
51052  windows_path="$new_path"
51053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51054    unix_path=`$CYGPATH -u "$windows_path"`
51055    new_path="$unix_path"
51056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51058    new_path="$unix_path"
51059  fi
51060
51061  if test "x$path" != "x$new_path"; then
51062    MSVC_DLL="$new_path"
51063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51064$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51065  fi
51066
51067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51069
51070    else
51071      # We're on a unix platform. Hooray! :)
51072      path="$MSVC_DLL"
51073      has_space=`$ECHO "$path" | $GREP " "`
51074      if test "x$has_space" != x; then
51075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51076$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51078      fi
51079
51080      # Use eval to expand a potential ~
51081      eval path="$path"
51082      if test ! -f "$path" && test ! -d "$path"; then
51083        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51084      fi
51085
51086      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51087    fi
51088  fi
51089
51090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51091$as_echo_n "checking for $DLL_NAME... " >&6; }
51092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51093$as_echo "$MSVC_DLL" >&6; }
51094    else
51095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51096$as_echo "incorrect, ignoring" >&6; }
51097      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51098$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51099    fi
51100  fi
51101
51102    fi
51103  fi
51104
51105  if test "x$MSVC_DLL" = x; then
51106    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51107    # (This was the original behaviour; kept since it might turn something up)
51108    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51109      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51110        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51111	    | $GREP x64 | $HEAD --lines 1`
51112      else
51113        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51114	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51115        if test "x$POSSIBLE_MSVC_DLL" = x; then
51116          # We're grasping at straws now...
51117          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51118	      | $HEAD --lines 1`
51119        fi
51120      fi
51121
51122
51123  DLL_NAME="$DLL_NAME"
51124  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51125  METHOD="search of VCINSTALLDIR"
51126  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51127    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51128$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51129
51130    # Need to check if the found msvcr is correct architecture
51131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51132$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51133    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51135      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51136      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51137      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51138        CORRECT_MSVCR_ARCH="PE32 executable"
51139      else
51140        CORRECT_MSVCR_ARCH="PE32+ executable"
51141      fi
51142    else
51143      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51144        CORRECT_MSVCR_ARCH=386
51145      else
51146        CORRECT_MSVCR_ARCH=x86-64
51147      fi
51148    fi
51149    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51151$as_echo "ok" >&6; }
51152      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51153
51154  # Only process if variable expands to non-empty
51155
51156  if test "x$MSVC_DLL" != x; then
51157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51158
51159  # Input might be given as Windows format, start by converting to
51160  # unix format.
51161  path="$MSVC_DLL"
51162  new_path=`$CYGPATH -u "$path"`
51163
51164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51167  # "foo.exe" is OK but "foo" is an error.
51168  #
51169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51170  # It is also a way to make sure we got the proper file name for the real test later on.
51171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51172  if test "x$test_shortpath" = x; then
51173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51174$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51175    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51176  fi
51177
51178  # Call helper function which possibly converts this using DOS-style short mode.
51179  # If so, the updated path is stored in $new_path.
51180
51181  input_path="$new_path"
51182  # Check if we need to convert this using DOS-style short mode. If the path
51183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51184  # take no chances and rewrite it.
51185  # Note: m4 eats our [], so we need to use [ and ] instead.
51186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51187  if test "x$has_forbidden_chars" != x; then
51188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51192      # Going to short mode and back again did indeed matter. Since short mode is
51193      # case insensitive, let's make it lowercase to improve readability.
51194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51195      # Now convert it back to Unix-style (cygpath)
51196      input_path=`$CYGPATH -u "$shortmode_path"`
51197      new_path="$input_path"
51198    fi
51199  fi
51200
51201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51202  if test "x$test_cygdrive_prefix" = x; then
51203    # As a simple fix, exclude /usr/bin since it's not a real path.
51204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51206      # a path prefixed by /cygdrive for fixpath to work.
51207      new_path="$CYGWIN_ROOT_PATH$input_path"
51208    fi
51209  fi
51210
51211
51212  if test "x$path" != "x$new_path"; then
51213    MSVC_DLL="$new_path"
51214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51215$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51216  fi
51217
51218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51219
51220  path="$MSVC_DLL"
51221  has_colon=`$ECHO $path | $GREP ^.:`
51222  new_path="$path"
51223  if test "x$has_colon" = x; then
51224    # Not in mixed or Windows style, start by that.
51225    new_path=`cmd //c echo $path`
51226  fi
51227
51228
51229  input_path="$new_path"
51230  # Check if we need to convert this using DOS-style short mode. If the path
51231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51232  # take no chances and rewrite it.
51233  # Note: m4 eats our [], so we need to use [ and ] instead.
51234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51235  if test "x$has_forbidden_chars" != x; then
51236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51238  fi
51239
51240
51241  windows_path="$new_path"
51242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51243    unix_path=`$CYGPATH -u "$windows_path"`
51244    new_path="$unix_path"
51245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51247    new_path="$unix_path"
51248  fi
51249
51250  if test "x$path" != "x$new_path"; then
51251    MSVC_DLL="$new_path"
51252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51253$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51254  fi
51255
51256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51258
51259    else
51260      # We're on a unix platform. Hooray! :)
51261      path="$MSVC_DLL"
51262      has_space=`$ECHO "$path" | $GREP " "`
51263      if test "x$has_space" != x; then
51264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51265$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51267      fi
51268
51269      # Use eval to expand a potential ~
51270      eval path="$path"
51271      if test ! -f "$path" && test ! -d "$path"; then
51272        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51273      fi
51274
51275      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51276    fi
51277  fi
51278
51279      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51280$as_echo_n "checking for $DLL_NAME... " >&6; }
51281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51282$as_echo "$MSVC_DLL" >&6; }
51283    else
51284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51285$as_echo "incorrect, ignoring" >&6; }
51286      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51287$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51288    fi
51289  fi
51290
51291    fi
51292  fi
51293
51294  if test "x$MSVC_DLL" = x; then
51295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51296$as_echo_n "checking for $DLL_NAME... " >&6; }
51297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51298$as_echo "no" >&6; }
51299    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51300  fi
51301
51302    MSVCR_DLL="$MSVC_DLL"
51303  fi
51304
51305
51306
51307# Check whether --with-msvcp-dll was given.
51308if test "${with_msvcp_dll+set}" = set; then :
51309  withval=$with_msvcp_dll;
51310fi
51311
51312
51313  if test "x$MSVCP_NAME" != "x"; then
51314    if test "x$with_msvcp_dll" != x; then
51315      # If given explicitely by user, do not probe. If not present, fail directly.
51316
51317  DLL_NAME="$MSVCP_NAME"
51318  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51319  METHOD="--with-msvcp-dll"
51320  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51321    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51322$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51323
51324    # Need to check if the found msvcr is correct architecture
51325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51326$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51327    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51329      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51330      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51331      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51332        CORRECT_MSVCR_ARCH="PE32 executable"
51333      else
51334        CORRECT_MSVCR_ARCH="PE32+ executable"
51335      fi
51336    else
51337      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51338        CORRECT_MSVCR_ARCH=386
51339      else
51340        CORRECT_MSVCR_ARCH=x86-64
51341      fi
51342    fi
51343    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51345$as_echo "ok" >&6; }
51346      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51347
51348  # Only process if variable expands to non-empty
51349
51350  if test "x$MSVC_DLL" != x; then
51351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51352
51353  # Input might be given as Windows format, start by converting to
51354  # unix format.
51355  path="$MSVC_DLL"
51356  new_path=`$CYGPATH -u "$path"`
51357
51358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51361  # "foo.exe" is OK but "foo" is an error.
51362  #
51363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51364  # It is also a way to make sure we got the proper file name for the real test later on.
51365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51366  if test "x$test_shortpath" = x; then
51367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51368$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51369    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51370  fi
51371
51372  # Call helper function which possibly converts this using DOS-style short mode.
51373  # If so, the updated path is stored in $new_path.
51374
51375  input_path="$new_path"
51376  # Check if we need to convert this using DOS-style short mode. If the path
51377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51378  # take no chances and rewrite it.
51379  # Note: m4 eats our [], so we need to use [ and ] instead.
51380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51381  if test "x$has_forbidden_chars" != x; then
51382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51386      # Going to short mode and back again did indeed matter. Since short mode is
51387      # case insensitive, let's make it lowercase to improve readability.
51388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51389      # Now convert it back to Unix-style (cygpath)
51390      input_path=`$CYGPATH -u "$shortmode_path"`
51391      new_path="$input_path"
51392    fi
51393  fi
51394
51395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51396  if test "x$test_cygdrive_prefix" = x; then
51397    # As a simple fix, exclude /usr/bin since it's not a real path.
51398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51400      # a path prefixed by /cygdrive for fixpath to work.
51401      new_path="$CYGWIN_ROOT_PATH$input_path"
51402    fi
51403  fi
51404
51405
51406  if test "x$path" != "x$new_path"; then
51407    MSVC_DLL="$new_path"
51408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51409$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51410  fi
51411
51412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51413
51414  path="$MSVC_DLL"
51415  has_colon=`$ECHO $path | $GREP ^.:`
51416  new_path="$path"
51417  if test "x$has_colon" = x; then
51418    # Not in mixed or Windows style, start by that.
51419    new_path=`cmd //c echo $path`
51420  fi
51421
51422
51423  input_path="$new_path"
51424  # Check if we need to convert this using DOS-style short mode. If the path
51425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51426  # take no chances and rewrite it.
51427  # Note: m4 eats our [], so we need to use [ and ] instead.
51428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51429  if test "x$has_forbidden_chars" != x; then
51430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51432  fi
51433
51434
51435  windows_path="$new_path"
51436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51437    unix_path=`$CYGPATH -u "$windows_path"`
51438    new_path="$unix_path"
51439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51441    new_path="$unix_path"
51442  fi
51443
51444  if test "x$path" != "x$new_path"; then
51445    MSVC_DLL="$new_path"
51446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51447$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51448  fi
51449
51450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51452
51453    else
51454      # We're on a unix platform. Hooray! :)
51455      path="$MSVC_DLL"
51456      has_space=`$ECHO "$path" | $GREP " "`
51457      if test "x$has_space" != x; then
51458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51459$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51461      fi
51462
51463      # Use eval to expand a potential ~
51464      eval path="$path"
51465      if test ! -f "$path" && test ! -d "$path"; then
51466        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51467      fi
51468
51469      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51470    fi
51471  fi
51472
51473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51474$as_echo_n "checking for $DLL_NAME... " >&6; }
51475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51476$as_echo "$MSVC_DLL" >&6; }
51477    else
51478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51479$as_echo "incorrect, ignoring" >&6; }
51480      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51481$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51482    fi
51483  fi
51484
51485      if test "x$MSVC_DLL" = x; then
51486        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51487      fi
51488      MSVCP_DLL="$MSVC_DLL"
51489    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51490
51491  DLL_NAME="$MSVCP_NAME"
51492  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51493  METHOD="devkit"
51494  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51495    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51496$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51497
51498    # Need to check if the found msvcr is correct architecture
51499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51500$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51501    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51503      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51504      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51505      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51506        CORRECT_MSVCR_ARCH="PE32 executable"
51507      else
51508        CORRECT_MSVCR_ARCH="PE32+ executable"
51509      fi
51510    else
51511      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51512        CORRECT_MSVCR_ARCH=386
51513      else
51514        CORRECT_MSVCR_ARCH=x86-64
51515      fi
51516    fi
51517    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51519$as_echo "ok" >&6; }
51520      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51521
51522  # Only process if variable expands to non-empty
51523
51524  if test "x$MSVC_DLL" != x; then
51525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51526
51527  # Input might be given as Windows format, start by converting to
51528  # unix format.
51529  path="$MSVC_DLL"
51530  new_path=`$CYGPATH -u "$path"`
51531
51532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51535  # "foo.exe" is OK but "foo" is an error.
51536  #
51537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51538  # It is also a way to make sure we got the proper file name for the real test later on.
51539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51540  if test "x$test_shortpath" = x; then
51541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51542$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51543    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51544  fi
51545
51546  # Call helper function which possibly converts this using DOS-style short mode.
51547  # If so, the updated path is stored in $new_path.
51548
51549  input_path="$new_path"
51550  # Check if we need to convert this using DOS-style short mode. If the path
51551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51552  # take no chances and rewrite it.
51553  # Note: m4 eats our [], so we need to use [ and ] instead.
51554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51555  if test "x$has_forbidden_chars" != x; then
51556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51560      # Going to short mode and back again did indeed matter. Since short mode is
51561      # case insensitive, let's make it lowercase to improve readability.
51562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51563      # Now convert it back to Unix-style (cygpath)
51564      input_path=`$CYGPATH -u "$shortmode_path"`
51565      new_path="$input_path"
51566    fi
51567  fi
51568
51569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51570  if test "x$test_cygdrive_prefix" = x; then
51571    # As a simple fix, exclude /usr/bin since it's not a real path.
51572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51574      # a path prefixed by /cygdrive for fixpath to work.
51575      new_path="$CYGWIN_ROOT_PATH$input_path"
51576    fi
51577  fi
51578
51579
51580  if test "x$path" != "x$new_path"; then
51581    MSVC_DLL="$new_path"
51582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51583$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51584  fi
51585
51586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51587
51588  path="$MSVC_DLL"
51589  has_colon=`$ECHO $path | $GREP ^.:`
51590  new_path="$path"
51591  if test "x$has_colon" = x; then
51592    # Not in mixed or Windows style, start by that.
51593    new_path=`cmd //c echo $path`
51594  fi
51595
51596
51597  input_path="$new_path"
51598  # Check if we need to convert this using DOS-style short mode. If the path
51599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51600  # take no chances and rewrite it.
51601  # Note: m4 eats our [], so we need to use [ and ] instead.
51602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51603  if test "x$has_forbidden_chars" != x; then
51604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51606  fi
51607
51608
51609  windows_path="$new_path"
51610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51611    unix_path=`$CYGPATH -u "$windows_path"`
51612    new_path="$unix_path"
51613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51615    new_path="$unix_path"
51616  fi
51617
51618  if test "x$path" != "x$new_path"; then
51619    MSVC_DLL="$new_path"
51620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51621$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51622  fi
51623
51624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51626
51627    else
51628      # We're on a unix platform. Hooray! :)
51629      path="$MSVC_DLL"
51630      has_space=`$ECHO "$path" | $GREP " "`
51631      if test "x$has_space" != x; then
51632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51633$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51635      fi
51636
51637      # Use eval to expand a potential ~
51638      eval path="$path"
51639      if test ! -f "$path" && test ! -d "$path"; then
51640        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51641      fi
51642
51643      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51644    fi
51645  fi
51646
51647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51648$as_echo_n "checking for $DLL_NAME... " >&6; }
51649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51650$as_echo "$MSVC_DLL" >&6; }
51651    else
51652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51653$as_echo "incorrect, ignoring" >&6; }
51654      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51655$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51656    fi
51657  fi
51658
51659      if test "x$MSVC_DLL" = x; then
51660        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51661      fi
51662      MSVCP_DLL="$MSVC_DLL"
51663    else
51664
51665  DLL_NAME="${MSVCP_NAME}"
51666  MSVC_DLL=
51667
51668  if test "x$MSVC_DLL" = x; then
51669    # Probe: Using well-known location from Visual Studio 10.0
51670    if test "x$VCINSTALLDIR" != x; then
51671      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51672
51673  windows_path="$CYGWIN_VC_INSTALL_DIR"
51674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51675    unix_path=`$CYGPATH -u "$windows_path"`
51676    CYGWIN_VC_INSTALL_DIR="$unix_path"
51677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51679    CYGWIN_VC_INSTALL_DIR="$unix_path"
51680  fi
51681
51682      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51683        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51684      else
51685        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51686      fi
51687      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51688
51689  DLL_NAME="$DLL_NAME"
51690  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51691  METHOD="well-known location in VCINSTALLDIR"
51692  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51693    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51694$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51695
51696    # Need to check if the found msvcr is correct architecture
51697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51698$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51699    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51701      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51702      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51703      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51704        CORRECT_MSVCR_ARCH="PE32 executable"
51705      else
51706        CORRECT_MSVCR_ARCH="PE32+ executable"
51707      fi
51708    else
51709      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51710        CORRECT_MSVCR_ARCH=386
51711      else
51712        CORRECT_MSVCR_ARCH=x86-64
51713      fi
51714    fi
51715    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51717$as_echo "ok" >&6; }
51718      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51719
51720  # Only process if variable expands to non-empty
51721
51722  if test "x$MSVC_DLL" != x; then
51723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51724
51725  # Input might be given as Windows format, start by converting to
51726  # unix format.
51727  path="$MSVC_DLL"
51728  new_path=`$CYGPATH -u "$path"`
51729
51730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51733  # "foo.exe" is OK but "foo" is an error.
51734  #
51735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51736  # It is also a way to make sure we got the proper file name for the real test later on.
51737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51738  if test "x$test_shortpath" = x; then
51739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51740$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51741    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51742  fi
51743
51744  # Call helper function which possibly converts this using DOS-style short mode.
51745  # If so, the updated path is stored in $new_path.
51746
51747  input_path="$new_path"
51748  # Check if we need to convert this using DOS-style short mode. If the path
51749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51750  # take no chances and rewrite it.
51751  # Note: m4 eats our [], so we need to use [ and ] instead.
51752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51753  if test "x$has_forbidden_chars" != x; then
51754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51758      # Going to short mode and back again did indeed matter. Since short mode is
51759      # case insensitive, let's make it lowercase to improve readability.
51760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51761      # Now convert it back to Unix-style (cygpath)
51762      input_path=`$CYGPATH -u "$shortmode_path"`
51763      new_path="$input_path"
51764    fi
51765  fi
51766
51767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51768  if test "x$test_cygdrive_prefix" = x; then
51769    # As a simple fix, exclude /usr/bin since it's not a real path.
51770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51772      # a path prefixed by /cygdrive for fixpath to work.
51773      new_path="$CYGWIN_ROOT_PATH$input_path"
51774    fi
51775  fi
51776
51777
51778  if test "x$path" != "x$new_path"; then
51779    MSVC_DLL="$new_path"
51780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51781$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51782  fi
51783
51784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51785
51786  path="$MSVC_DLL"
51787  has_colon=`$ECHO $path | $GREP ^.:`
51788  new_path="$path"
51789  if test "x$has_colon" = x; then
51790    # Not in mixed or Windows style, start by that.
51791    new_path=`cmd //c echo $path`
51792  fi
51793
51794
51795  input_path="$new_path"
51796  # Check if we need to convert this using DOS-style short mode. If the path
51797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51798  # take no chances and rewrite it.
51799  # Note: m4 eats our [], so we need to use [ and ] instead.
51800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51801  if test "x$has_forbidden_chars" != x; then
51802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51804  fi
51805
51806
51807  windows_path="$new_path"
51808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51809    unix_path=`$CYGPATH -u "$windows_path"`
51810    new_path="$unix_path"
51811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51813    new_path="$unix_path"
51814  fi
51815
51816  if test "x$path" != "x$new_path"; then
51817    MSVC_DLL="$new_path"
51818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51819$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51820  fi
51821
51822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51824
51825    else
51826      # We're on a unix platform. Hooray! :)
51827      path="$MSVC_DLL"
51828      has_space=`$ECHO "$path" | $GREP " "`
51829      if test "x$has_space" != x; then
51830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51831$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51833      fi
51834
51835      # Use eval to expand a potential ~
51836      eval path="$path"
51837      if test ! -f "$path" && test ! -d "$path"; then
51838        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51839      fi
51840
51841      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51842    fi
51843  fi
51844
51845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51846$as_echo_n "checking for $DLL_NAME... " >&6; }
51847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51848$as_echo "$MSVC_DLL" >&6; }
51849    else
51850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51851$as_echo "incorrect, ignoring" >&6; }
51852      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51853$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51854    fi
51855  fi
51856
51857    fi
51858  fi
51859
51860  if test "x$MSVC_DLL" = x; then
51861    # Probe: Check in the Boot JDK directory.
51862    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51863
51864  DLL_NAME="$DLL_NAME"
51865  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51866  METHOD="well-known location in Boot JDK"
51867  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51868    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51869$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51870
51871    # Need to check if the found msvcr is correct architecture
51872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51873$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51874    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51876      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51877      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51878      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51879        CORRECT_MSVCR_ARCH="PE32 executable"
51880      else
51881        CORRECT_MSVCR_ARCH="PE32+ executable"
51882      fi
51883    else
51884      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51885        CORRECT_MSVCR_ARCH=386
51886      else
51887        CORRECT_MSVCR_ARCH=x86-64
51888      fi
51889    fi
51890    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51892$as_echo "ok" >&6; }
51893      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51894
51895  # Only process if variable expands to non-empty
51896
51897  if test "x$MSVC_DLL" != x; then
51898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51899
51900  # Input might be given as Windows format, start by converting to
51901  # unix format.
51902  path="$MSVC_DLL"
51903  new_path=`$CYGPATH -u "$path"`
51904
51905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51908  # "foo.exe" is OK but "foo" is an error.
51909  #
51910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51911  # It is also a way to make sure we got the proper file name for the real test later on.
51912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51913  if test "x$test_shortpath" = x; then
51914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51915$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51916    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51917  fi
51918
51919  # Call helper function which possibly converts this using DOS-style short mode.
51920  # If so, the updated path is stored in $new_path.
51921
51922  input_path="$new_path"
51923  # Check if we need to convert this using DOS-style short mode. If the path
51924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51925  # take no chances and rewrite it.
51926  # Note: m4 eats our [], so we need to use [ and ] instead.
51927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51928  if test "x$has_forbidden_chars" != x; then
51929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51933      # Going to short mode and back again did indeed matter. Since short mode is
51934      # case insensitive, let's make it lowercase to improve readability.
51935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51936      # Now convert it back to Unix-style (cygpath)
51937      input_path=`$CYGPATH -u "$shortmode_path"`
51938      new_path="$input_path"
51939    fi
51940  fi
51941
51942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51943  if test "x$test_cygdrive_prefix" = x; then
51944    # As a simple fix, exclude /usr/bin since it's not a real path.
51945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51947      # a path prefixed by /cygdrive for fixpath to work.
51948      new_path="$CYGWIN_ROOT_PATH$input_path"
51949    fi
51950  fi
51951
51952
51953  if test "x$path" != "x$new_path"; then
51954    MSVC_DLL="$new_path"
51955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51956$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51957  fi
51958
51959    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51960
51961  path="$MSVC_DLL"
51962  has_colon=`$ECHO $path | $GREP ^.:`
51963  new_path="$path"
51964  if test "x$has_colon" = x; then
51965    # Not in mixed or Windows style, start by that.
51966    new_path=`cmd //c echo $path`
51967  fi
51968
51969
51970  input_path="$new_path"
51971  # Check if we need to convert this using DOS-style short mode. If the path
51972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51973  # take no chances and rewrite it.
51974  # Note: m4 eats our [], so we need to use [ and ] instead.
51975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51976  if test "x$has_forbidden_chars" != x; then
51977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51979  fi
51980
51981
51982  windows_path="$new_path"
51983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51984    unix_path=`$CYGPATH -u "$windows_path"`
51985    new_path="$unix_path"
51986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51988    new_path="$unix_path"
51989  fi
51990
51991  if test "x$path" != "x$new_path"; then
51992    MSVC_DLL="$new_path"
51993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51994$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51995  fi
51996
51997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51999
52000    else
52001      # We're on a unix platform. Hooray! :)
52002      path="$MSVC_DLL"
52003      has_space=`$ECHO "$path" | $GREP " "`
52004      if test "x$has_space" != x; then
52005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52006$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52007        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52008      fi
52009
52010      # Use eval to expand a potential ~
52011      eval path="$path"
52012      if test ! -f "$path" && test ! -d "$path"; then
52013        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52014      fi
52015
52016      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52017    fi
52018  fi
52019
52020      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52021$as_echo_n "checking for $DLL_NAME... " >&6; }
52022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52023$as_echo "$MSVC_DLL" >&6; }
52024    else
52025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52026$as_echo "incorrect, ignoring" >&6; }
52027      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52028$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52029    fi
52030  fi
52031
52032  fi
52033
52034  if test "x$MSVC_DLL" = x; then
52035    # Probe: Look in the Windows system32 directory
52036    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
52037
52038  windows_path="$CYGWIN_SYSTEMROOT"
52039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52040    unix_path=`$CYGPATH -u "$windows_path"`
52041    CYGWIN_SYSTEMROOT="$unix_path"
52042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52044    CYGWIN_SYSTEMROOT="$unix_path"
52045  fi
52046
52047    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
52048
52049  DLL_NAME="$DLL_NAME"
52050  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52051  METHOD="well-known location in SYSTEMROOT"
52052  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52053    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52054$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52055
52056    # Need to check if the found msvcr is correct architecture
52057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52058$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52059    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52061      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52062      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52063      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52064        CORRECT_MSVCR_ARCH="PE32 executable"
52065      else
52066        CORRECT_MSVCR_ARCH="PE32+ executable"
52067      fi
52068    else
52069      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52070        CORRECT_MSVCR_ARCH=386
52071      else
52072        CORRECT_MSVCR_ARCH=x86-64
52073      fi
52074    fi
52075    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52077$as_echo "ok" >&6; }
52078      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52079
52080  # Only process if variable expands to non-empty
52081
52082  if test "x$MSVC_DLL" != x; then
52083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52084
52085  # Input might be given as Windows format, start by converting to
52086  # unix format.
52087  path="$MSVC_DLL"
52088  new_path=`$CYGPATH -u "$path"`
52089
52090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52093  # "foo.exe" is OK but "foo" is an error.
52094  #
52095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52096  # It is also a way to make sure we got the proper file name for the real test later on.
52097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52098  if test "x$test_shortpath" = x; then
52099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52100$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52101    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52102  fi
52103
52104  # Call helper function which possibly converts this using DOS-style short mode.
52105  # If so, the updated path is stored in $new_path.
52106
52107  input_path="$new_path"
52108  # Check if we need to convert this using DOS-style short mode. If the path
52109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52110  # take no chances and rewrite it.
52111  # Note: m4 eats our [], so we need to use [ and ] instead.
52112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52113  if test "x$has_forbidden_chars" != x; then
52114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52118      # Going to short mode and back again did indeed matter. Since short mode is
52119      # case insensitive, let's make it lowercase to improve readability.
52120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52121      # Now convert it back to Unix-style (cygpath)
52122      input_path=`$CYGPATH -u "$shortmode_path"`
52123      new_path="$input_path"
52124    fi
52125  fi
52126
52127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52128  if test "x$test_cygdrive_prefix" = x; then
52129    # As a simple fix, exclude /usr/bin since it's not a real path.
52130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52132      # a path prefixed by /cygdrive for fixpath to work.
52133      new_path="$CYGWIN_ROOT_PATH$input_path"
52134    fi
52135  fi
52136
52137
52138  if test "x$path" != "x$new_path"; then
52139    MSVC_DLL="$new_path"
52140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52141$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52142  fi
52143
52144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52145
52146  path="$MSVC_DLL"
52147  has_colon=`$ECHO $path | $GREP ^.:`
52148  new_path="$path"
52149  if test "x$has_colon" = x; then
52150    # Not in mixed or Windows style, start by that.
52151    new_path=`cmd //c echo $path`
52152  fi
52153
52154
52155  input_path="$new_path"
52156  # Check if we need to convert this using DOS-style short mode. If the path
52157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52158  # take no chances and rewrite it.
52159  # Note: m4 eats our [], so we need to use [ and ] instead.
52160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52161  if test "x$has_forbidden_chars" != x; then
52162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52164  fi
52165
52166
52167  windows_path="$new_path"
52168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52169    unix_path=`$CYGPATH -u "$windows_path"`
52170    new_path="$unix_path"
52171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52173    new_path="$unix_path"
52174  fi
52175
52176  if test "x$path" != "x$new_path"; then
52177    MSVC_DLL="$new_path"
52178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52179$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52180  fi
52181
52182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52184
52185    else
52186      # We're on a unix platform. Hooray! :)
52187      path="$MSVC_DLL"
52188      has_space=`$ECHO "$path" | $GREP " "`
52189      if test "x$has_space" != x; then
52190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52191$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52193      fi
52194
52195      # Use eval to expand a potential ~
52196      eval path="$path"
52197      if test ! -f "$path" && test ! -d "$path"; then
52198        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52199      fi
52200
52201      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52202    fi
52203  fi
52204
52205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52206$as_echo_n "checking for $DLL_NAME... " >&6; }
52207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52208$as_echo "$MSVC_DLL" >&6; }
52209    else
52210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52211$as_echo "incorrect, ignoring" >&6; }
52212      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52213$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52214    fi
52215  fi
52216
52217  fi
52218
52219  if test "x$MSVC_DLL" = x; then
52220    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52221    if test "x$VS100COMNTOOLS" != x; then
52222      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52223
52224  windows_path="$CYGWIN_VS_TOOLS_DIR"
52225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52226    unix_path=`$CYGPATH -u "$windows_path"`
52227    CYGWIN_VS_TOOLS_DIR="$unix_path"
52228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52230    CYGWIN_VS_TOOLS_DIR="$unix_path"
52231  fi
52232
52233      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52234        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52235	    | $GREP -i /x64/ | $HEAD --lines 1`
52236      else
52237        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52238	    | $GREP -i /x86/ | $HEAD --lines 1`
52239      fi
52240
52241  DLL_NAME="$DLL_NAME"
52242  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52243  METHOD="search of VS100COMNTOOLS"
52244  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52246$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52247
52248    # Need to check if the found msvcr is correct architecture
52249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52250$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52251    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52253      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52254      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52255      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52256        CORRECT_MSVCR_ARCH="PE32 executable"
52257      else
52258        CORRECT_MSVCR_ARCH="PE32+ executable"
52259      fi
52260    else
52261      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52262        CORRECT_MSVCR_ARCH=386
52263      else
52264        CORRECT_MSVCR_ARCH=x86-64
52265      fi
52266    fi
52267    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52269$as_echo "ok" >&6; }
52270      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52271
52272  # Only process if variable expands to non-empty
52273
52274  if test "x$MSVC_DLL" != x; then
52275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52276
52277  # Input might be given as Windows format, start by converting to
52278  # unix format.
52279  path="$MSVC_DLL"
52280  new_path=`$CYGPATH -u "$path"`
52281
52282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52285  # "foo.exe" is OK but "foo" is an error.
52286  #
52287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52288  # It is also a way to make sure we got the proper file name for the real test later on.
52289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52290  if test "x$test_shortpath" = x; then
52291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52292$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52293    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52294  fi
52295
52296  # Call helper function which possibly converts this using DOS-style short mode.
52297  # If so, the updated path is stored in $new_path.
52298
52299  input_path="$new_path"
52300  # Check if we need to convert this using DOS-style short mode. If the path
52301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52302  # take no chances and rewrite it.
52303  # Note: m4 eats our [], so we need to use [ and ] instead.
52304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52305  if test "x$has_forbidden_chars" != x; then
52306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52310      # Going to short mode and back again did indeed matter. Since short mode is
52311      # case insensitive, let's make it lowercase to improve readability.
52312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52313      # Now convert it back to Unix-style (cygpath)
52314      input_path=`$CYGPATH -u "$shortmode_path"`
52315      new_path="$input_path"
52316    fi
52317  fi
52318
52319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52320  if test "x$test_cygdrive_prefix" = x; then
52321    # As a simple fix, exclude /usr/bin since it's not a real path.
52322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52324      # a path prefixed by /cygdrive for fixpath to work.
52325      new_path="$CYGWIN_ROOT_PATH$input_path"
52326    fi
52327  fi
52328
52329
52330  if test "x$path" != "x$new_path"; then
52331    MSVC_DLL="$new_path"
52332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52333$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52334  fi
52335
52336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52337
52338  path="$MSVC_DLL"
52339  has_colon=`$ECHO $path | $GREP ^.:`
52340  new_path="$path"
52341  if test "x$has_colon" = x; then
52342    # Not in mixed or Windows style, start by that.
52343    new_path=`cmd //c echo $path`
52344  fi
52345
52346
52347  input_path="$new_path"
52348  # Check if we need to convert this using DOS-style short mode. If the path
52349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52350  # take no chances and rewrite it.
52351  # Note: m4 eats our [], so we need to use [ and ] instead.
52352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52353  if test "x$has_forbidden_chars" != x; then
52354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52356  fi
52357
52358
52359  windows_path="$new_path"
52360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52361    unix_path=`$CYGPATH -u "$windows_path"`
52362    new_path="$unix_path"
52363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52365    new_path="$unix_path"
52366  fi
52367
52368  if test "x$path" != "x$new_path"; then
52369    MSVC_DLL="$new_path"
52370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52371$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52372  fi
52373
52374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52376
52377    else
52378      # We're on a unix platform. Hooray! :)
52379      path="$MSVC_DLL"
52380      has_space=`$ECHO "$path" | $GREP " "`
52381      if test "x$has_space" != x; then
52382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52383$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52385      fi
52386
52387      # Use eval to expand a potential ~
52388      eval path="$path"
52389      if test ! -f "$path" && test ! -d "$path"; then
52390        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52391      fi
52392
52393      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52394    fi
52395  fi
52396
52397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52398$as_echo_n "checking for $DLL_NAME... " >&6; }
52399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52400$as_echo "$MSVC_DLL" >&6; }
52401    else
52402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52403$as_echo "incorrect, ignoring" >&6; }
52404      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52405$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52406    fi
52407  fi
52408
52409    fi
52410  fi
52411
52412  if test "x$MSVC_DLL" = x; then
52413    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52414    # (This was the original behaviour; kept since it might turn something up)
52415    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52416      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52417        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52418	    | $GREP x64 | $HEAD --lines 1`
52419      else
52420        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52421	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52422        if test "x$POSSIBLE_MSVC_DLL" = x; then
52423          # We're grasping at straws now...
52424          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52425	      | $HEAD --lines 1`
52426        fi
52427      fi
52428
52429
52430  DLL_NAME="$DLL_NAME"
52431  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52432  METHOD="search of VCINSTALLDIR"
52433  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52434    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52435$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52436
52437    # Need to check if the found msvcr is correct architecture
52438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52439$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52440    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52441    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52442      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52443      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52444      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52445        CORRECT_MSVCR_ARCH="PE32 executable"
52446      else
52447        CORRECT_MSVCR_ARCH="PE32+ executable"
52448      fi
52449    else
52450      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52451        CORRECT_MSVCR_ARCH=386
52452      else
52453        CORRECT_MSVCR_ARCH=x86-64
52454      fi
52455    fi
52456    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52458$as_echo "ok" >&6; }
52459      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52460
52461  # Only process if variable expands to non-empty
52462
52463  if test "x$MSVC_DLL" != x; then
52464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52465
52466  # Input might be given as Windows format, start by converting to
52467  # unix format.
52468  path="$MSVC_DLL"
52469  new_path=`$CYGPATH -u "$path"`
52470
52471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52474  # "foo.exe" is OK but "foo" is an error.
52475  #
52476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52477  # It is also a way to make sure we got the proper file name for the real test later on.
52478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52479  if test "x$test_shortpath" = x; then
52480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52481$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52482    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52483  fi
52484
52485  # Call helper function which possibly converts this using DOS-style short mode.
52486  # If so, the updated path is stored in $new_path.
52487
52488  input_path="$new_path"
52489  # Check if we need to convert this using DOS-style short mode. If the path
52490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52491  # take no chances and rewrite it.
52492  # Note: m4 eats our [], so we need to use [ and ] instead.
52493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52494  if test "x$has_forbidden_chars" != x; then
52495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52499      # Going to short mode and back again did indeed matter. Since short mode is
52500      # case insensitive, let's make it lowercase to improve readability.
52501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52502      # Now convert it back to Unix-style (cygpath)
52503      input_path=`$CYGPATH -u "$shortmode_path"`
52504      new_path="$input_path"
52505    fi
52506  fi
52507
52508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52509  if test "x$test_cygdrive_prefix" = x; then
52510    # As a simple fix, exclude /usr/bin since it's not a real path.
52511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52513      # a path prefixed by /cygdrive for fixpath to work.
52514      new_path="$CYGWIN_ROOT_PATH$input_path"
52515    fi
52516  fi
52517
52518
52519  if test "x$path" != "x$new_path"; then
52520    MSVC_DLL="$new_path"
52521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52522$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52523  fi
52524
52525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52526
52527  path="$MSVC_DLL"
52528  has_colon=`$ECHO $path | $GREP ^.:`
52529  new_path="$path"
52530  if test "x$has_colon" = x; then
52531    # Not in mixed or Windows style, start by that.
52532    new_path=`cmd //c echo $path`
52533  fi
52534
52535
52536  input_path="$new_path"
52537  # Check if we need to convert this using DOS-style short mode. If the path
52538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52539  # take no chances and rewrite it.
52540  # Note: m4 eats our [], so we need to use [ and ] instead.
52541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52542  if test "x$has_forbidden_chars" != x; then
52543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52545  fi
52546
52547
52548  windows_path="$new_path"
52549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52550    unix_path=`$CYGPATH -u "$windows_path"`
52551    new_path="$unix_path"
52552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52554    new_path="$unix_path"
52555  fi
52556
52557  if test "x$path" != "x$new_path"; then
52558    MSVC_DLL="$new_path"
52559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52560$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52561  fi
52562
52563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52565
52566    else
52567      # We're on a unix platform. Hooray! :)
52568      path="$MSVC_DLL"
52569      has_space=`$ECHO "$path" | $GREP " "`
52570      if test "x$has_space" != x; then
52571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52572$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52573        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52574      fi
52575
52576      # Use eval to expand a potential ~
52577      eval path="$path"
52578      if test ! -f "$path" && test ! -d "$path"; then
52579        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52580      fi
52581
52582      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52583    fi
52584  fi
52585
52586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52587$as_echo_n "checking for $DLL_NAME... " >&6; }
52588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52589$as_echo "$MSVC_DLL" >&6; }
52590    else
52591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52592$as_echo "incorrect, ignoring" >&6; }
52593      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52594$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52595    fi
52596  fi
52597
52598    fi
52599  fi
52600
52601  if test "x$MSVC_DLL" = x; then
52602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52603$as_echo_n "checking for $DLL_NAME... " >&6; }
52604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52605$as_echo "no" >&6; }
52606    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52607  fi
52608
52609      MSVCP_DLL="$MSVC_DLL"
52610    fi
52611
52612  fi
52613
52614
52615
52616# Check whether --with-dxsdk was given.
52617if test "${with_dxsdk+set}" = set; then :
52618  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52619$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52620fi
52621
52622
52623
52624
52625# Check whether --with-dxsdk-lib was given.
52626if test "${with_dxsdk_lib+set}" = set; then :
52627  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52628$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52629fi
52630
52631
52632
52633
52634# Check whether --with-dxsdk-include was given.
52635if test "${with_dxsdk_include+set}" = set; then :
52636  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52637$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52638fi
52639
52640
52641  fi
52642
52643
52644###############################################################################
52645#
52646# We need to do some final tweaking, when everything else is done.
52647#
52648###############################################################################
52649
52650
52651  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52652
52653
52654  # The name of the Service Agent jar.
52655  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52656  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52657    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52658  fi
52659
52660
52661
52662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52663$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52664
52665  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52666    ENABLE_INTREE_EC=yes
52667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52668$as_echo "yes" >&6; }
52669  else
52670    ENABLE_INTREE_EC=no
52671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52672$as_echo "no" >&6; }
52673  fi
52674
52675
52676
52677
52678###############################################################################
52679#
52680# Configure parts of the build that only affect the build performance,
52681# not the result.
52682#
52683###############################################################################
52684
52685
52686  # How many cores do we have on this build system?
52687
52688# Check whether --with-num-cores was given.
52689if test "${with_num_cores+set}" = set; then :
52690  withval=$with_num_cores;
52691fi
52692
52693  if test "x$with_num_cores" = x; then
52694    # The number of cores were not specified, try to probe them.
52695
52696  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52697$as_echo_n "checking for number of cores... " >&6; }
52698  NUM_CORES=1
52699  FOUND_CORES=no
52700
52701  if test -f /proc/cpuinfo; then
52702    # Looks like a Linux (or cygwin) system
52703    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52704    FOUND_CORES=yes
52705  elif test -x /usr/sbin/psrinfo; then
52706    # Looks like a Solaris system
52707    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52708    FOUND_CORES=yes
52709  elif test -x /usr/sbin/system_profiler; then
52710    # Looks like a MacOSX system
52711    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52712    FOUND_CORES=yes
52713  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52714    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52715    FOUND_CORES=yes
52716  elif test -n "$NUMBER_OF_PROCESSORS"; then
52717    # On windows, look in the env
52718    NUM_CORES=$NUMBER_OF_PROCESSORS
52719    FOUND_CORES=yes
52720  fi
52721
52722  if test "x$FOUND_CORES" = xyes; then
52723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52724$as_echo "$NUM_CORES" >&6; }
52725  else
52726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52727$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52728    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52729$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52730  fi
52731
52732  else
52733    NUM_CORES=$with_num_cores
52734  fi
52735
52736
52737
52738  # How much memory do we have on this build system?
52739
52740# Check whether --with-memory-size was given.
52741if test "${with_memory_size+set}" = set; then :
52742  withval=$with_memory_size;
52743fi
52744
52745  if test "x$with_memory_size" = x; then
52746    # The memory size was not specified, try to probe it.
52747
52748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52749$as_echo_n "checking for memory size... " >&6; }
52750  # Default to 1024 MB
52751  MEMORY_SIZE=1024
52752  FOUND_MEM=no
52753
52754  if test -f /proc/meminfo; then
52755    # Looks like a Linux (or cygwin) system
52756    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52757    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52758    FOUND_MEM=yes
52759  elif test -x /usr/sbin/prtconf; then
52760    # Looks like a Solaris or AIX system
52761    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52762    FOUND_MEM=yes
52763  elif test -x /usr/sbin/system_profiler; then
52764    # Looks like a MacOSX system
52765    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52766    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52767    FOUND_MEM=yes
52768  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52769    # Windows, but without cygwin
52770    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52771    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52772    FOUND_MEM=yes
52773  fi
52774
52775  if test "x$FOUND_MEM" = xyes; then
52776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52777$as_echo "$MEMORY_SIZE MB" >&6; }
52778  else
52779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52780$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52781    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52782$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52783  fi
52784
52785  else
52786    MEMORY_SIZE=$with_memory_size
52787  fi
52788
52789
52790
52791  # Provide a decent default number of parallel jobs for make depending on
52792  # number of cores, amount of memory and machine architecture.
52793
52794# Check whether --with-jobs was given.
52795if test "${with_jobs+set}" = set; then :
52796  withval=$with_jobs;
52797fi
52798
52799  if test "x$with_jobs" = x; then
52800    # Number of jobs was not specified, calculate.
52801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52802$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52803    # Approximate memory in GB.
52804    memory_gb=`expr $MEMORY_SIZE / 1024`
52805    # Pick the lowest of memory in gb and number of cores.
52806    if test "$memory_gb" -lt "$NUM_CORES"; then
52807      JOBS="$memory_gb"
52808    else
52809      JOBS="$NUM_CORES"
52810      # On bigger machines, leave some room for other processes to run
52811      if test "$JOBS" -gt "4"; then
52812        JOBS=`expr $JOBS '*' 90 / 100`
52813      fi
52814    fi
52815    # Cap number of jobs to 16
52816    if test "$JOBS" -gt "16"; then
52817      JOBS=16
52818    fi
52819    if test "$JOBS" -eq "0"; then
52820      JOBS=1
52821    fi
52822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52823$as_echo "$JOBS" >&6; }
52824  else
52825    JOBS=$with_jobs
52826  fi
52827
52828
52829
52830# Setup arguments for the boot jdk (after cores and memory have been setup)
52831
52832  ##############################################################################
52833  #
52834  # Specify jvm options for anything that is run with the Boot JDK.
52835  # Not all JVM:s accept the same arguments on the command line.
52836  #
52837
52838# Check whether --with-boot-jdk-jvmargs was given.
52839if test "${with_boot_jdk_jvmargs+set}" = set; then :
52840  withval=$with_boot_jdk_jvmargs;
52841fi
52842
52843
52844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52845$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52846
52847  # Disable special log output when a debug build is used as Boot JDK...
52848
52849  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52850  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52851  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52852  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52853  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52854  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52855    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52856    JVM_ARG_OK=true
52857  else
52858    $ECHO "Arg failed:" >&5
52859    $ECHO "$OUTPUT" >&5
52860    JVM_ARG_OK=false
52861  fi
52862
52863
52864  # Apply user provided options.
52865
52866  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52867  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52868  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52869  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52870  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52871  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52872    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52873    JVM_ARG_OK=true
52874  else
52875    $ECHO "Arg failed:" >&5
52876    $ECHO "$OUTPUT" >&5
52877    JVM_ARG_OK=false
52878  fi
52879
52880
52881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52882$as_echo "$boot_jdk_jvmargs" >&6; }
52883
52884  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52885  JAVA_FLAGS=$boot_jdk_jvmargs
52886
52887
52888
52889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52890$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52891
52892  # Starting amount of heap memory.
52893
52894  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52895  $ECHO "Command: $JAVA -Xms64M -version" >&5
52896  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52897  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52898  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52899  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52900    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52901    JVM_ARG_OK=true
52902  else
52903    $ECHO "Arg failed:" >&5
52904    $ECHO "$OUTPUT" >&5
52905    JVM_ARG_OK=false
52906  fi
52907
52908
52909  # Maximum amount of heap memory.
52910  # Maximum stack size.
52911  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52912  if test "x$BUILD_NUM_BITS" = x32; then
52913    if test "$JVM_MAX_HEAP" -gt "1100"; then
52914      JVM_MAX_HEAP=1100
52915    elif test "$JVM_MAX_HEAP" -lt "512"; then
52916      JVM_MAX_HEAP=512
52917    fi
52918    STACK_SIZE=768
52919  else
52920    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52921    # pointers are used. Apparently, we need to increase the heap and stack
52922    # space for the jvm. More specifically, when running javac to build huge
52923    # jdk batch
52924    if test "$JVM_MAX_HEAP" -gt "1600"; then
52925      JVM_MAX_HEAP=1600
52926    elif test "$JVM_MAX_HEAP" -lt "512"; then
52927      JVM_MAX_HEAP=512
52928    fi
52929    STACK_SIZE=1536
52930  fi
52931
52932  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52933  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52934  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52935  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52936  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52937  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52938    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52939    JVM_ARG_OK=true
52940  else
52941    $ECHO "Arg failed:" >&5
52942    $ECHO "$OUTPUT" >&5
52943    JVM_ARG_OK=false
52944  fi
52945
52946
52947  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52948  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52949  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52950  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52951  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52952  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52953    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52954    JVM_ARG_OK=true
52955  else
52956    $ECHO "Arg failed:" >&5
52957    $ECHO "$OUTPUT" >&5
52958    JVM_ARG_OK=false
52959  fi
52960
52961
52962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52963$as_echo "$boot_jdk_jvmargs_big" >&6; }
52964
52965  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52966
52967
52968
52969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52970$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52971
52972  # Use serial gc for small short lived tools if possible
52973
52974  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52975  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52976  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52977  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52978  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52979  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52980    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52981    JVM_ARG_OK=true
52982  else
52983    $ECHO "Arg failed:" >&5
52984    $ECHO "$OUTPUT" >&5
52985    JVM_ARG_OK=false
52986  fi
52987
52988
52989  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52990  $ECHO "Command: $JAVA -Xms32M -version" >&5
52991  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52992  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52993  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52994  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52995    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52996    JVM_ARG_OK=true
52997  else
52998    $ECHO "Arg failed:" >&5
52999    $ECHO "$OUTPUT" >&5
53000    JVM_ARG_OK=false
53001  fi
53002
53003
53004  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53005  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53006  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53007  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53008  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53009  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53010    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53011    JVM_ARG_OK=true
53012  else
53013    $ECHO "Arg failed:" >&5
53014    $ECHO "$OUTPUT" >&5
53015    JVM_ARG_OK=false
53016  fi
53017
53018
53019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53020$as_echo "$boot_jdk_jvmargs_small" >&6; }
53021
53022  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53023
53024
53025  JAVA_TOOL_FLAGS_SMALL=""
53026  for f in $JAVA_FLAGS_SMALL; do
53027    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53028  done
53029
53030
53031
53032# Setup smart javac (after cores and memory have been setup)
53033
53034
53035# Check whether --with-sjavac-server-java was given.
53036if test "${with_sjavac_server_java+set}" = set; then :
53037  withval=$with_sjavac_server_java;
53038fi
53039
53040
53041  if test "x$with_sjavac_server_java" != x; then
53042    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53043    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53044    if test "x$FOUND_VERSION" = x; then
53045      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53046    fi
53047  else
53048    SJAVAC_SERVER_JAVA="$JAVA"
53049  fi
53050
53051
53052  if test "$MEMORY_SIZE" -gt "3000"; then
53053
53054  $ECHO "Check if jvm arg is ok: -d64" >&5
53055  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53056  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53057  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53058  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53059  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53060    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53061    JVM_ARG_OK=true
53062  else
53063    $ECHO "Arg failed:" >&5
53064    $ECHO "$OUTPUT" >&5
53065    JVM_ARG_OK=false
53066  fi
53067
53068    if test "$JVM_ARG_OK" = true; then
53069      JVM_64BIT=true
53070      JVM_ARG_OK=false
53071    fi
53072  fi
53073
53074  MX_VALUE=`expr $MEMORY_SIZE / 2`
53075  if test "$JVM_64BIT" = true; then
53076    # Set ms lower than mx since more than one instance of the server might
53077    # get launched at the same time before they figure out which instance won.
53078    MS_VALUE=512
53079    if test "$MX_VALUE" -gt "2048"; then
53080      MX_VALUE=2048
53081    fi
53082  else
53083    MS_VALUE=256
53084    if test "$MX_VALUE" -gt "1500"; then
53085      MX_VALUE=1500
53086    fi
53087  fi
53088  if test "$MX_VALUE" -lt "512"; then
53089    MX_VALUE=512
53090  fi
53091
53092  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53093  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53094  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53095  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53096  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53097  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53098    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53099    JVM_ARG_OK=true
53100  else
53101    $ECHO "Arg failed:" >&5
53102    $ECHO "$OUTPUT" >&5
53103    JVM_ARG_OK=false
53104  fi
53105
53106
53107
53108  # Check whether --enable-sjavac was given.
53109if test "${enable_sjavac+set}" = set; then :
53110  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53111else
53112  ENABLE_SJAVAC='no'
53113fi
53114
53115  if test "x$JVM_ARG_OK" = "xfalse"; then
53116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53117$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53118    ENABLE_SJAVAC=no;
53119  fi
53120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53121$as_echo_n "checking whether to use sjavac... " >&6; }
53122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53123$as_echo "$ENABLE_SJAVAC" >&6; }
53124
53125
53126
53127# Can the C/C++ compiler use precompiled headers?
53128
53129
53130  ###############################################################################
53131  #
53132  # Can the C/C++ compiler use precompiled headers?
53133  #
53134  # Check whether --enable-precompiled-headers was given.
53135if test "${enable_precompiled_headers+set}" = set; then :
53136  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53137else
53138  ENABLE_PRECOMPH=yes
53139fi
53140
53141
53142  USE_PRECOMPILED_HEADER=1
53143  if test "x$ENABLE_PRECOMPH" = xno; then
53144    USE_PRECOMPILED_HEADER=0
53145  fi
53146
53147  if test "x$ENABLE_PRECOMPH" = xyes; then
53148    # Check that the compiler actually supports precomp headers.
53149    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53150      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53151$as_echo_n "checking that precompiled headers work... " >&6; }
53152      echo "int alfa();" > conftest.h
53153      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53154      if test ! -f conftest.hpp.gch; then
53155        USE_PRECOMPILED_HEADER=0
53156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53157$as_echo "no" >&6; }
53158      else
53159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53160$as_echo "yes" >&6; }
53161      fi
53162      rm -f conftest.h conftest.hpp.gch
53163    fi
53164  fi
53165
53166
53167
53168
53169# Setup use of ccache, if available
53170
53171  # Check whether --enable-ccache was given.
53172if test "${enable_ccache+set}" = set; then :
53173  enableval=$enable_ccache;
53174fi
53175
53176
53177  CCACHE=
53178  CCACHE_STATUS=
53179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53180$as_echo_n "checking is ccache enabled... " >&6; }
53181  if test "x$enable_ccache" = xyes; then
53182    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53184$as_echo "yes" >&6; }
53185      OLD_PATH="$PATH"
53186      if test "x$TOOLCHAIN_PATH" != x; then
53187        PATH=$TOOLCHAIN_PATH:$PATH
53188      fi
53189
53190
53191
53192  # Publish this variable in the help.
53193
53194
53195  if test "x$CCACHE" = x; then
53196    # The variable is not set by user, try to locate tool using the code snippet
53197    for ac_prog in ccache
53198do
53199  # Extract the first word of "$ac_prog", so it can be a program name with args.
53200set dummy $ac_prog; ac_word=$2
53201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53202$as_echo_n "checking for $ac_word... " >&6; }
53203if ${ac_cv_path_CCACHE+:} false; then :
53204  $as_echo_n "(cached) " >&6
53205else
53206  case $CCACHE in
53207  [\\/]* | ?:[\\/]*)
53208  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53209  ;;
53210  *)
53211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53212for as_dir in $PATH
53213do
53214  IFS=$as_save_IFS
53215  test -z "$as_dir" && as_dir=.
53216    for ac_exec_ext in '' $ac_executable_extensions; do
53217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53218    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53220    break 2
53221  fi
53222done
53223  done
53224IFS=$as_save_IFS
53225
53226  ;;
53227esac
53228fi
53229CCACHE=$ac_cv_path_CCACHE
53230if test -n "$CCACHE"; then
53231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53232$as_echo "$CCACHE" >&6; }
53233else
53234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53235$as_echo "no" >&6; }
53236fi
53237
53238
53239  test -n "$CCACHE" && break
53240done
53241
53242  else
53243    # The variable is set, but is it from the command line or the environment?
53244
53245    # Try to remove the string !CCACHE! from our list.
53246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53248      # If it failed, the variable was not from the command line. Ignore it,
53249      # but warn the user (except for BASH, which is always set by the calling BASH).
53250      if test "xCCACHE" != xBASH; then
53251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53252$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53253      fi
53254      # Try to locate tool using the code snippet
53255      for ac_prog in ccache
53256do
53257  # Extract the first word of "$ac_prog", so it can be a program name with args.
53258set dummy $ac_prog; ac_word=$2
53259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53260$as_echo_n "checking for $ac_word... " >&6; }
53261if ${ac_cv_path_CCACHE+:} false; then :
53262  $as_echo_n "(cached) " >&6
53263else
53264  case $CCACHE in
53265  [\\/]* | ?:[\\/]*)
53266  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53267  ;;
53268  *)
53269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53270for as_dir in $PATH
53271do
53272  IFS=$as_save_IFS
53273  test -z "$as_dir" && as_dir=.
53274    for ac_exec_ext in '' $ac_executable_extensions; do
53275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53276    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53278    break 2
53279  fi
53280done
53281  done
53282IFS=$as_save_IFS
53283
53284  ;;
53285esac
53286fi
53287CCACHE=$ac_cv_path_CCACHE
53288if test -n "$CCACHE"; then
53289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53290$as_echo "$CCACHE" >&6; }
53291else
53292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53293$as_echo "no" >&6; }
53294fi
53295
53296
53297  test -n "$CCACHE" && break
53298done
53299
53300    else
53301      # If it succeeded, then it was overridden by the user. We will use it
53302      # for the tool.
53303
53304      # First remove it from the list of overridden variables, so we can test
53305      # for unknown variables in the end.
53306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53307
53308      # Check if the provided tool contains a complete path.
53309      tool_specified="$CCACHE"
53310      tool_basename="${tool_specified##*/}"
53311      if test "x$tool_basename" = "x$tool_specified"; then
53312        # A command without a complete path is provided, search $PATH.
53313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53314$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53315        # Extract the first word of "$tool_basename", so it can be a program name with args.
53316set dummy $tool_basename; ac_word=$2
53317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53318$as_echo_n "checking for $ac_word... " >&6; }
53319if ${ac_cv_path_CCACHE+:} false; then :
53320  $as_echo_n "(cached) " >&6
53321else
53322  case $CCACHE in
53323  [\\/]* | ?:[\\/]*)
53324  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53325  ;;
53326  *)
53327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53328for as_dir in $PATH
53329do
53330  IFS=$as_save_IFS
53331  test -z "$as_dir" && as_dir=.
53332    for ac_exec_ext in '' $ac_executable_extensions; do
53333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53334    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53336    break 2
53337  fi
53338done
53339  done
53340IFS=$as_save_IFS
53341
53342  ;;
53343esac
53344fi
53345CCACHE=$ac_cv_path_CCACHE
53346if test -n "$CCACHE"; then
53347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53348$as_echo "$CCACHE" >&6; }
53349else
53350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53351$as_echo "no" >&6; }
53352fi
53353
53354
53355        if test "x$CCACHE" = x; then
53356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53357        fi
53358      else
53359        # Otherwise we believe it is a complete path. Use it as it is.
53360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53361$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53363$as_echo_n "checking for CCACHE... " >&6; }
53364        if test ! -x "$tool_specified"; then
53365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53366$as_echo "not found" >&6; }
53367          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53368        fi
53369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53370$as_echo "$tool_specified" >&6; }
53371      fi
53372    fi
53373  fi
53374
53375
53376
53377  if test "x$CCACHE" = x; then
53378    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53379  fi
53380
53381
53382      PATH="$OLD_PATH"
53383      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53384      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53385    else
53386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53387$as_echo "no" >&6; }
53388      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53389$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53390    fi
53391  elif test "x$enable_ccache" = xno; then
53392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53393$as_echo "no, explicitly disabled" >&6; }
53394    CCACHE_STATUS="Disabled"
53395  elif test "x$enable_ccache" = x; then
53396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53397$as_echo "no" >&6; }
53398  else
53399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53400$as_echo "unknown" >&6; }
53401    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53402  fi
53403
53404
53405
53406# Check whether --with-ccache-dir was given.
53407if test "${with_ccache_dir+set}" = set; then :
53408  withval=$with_ccache_dir;
53409fi
53410
53411
53412  if test "x$with_ccache_dir" != x; then
53413    # When using a non home ccache directory, assume the use is to share ccache files
53414    # with other users. Thus change the umask.
53415    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53416    if test "x$CCACHE" = x; then
53417      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53418$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53419    fi
53420  fi
53421
53422  if test "x$CCACHE" != x; then
53423
53424  if test "x$CCACHE" != x; then
53425    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53426      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53427          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53428      if test "x$HAS_BAD_CCACHE" != "x"; then
53429        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53430      fi
53431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53432$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53433      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53434      PUSHED_FLAGS="$CXXFLAGS"
53435      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53436      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53437/* end confdefs.h.  */
53438
53439int
53440main ()
53441{
53442
53443  ;
53444  return 0;
53445}
53446_ACEOF
53447if ac_fn_cxx_try_compile "$LINENO"; then :
53448  CC_KNOWS_CCACHE_TRICK=yes
53449else
53450  CC_KNOWS_CCACHE_TRICK=no
53451fi
53452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53453      CXXFLAGS="$PUSHED_FLAGS"
53454      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53456$as_echo "yes" >&6; }
53457        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53458
53459        CCACHE_SLOPPINESS=pch_defines,time_macros
53460      else
53461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53462$as_echo "no" >&6; }
53463        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53464      fi
53465    fi
53466
53467    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53468        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53469
53470    if test "x$SET_CCACHE_DIR" != x; then
53471      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53472      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53473    fi
53474  fi
53475
53476  fi
53477
53478
53479###############################################################################
53480#
53481# And now the finish...
53482#
53483###############################################################################
53484
53485# Check for some common pitfalls
53486
53487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53488    file_to_test="$SRC_ROOT/LICENSE"
53489    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53490      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
53491    fi
53492  fi
53493
53494
53495  # Did user specify any unknown variables?
53496
53497  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53498    # Replace the separating ! with spaces before presenting for end user.
53499    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53500    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53501$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53502  fi
53503
53504
53505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53506$as_echo_n "checking if build directory is on local disk... " >&6; }
53507
53508  # df -l lists only local disks; if the given directory is not found then
53509  # a non-zero exit code is given
53510  if test "x$DF" = x; then
53511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53512      # msys does not have df; use Windows "net use" instead.
53513      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53514      if test "x$IS_NETWORK_DISK" = x; then
53515        OUTPUT_DIR_IS_LOCAL="yes"
53516      else
53517        OUTPUT_DIR_IS_LOCAL="no"
53518      fi
53519    else
53520      # No df here, say it's local
53521      OUTPUT_DIR_IS_LOCAL="yes"
53522    fi
53523  else
53524    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53525      OUTPUT_DIR_IS_LOCAL="yes"
53526    else
53527      OUTPUT_DIR_IS_LOCAL="no"
53528    fi
53529  fi
53530
53531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53532$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53533
53534
53535
53536  # Check if the user has any old-style ALT_ variables set.
53537  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53538
53539  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53540  # Since we can't properly handle the dependencies for this, warn the user about the situation
53541  if test -e $OUTPUT_ROOT/spec.gmk; then
53542    IS_RECONFIGURE=yes
53543  else
53544    IS_RECONFIGURE=no
53545  fi
53546
53547
53548# At the end, call the custom hook. (Dummy macro if no custom sources available)
53549
53550
53551# We're messing a bit with internal autoconf variables to put the config.status
53552# in the output directory instead of the current directory.
53553CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53554
53555# Create the actual output files. Now the main work of configure is done.
53556cat >confcache <<\_ACEOF
53557# This file is a shell script that caches the results of configure
53558# tests run on this system so they can be shared between configure
53559# scripts and configure runs, see configure's option --config-cache.
53560# It is not useful on other systems.  If it contains results you don't
53561# want to keep, you may remove or edit it.
53562#
53563# config.status only pays attention to the cache file if you give it
53564# the --recheck option to rerun configure.
53565#
53566# `ac_cv_env_foo' variables (set or unset) will be overridden when
53567# loading this file, other *unset* `ac_cv_foo' will be assigned the
53568# following values.
53569
53570_ACEOF
53571
53572# The following way of writing the cache mishandles newlines in values,
53573# but we know of no workaround that is simple, portable, and efficient.
53574# So, we kill variables containing newlines.
53575# Ultrix sh set writes to stderr and can't be redirected directly,
53576# and sets the high bit in the cache file unless we assign to the vars.
53577(
53578  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53579    eval ac_val=\$$ac_var
53580    case $ac_val in #(
53581    *${as_nl}*)
53582      case $ac_var in #(
53583      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53584$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53585      esac
53586      case $ac_var in #(
53587      _ | IFS | as_nl) ;; #(
53588      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53589      *) { eval $ac_var=; unset $ac_var;} ;;
53590      esac ;;
53591    esac
53592  done
53593
53594  (set) 2>&1 |
53595    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53596    *${as_nl}ac_space=\ *)
53597      # `set' does not quote correctly, so add quotes: double-quote
53598      # substitution turns \\\\ into \\, and sed turns \\ into \.
53599      sed -n \
53600	"s/'/'\\\\''/g;
53601	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53602      ;; #(
53603    *)
53604      # `set' quotes correctly as required by POSIX, so do not add quotes.
53605      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53606      ;;
53607    esac |
53608    sort
53609) |
53610  sed '
53611     /^ac_cv_env_/b end
53612     t clear
53613     :clear
53614     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53615     t end
53616     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53617     :end' >>confcache
53618if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53619  if test -w "$cache_file"; then
53620    if test "x$cache_file" != "x/dev/null"; then
53621      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53622$as_echo "$as_me: updating cache $cache_file" >&6;}
53623      if test ! -f "$cache_file" || test -h "$cache_file"; then
53624	cat confcache >"$cache_file"
53625      else
53626        case $cache_file in #(
53627        */* | ?:*)
53628	  mv -f confcache "$cache_file"$$ &&
53629	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53630        *)
53631	  mv -f confcache "$cache_file" ;;
53632	esac
53633      fi
53634    fi
53635  else
53636    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53637$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53638  fi
53639fi
53640rm -f confcache
53641
53642test "x$prefix" = xNONE && prefix=$ac_default_prefix
53643# Let make expand exec_prefix.
53644test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53645
53646# Transform confdefs.h into DEFS.
53647# Protect against shell expansion while executing Makefile rules.
53648# Protect against Makefile macro expansion.
53649#
53650# If the first sed substitution is executed (which looks for macros that
53651# take arguments), then branch to the quote section.  Otherwise,
53652# look for a macro that doesn't take arguments.
53653ac_script='
53654:mline
53655/\\$/{
53656 N
53657 s,\\\n,,
53658 b mline
53659}
53660t clear
53661:clear
53662s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53663t quote
53664s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53665t quote
53666b any
53667:quote
53668s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53669s/\[/\\&/g
53670s/\]/\\&/g
53671s/\$/$$/g
53672H
53673:any
53674${
53675	g
53676	s/^\n//
53677	s/\n/ /g
53678	p
53679}
53680'
53681DEFS=`sed -n "$ac_script" confdefs.h`
53682
53683
53684ac_libobjs=
53685ac_ltlibobjs=
53686U=
53687for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53688  # 1. Remove the extension, and $U if already installed.
53689  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53690  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53691  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53692  #    will be set to the directory where LIBOBJS objects are built.
53693  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53694  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53695done
53696LIBOBJS=$ac_libobjs
53697
53698LTLIBOBJS=$ac_ltlibobjs
53699
53700
53701
53702: "${CONFIG_STATUS=./config.status}"
53703ac_write_fail=0
53704ac_clean_files_save=$ac_clean_files
53705ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53706{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53707$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53708as_write_fail=0
53709cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53710#! $SHELL
53711# Generated by $as_me.
53712# Run this file to recreate the current configuration.
53713# Compiler output produced by configure, useful for debugging
53714# configure, is in config.log if it exists.
53715
53716debug=false
53717ac_cs_recheck=false
53718ac_cs_silent=false
53719
53720SHELL=\${CONFIG_SHELL-$SHELL}
53721export SHELL
53722_ASEOF
53723cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53724## -------------------- ##
53725## M4sh Initialization. ##
53726## -------------------- ##
53727
53728# Be more Bourne compatible
53729DUALCASE=1; export DUALCASE # for MKS sh
53730if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53731  emulate sh
53732  NULLCMD=:
53733  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53734  # is contrary to our usage.  Disable this feature.
53735  alias -g '${1+"$@"}'='"$@"'
53736  setopt NO_GLOB_SUBST
53737else
53738  case `(set -o) 2>/dev/null` in #(
53739  *posix*) :
53740    set -o posix ;; #(
53741  *) :
53742     ;;
53743esac
53744fi
53745
53746
53747as_nl='
53748'
53749export as_nl
53750# Printing a long string crashes Solaris 7 /usr/bin/printf.
53751as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53752as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53753as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53754# Prefer a ksh shell builtin over an external printf program on Solaris,
53755# but without wasting forks for bash or zsh.
53756if test -z "$BASH_VERSION$ZSH_VERSION" \
53757    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53758  as_echo='print -r --'
53759  as_echo_n='print -rn --'
53760elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53761  as_echo='printf %s\n'
53762  as_echo_n='printf %s'
53763else
53764  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53765    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53766    as_echo_n='/usr/ucb/echo -n'
53767  else
53768    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53769    as_echo_n_body='eval
53770      arg=$1;
53771      case $arg in #(
53772      *"$as_nl"*)
53773	expr "X$arg" : "X\\(.*\\)$as_nl";
53774	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53775      esac;
53776      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53777    '
53778    export as_echo_n_body
53779    as_echo_n='sh -c $as_echo_n_body as_echo'
53780  fi
53781  export as_echo_body
53782  as_echo='sh -c $as_echo_body as_echo'
53783fi
53784
53785# The user is always right.
53786if test "${PATH_SEPARATOR+set}" != set; then
53787  PATH_SEPARATOR=:
53788  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53789    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53790      PATH_SEPARATOR=';'
53791  }
53792fi
53793
53794
53795# IFS
53796# We need space, tab and new line, in precisely that order.  Quoting is
53797# there to prevent editors from complaining about space-tab.
53798# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53799# splitting by setting IFS to empty value.)
53800IFS=" ""	$as_nl"
53801
53802# Find who we are.  Look in the path if we contain no directory separator.
53803as_myself=
53804case $0 in #((
53805  *[\\/]* ) as_myself=$0 ;;
53806  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53807for as_dir in $PATH
53808do
53809  IFS=$as_save_IFS
53810  test -z "$as_dir" && as_dir=.
53811    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53812  done
53813IFS=$as_save_IFS
53814
53815     ;;
53816esac
53817# We did not find ourselves, most probably we were run as `sh COMMAND'
53818# in which case we are not to be found in the path.
53819if test "x$as_myself" = x; then
53820  as_myself=$0
53821fi
53822if test ! -f "$as_myself"; then
53823  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53824  exit 1
53825fi
53826
53827# Unset variables that we do not need and which cause bugs (e.g. in
53828# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53829# suppresses any "Segmentation fault" message there.  '((' could
53830# trigger a bug in pdksh 5.2.14.
53831for as_var in BASH_ENV ENV MAIL MAILPATH
53832do eval test x\${$as_var+set} = xset \
53833  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53834done
53835PS1='$ '
53836PS2='> '
53837PS4='+ '
53838
53839# NLS nuisances.
53840LC_ALL=C
53841export LC_ALL
53842LANGUAGE=C
53843export LANGUAGE
53844
53845# CDPATH.
53846(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53847
53848
53849# as_fn_error STATUS ERROR [LINENO LOG_FD]
53850# ----------------------------------------
53851# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53852# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53853# script with STATUS, using 1 if that was 0.
53854as_fn_error ()
53855{
53856  as_status=$1; test $as_status -eq 0 && as_status=1
53857  if test "$4"; then
53858    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53859    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53860  fi
53861  $as_echo "$as_me: error: $2" >&2
53862  as_fn_exit $as_status
53863} # as_fn_error
53864
53865
53866# as_fn_set_status STATUS
53867# -----------------------
53868# Set $? to STATUS, without forking.
53869as_fn_set_status ()
53870{
53871  return $1
53872} # as_fn_set_status
53873
53874# as_fn_exit STATUS
53875# -----------------
53876# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53877as_fn_exit ()
53878{
53879  set +e
53880  as_fn_set_status $1
53881  exit $1
53882} # as_fn_exit
53883
53884# as_fn_unset VAR
53885# ---------------
53886# Portably unset VAR.
53887as_fn_unset ()
53888{
53889  { eval $1=; unset $1;}
53890}
53891as_unset=as_fn_unset
53892# as_fn_append VAR VALUE
53893# ----------------------
53894# Append the text in VALUE to the end of the definition contained in VAR. Take
53895# advantage of any shell optimizations that allow amortized linear growth over
53896# repeated appends, instead of the typical quadratic growth present in naive
53897# implementations.
53898if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53899  eval 'as_fn_append ()
53900  {
53901    eval $1+=\$2
53902  }'
53903else
53904  as_fn_append ()
53905  {
53906    eval $1=\$$1\$2
53907  }
53908fi # as_fn_append
53909
53910# as_fn_arith ARG...
53911# ------------------
53912# Perform arithmetic evaluation on the ARGs, and store the result in the
53913# global $as_val. Take advantage of shells that can avoid forks. The arguments
53914# must be portable across $(()) and expr.
53915if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53916  eval 'as_fn_arith ()
53917  {
53918    as_val=$(( $* ))
53919  }'
53920else
53921  as_fn_arith ()
53922  {
53923    as_val=`expr "$@" || test $? -eq 1`
53924  }
53925fi # as_fn_arith
53926
53927
53928if expr a : '\(a\)' >/dev/null 2>&1 &&
53929   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53930  as_expr=expr
53931else
53932  as_expr=false
53933fi
53934
53935if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53936  as_basename=basename
53937else
53938  as_basename=false
53939fi
53940
53941if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53942  as_dirname=dirname
53943else
53944  as_dirname=false
53945fi
53946
53947as_me=`$as_basename -- "$0" ||
53948$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53949	 X"$0" : 'X\(//\)$' \| \
53950	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53951$as_echo X/"$0" |
53952    sed '/^.*\/\([^/][^/]*\)\/*$/{
53953	    s//\1/
53954	    q
53955	  }
53956	  /^X\/\(\/\/\)$/{
53957	    s//\1/
53958	    q
53959	  }
53960	  /^X\/\(\/\).*/{
53961	    s//\1/
53962	    q
53963	  }
53964	  s/.*/./; q'`
53965
53966# Avoid depending upon Character Ranges.
53967as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53968as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53969as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53970as_cr_digits='0123456789'
53971as_cr_alnum=$as_cr_Letters$as_cr_digits
53972
53973ECHO_C= ECHO_N= ECHO_T=
53974case `echo -n x` in #(((((
53975-n*)
53976  case `echo 'xy\c'` in
53977  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53978  xy)  ECHO_C='\c';;
53979  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53980       ECHO_T='	';;
53981  esac;;
53982*)
53983  ECHO_N='-n';;
53984esac
53985
53986rm -f conf$$ conf$$.exe conf$$.file
53987if test -d conf$$.dir; then
53988  rm -f conf$$.dir/conf$$.file
53989else
53990  rm -f conf$$.dir
53991  mkdir conf$$.dir 2>/dev/null
53992fi
53993if (echo >conf$$.file) 2>/dev/null; then
53994  if ln -s conf$$.file conf$$ 2>/dev/null; then
53995    as_ln_s='ln -s'
53996    # ... but there are two gotchas:
53997    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53998    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53999    # In both cases, we have to default to `cp -pR'.
54000    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54001      as_ln_s='cp -pR'
54002  elif ln conf$$.file conf$$ 2>/dev/null; then
54003    as_ln_s=ln
54004  else
54005    as_ln_s='cp -pR'
54006  fi
54007else
54008  as_ln_s='cp -pR'
54009fi
54010rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54011rmdir conf$$.dir 2>/dev/null
54012
54013
54014# as_fn_mkdir_p
54015# -------------
54016# Create "$as_dir" as a directory, including parents if necessary.
54017as_fn_mkdir_p ()
54018{
54019
54020  case $as_dir in #(
54021  -*) as_dir=./$as_dir;;
54022  esac
54023  test -d "$as_dir" || eval $as_mkdir_p || {
54024    as_dirs=
54025    while :; do
54026      case $as_dir in #(
54027      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54028      *) as_qdir=$as_dir;;
54029      esac
54030      as_dirs="'$as_qdir' $as_dirs"
54031      as_dir=`$as_dirname -- "$as_dir" ||
54032$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54033	 X"$as_dir" : 'X\(//\)[^/]' \| \
54034	 X"$as_dir" : 'X\(//\)$' \| \
54035	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54036$as_echo X"$as_dir" |
54037    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54038	    s//\1/
54039	    q
54040	  }
54041	  /^X\(\/\/\)[^/].*/{
54042	    s//\1/
54043	    q
54044	  }
54045	  /^X\(\/\/\)$/{
54046	    s//\1/
54047	    q
54048	  }
54049	  /^X\(\/\).*/{
54050	    s//\1/
54051	    q
54052	  }
54053	  s/.*/./; q'`
54054      test -d "$as_dir" && break
54055    done
54056    test -z "$as_dirs" || eval "mkdir $as_dirs"
54057  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54058
54059
54060} # as_fn_mkdir_p
54061if mkdir -p . 2>/dev/null; then
54062  as_mkdir_p='mkdir -p "$as_dir"'
54063else
54064  test -d ./-p && rmdir ./-p
54065  as_mkdir_p=false
54066fi
54067
54068
54069# as_fn_executable_p FILE
54070# -----------------------
54071# Test if FILE is an executable regular file.
54072as_fn_executable_p ()
54073{
54074  test -f "$1" && test -x "$1"
54075} # as_fn_executable_p
54076as_test_x='test -x'
54077as_executable_p=as_fn_executable_p
54078
54079# Sed expression to map a string onto a valid CPP name.
54080as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54081
54082# Sed expression to map a string onto a valid variable name.
54083as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54084
54085
54086exec 6>&1
54087## ----------------------------------- ##
54088## Main body of $CONFIG_STATUS script. ##
54089## ----------------------------------- ##
54090_ASEOF
54091test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54092
54093cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54094# Save the log message, to keep $0 and so on meaningful, and to
54095# report actual input values of CONFIG_FILES etc. instead of their
54096# values after options handling.
54097ac_log="
54098This file was extended by OpenJDK $as_me jdk9, which was
54099generated by GNU Autoconf 2.69.  Invocation command line was
54100
54101  CONFIG_FILES    = $CONFIG_FILES
54102  CONFIG_HEADERS  = $CONFIG_HEADERS
54103  CONFIG_LINKS    = $CONFIG_LINKS
54104  CONFIG_COMMANDS = $CONFIG_COMMANDS
54105  $ $0 $@
54106
54107on `(hostname || uname -n) 2>/dev/null | sed 1q`
54108"
54109
54110_ACEOF
54111
54112case $ac_config_files in *"
54113"*) set x $ac_config_files; shift; ac_config_files=$*;;
54114esac
54115
54116
54117
54118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54119# Files that config.status was made for.
54120config_files="$ac_config_files"
54121
54122_ACEOF
54123
54124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54125ac_cs_usage="\
54126\`$as_me' instantiates files and other configuration actions
54127from templates according to the current configuration.  Unless the files
54128and actions are specified as TAGs, all are instantiated by default.
54129
54130Usage: $0 [OPTION]... [TAG]...
54131
54132  -h, --help       print this help, then exit
54133  -V, --version    print version number and configuration settings, then exit
54134      --config     print configuration, then exit
54135  -q, --quiet, --silent
54136                   do not print progress messages
54137  -d, --debug      don't remove temporary files
54138      --recheck    update $as_me by reconfiguring in the same conditions
54139      --file=FILE[:TEMPLATE]
54140                   instantiate the configuration file FILE
54141
54142Configuration files:
54143$config_files
54144
54145Report bugs to <build-dev@openjdk.java.net>.
54146OpenJDK home page: <http://openjdk.java.net>."
54147
54148_ACEOF
54149cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54150ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54151ac_cs_version="\\
54152OpenJDK config.status jdk9
54153configured by $0, generated by GNU Autoconf 2.69,
54154  with options \\"\$ac_cs_config\\"
54155
54156Copyright (C) 2012 Free Software Foundation, Inc.
54157This config.status script is free software; the Free Software Foundation
54158gives unlimited permission to copy, distribute and modify it."
54159
54160ac_pwd='$ac_pwd'
54161srcdir='$srcdir'
54162AWK='$AWK'
54163test -n "\$AWK" || AWK=awk
54164_ACEOF
54165
54166cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54167# The default lists apply if the user does not specify any file.
54168ac_need_defaults=:
54169while test $# != 0
54170do
54171  case $1 in
54172  --*=?*)
54173    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54174    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54175    ac_shift=:
54176    ;;
54177  --*=)
54178    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54179    ac_optarg=
54180    ac_shift=:
54181    ;;
54182  *)
54183    ac_option=$1
54184    ac_optarg=$2
54185    ac_shift=shift
54186    ;;
54187  esac
54188
54189  case $ac_option in
54190  # Handling of the options.
54191  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54192    ac_cs_recheck=: ;;
54193  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54194    $as_echo "$ac_cs_version"; exit ;;
54195  --config | --confi | --conf | --con | --co | --c )
54196    $as_echo "$ac_cs_config"; exit ;;
54197  --debug | --debu | --deb | --de | --d | -d )
54198    debug=: ;;
54199  --file | --fil | --fi | --f )
54200    $ac_shift
54201    case $ac_optarg in
54202    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54203    '') as_fn_error $? "missing file argument" ;;
54204    esac
54205    as_fn_append CONFIG_FILES " '$ac_optarg'"
54206    ac_need_defaults=false;;
54207  --he | --h |  --help | --hel | -h )
54208    $as_echo "$ac_cs_usage"; exit ;;
54209  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54210  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54211    ac_cs_silent=: ;;
54212
54213  # This is an error.
54214  -*) as_fn_error $? "unrecognized option: \`$1'
54215Try \`$0 --help' for more information." ;;
54216
54217  *) as_fn_append ac_config_targets " $1"
54218     ac_need_defaults=false ;;
54219
54220  esac
54221  shift
54222done
54223
54224ac_configure_extra_args=
54225
54226if $ac_cs_silent; then
54227  exec 6>/dev/null
54228  ac_configure_extra_args="$ac_configure_extra_args --silent"
54229fi
54230
54231_ACEOF
54232cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54233if \$ac_cs_recheck; then
54234  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54235  shift
54236  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54237  CONFIG_SHELL='$SHELL'
54238  export CONFIG_SHELL
54239  exec "\$@"
54240fi
54241
54242_ACEOF
54243cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54244exec 5>>config.log
54245{
54246  echo
54247  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54248## Running $as_me. ##
54249_ASBOX
54250  $as_echo "$ac_log"
54251} >&5
54252
54253_ACEOF
54254cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54255_ACEOF
54256
54257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54258
54259# Handling of arguments.
54260for ac_config_target in $ac_config_targets
54261do
54262  case $ac_config_target in
54263    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54264    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54265    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54266    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54267    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54268
54269  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54270  esac
54271done
54272
54273
54274# If the user did not use the arguments to specify the items to instantiate,
54275# then the envvar interface is used.  Set only those that are not.
54276# We use the long form for the default assignment because of an extremely
54277# bizarre bug on SunOS 4.1.3.
54278if $ac_need_defaults; then
54279  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54280fi
54281
54282# Have a temporary directory for convenience.  Make it in the build tree
54283# simply because there is no reason against having it here, and in addition,
54284# creating and moving files from /tmp can sometimes cause problems.
54285# Hook for its removal unless debugging.
54286# Note that there is a small window in which the directory will not be cleaned:
54287# after its creation but before its name has been assigned to `$tmp'.
54288$debug ||
54289{
54290  tmp= ac_tmp=
54291  trap 'exit_status=$?
54292  : "${ac_tmp:=$tmp}"
54293  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54294' 0
54295  trap 'as_fn_exit 1' 1 2 13 15
54296}
54297# Create a (secure) tmp directory for tmp files.
54298
54299{
54300  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54301  test -d "$tmp"
54302}  ||
54303{
54304  tmp=./conf$$-$RANDOM
54305  (umask 077 && mkdir "$tmp")
54306} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54307ac_tmp=$tmp
54308
54309# Set up the scripts for CONFIG_FILES section.
54310# No need to generate them if there are no CONFIG_FILES.
54311# This happens for instance with `./config.status config.h'.
54312if test -n "$CONFIG_FILES"; then
54313
54314
54315ac_cr=`echo X | tr X '\015'`
54316# On cygwin, bash can eat \r inside `` if the user requested igncr.
54317# But we know of no other shell where ac_cr would be empty at this
54318# point, so we can use a bashism as a fallback.
54319if test "x$ac_cr" = x; then
54320  eval ac_cr=\$\'\\r\'
54321fi
54322ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54323if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54324  ac_cs_awk_cr='\\r'
54325else
54326  ac_cs_awk_cr=$ac_cr
54327fi
54328
54329echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54330_ACEOF
54331
54332
54333{
54334  echo "cat >conf$$subs.awk <<_ACEOF" &&
54335  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54336  echo "_ACEOF"
54337} >conf$$subs.sh ||
54338  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54339ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54340ac_delim='%!_!# '
54341for ac_last_try in false false false false false :; do
54342  . ./conf$$subs.sh ||
54343    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54344
54345  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54346  if test $ac_delim_n = $ac_delim_num; then
54347    break
54348  elif $ac_last_try; then
54349    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54350  else
54351    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54352  fi
54353done
54354rm -f conf$$subs.sh
54355
54356cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54357cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54358_ACEOF
54359sed -n '
54360h
54361s/^/S["/; s/!.*/"]=/
54362p
54363g
54364s/^[^!]*!//
54365:repl
54366t repl
54367s/'"$ac_delim"'$//
54368t delim
54369:nl
54370h
54371s/\(.\{148\}\)..*/\1/
54372t more1
54373s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54374p
54375n
54376b repl
54377:more1
54378s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54379p
54380g
54381s/.\{148\}//
54382t nl
54383:delim
54384h
54385s/\(.\{148\}\)..*/\1/
54386t more2
54387s/["\\]/\\&/g; s/^/"/; s/$/"/
54388p
54389b
54390:more2
54391s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54392p
54393g
54394s/.\{148\}//
54395t delim
54396' <conf$$subs.awk | sed '
54397/^[^""]/{
54398  N
54399  s/\n//
54400}
54401' >>$CONFIG_STATUS || ac_write_fail=1
54402rm -f conf$$subs.awk
54403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54404_ACAWK
54405cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54406  for (key in S) S_is_set[key] = 1
54407  FS = ""
54408
54409}
54410{
54411  line = $ 0
54412  nfields = split(line, field, "@")
54413  substed = 0
54414  len = length(field[1])
54415  for (i = 2; i < nfields; i++) {
54416    key = field[i]
54417    keylen = length(key)
54418    if (S_is_set[key]) {
54419      value = S[key]
54420      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54421      len += length(value) + length(field[++i])
54422      substed = 1
54423    } else
54424      len += 1 + keylen
54425  }
54426
54427  print line
54428}
54429
54430_ACAWK
54431_ACEOF
54432cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54433if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54434  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54435else
54436  cat
54437fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54438  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54439_ACEOF
54440
54441# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54442# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54443# trailing colons and then remove the whole line if VPATH becomes empty
54444# (actually we leave an empty line to preserve line numbers).
54445if test "x$srcdir" = x.; then
54446  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54447h
54448s///
54449s/^/:/
54450s/[	 ]*$/:/
54451s/:\$(srcdir):/:/g
54452s/:\${srcdir}:/:/g
54453s/:@srcdir@:/:/g
54454s/^:*//
54455s/:*$//
54456x
54457s/\(=[	 ]*\).*/\1/
54458G
54459s/\n//
54460s/^[^=]*=[	 ]*$//
54461}'
54462fi
54463
54464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54465fi # test -n "$CONFIG_FILES"
54466
54467
54468eval set X "  :F $CONFIG_FILES      "
54469shift
54470for ac_tag
54471do
54472  case $ac_tag in
54473  :[FHLC]) ac_mode=$ac_tag; continue;;
54474  esac
54475  case $ac_mode$ac_tag in
54476  :[FHL]*:*);;
54477  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54478  :[FH]-) ac_tag=-:-;;
54479  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54480  esac
54481  ac_save_IFS=$IFS
54482  IFS=:
54483  set x $ac_tag
54484  IFS=$ac_save_IFS
54485  shift
54486  ac_file=$1
54487  shift
54488
54489  case $ac_mode in
54490  :L) ac_source=$1;;
54491  :[FH])
54492    ac_file_inputs=
54493    for ac_f
54494    do
54495      case $ac_f in
54496      -) ac_f="$ac_tmp/stdin";;
54497      *) # Look for the file first in the build tree, then in the source tree
54498	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54499	 # because $ac_f cannot contain `:'.
54500	 test -f "$ac_f" ||
54501	   case $ac_f in
54502	   [\\/$]*) false;;
54503	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54504	   esac ||
54505	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54506      esac
54507      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54508      as_fn_append ac_file_inputs " '$ac_f'"
54509    done
54510
54511    # Let's still pretend it is `configure' which instantiates (i.e., don't
54512    # use $as_me), people would be surprised to read:
54513    #    /* config.h.  Generated by config.status.  */
54514    configure_input='Generated from '`
54515	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54516	`' by configure.'
54517    if test x"$ac_file" != x-; then
54518      configure_input="$ac_file.  $configure_input"
54519      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54520$as_echo "$as_me: creating $ac_file" >&6;}
54521    fi
54522    # Neutralize special characters interpreted by sed in replacement strings.
54523    case $configure_input in #(
54524    *\&* | *\|* | *\\* )
54525       ac_sed_conf_input=`$as_echo "$configure_input" |
54526       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54527    *) ac_sed_conf_input=$configure_input;;
54528    esac
54529
54530    case $ac_tag in
54531    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54532      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54533    esac
54534    ;;
54535  esac
54536
54537  ac_dir=`$as_dirname -- "$ac_file" ||
54538$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54539	 X"$ac_file" : 'X\(//\)[^/]' \| \
54540	 X"$ac_file" : 'X\(//\)$' \| \
54541	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54542$as_echo X"$ac_file" |
54543    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54544	    s//\1/
54545	    q
54546	  }
54547	  /^X\(\/\/\)[^/].*/{
54548	    s//\1/
54549	    q
54550	  }
54551	  /^X\(\/\/\)$/{
54552	    s//\1/
54553	    q
54554	  }
54555	  /^X\(\/\).*/{
54556	    s//\1/
54557	    q
54558	  }
54559	  s/.*/./; q'`
54560  as_dir="$ac_dir"; as_fn_mkdir_p
54561  ac_builddir=.
54562
54563case "$ac_dir" in
54564.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54565*)
54566  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54567  # A ".." for each directory in $ac_dir_suffix.
54568  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54569  case $ac_top_builddir_sub in
54570  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54571  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54572  esac ;;
54573esac
54574ac_abs_top_builddir=$ac_pwd
54575ac_abs_builddir=$ac_pwd$ac_dir_suffix
54576# for backward compatibility:
54577ac_top_builddir=$ac_top_build_prefix
54578
54579case $srcdir in
54580  .)  # We are building in place.
54581    ac_srcdir=.
54582    ac_top_srcdir=$ac_top_builddir_sub
54583    ac_abs_top_srcdir=$ac_pwd ;;
54584  [\\/]* | ?:[\\/]* )  # Absolute name.
54585    ac_srcdir=$srcdir$ac_dir_suffix;
54586    ac_top_srcdir=$srcdir
54587    ac_abs_top_srcdir=$srcdir ;;
54588  *) # Relative name.
54589    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54590    ac_top_srcdir=$ac_top_build_prefix$srcdir
54591    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54592esac
54593ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54594
54595
54596  case $ac_mode in
54597  :F)
54598  #
54599  # CONFIG_FILE
54600  #
54601
54602_ACEOF
54603
54604cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54605# If the template does not know about datarootdir, expand it.
54606# FIXME: This hack should be removed a few years after 2.60.
54607ac_datarootdir_hack=; ac_datarootdir_seen=
54608ac_sed_dataroot='
54609/datarootdir/ {
54610  p
54611  q
54612}
54613/@datadir@/p
54614/@docdir@/p
54615/@infodir@/p
54616/@localedir@/p
54617/@mandir@/p'
54618case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54619*datarootdir*) ac_datarootdir_seen=yes;;
54620*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54621  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54622$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54623_ACEOF
54624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54625  ac_datarootdir_hack='
54626  s&@datadir@&$datadir&g
54627  s&@docdir@&$docdir&g
54628  s&@infodir@&$infodir&g
54629  s&@localedir@&$localedir&g
54630  s&@mandir@&$mandir&g
54631  s&\\\${datarootdir}&$datarootdir&g' ;;
54632esac
54633_ACEOF
54634
54635# Neutralize VPATH when `$srcdir' = `.'.
54636# Shell code in configure.ac might set extrasub.
54637# FIXME: do we really want to maintain this feature?
54638cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54639ac_sed_extra="$ac_vpsub
54640$extrasub
54641_ACEOF
54642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54643:t
54644/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54645s|@configure_input@|$ac_sed_conf_input|;t t
54646s&@top_builddir@&$ac_top_builddir_sub&;t t
54647s&@top_build_prefix@&$ac_top_build_prefix&;t t
54648s&@srcdir@&$ac_srcdir&;t t
54649s&@abs_srcdir@&$ac_abs_srcdir&;t t
54650s&@top_srcdir@&$ac_top_srcdir&;t t
54651s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54652s&@builddir@&$ac_builddir&;t t
54653s&@abs_builddir@&$ac_abs_builddir&;t t
54654s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54655$ac_datarootdir_hack
54656"
54657eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54658  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54659
54660test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54661  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54662  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54663      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54664  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54665which seems to be undefined.  Please make sure it is defined" >&5
54666$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54667which seems to be undefined.  Please make sure it is defined" >&2;}
54668
54669  rm -f "$ac_tmp/stdin"
54670  case $ac_file in
54671  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54672  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54673  esac \
54674  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54675 ;;
54676
54677
54678
54679  esac
54680
54681done # for ac_tag
54682
54683
54684as_fn_exit 0
54685_ACEOF
54686ac_clean_files=$ac_clean_files_save
54687
54688test $ac_write_fail = 0 ||
54689  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54690
54691
54692# configure is writing to config.log, and then calls config.status.
54693# config.status does its own redirection, appending to config.log.
54694# Unfortunately, on DOS this fails, as config.log is still kept open
54695# by configure, so config.status won't be able to write to it; its
54696# output is simply discarded.  So we exec the FD to /dev/null,
54697# effectively closing config.log, so it can be properly (re)opened and
54698# appended to by config.status.  When coming back to configure, we
54699# need to make the FD available again.
54700if test "$no_create" != yes; then
54701  ac_cs_success=:
54702  ac_config_status_args=
54703  test "$silent" = yes &&
54704    ac_config_status_args="$ac_config_status_args --quiet"
54705  exec 5>/dev/null
54706  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54707  exec 5>>config.log
54708  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54709  # would make configure fail if this is the last instruction.
54710  $ac_cs_success || as_fn_exit 1
54711fi
54712if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54713  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54714$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54715fi
54716
54717
54718# After AC_OUTPUT, we need to do final work
54719
54720
54721  # Try to move config.log (generated by autoconf) to the configure-support directory.
54722  if test -e ./config.log; then
54723    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54724  fi
54725
54726  # Rotate our log file (configure.log)
54727  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54728    $RM -f "$OUTPUT_ROOT/configure.log.old"
54729  fi
54730  if test -e "$OUTPUT_ROOT/configure.log"; then
54731    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54732  fi
54733
54734  # Move configure.log from current directory to the build output root
54735  if test -e ./configure.log; then
54736    echo found it
54737    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54738  fi
54739
54740  # Make the compare script executable
54741  $CHMOD +x $OUTPUT_ROOT/compare.sh
54742
54743
54744# Finally output some useful information to the user
54745
54746  # Finally output some useful information to the user
54747
54748  printf "\n"
54749  printf "====================================================\n"
54750  if test "x$no_create" != "xyes"; then
54751    if test "x$IS_RECONFIGURE" != "xyes"; then
54752      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54753    else
54754      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54755    fi
54756  else
54757    if test "x$IS_RECONFIGURE" != "xyes"; then
54758      printf "A configuration has been successfully checked but not created\n"
54759    else
54760      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54761    fi
54762  fi
54763  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54764    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54765  else
54766    printf "using default settings.\n"
54767  fi
54768
54769  printf "\n"
54770  printf "Configuration summary:\n"
54771  printf "* Debug level:    $DEBUG_LEVEL\n"
54772  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54773  printf "* JDK variant:    $JDK_VARIANT\n"
54774  printf "* JVM variants:   $with_jvm_variants\n"
54775  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54776  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
54777
54778  printf "\n"
54779  printf "Tools summary:\n"
54780  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54781    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54782  fi
54783  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54784  if test "x$TOOLCHAIN_VERSION" != "x"; then
54785    print_version=" $TOOLCHAIN_VERSION"
54786  fi
54787  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54788  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54789  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54790
54791  printf "\n"
54792  printf "Build performance summary:\n"
54793  printf "* Cores to use:   $JOBS\n"
54794  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54795  if test "x$CCACHE_STATUS" != "x"; then
54796    printf "* ccache status:  $CCACHE_STATUS\n"
54797  fi
54798  printf "\n"
54799
54800  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54801    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54802    printf "will result in longer build times.\n"
54803    printf "\n"
54804  fi
54805
54806  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54807    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54808    printf "These are not respected, and will be ignored. It is recommended\n"
54809    printf "that you clean your environment. The following variables are set:\n"
54810    printf "$FOUND_ALT_VARIABLES\n"
54811    printf "\n"
54812  fi
54813
54814  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54815    printf "WARNING: Your build output directory is not on a local disk.\n"
54816    printf "This will severely degrade build performance!\n"
54817    printf "It is recommended that you create an output directory on a local disk,\n"
54818    printf "and run the configure script again from that directory.\n"
54819    printf "\n"
54820  fi
54821
54822  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54823    printf "WARNING: The result of this configuration has overridden an older\n"
54824    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54825    printf "proper build. Failure to do so might result in strange build problems.\n"
54826    printf "\n"
54827  fi
54828
54829  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54830    printf "WARNING: The result of this configuration was not saved.\n"
54831    printf "You should run without '--no-create | -n' to create the configuration.\n"
54832    printf "\n"
54833  fi
54834
54835
54836
54837  # Locate config.log.
54838  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54839    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54840  elif test -e "./config.log"; then
54841    CONFIG_LOG_PATH="."
54842  fi
54843
54844  if test -e "$CONFIG_LOG_PATH/config.log"; then
54845    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54846    if test $? -eq 0; then
54847      printf "The following warnings were produced. Repeated here for convenience:\n"
54848      # We must quote sed expression (using []) to stop m4 from eating the [].
54849      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54850      printf "\n"
54851    fi
54852  fi
54853
54854